/* =====================================================
   THEME: "Cold War / Secret Defense" (opt-in)
   Apply with: <body class="theme-coldwar">
   ===================================================== */
.theme-coldwar{
  --bg:#0c0f0e;
  --panel:#f7f3e7;   /* paper */
  --panel-2:#efe9d8; /* paper variant */
  --text:#1b1b1b;    /* ink */
  --muted:#4a5049;   /* muted ink */
  --line:#a5a28f;    /* dashed border */
  --accent:#c53a2e;  /* red stamp */
  --radius:6px;
}

/* Background + typography shift */
.theme-coldwar body{
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 70% 10%, rgba(255,255,255,.05), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #0d0f0e 0%, #0b0e0d 100%);
  background-attachment: fixed;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Cards become paper notes with tape */
.theme-coldwar .card{
  background:var(--panel);
  border:1px dashed var(--line);
  border-radius:6px;
  box-shadow: 0 20px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.08) inset;
  position:relative;
}
.theme-coldwar .card::before,
.theme-coldwar .card::after{
  content:""; position:absolute; width:68px; height:16px; background:#d9d2a5; top:-10px;
  transform:rotate(-2deg); box-shadow:0 2px 6px rgba(0,0,0,.25) inset, 0 2px 6px rgba(0,0,0,.2);
}
.theme-coldwar .card::before{ left:18px; }
.theme-coldwar .card::after{ right:18px; transform:rotate(3deg); }

/* Badges like stamps */
.theme-coldwar .badge{ background:#ede9d7; border:1px dashed #8b8b7a; color:#30332e; border-radius:2px }
.theme-coldwar .badge.open{ color:#3b6b47; border-color:#6a6d5f }
.theme-coldwar .badge.closed{ color:#7a2b2b; border-color:#a56b6b }
.theme-coldwar .badge.apply{ color:#7a6b2b; border-color:#a59a6b }

/* Buttons become tagged labels */
.theme-coldwar .actions{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px }
.theme-coldwar .actions .btn{
  background:#efe9d8; color:#222; border:1px dashed #8b8b7a; border-radius:3px;
  text-transform:uppercase; letter-spacing:.06em; box-shadow:0 4px 14px rgba(0,0,0,.25);
}
.theme-coldwar .actions .btn:hover{ transform:translateY(-1px); box-shadow:0 8px 22px rgba(0,0,0,.28) }
.theme-coldwar .btn.btn-discord{ border-color:#8b8b7a; box-shadow:0 4px 14px rgba(0,0,0,.25) }
.theme-coldwar .btn.primary{ background:#f0d5d2; border-color:#bf6d64; color:#3a1c19; position:relative }
.theme-coldwar .btn.primary::before{ content:"URGENT"; position:absolute; top:-10px; right:8px; font-size:10px; color:#a93326; border:1px solid #a93326; padding:1px 4px; transform:rotate(-8deg); background:rgba(255,255,255,.6) }

/* Banner + utilities */
.theme-coldwar .banner{ border:1px dashed #8b8b7a; border-radius:4px; overflow:hidden }
.theme-coldwar .banner img{ filter:contrast(.8) saturate(.7) }
.theme-coldwar .avatar{ border-radius:2px }

/* Notifications & progress bar */
.theme-coldwar .notif{ background:#ede9d7; border:1px dashed #a5a28f; border-radius:4px; color:#2b2e27 }
.theme-coldwar .progress{ background:#efe9d8; border:1px dashed #a5a28f; border-radius:2px }
.theme-coldwar .progress .fill{ background:linear-gradient(90deg, #a5a28f, #6a6d5f) }

/* Header tweaks (brand) */
.theme-coldwar .site-header{ backdrop-filter:none; background:linear-gradient(180deg, rgba(13,15,14,.95), rgba(11,14,13,.85)); border-bottom:1px dashed var(--line) }
.theme-coldwar .brand-logo{ filter:none }
.theme-coldwar .brand-title{ text-transform:uppercase; letter-spacing:.12em; font-weight:800 }

/* =====================================================
   Cold War theme — base layout, typography & containers
   ===================================================== */

/* Layout sanity */
*, *::before, *::after { box-sizing: border-box; }

/* Page background & typography when theme is active */
body.theme-coldwar{
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 70% 10%, rgba(255,255,255,.05), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #0d0f0e 0%, #0b0e0d 100%);
  background-attachment: fixed;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Container & grid */
.theme-coldwar .wrap{ max-width:1200px; margin:0 auto; padding:16px; position:relative; z-index:2 }
.theme-coldwar .grid{ display:grid; grid-template-columns:repeat(12,1fr); gap:20px }
.theme-coldwar .tile{ grid-column:span 4 }
.theme-coldwar .tile.wide{ grid-column:span 8 }
.theme-coldwar .tile.full{ grid-column:span 12 }
@media (max-width: 900px){
  .theme-coldwar .tile,
  .theme-coldwar .tile.wide{ grid-column:span 12 }
}

/* Headings & text */
.theme-coldwar h1{ font-size:2rem; margin:0 0 6px; color:var(--text) }
.theme-coldwar h2.section{ font-size:12px; color:#2b332d; text-transform:uppercase; letter-spacing:.18em; margin:0 0 12px; opacity:.85 }
.theme-coldwar p{ color:var(--text); line-height:1.5; margin:0 0 8px }
.theme-coldwar .muted{ color:#4a5049 }

/* Links */
.theme-coldwar a{ color:#1b1b1b; text-decoration:underline dotted }
.theme-coldwar a:hover{ text-decoration:underline }

/* Base card (paper note) if not already applied */
.theme-coldwar .card{
  background:var(--panel);
  border:1px dashed var(--line);
  border-radius:6px;
  box-shadow: 0 20px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.08) inset;
  position:relative;
  padding:16px;
}
.theme-coldwar .card::before,
.theme-coldwar .card::after{
  content:""; position:absolute; width:68px; height:16px; background:#d9d2a5; top:-10px;
  transform:rotate(-2deg); box-shadow:0 2px 6px rgba(0,0,0,.25) inset, 0 2px 6px rgba(0,0,0,.2);
}
.theme-coldwar .card::before{ left:18px; }
.theme-coldwar .card::after{ right:18px; transform:rotate(3deg); }

/* Actions & buttons */
.theme-coldwar .actions{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px }
.theme-coldwar .actions .btn{ width:100% }
.theme-coldwar .btn{
  display:inline-flex; align-items:center; justify-content:center;
  min-height:40px; padding:8px 14px; border-radius:3px;
  text-decoration:none; border:1px dashed #8b8b7a;
  background:#efe9d8; color:#222; font-weight:700;
  text-transform:uppercase; letter-spacing:.06em;
  box-shadow:0 4px 14px rgba(0,0,0,.25);
}
.theme-coldwar .btn:hover{ transform:translateY(-1px); box-shadow:0 8px 22px rgba(0,0,0,.28) }
.theme-coldwar .btn.primary{ background:#f0d5d2; border-color:#bf6d64; color:#3a1c19; position:relative }
.theme-coldwar .btn.primary::before{ content:"URGENT"; position:absolute; top:-10px; right:8px; font-size:10px; color:#a93326; border:1px solid #a93326; padding:1px 4px; transform:rotate(-8deg); background:rgba(255,255,255,.6) }

/* Banner & avatars */
.theme-coldwar .banner{ border:1px dashed #8b8b7a; border-radius:4px; overflow:hidden }
.theme-coldwar .banner img{ width:100%; height:100%; object-fit:cover; filter:contrast(.8) saturate(.7) }
.theme-coldwar .avatar{ border-radius:2px; background:#333 no-repeat center/cover; display:block }

/* Notifications & progress bar */
.theme-coldwar .notif{ background:#ede9d7; border:1px dashed #a5a28f; border-radius:4px; color:#2b2e27; padding:10px }
.theme-coldwar .progress{ background:#efe9d8; border:1px dashed #a5a28f; border-radius:2px; height:10px; overflow:hidden }
.theme-coldwar .progress .fill{ height:100%; background:linear-gradient(90deg, #a5a28f, #6a6d5f) }

/* =====================================================
   Cold War theme — forms & inputs
   ===================================================== */
.theme-coldwar input[type="text"],
.theme-coldwar input[type="email"],
.theme-coldwar input[type="password"],
.theme-coldwar input[type="file"],
.theme-coldwar select,
.theme-coldwar textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px dashed var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.theme-coldwar input[type="file"] {
  padding: 6px;
  background: var(--panel);
  cursor: pointer;
}

.theme-coldwar button,
.theme-coldwar input[type="submit"] {
  padding: 10px 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

.theme-coldwar button:hover,
.theme-coldwar input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
}

/* Cold War theme — refine text fields */
.theme-coldwar input[type="text"],
.theme-coldwar input[type="email"],
.theme-coldwar input[type="password"],
.theme-coldwar textarea {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  transition: border-color .2s, background .2s;
}

.theme-coldwar input[type="text"]:focus,
.theme-coldwar input[type="email"]:focus,
.theme-coldwar input[type="password"]:focus,
.theme-coldwar textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fffdf7;
}

.theme-coldwar label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
/* =========================================================
   Thème Coldwar — Modales & champs de recherche
   ========================================================= */

/* ===== Modale générique ===== */
.theme-coldwar .modal,
.theme-coldwar .member-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.theme-coldwar .modal.open,
.theme-coldwar .member-modal.open {
  display: flex;
}

.theme-coldwar .modal .box,
.theme-coldwar .member-modal .box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(1100px, 96vw);
  height: min(92vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.theme-coldwar .modal .top,
.theme-coldwar .member-modal .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
}

.theme-coldwar .modal .title,
.theme-coldwar .member-modal .title {
  font-weight: 700;
  color: var(--text);
}

.theme-coldwar .modal iframe,
.theme-coldwar .member-modal iframe {
  border: 0;
  display: block;
  width: 100%;
  height: calc(100% - 48px);
}

/* ===== Champ de recherche ===== */
.theme-coldwar input[type="search"] {
  background: var(--panel-2);
  border: 1px dashed var(--line);
  border-radius: 0;
  padding: 10px 14px;
  color: var(--text);
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.theme-coldwar input[type="search"]:focus {
  border-color: var(--accent);
  background: #fffdf7;
  outline: none;
}

/* =========================================================
   Thème Coldwar — Annuaire membres (tuiles "carte d'identité")
   ========================================================= */

/* Grille responsive des tuiles */
/* Grille responsive (4 cartes desktop) */
.theme-coldwar .member-page .wrap{ max-width:1400px; margin:0 auto; padding:16px; }
.theme-coldwar .member-page .member-grid{
  display:grid !important;
  gap:16px !important;
  grid-template-columns:repeat(4, minmax(0,1fr)) !important;
  margin-top:12px !important;
}
@media (max-width:1200px){ .theme-coldwar .member-page .member-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (max-width:900px){  .theme-coldwar .member-page .member-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:560px){  .theme-coldwar .member-page .member-grid{ grid-template-columns:1fr; } }

/* Tuile rectangulaire façon carte d'identité */
.theme-coldwar .member-page .card{
  background:var(--panel) !important;
  border:1px dashed var(--line) !important;
  border-radius:4px !important; /* angles légers, pas d'effet tape */
  box-shadow:0 8px 18px rgba(0,0,0,.25) !important;
  position:relative !important;
  padding:16px !important;
  transition:transform .12s ease, box-shadow .12s ease !important;
}
/* neutralise le ruban adhésif des .card génériques */
.theme-coldwar .member-page .card::before,
.theme-coldwar .member-page .card::after{ content:none !important; display:none !important; }

.theme-coldwar .member-page .card:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 24px rgba(0,0,0,.30);
}

/* Lien de carte */
.theme-coldwar .member-page .card a.card-link{ display:block; color:inherit; text-decoration:none; }

/* Corps de la carte : avatar en haut à gauche */
.theme-coldwar .member-page .card .body{
  display:grid;
  grid-template-columns:64px 1fr;
  gap:12px;
  align-items:start;
  margin-top:6px;
  position:relative;
  z-index:1;
}
.theme-coldwar .member-page .card .avatar{
  width:64px; height:64px;
  border-radius:4px;
  object-fit:cover;
  background:#333 no-repeat center/cover;
  border:1px dashed var(--line);
}

.theme-coldwar .member-page .card .body img.avatar{
  width:64px !important;
  height:64px !important;
  object-fit:cover !important;
}

/* Titres & métadonnées */
.theme-coldwar .member-page .id-title{ font-weight:800; line-height:1.2; margin:0 0 2px; color:var(--text); }
.theme-coldwar .member-page .handle{ font-size:13px; color:var(--muted); }
.theme-coldwar .member-page .meta{ margin-top:6px; display:flex; flex-wrap:wrap; gap:8px; font-size:12px; color:var(--muted); }

/* Badge de rôle (tampon) */
.theme-coldwar .member-page .badge{
  position:absolute !important;
  top:50% !important;
  left:50% !important;
  transform:translate(-50%,-50%) rotate(-26deg) !important;
  font-size:20px !important;
  font-weight:900 !important;
  color:rgba(197,58,46,0.22) !important;
  text-transform:uppercase !important;
  letter-spacing:.12em !important;
  white-space:nowrap !important;
  pointer-events:none !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  padding:0 !important;
  z-index:0 !important;
}
/* =========================================================
   Thème Coldwar — Filtres (pills) annuaire membres
   ========================================================= */
.theme-coldwar .member-page .pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-coldwar .member-page .pill {
  display: inline-block;
  padding: 8px 14px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--panel);
  font-size: 14px;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}

.theme-coldwar .member-page .pill:hover {
  background: rgba(255,122,24,0.12);
  border-color: var(--brand);
  color: var(--brand);
}

.theme-coldwar .member-page .pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #000;
  font-weight: 700;
}
.theme-coldwar .member-page .toolbar {
  position: relative;
  z-index: 0;
}
.theme-coldwar .member-page .toolbar .pills {
  margin-top: 8px;
  position: relative;
  z-index: 2; /* au-dessus de l'input */
}
.theme-coldwar .member-page .toolbar input[type="search"] {
  position: relative;
  z-index: 1;
}