/* Dynasty – thème commun aux trois pages (site public, espace agents, modération).
   Le style du badge du logo : beige et ivoire, or pour les filets et l'emblème,
   anthracite pour le texte. Moderne et haut de gamme : beaucoup d'air, coins arrondis
   comme le badge, filets dorés fins, ombres douces.
   Deux éclairages : jour (beige clair) et nuit (brun chaud, jamais noir bleuté).
   Les noms de jetons et de composants sont un contrat entre les trois pages :
   ne pas en renommer un sans vérifier les trois, de jour comme de nuit. */

/* Polices : aucune n'est téléchargée. Titres en Sitka (Windows) ou en Iowan / Baskerville
   (Apple), avec Palatino et Georgia en repli ; le mot DYNASTY en Palatino, comme sur le logo.
   Un fichier sous licence libre pourra être posé dans fonts/ et déclaré sous le nom « Dynasty Display ». */

/* ---------- Éclairage de jour ---------- */
:root {
  /* Couleurs du logo */
  --ivory: #faf5ef;
  --anthracite: #343841;
  --gold: #a4854d;            /* bronze doré : filets, emblème, grands chiffres */
  --gold-deep: #7a5f2e;       /* or foncé : petit texte doré lisible sur beige */
  --champagne: #c3af8a;       /* or clair */
  --champagne-2: #d6c6a4;

  /* Surfaces : beige, sable, ivoire */
  --bg: #f3ede4;
  --bg-2: #ebe3d7;
  --bg-deep: #e3d9ca;
  --bg-light: #fdfbf7;
  --card: #fdfbf7;
  --card-2: #f6f0e7;
  --card-3: #ece4d7;
  --line: rgba(44, 47, 53, .1);
  --line-2: rgba(44, 47, 53, .2);
  --gold-line: rgba(164, 133, 77, .42);
  --gold-line-2: rgba(164, 133, 77, .75);

  /* Texte */
  --text: #2c2f35;
  --text-2: #4a4d55;
  --text-3: #62636a;
  --gold-text: #7a5f2e;
  --price: #2c2f35;

  /* Actions : anthracite de jour, champagne de nuit */
  --accent: #2c2f35;
  --accent-ink: #faf5ef;
  --accent-hover: #43464f;
  --lamp: #2c2f35;            /* alias historique du site jumeau */
  --lamp-rgb: 44, 47, 53;
  --lamp-ink: #faf5ef;
  --violet: #7a5f2e;          /* alias historique : accent de texte */
  --focus: #a4854d;

  /* Barre haute : ivoire vitré */
  --band: rgba(250, 245, 239, .9);
  --band-solid: #faf5ef;
  --band-text: #2c2f35;
  --band-text-2: #4a4d55;
  --band-gold: #7a5f2e;
  --band-line: rgba(164, 133, 77, .32);

  /* Espaces sombres (Collection Signature, pied de page) : anthracite et or, de jour comme de nuit */
  --deep: #26282d;
  --deep-2: #30333a;
  --deep-3: #3a3d45;
  --deep-text: #f6f0e6;
  --deep-text-2: #d8cfc1;
  --deep-gold: #d2bf98;
  --deep-line: rgba(210, 191, 152, .3);
  --vip-ink: #26282d;
  --vip-ink-2: #30333a;
  --vip-gold: #d2bf98;
  --vip-gold-2: #a4854d;
  --vip-line: rgba(210, 191, 152, .32);
  --vip-text: #f6f0e6;
  --vip-text-2: #d8cfc1;

  /* Cartouche posé sur les photos */
  --cartouche: rgba(252, 249, 244, .9);
  --cartouche-text: #2c2f35;
  --cartouche-line: rgba(164, 133, 77, .45);

  /* États */
  --green: #2f6b47;
  --amber: #875a14;
  --red: #a3312a;
  --red-ink: #ffffff;
  --cyan: #2d6670;
  --blue: #2e5a86;
  --pink: #9e2f4a;
  --indigo: #43464f;
  --lime: #56631c;
  --green-soft: rgba(47, 107, 71, .11);
  --amber-soft: rgba(166, 112, 22, .13);
  --red-soft: rgba(163, 49, 42, .1);
  --cyan-soft: rgba(45, 102, 112, .1);
  --blue-soft: rgba(46, 90, 134, .1);
  --violet-soft: rgba(164, 133, 77, .13);

  /* Reliefs */
  --raised: 0 1px 2px rgba(60, 48, 30, .05), 0 12px 30px -18px rgba(60, 48, 30, .3);
  --raised-hi: 0 2px 6px rgba(60, 48, 30, .07), 0 26px 50px -24px rgba(60, 48, 30, .42);
  --pressed: inset 0 2px 4px rgba(60, 48, 30, .12);
  --sunk: inset 0 1px 2px rgba(60, 48, 30, .07);
  --shadow: 0 2px 10px rgba(60, 48, 30, .07), 0 36px 70px -34px rgba(60, 48, 30, .5);
  --glass: rgba(253, 251, 247, .9);
  --glass-line: rgba(164, 133, 77, .28);
  --grad: linear-gradient(180deg, #3a3d45 0%, #2c2f35 100%);
  --grad-2: linear-gradient(180deg, #fdfbf7 0%, #f6f0e7 100%);
  --grad-3: linear-gradient(180deg, #d6c6a4 0%, #c3af8a 100%);

  /* Formes et typographie */
  --r-xl: 28px;
  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Dynasty Display", "Sitka Display", "Sitka Heading", "Iowan Old Style", Baskerville, "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-heading: "Dynasty Display", "Sitka Heading", "Sitka Subheading", "Iowan Old Style", Baskerville, "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-brand: "Palatino Linotype", "Book Antiqua", Palatino, "Sitka Heading", Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-slow: cubic-bezier(.4, 0, .2, 1);
  color-scheme: light;
}

/* ---------- Éclairage de nuit : brun chaud, texte ivoire, or champagne ---------- */
:root[data-theme="dark"] {
  --bg: #181613;
  --bg-2: #1e1b17;
  --bg-deep: #131110;
  --bg-light: #27231e;
  --card: #221f1a;
  --card-2: #2a2620;
  --card-3: #332e27;
  --line: rgba(243, 236, 226, .09);
  --line-2: rgba(243, 236, 226, .18);
  --gold-line: rgba(205, 181, 138, .34);
  --gold-line-2: rgba(205, 181, 138, .66);

  --text: #f3ece2;
  --text-2: #d9cfc1;
  --text-3: #afa493;
  --gold-text: #cdb58a;
  --price: #f3ece2;

  --accent: #cdb58a;
  --accent-ink: #1d1a16;
  --accent-hover: #dcc7a0;
  --lamp: #cdb58a;
  --lamp-rgb: 205, 181, 138;
  --lamp-ink: #1d1a16;
  --violet: #cdb58a;
  --focus: #d6c6a4;

  --band: rgba(24, 22, 19, .88);
  --band-solid: #181613;
  --band-text: #f3ece2;
  --band-text-2: #d9cfc1;
  --band-gold: #cdb58a;
  --band-line: rgba(205, 181, 138, .24);

  --deep: #26282d;
  --deep-2: #30333a;
  --deep-3: #3a3d45;

  --cartouche: rgba(28, 25, 21, .86);
  --cartouche-text: #f3ece2;
  --cartouche-line: rgba(205, 181, 138, .38);

  --green: #8cc9a1;
  --amber: #e2b866;
  --red: #ec8a80;
  --red-ink: #22150f;
  --cyan: #8fc4cb;
  --blue: #9dbde0;
  --pink: #ec94a8;
  --indigo: #d6c6a4;
  --lime: #c3d27a;
  --green-soft: rgba(140, 201, 161, .13);
  --amber-soft: rgba(226, 184, 102, .14);
  --red-soft: rgba(236, 138, 128, .14);
  --cyan-soft: rgba(143, 196, 203, .12);
  --blue-soft: rgba(157, 189, 224, .12);
  --violet-soft: rgba(205, 181, 138, .14);

  --raised: inset 0 1px 0 rgba(243, 236, 226, .04), 0 1px 2px rgba(0, 0, 0, .4), 0 14px 30px -18px rgba(0, 0, 0, .8);
  --raised-hi: inset 0 1px 0 rgba(243, 236, 226, .06), 0 2px 6px rgba(0, 0, 0, .45), 0 28px 50px -24px rgba(0, 0, 0, .9);
  --pressed: inset 0 2px 6px rgba(0, 0, 0, .5);
  --sunk: inset 0 1px 3px rgba(0, 0, 0, .4);
  --shadow: 0 2px 10px rgba(0, 0, 0, .4), 0 40px 80px -34px rgba(0, 0, 0, .95);
  --glass: rgba(34, 31, 26, .9);
  --glass-line: rgba(205, 181, 138, .2);
  --grad: linear-gradient(180deg, #dcc7a0 0%, #cdb58a 100%);
  --grad-2: linear-gradient(180deg, #2a2620 0%, #221f1a 100%);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); background: var(--bg); font-family: var(--font);
  font-size: 15.5px; line-height: 1.6; min-height: 100vh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .5s var(--ease-slow), color .5s var(--ease-slow);
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; color: var(--text); }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-family: var(--font-display); font-weight: 400; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.emblem { display: block; width: 100%; height: auto; }
.muted { color: var(--text-3); }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
::selection { background: rgba(164, 133, 77, .3); color: inherit; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: padding-box; border: 3px solid transparent; }

/* Animations : lentes et discrètes */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Apparition au défilement */
.rise { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease-slow) var(--d, 0ms), transform 1s var(--ease-out) var(--d, 0ms); }
.rise.seen { opacity: 1; transform: none; }
/* Photos : elles n'apparaissent qu'une fois prêtes (chargées et décodées), en fondu, jamais morceau par morceau */
img[data-fade]:not(.shown) { opacity: 0; }
img[data-fade] { transition: opacity .6s var(--ease-slow); }
/* Changement de page : la nouvelle page apparaît en fondu */
.view-in { animation: fade .35s ease both; }

/* Filet doré, avec ou sans losange central */
.rule { display: flex; align-items: center; gap: 12px; color: var(--gold); }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--gold-line); }
.rule i { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--gold); flex: none; }

/* ---------- Boutons : toujours dans un cadre net ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 10px 22px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer;
  font-family: var(--font); font-weight: 600; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; white-space: nowrap;
  flex: none; max-width: 100%; text-align: center;
  background: var(--card); color: var(--text); box-shadow: var(--raised);
  transition: background-color .3s var(--ease-slow), border-color .3s var(--ease-slow), color .3s var(--ease-slow), transform .15s, box-shadow .3s;
}
.btn:hover { border-color: var(--gold-line-2); background: var(--card-2); }
.btn:active { transform: translateY(1px); box-shadow: var(--pressed); }
.btn .icon { width: 17px; height: 17px; }
.btn-main { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-main:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-gold { background: var(--champagne); color: #2c2f35; border-color: var(--champagne); }
.btn-gold:hover { background: var(--champagne-2); border-color: var(--champagne-2); }
.btn-ghost { background: transparent; box-shadow: none; color: var(--text); }
.btn-ghost:hover { background: var(--card-2); }
.btn-flat { background: var(--card-2); box-shadow: none; border-color: var(--line); }
.btn-flat:hover { background: var(--card-3); }
.btn-white { background: var(--card); color: var(--text); }
.btn-red { background: var(--red); color: var(--red-ink); border-color: var(--red); }
.btn-red:hover { filter: brightness(1.08); }
.btn-sm { min-height: 38px; padding: 7px 15px; font-size: 11.5px; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; box-shadow: none; }
/* Boutons clairs posés sur l'anthracite */
.btn-veil { background: rgba(246, 240, 230, .06); color: var(--deep-text); border-color: rgba(246, 240, 230, .32); box-shadow: none; }
.btn-veil:hover { background: rgba(246, 240, 230, .12); border-color: var(--deep-gold); color: var(--deep-text); }

.iconbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; padding: 0;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--text-2); cursor: pointer;
  box-shadow: var(--raised); transition: background-color .3s, border-color .3s, color .3s, transform .15s;
}
.iconbtn:hover { color: var(--text); border-color: var(--gold-line-2); background: var(--card-2); }
.iconbtn:active { transform: translateY(1px); }
.iconbtn:disabled { opacity: .38; cursor: default; pointer-events: none; }
.iconbtn .count {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--gold); color: #ffffff; font-size: 11px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--band-solid); animation: pop .4s var(--ease); font-variant-numeric: tabular-nums;
}
:root[data-theme="dark"] .iconbtn .count { background: var(--champagne); color: #1d1a16; }

/* Console : les commandes vivent dans une case délimitée */
.actionbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px; border-radius: 16px;
  background: var(--card-2); border: 1px solid var(--line);
}
.actionbar.tight { padding: 6px; gap: 6px; border-radius: 16px; }
.actionbar .sep { width: 1px; align-self: stretch; background: var(--line-2); margin: 0 2px; }
.actionbar .grow { flex: 1; }

/* Étiquettes */
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 8px; line-height: 1.2; background: var(--card-2); color: var(--text-2); white-space: nowrap; border: 1px solid var(--line);
}
.tag .icon { width: 13px; height: 13px; stroke-width: 1.8; }
.tag-sig { background: var(--deep); color: var(--deep-gold); border-color: rgba(210, 191, 152, .45); }
.tag-new { background: var(--champagne); color: #2c2f35; border-color: transparent; }
.tag-promo { background: var(--anthracite); color: var(--ivory); border-color: transparent; }
.tag-ok { background: var(--green-soft); color: var(--green); border-color: transparent; }
.tag-warn { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.tag-red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.tag-info { background: var(--cyan-soft); color: var(--cyan); border-color: transparent; }
.tag-violet { background: var(--violet-soft); color: var(--gold-text); border-color: transparent; }
.tag-off { background: var(--card-3); color: var(--text-2); }
.tag-vip { background: var(--vip-ink); color: var(--vip-gold); border-color: var(--vip-line); }

/* Champs */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--bg-light); color: var(--text); font-size: 15px; outline: 0;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(164, 133, 77, .22); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field .help { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.field select option, select.input option { background: var(--card); color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; margin: 7px 18px 7px 0; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--gold); }
.field .check { display: inline-flex; margin: 7px 18px 7px 0; font-size: 14.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text); }

/* Encarts */
.note {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r);
  font-size: 14.5px; line-height: 1.5; background: var(--card-2); color: var(--text-2); border: 1px solid var(--line);
}
.note .icon { margin-top: 2px; color: var(--gold-text); }
.note strong { color: var(--text); }
.note-info { background: var(--cyan-soft); border-color: transparent; }
.note-info .icon { color: var(--cyan); }
.note-warn { background: var(--amber-soft); border-color: transparent; }
.note-warn .icon { color: var(--amber); }
.note-violet, .note-gold { background: var(--violet-soft); border-color: transparent; }
.note-red { background: var(--red-soft); border-color: transparent; }
.note-red .icon { color: var(--red); }
.note-ok { background: var(--green-soft); border-color: transparent; }
.note-ok .icon { color: var(--green); }
.note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Texte enrichi, tableaux, vides */
.rich { color: var(--text-2); font-size: 15px; }
.rich p { margin: 0 0 .9em; }
.rich h3 { font-family: var(--font); font-size: 11.5px; font-weight: 700; margin: 1.4em 0 .6em; color: var(--gold-text); letter-spacing: .2em; text-transform: uppercase; }
.rich ul { margin: 0 0 1em; padding-left: 20px; }
.rich li { margin: .3em 0; }
.rich strong { color: var(--text); }
.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec th, .spec td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--text-3); font-weight: 500; width: 42%; }
.empty { padding: 48px 24px; text-align: center; color: var(--text-3); background: var(--card-2); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 3px; }

/* Fenêtres */
.modal-backdrop { position: fixed; inset: 0; background: rgba(38, 34, 28, .42); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: flex-start; justify-content: center; padding: 34px 16px; overflow-y: auto; z-index: 100; animation: fade .25s ease both; }
:root[data-theme="dark"] .modal-backdrop { background: rgba(8, 7, 6, .6); }
.modal { background: var(--card); border: 1px solid var(--gold-line); border-radius: var(--r-lg); width: 100%; max-width: 960px; box-shadow: var(--shadow); animation: rise .35s var(--ease) both; }
.modal.narrow { max-width: 540px; }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 16px 24px; background: var(--card); border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.modal-head h2 { font-size: 22px; }
.modal-body { padding: 24px; }
.modal-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; background: var(--card-2); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.modal-foot .right { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }

/* ---------- Choisir un modèle du catalogue en images (site, modération, espace agents) ---------- */
.field .lab { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.choice { display: flex; align-items: flex-start; gap: 4px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--card-2); transition: border-color .25s, box-shadow .25s, background-color .25s; }
.choice:hover { border-color: var(--gold-line-2); box-shadow: var(--raised); }
.choice.on { border-color: var(--gold-line-2); background: var(--card); }
.choice.is-empty { border-style: dashed; border-color: var(--gold-line-2); }
.choice-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 16px; padding: 8px; border: 0; border-radius: 15px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.choice-main:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice-shot { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 11px; overflow: hidden; background: var(--card-3); }
.choice-shot img { width: 100%; height: 100%; object-fit: cover; }
.choice-mosaic { display: grid; grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; gap: 3px; }
.choice-mosaic img:first-child { grid-row: 1 / 3; }
.choice-mosaic img { opacity: .85; }
.choice-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.choice-txt small { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
.choice-txt b { font-family: var(--font-heading); font-weight: 400; font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.choice-txt em { font-style: normal; font-family: var(--font-display); font-size: 16px; color: var(--price); }
.choice.is-empty .choice-txt em { font-family: var(--font); font-size: 13.5px; color: var(--text-3); }
.choice-go { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--gold-line); background: var(--card-2); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text); transition: background-color .25s, border-color .25s; }
.choice-go .icon { width: 15px; height: 15px; }
.choice-main:hover .choice-go { border-color: var(--gold); background: var(--card); }
.choice.is-empty .choice-go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.choice.is-empty .choice-main:hover .choice-go { background: var(--accent-hover); border-color: var(--accent-hover); }
.choice-warn { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--amber); }
.choice-warn .icon { width: 15px; height: 15px; }
.choice-x { display: grid; place-items: center; width: 34px; height: 34px; margin: 8px 8px 0 0; flex: none; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text-3); cursor: pointer; transition: color .25s, border-color .25s; }
.choice-x:hover { color: var(--text); border-color: var(--gold-line-2); }
.choice-x .icon { width: 16px; height: 16px; }
.choice.sm .choice-main { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
.choice.sm .choice-txt b { font-size: 17px; }
.choice.sm .choice-go { margin-top: 6px; }

/* La galerie : familles, recherche et tailles fixes en haut, cartes photo qui défilent dessous */
.modal.pk-modal { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100vh - 68px); max-height: calc(100dvh - 68px); }
.pk-modal .modal-head { position: static; flex: none; }
.pk-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pk-top { flex: none; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--card); }
.pk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pk-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 13px; background: var(--card-2); border: 1px solid var(--line); }
.pk-tabs button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 14px; border: 0; border-radius: 10px; background: transparent; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); cursor: pointer; transition: background-color .25s, color .25s; }
.pk-tabs button:hover { color: var(--text); }
.pk-tabs button.on { background: var(--accent); color: var(--accent-ink); }
.pk-tabs b { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(127, 127, 127, .2); letter-spacing: 0; }
.pk-search { position: relative; flex: 1 1 220px; max-width: 320px; margin-left: auto; }
.pk-search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.pk-search .input { min-height: 42px; padding-left: 40px; font-size: 14.5px; }
.pk-note { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--violet-soft); font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.pk-note .icon { width: 17px; height: 17px; margin-top: 2px; color: var(--gold-text); }
.pk-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.pk-chip { min-height: 34px; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: border-color .25s, color .25s, box-shadow .25s; }
.pk-chip:hover { border-color: var(--gold-line-2); color: var(--text); }
.pk-chip.on { border-color: var(--gold); color: var(--text); background: var(--card-2); box-shadow: 0 0 0 1px var(--gold); }
.pk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pk-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; border-radius: 16px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.pk-card:hover { border-color: var(--gold-line-2); box-shadow: var(--raised); transform: translateY(-2px); }
.pk-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pk-card.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.pk-shot { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--card-3); overflow: hidden; }
.pk-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pk-card:hover .pk-shot img { transform: scale(1.04); }
.pk-tick { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 999px; background: var(--anthracite); color: var(--ivory); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
:root[data-theme="dark"] .pk-tick { background: var(--champagne); color: #1d1a16; }
.pk-tick .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.pk-count { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: var(--cartouche); color: var(--cartouche-text); font-size: 11.5px; font-weight: 600; }
.pk-count .icon { width: 13px; height: 13px; }
.pk-txt { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px 12px; min-width: 0; }
.pk-txt small { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); overflow-wrap: anywhere; }
.pk-txt b { font-family: var(--font-heading); font-weight: 400; font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.pk-txt em { font-style: normal; font-family: var(--font-display); font-size: 15px; color: var(--price); }
.pk-card.off .pk-shot img { opacity: .5; filter: grayscale(.6); }
.pk-warn { display: flex; align-items: flex-start; gap: 5px; margin-top: 4px; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--amber); }
.pk-warn .icon { width: 14px; height: 14px; margin-top: 1px; }
.pk-none .pk-shot { display: grid; place-items: center; color: var(--gold); background: var(--bg-light); border-bottom: 1px dashed var(--gold-line); }
.pk-none .pk-shot .icon { width: 42px; height: 42px; stroke-width: 1.2; }
.pk-none .pk-txt em { font-family: var(--font); font-size: 13px; line-height: 1.4; color: var(--text-3); }
.pk-empty { margin: 8px 0 0; padding: 30px 16px; text-align: center; color: var(--text-3); border: 1px dashed var(--line-2); border-radius: 16px; }

/* Zones du terrain en pastilles de couleur */
.zones { margin: 0; padding: 0; border: 0; min-width: 0; }
/* Protégées des styles de formulaire de la modération (étiquettes de champ, titres de rubrique) */
fieldset.zones > legend { float: none; display: block; width: auto; padding: 0; margin: 0 0 9px; font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.zone-row { display: flex; flex-wrap: wrap; gap: 8px; }
.zone-row .zone { position: relative; display: block; margin: 0; font: inherit; letter-spacing: 0; text-transform: none; color: inherit; cursor: pointer; }
.zone input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.zone span { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-light); font-size: 13.5px; font-weight: 600; color: var(--text); transition: border-color .25s, background-color .25s, box-shadow .25s; }
.zone span i { width: 13px; height: 13px; border-radius: 50%; background: var(--z); box-shadow: 0 0 0 2px var(--card), 0 0 0 3px rgba(0, 0, 0, .12); flex: none; }
.zone span i.none { background: transparent; box-shadow: none; border: 1.5px dashed var(--text-3); }
.zone span b { font-family: var(--font-display); font-weight: 400; color: var(--gold-text); }
.zone:hover span { border-color: var(--gold-line-2); }
.zone input:checked + span { border-color: var(--gold); background: var(--card-2); box-shadow: 0 0 0 1px var(--gold); }
.zone input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (max-width: 900px) {
  .pk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pk-top { padding: 12px 16px; }
  .pk-modal .modal-body { padding: 14px 16px 20px; }
  .pk-tabs button { padding: 7px 11px; letter-spacing: .08em; }
  .pk-search { flex-basis: 100%; max-width: none; margin-left: 0; }
  .pk-txt { padding: 8px 10px 10px; }
  .pk-txt b { font-size: 15px; }
}
/* Quand la place manque (téléphone, colonnes étroites de la modération), la carte du modèle choisi passe en hauteur :
   grande photo, puis le nom et le prix. La requête de conteneur suit la largeur réelle de la carte. */
.choice-host { container-type: inline-size; }
@media (max-width: 560px) {
  .choice { position: relative; }
  .choice-main, .choice.sm .choice-main { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 6px; }
  .choice-shot { aspect-ratio: 16 / 9; }
  .choice-txt { padding: 0 8px 8px; }
  .choice-x { position: absolute; top: 12px; right: 12px; margin: 0; background: var(--cartouche); border-color: var(--cartouche-line); color: var(--cartouche-text); }
}
@container (max-width: 400px) {
  .choice { position: relative; }
  .choice-main, .choice.sm .choice-main { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 6px; }
  .choice-shot { aspect-ratio: 16 / 9; }
  .choice-txt { padding: 0 8px 8px; }
  .choice-x { position: absolute; top: 12px; right: 12px; margin: 0; background: var(--cartouche); border-color: var(--cartouche-line); color: var(--cartouche-text); }
}

/* Notification */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--deep); color: var(--deep-text); padding: 13px 22px; border-radius: 14px; border: 1px solid var(--deep-line); font-size: 14.5px; font-weight: 600; z-index: 300; box-shadow: var(--shadow); max-width: min(92vw, 520px); text-align: center; animation: toastIn .35s var(--ease) both; }
.toast.ok { background: var(--deep); color: var(--deep-text); }
.toast.error { background: var(--red); color: var(--red-ink); border-color: transparent; }

/* Bascule jour / nuit */
.themebtn .icon { transition: transform .6s var(--ease); }
.themebtn:hover .icon { transform: rotate(30deg); }

@media (max-width: 520px) {
  .btn { white-space: normal; }
}

/* Mise au point au clavier */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn:focus-visible, .iconbtn:focus-visible { outline-offset: 3px; }

/* =========================================================
   Carte interactive de San Andreas (site public et modération)
   Carte officielle du jeu en tuiles : fond « Plan » ou « Satellite »
   ========================================================= */
.carte { position: relative; overflow: hidden; background: #0fa8d2; user-select: none; -webkit-user-select: none; }
.carte[data-style="satellite"] { background: #143c6a; }
.carte-view { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; outline: none; }
.carte-preview .carte-view { touch-action: pan-y; }
.carte-mini .carte-view { cursor: pointer; pointer-events: none; }
.carte.grabbing .carte-view { cursor: grabbing; }
.carte-view:focus-visible { box-shadow: inset 0 0 0 3px var(--focus); }
.carte-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.carte-base { display: block; width: 1200px; height: 1600px; max-width: none; pointer-events: none; }
.carte-tiles { position: absolute; left: 0; top: 0; width: 1200px; height: 1600px; pointer-events: none; }
.carte-tile { position: absolute; max-width: none; opacity: 0; transition: opacity .3s; pointer-events: none; }
.carte-tile.ok { opacity: 1; }
.carte-pick .carte-view { cursor: crosshair; }
.carte.dragging-pin .carte-view, .carte.dragging-pin .pin { cursor: grabbing; }
.carte-pick .pin { cursor: grab; }
.carte-labels, .carte-pins { position: absolute; inset: 0; pointer-events: none; }
.carte-label { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; font-family: var(--font); font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; transition: opacity .35s; }
.carte-label > span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; padding: 3px 8px; border-radius: 7px; background: rgba(253, 251, 247, .8); color: #4a4d55; transition: color .3s; }
:root[data-theme="dark"] .carte-label > span { background: rgba(24, 22, 19, .74); color: #d9cfc1; }
.carte-label:hover > span { color: var(--gold-text); }
.carte-label.off { opacity: 0; pointer-events: none; }
/* Repères : un point doré et, si la place le permet, le prix */
.pin { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; z-index: 2; }
.pin.off { visibility: hidden; }
.pin.on { z-index: 5; }
.pin-dot { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 2px solid #ffffff; box-shadow: 0 2px 8px rgba(30, 26, 21, .45); transition: transform .35s var(--ease-out); }
.pin-dot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1px solid var(--gold); opacity: 0; }
.pin.on .pin-dot, .pin:hover .pin-dot, .pin:focus-visible .pin-dot { transform: scale(1.25); }
.pin.on .pin-dot::after { opacity: .8; animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.pin-tag { position: absolute; left: 0; bottom: 14px; transform: translateX(-50%); white-space: nowrap; padding: 5px 10px; border-radius: 10px; background: var(--card); color: var(--text); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; border: 1px solid var(--gold-line); box-shadow: 0 6px 16px -8px rgba(30, 26, 21, .5); transition: background-color .3s, color .3s; }
.pin-tag::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; margin-left: -4px; transform: rotate(45deg); background: inherit; border-right: 1px solid var(--gold-line); border-bottom: 1px solid var(--gold-line); }
.pin.compact .pin-tag { display: none; }
.pin.on .pin-tag, .pin:hover .pin-tag, .pin:focus-visible .pin-tag { display: block; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); z-index: 3; }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin-dot { box-shadow: 0 0 0 3px var(--focus), 0 2px 8px rgba(30, 26, 21, .45); }
.pin.hl { z-index: 6; }
.pin.hl .pin-dot { transform: scale(1.35); }
.pin.hl .pin-tag { display: block; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); z-index: 3; }
.pin-rent .pin-dot { background: #ffffff; border: 3px solid var(--gold); }
.pin-sig .pin-dot { background: var(--deep); border-color: var(--champagne); }
.pin-sig .pin-tag { background: var(--deep); color: var(--deep-gold); border-color: rgba(210, 191, 152, .5); }
.pin-sold .pin-dot { background: #9a968e; }
.pin-sold .pin-tag { color: var(--text-3); }
/* Fiche express */
.carte-pop { position: absolute; left: 0; top: 0; z-index: 8; width: 300px; padding: 10px; border-radius: 20px; background: var(--card); color: var(--text); border: 1px solid var(--gold-line); box-shadow: var(--shadow); pointer-events: auto; cursor: auto; }
.carte-pop.in { animation: popIn .45s var(--ease-out) both; }
@keyframes popIn { from { opacity: 0; } to { opacity: 1; } }
.carte-pop::after { content: ""; position: absolute; left: var(--arrow, 50%); bottom: -7px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); background: var(--card); border-right: 1px solid var(--gold-line); border-bottom: 1px solid var(--gold-line); }
.carte-pop.below::after { bottom: auto; top: -7px; border: 0; border-left: 1px solid var(--gold-line); border-top: 1px solid var(--gold-line); }
.pop-close { position: absolute; top: 16px; right: 16px; z-index: 2; background: rgba(253, 251, 247, .94); color: var(--anthracite); border-color: transparent; }
.pop-shot { display: block; aspect-ratio: 16 / 10; border-radius: 13px; overflow: hidden; background: var(--card-3); }
.pop-shot img { width: 100%; height: 100%; object-fit: cover; }
.pop-body { padding: 12px 6px 4px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pop-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); }
.pop-name { font-family: var(--font-heading); font-size: 21px; line-height: 1.15; overflow-wrap: anywhere; }
.pop-price { font-family: var(--font-display); font-size: 21px; }
.pop-price small { font-family: var(--font); font-size: 13px; color: var(--text-2); }
.pop-body .card-keys { font-size: 12.5px; gap: 4px 12px; }
.pop-acts { margin-top: 8px; }
.pop-acts .btn { flex: 1; }
.carte-pop.docked { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; transform: none; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 0 12px; align-items: start; }
.carte-pop.docked[hidden] { display: none; }
.carte-pop.docked::after { display: none; }
.carte-pop.docked .pop-shot { aspect-ratio: 1 / 1; }
.carte-pop.docked .pop-body { padding: 0 34px 0 0; }
.carte-pop.docked .pop-acts { grid-column: 1 / -1; margin-top: 10px; }
.carte-pop.docked .pop-close { top: 8px; right: 8px; }
/* Commandes */
.carte-ctrl { position: absolute; top: 14px; right: 14px; z-index: 7; display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 15px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--raised); }
.carte-ctrl .iconbtn { width: 38px; height: 38px; border-radius: 11px; box-shadow: none; border-color: transparent; background: transparent; }
.carte-ctrl .iconbtn:hover { background: var(--card-2); border-color: var(--line); }
.carte-hint { position: absolute; left: 14px; bottom: 14px; z-index: 6; margin: 0; padding: 6px 12px; border-radius: 10px; background: rgba(253, 251, 247, .88); color: var(--text-2); font-size: 12px; pointer-events: none; }
:root[data-theme="dark"] .carte-hint { background: rgba(24, 22, 19, .8); }
/* Fond de carte : Plan ou Satellite */
.carte-style { position: absolute; top: 14px; left: 14px; z-index: 7; display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--raised); }
.carte-style button { min-height: 34px; padding: 4px 13px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .3s, color .3s; }
.carte-style button:hover { color: var(--text); background: var(--card-2); }
.carte-style button.on { background: var(--accent); color: var(--accent-ink); }

/* =========================================================
   Espaces privés : modération et espace agents
   Écran de déverrouillage, menu latéral anthracite, barre haute,
   encarts, tableaux, formulaires, photos. Communs aux deux pages.
   ========================================================= */
body.private { --admin-top: 76px; background: var(--bg); }
/* Déverrouillage */
.gate { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 28px 16px; overflow: hidden; isolation: isolate; }
.gate::before { content: ""; position: absolute; inset: 18px; z-index: -1; border: 1px solid var(--gold-line); border-radius: 30px; pointer-events: none; }
.gate-card { width: min(460px, 100%); padding: 34px 32px 24px; border-radius: 26px; background: var(--card); border: 1px solid var(--gold-line); box-shadow: var(--shadow); animation: rise .6s var(--ease-out) both; }
.gate-badge { width: 76px; height: 76px; margin: 0 auto 18px; padding: 13px 13px 15px; border-radius: 22px; border: 1px solid var(--gold-line); background: var(--bg-light); color: var(--gold); box-shadow: var(--raised); }
:root[data-theme="dark"] .gate-badge { color: var(--champagne); }
.gate-kicker { display: block; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-text); }
.gate h1 { margin: 8px 0 10px; text-align: center; font-size: 34px; }
.gate-intro { margin: 0 0 20px; text-align: center; color: var(--text-2); font-size: 14.5px; }
.gate-card .note { margin-bottom: 14px; }
.gate-submit { width: 100%; margin-top: 4px; }
.gate-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-3); }
.gate-foot a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.gate-foot a:hover { color: var(--gold-text); }
.gate-safe { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 12.5px; color: var(--text-3); }
.gate-safe .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--gold); }
.pass { position: relative; }
.pass input { padding-right: 50px; }
.pass-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pass-eye:hover { color: var(--text); background: var(--card-2); }

/* Application : menu latéral et zone de travail */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; gap: 18px; padding: 18px 14px; background: var(--deep); color: var(--deep-text); border-right: 1px solid var(--deep-line); overflow-y: auto; z-index: 30; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 16px; border-bottom: 1px solid var(--deep-line); }
.side-brand .mark { display: grid; place-items: center; width: 44px; height: 44px; padding: 6px 6px 7px; border-radius: 13px; background: #2f3137; color: var(--deep-gold); border: 1px solid var(--deep-line); flex: none; }
.side-brand .mark img { width: 100%; height: 100%; object-fit: contain; }
.side-brand b { display: block; font-family: var(--font-brand); font-weight: 400; font-size: 18px; letter-spacing: .26em; line-height: 1.1; }
.side-brand small { display: block; margin-top: 4px; font-size: 10px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--deep-gold); }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 12px; border-radius: 12px; color: var(--deep-text-2); font-size: 14.5px; font-weight: 600; transition: background-color .25s, color .25s; }
.side-nav a .icon { color: var(--deep-gold); opacity: .85; }
.side-nav a:hover { background: rgba(246, 240, 230, .06); color: var(--deep-text); }
.side-nav a.active { background: rgba(210, 191, 152, .14); color: var(--deep-text); box-shadow: inset 3px 0 0 var(--deep-gold); }
.side-nav a b { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(210, 191, 152, .18); color: var(--deep-gold); font-size: 11.5px; text-align: center; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 3px; padding-top: 14px; border-top: 1px solid var(--deep-line); }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--deep-text-2); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.side-link .icon { color: var(--deep-gold); }
.side-link:hover { background: rgba(246, 240, 230, .06); color: var(--deep-text); }
.side :focus-visible { outline-color: var(--deep-gold); }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgba(38, 34, 28, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; min-height: var(--admin-top); padding: 12px 28px; background: var(--band); border-bottom: 1px solid var(--band-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topbar-titles { min-width: 0; }
.topbar-titles .eyebrow-sm { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-text); }
.topbar-titles h1 { font-size: 27px; line-height: 1.15; overflow-wrap: break-word; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.side-toggle { display: none !important; }
.content { width: 100%; max-width: 1420px; padding: 26px 28px 60px; }
.banner-zone:empty { display: none; }
.banner-zone { display: flex; flex-direction: column; gap: 10px; padding: 18px 28px 0; max-width: 1420px; }

/* Pastilles et boutons compacts */
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); flex: none; }
.pill i.off { background: var(--text-3); box-shadow: 0 0 0 3px var(--line); }
.mini { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--text-2); cursor: pointer; flex: none; transition: border-color .2s, color .2s, background-color .2s; }
.mini .icon { width: 16px; height: 16px; }
.mini:hover { color: var(--text); border-color: var(--gold-line-2); background: var(--card-2); }
.mini.on { color: var(--gold-text); border-color: var(--gold-line-2); background: var(--violet-soft); }
.mini.danger:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.mini:disabled { opacity: .35; pointer-events: none; }
.btn-save.dirty { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-save.dirty::after { content: ""; position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); border: 2px solid var(--card); animation: pop 1.6s var(--ease) infinite; }
.btn-save.clean { background: var(--card); color: var(--text-2); box-shadow: none; }
.btn-save.clean .icon { color: var(--green); }
/* Enregistrement automatique en cours */
.btn-save.busy { background: var(--card); color: var(--text-2); box-shadow: none; }
.btn-save.busy .icon { color: var(--gold-text); animation: savePulse 1.1s ease-in-out infinite; }
@keyframes savePulse { 50% { opacity: .3; } }

/* Encarts, chiffres, barre d'outils */
.box { padding: 22px 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--raised); min-width: 0; }
.box + .box { margin-top: 16px; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 16px; }
.box-head h2 { font-size: 23px; }
.box-sub { margin: -8px 0 16px; color: var(--text-3); font-size: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 15px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--raised); }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; color: var(--text); }
.stat span { display: block; margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.stat.gold { border-color: var(--gold-line); background: var(--violet-soft); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; min-height: 42px; font-size: 14px; }
.toolbar .search { flex: 1 1 240px; }
.toolbar .sp { flex: 1; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 14px; border-radius: 16px; background: var(--deep); color: var(--deep-text); border: 1px solid var(--deep-line); }
.bulkbar .input { width: auto; min-height: 38px; background: #30333a; color: var(--deep-text); border-color: var(--deep-line); font-size: 14px; }
.bulkbar .sp { flex: 1; }
.right-align { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.help { font-size: 13px; color: var(--text-3); }

/* Tableaux */
.tablewrap { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--raised); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { padding: 12px; text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); background: var(--card-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th .sorticon { width: 13px; height: 13px; margin-left: 4px; vertical-align: -2px; color: var(--gold-text); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background-color .15s; }
.tbl tbody tr:hover td { background: var(--card-2); }
.tbl tbody tr.on td { background: var(--violet-soft); }
.tbl tbody tr.flash td { animation: flashRow 1.6s ease; }
@keyframes flashRow { 0%, 30% { background: var(--violet-soft); } 100% { background: transparent; } }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .acts { white-space: nowrap; text-align: right; }
.tbl .acts .mini + .mini { margin-left: 4px; }
.tbl input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--gold); cursor: pointer; }
.thumb { width: 78px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 9px; background: var(--card-3); border: 1px solid var(--line); }
.cell-main { min-width: 180px; }
.cell-main b { display: block; font-family: var(--font-heading); font-weight: 400; font-size: 17px; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.cell-main small { display: block; font-size: 12.5px; color: var(--text-3); }
.cell-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cell-tags .tag { padding: 3px 7px; font-size: 9.5px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--card-2); font-size: 13.5px; color: var(--text-2); }
.pager .right { display: flex; gap: 6px; }

/* Formulaires */
.fs { margin: 0 0 16px; padding: 18px 22px 8px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--raised); min-width: 0; }
.fs legend { float: left; width: 100%; margin: 0 0 14px; padding: 0; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 21px; color: var(--text); }
.fs legend .icon { width: 20px; height: 20px; color: var(--gold); }
.fs legend + * { clear: both; }
.fs .help { margin: -6px 0 14px; }
.fs-private { border-color: var(--gold-line); background: var(--card-2); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 16px; }
.grid .full, .grid-3 .full, .grid-4 .full { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: -2px 0 12px; }
.field .inline { display: flex; gap: 8px; }
.field .inline > input, .field .inline > select { flex: 1; min-width: 0; }
.field .inline .btn { min-height: 46px; }
.chipsin { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg-light); }
.chipsin span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line); font-size: 13.5px; }
.chipsin span button { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); cursor: pointer; }
.chipsin span button:hover { color: var(--red); background: var(--red-soft); }
.chipsin span button .icon { width: 14px; height: 14px; }
.chipsin input { flex: 1 1 140px; min-width: 120px; min-height: 30px; padding: 2px 6px; border: 0; background: transparent; outline: 0; font-size: 14px; }

/* Photos : glisser-déposer, ordre, photo principale */
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; margin-bottom: 12px; }
.imgitem { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card-2); }
.imgitem img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--card-3); }
.imgitem .flag { position: absolute; top: 8px; left: 8px; }
.imgitem .tools { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 6px; }
.imgitem .tools span { display: flex; gap: 4px; }
.imgitem .cap { width: 100%; min-height: 36px; padding: 6px 9px; border: 0; border-top: 1px solid var(--line); background: var(--card); font-size: 13px; outline: 0; }
.imgitem .cap:focus { box-shadow: inset 0 0 0 2px var(--gold); }
.drop { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 16px; border: 2px dashed var(--gold-line); border-radius: 16px; background: var(--bg-light); color: var(--text-2); font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; transition: border-color .2s, background-color .2s; }
.drop:hover, .drop.over { border-color: var(--gold); background: var(--violet-soft); }
.drop .icon { color: var(--gold); }
.drop input[type="file"] { display: none; }
.img-preview { width: 92px; height: 92px; object-fit: contain; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); padding: 6px; }

@media (max-width: 1100px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .35s var(--ease-out); box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .side-toggle { display: inline-flex !important; }
  .cols, .cols-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body.private { --admin-top: 64px; }
  .topbar { padding: 8px 12px; gap: 10px; }
  .topbar-titles h1 { font-size: 21px; }
  .topbar-titles .eyebrow-sm { display: none; }
  .topbar-actions .pill { display: none; }
  .topbar-titles { flex: 1 1 auto; }
  .topbar-actions { flex-wrap: nowrap; gap: 6px; }
  .topbar-actions .btn { min-height: 40px; padding: 8px 11px; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .iconbtn { width: 40px; height: 40px; }
  .imgs { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .content { padding: 16px 12px 48px; }
  .banner-zone { padding: 12px 12px 0; }
  .box { padding: 18px 16px; border-radius: 18px; }
  .fs { padding: 16px 14px 6px; border-radius: 18px; }
  .grid, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 25px; }
  .toolbar .input { flex: 1 1 140px; }
  .gate-card { padding: 28px 20px 20px; }
  .gate::before { inset: 8px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .rise { opacity: 1; transform: none; }
  /* Les fondus restent : ils ne déplacent rien. Photos, fondu enchaîné du diaporama, tuiles de la carte, pages et panneaux. */
  img[data-fade], .carte-tile, .veil { transition: opacity .5s ease !important; }
  .hero-img { transform: none !important; transition: opacity 1.2s ease !important; }
  .view-in, .sheet, .palette, .modal-backdrop { animation: fade .3s ease both !important; }
  .sheet-box, .pal-box, .modal, .carte-pop.in, .toast, .menu-mobile, .hero-slide.swap > *, .g-main img.in { animation: fade .45s ease both !important; }
  .drawer { transform: none !important; opacity: 0; transition: opacity .3s ease !important; }
  .drawer.open { opacity: 1; }
}
