/* Réseau Poker : feuille unique.
   Jetons sur :root, deux thèmes (sombre par défaut, clair au choix), un seul accent
   (vert tapis), l'or est réservé aux étoiles. Un seul système d'arrondis :
   boutons et pastilles en pilule, panneaux 18px, champs 12px. */

@font-face { font-family: "Geist"; src: url("../polices/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../polices/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; }
/* Windows n'a pas de drapeaux en emoji (il écrit « CH », « FR ») : cette police ne
   couvre QUE les drapeaux (unicode-range) et passe avant les autres. Twemoji, CC BY 4.0. */
@font-face { font-family: "Drapeaux"; src: url("../polices/TwemojiCountryFlags.woff2") format("woff2");
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap; }

:root, [data-theme="sombre"] {
  color-scheme: dark;
  --fond: #070b16;
  --fond-2: #0b1222;
  --verre: rgba(14, 22, 40, 0.72);
  --verre-fort: rgba(12, 19, 35, 0.92);
  --surface: #101a2e;
  --surface-2: #15213a;
  --ligne: rgba(148, 170, 205, 0.14);
  --ligne-forte: rgba(148, 170, 205, 0.28);
  --texte: #e9eef8;
  --texte-2: #a3b1c8;
  --texte-3: #7f8ea8;
  --accent: #3ddc97;
  --accent-fort: #20c47f;
  --accent-doux: rgba(61, 220, 151, 0.14);
  --accent-texte: #04140c;
  --or: #f5c451;
  --or-doux: rgba(245, 196, 81, 0.16);
  --danger: #ff7a7a;
  --ombre: 0 24px 60px rgba(2, 6, 16, 0.55);
  --ocean: #0a1428;
}
[data-theme="clair"] {
  color-scheme: light;
  --fond: #eef3f9;
  --fond-2: #e3ebf5;
  --verre: rgba(255, 255, 255, 0.78);
  --verre-fort: rgba(255, 255, 255, 0.95);
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --ligne: rgba(30, 50, 90, 0.12);
  --ligne-forte: rgba(30, 50, 90, 0.24);
  --texte: #0d1729;
  --texte-2: #44536d;
  --texte-3: #5d6c86;
  --accent: #0f9d63;
  --accent-fort: #0b8452;
  --accent-doux: rgba(15, 157, 99, 0.12);
  --accent-texte: #ffffff;
  --or: #c98a06;
  --or-doux: rgba(201, 138, 6, 0.14);
  --danger: #c53030;
  --ombre: 0 22px 50px rgba(20, 40, 80, 0.16);
  --ocean: #d6e3f3;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Drapeaux", "Geist", system-ui, sans-serif;
  font-size: 15px; line-height: 1.5;
  background: var(--fond); color: var(--texte);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.mono { font-family: "Drapeaux", "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.visuel-cache { position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }

/* ------------------------------------------------------------------ boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--ligne-forte); background: var(--surface-2); color: var(--texte);
  font-weight: 560; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s cubic-bezier(.16, 1, .3, 1), background .2s, border-color .2s, box-shadow .2s;
}
.bouton:hover { border-color: var(--accent); }
.bouton:active { transform: scale(0.97); }
.bouton i { font-size: 18px; }
.bouton-plein { background: var(--accent); border-color: transparent; color: var(--accent-texte); }
.bouton-plein:hover { background: var(--accent-fort); box-shadow: 0 10px 30px -10px var(--accent); }
.bouton-large { width: 100%; min-height: 48px; }
.bouton-fantome { background: transparent; }
.bouton-danger { color: var(--danger); }
.bouton-danger:hover { border-color: var(--danger); }
.bouton-rond { width: 42px; padding: 0; }
.bouton-petit { min-height: 34px; padding: 0 12px; font-size: 13px; }
.lien-discret { background: none; border: 0; color: var(--texte-2); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; font-size: 13px; padding: 6px; }

/* ------------------------------------------------------------------ formulaires */
.formulaire { display: grid; gap: 16px; }
.champ { display: grid; gap: 6px; }
.champ label, .etiquette { font-size: 13px; font-weight: 560; color: var(--texte-2); }
.champ input, .champ select, .champ textarea, .saisie {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--ligne-forte); background: var(--surface); color: var(--texte);
  transition: border-color .2s, box-shadow .2s;
}
.champ textarea { min-height: 96px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus, .saisie:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-doux);
}
.champ ::placeholder, .saisie::placeholder { color: var(--texte-3); }
.aide { margin: 0; font-size: 12.5px; color: var(--texte-3); }
.champ-erreur input, .champ-erreur select { border-color: var(--danger); }
.texte-erreur { margin: 0; font-size: 12.5px; color: var(--danger); }
.note { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.note-erreur { background: rgba(255, 122, 122, 0.12); color: var(--danger); }
.note-ok { background: var(--accent-doux); color: var(--accent); }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ------------------------------------------------------------------ pages d'accès */
.page-acces { min-height: 100dvh; overflow-x: hidden; }
.acces-fond { position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(61, 220, 151, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(46, 110, 220, 0.18), transparent 60%),
    var(--fond); }
.acces-fond canvas { width: 100%; height: 100%; display: block; }
.acces { position: relative; z-index: 1; min-height: 100dvh; display: grid; align-content: center;
  justify-items: start; gap: 28px; padding: 48px max(24px, 8vw); }
.acces-marque, .rail-marque { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.marque-signe { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 24px; color: var(--accent-texte);
  background: conic-gradient(from 210deg, var(--accent), #2f8cff, var(--accent));
  box-shadow: 0 8px 24px -8px var(--accent); }
.marque-nom { font-weight: 680; font-size: 18px; letter-spacing: -0.01em; }
.acces-carte { width: min(440px, 100%); padding: 32px; border-radius: 18px;
  background: var(--verre); border: 1px solid var(--ligne);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--ombre), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: monter .7s cubic-bezier(.16, 1, .3, 1) both; display: grid; gap: 18px; }
.acces-titre { margin: 0; font-size: 30px; letter-spacing: -0.02em; line-height: 1.1; }
.acces-texte { margin: 0; color: var(--texte-2); }
.acces-langues { margin: 0; }

@keyframes monter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes apparaitre { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------------ squelette de l'application */
.page-app { overflow: hidden; }
.app { display: grid; grid-template-columns: 236px 1fr; height: 100dvh; }
.rail {
  display: flex; flex-direction: column; gap: 28px; padding: 22px 14px;
  border-right: 1px solid var(--ligne); background: var(--fond-2); z-index: 30;
}
.rail-marque { padding: 0 8px; }
.rail-liens { display: grid; gap: 4px; }
.rail-liens a, .rail-liens button, .rail-petit {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 12px; border: 0; background: none; color: var(--texte-2); text-decoration: none;
  font-weight: 540; cursor: pointer; width: 100%; text-align: left;
  transition: background .2s, color .2s;
}
.rail-liens i, .rail-petit i { font-size: 21px; }
.rail-liens a:hover, .rail-liens button:hover, .rail-petit:hover { background: var(--surface-2); color: var(--texte); }
.rail-liens a[aria-current="page"] { background: var(--accent-doux); color: var(--accent); }
.rail-ajouter { color: var(--texte) !important; }
.rail-ajouter i { color: var(--accent); }
.rail-pied { margin-top: auto; display: grid; gap: 2px; }
.rail-pied form { margin: 0; }
.rail-petit { font-size: 13.5px; min-height: 40px; }
.rail-petit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.scene { position: relative; overflow: hidden; min-width: 0; }
.vue { position: absolute; inset: 0; overflow: auto; animation: apparaitre .35s ease both; }

/* ------------------------------------------------------------------ globe */
.vue-globe { overflow: hidden;
  background:
    radial-gradient(900px 600px at 70% 40%, rgba(47, 140, 255, 0.10), transparent 65%),
    radial-gradient(700px 500px at 20% 90%, rgba(61, 220, 151, 0.08), transparent 60%),
    var(--fond); }
[data-theme="clair"] .vue-globe { background:
    radial-gradient(900px 600px at 70% 40%, rgba(47, 140, 255, 0.12), transparent 65%), var(--fond); }
.globe-ciel { position: absolute; inset: 0; pointer-events: none; }
.globe-canevas { position: absolute; inset: 0; }
.globe-canevas canvas { outline: none; }

.flottant {
  position: absolute; z-index: 5; border-radius: 18px; background: var(--verre);
  border: 1px solid var(--ligne); backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%); box-shadow: var(--ombre);
}
.globe-entete { top: 22px; left: 22px; padding: 18px 20px; width: min(380px, calc(100% - 44px));
  display: grid; gap: 12px; animation: monter .6s .1s cubic-bezier(.16, 1, .3, 1) both; }
.globe-entete h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; line-height: 1.15; }
.compteurs { display: flex; gap: 22px; }
.compteur b { display: block; font-size: 26px; font-weight: 640; letter-spacing: -0.02em; }
.compteur span { font-size: 12.5px; color: var(--texte-2); }
.recherche { position: relative; }
.recherche i { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--texte-3); font-size: 18px; }
.recherche input { padding-left: 40px; }
.suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 8; padding: 6px;
  border-radius: 14px; background: var(--verre-fort); border: 1px solid var(--ligne); box-shadow: var(--ombre);
  max-height: 320px; overflow: auto; }
.suggestions button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px;
  border-radius: 10px; border: 0; background: none; cursor: pointer; text-align: left; }
.suggestions button:hover, .suggestions button[aria-selected="true"] { background: var(--surface-2); }
.suggestions small { color: var(--texte-3); margin-left: auto; }

.globe-classement { top: 22px; right: 22px; padding: 16px; width: 250px;
  animation: monter .6s .2s cubic-bezier(.16, 1, .3, 1) both; }
.globe-classement h2, .legende h2 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--texte-2); }
.classement { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.classement button { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px;
  width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; }
.classement button:hover { background: var(--surface-2); }
.classement .drapeau { font-size: 18px; }
.classement .barre { height: 4px; border-radius: 4px; background: var(--accent); margin-top: 4px;
  transform-origin: left; animation: etirer .9s cubic-bezier(.16, 1, .3, 1) both; }
.classement .nb { font-family: "Geist Mono", monospace; font-size: 13px; color: var(--texte-2); }
@keyframes etirer { from { transform: scaleX(0); } }

.legende { left: 22px; bottom: 22px; padding: 14px 16px; width: 300px;
  animation: monter .6s .3s cubic-bezier(.16, 1, .3, 1) both; }
.legende summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--texte-2); }
.legende summary::-webkit-details-marker { display: none; }
.legende summary i:last-child { margin-left: auto; transition: rotate .25s; }
.legende[open] summary i:last-child { rotate: 180deg; }
.legende ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; font-size: 13px; color: var(--texte-2); }
.legende li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
.echelle { height: 10px; border-radius: 6px; margin-top: 4px;
  background: linear-gradient(90deg, #143a52, #17806a, #2fc98a, #7af5bf); }
.echelle-bornes { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--texte-3); }
.puce-legende { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; background: var(--accent); color: var(--accent-texte); }
.puce-legende.or { background: transparent; border: 2px solid var(--or); }
.trait-legende { width: 22px; height: 2px; margin-top: 9px; background: linear-gradient(90deg, transparent, var(--accent)); }

.globe-outils { right: 22px; bottom: 22px; padding: 6px; display: flex; gap: 4px;
  animation: monter .6s .35s cubic-bezier(.16, 1, .3, 1) both; }
.globe-outils button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: none;
  color: var(--texte-2); cursor: pointer; display: grid; place-items: center; font-size: 20px; }
.globe-outils button:hover, .globe-outils button[aria-pressed="true"] { background: var(--surface-2); color: var(--accent); }

/* épingles HTML posées sur le globe */
.epingle { position: relative; transform: translate(-50%, -50%); cursor: pointer; pointer-events: auto; }
.epingle-corps { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-texte); font: 700 12.5px "Geist Mono", monospace;
  box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.22), 0 8px 18px -6px rgba(0, 0, 0, .6);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.epingle:hover .epingle-corps { transform: scale(1.18); }
.epingle.or .epingle-corps { box-shadow: 0 0 0 3px var(--or), 0 0 0 7px rgba(245, 196, 81, 0.18), 0 8px 18px -6px rgba(0, 0, 0, .6); }
.epingle::after { content: ""; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid var(--accent);
  opacity: 0; animation: onde 2.8s ease-out infinite; animation-delay: var(--retard, 0s); pointer-events: none; }
@keyframes onde { 0% { opacity: .55; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.9); } }
.epingle-ville .epingle-corps { background: var(--surface); color: var(--texte); border: 1px solid var(--ligne-forte);
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .6); font-family: "Geist", sans-serif; font-weight: 600; gap: 6px;
  display: flex; align-items: center; }
.epingle-ville .epingle-corps b { color: var(--accent); font-family: "Geist Mono", monospace; }
.epingle-ville::after { display: none; }
.etiquette-globe { pointer-events: none; transform: translate(-50%, 14px); font-size: 12px; font-weight: 600;
  color: var(--texte); text-shadow: 0 1px 6px rgba(0, 0, 0, .9); white-space: nowrap; }

/* panneau pays */
.panneau-pays { top: 22px; right: 22px; bottom: 22px; width: min(400px, calc(100% - 44px));
  display: flex; flex-direction: column; overflow: hidden;
  animation: glisser .5s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes glisser { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.panneau-pays-tete { padding: 20px 20px 14px; display: grid; gap: 12px; border-bottom: 1px solid var(--ligne); }
.panneau-pays-titre { display: flex; align-items: center; gap: 12px; }
.panneau-pays-titre .drapeau-grand { font-size: 38px; line-height: 1; }
.panneau-pays-titre h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; line-height: 1.1; }
.panneau-pays-titre p { margin: 2px 0 0; font-size: 13px; color: var(--texte-2); }
.panneau-pays-titre .bouton { margin-left: auto; }
.villes { display: flex; flex-wrap: wrap; gap: 6px; }
.panneau-pays-corps { overflow: auto; padding: 10px; flex: 1; }

/* pastilles */
.pastille { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--ligne-forte); background: var(--surface);
  font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--texte); transition: all .18s; }
.pastille:hover { border-color: var(--accent); }
.pastille[aria-pressed="true"] { background: var(--accent-doux); border-color: var(--accent); color: var(--accent); }
.pastille b { font-family: "Geist Mono", monospace; font-weight: 600; font-size: 12px; color: var(--texte-2); }
.pastille[aria-pressed="true"] b { color: inherit; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 560; background: var(--surface-2); color: var(--texte-2); white-space: nowrap; }
.chip-elite { background: var(--accent-doux); color: var(--accent); }

/* ------------------------------------------------------------------ lignes de contact */
.contacts { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ligne-contact { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px; border-radius: 14px; cursor: pointer; text-decoration: none; color: inherit;
  transition: background .2s, transform .2s cubic-bezier(.16, 1, .3, 1);
  animation: monter .45s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(min(var(--i, 0), 18) * 22ms); }
.ligne-contact:hover { background: var(--surface-2); }
.ligne-contact:active { transform: scale(0.99); }
.ligne-nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-detail { font-size: 13px; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-fin { display: flex; align-items: center; gap: 6px; }

.avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; position: relative;
  font-weight: 680; font-size: 15px; letter-spacing: -0.02em; color: #06101c;
  background: linear-gradient(135deg, hsl(var(--teinte, 160) 70% 68%), hsl(calc(var(--teinte, 160) + 40) 70% 52%)); }
.avatar .avatar-drapeau { position: absolute; right: -5px; bottom: -5px; font-size: 15px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.avatar-grand { width: 76px; height: 76px; border-radius: 22px; font-size: 26px; }
.avatar-grand .avatar-drapeau { font-size: 22px; right: -6px; bottom: -6px; }

.etoiles { display: inline-flex; gap: 1px; }
.etoiles button, .etoiles span { border: 0; background: none; padding: 2px; color: var(--ligne-forte);
  font-size: 15px; line-height: 1; cursor: default; }
.etoiles button { cursor: pointer; transition: transform .15s; }
.etoiles button:hover { transform: scale(1.25); }
.etoiles .pleine { color: var(--or); }
.etoiles-grandes button { font-size: 26px; padding: 4px; }
.etoiles button.eclat { animation: eclat .45s cubic-bezier(.16, 1, .3, 1); }
@keyframes eclat { 0% { transform: scale(1); } 40% { transform: scale(1.5) rotate(-10deg); } 100% { transform: scale(1); } }

.action-rapide { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 18px;
  color: var(--texte-2); background: var(--surface-2); border: 0; text-decoration: none; cursor: pointer; }
.action-rapide:hover { color: var(--accent); background: var(--accent-doux); }

/* ------------------------------------------------------------------ liste */
.vue-liste { padding: 26px clamp(16px, 3vw, 40px) 120px; }
.liste-tete { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.liste-tete h1 { margin: 0; font-size: 30px; letter-spacing: -0.025em; line-height: 1.1; }
.liste-tete p { margin: 4px 0 0; color: var(--texte-2); }
.liste-tete .bouton { margin-left: auto; }
.barre-filtres { position: sticky; top: -26px; z-index: 6; margin: 0 calc(-1 * clamp(16px, 3vw, 40px)) 16px;
  padding: 14px clamp(16px, 3vw, 40px); background: color-mix(in srgb, var(--fond) 86%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--ligne);
  display: grid; gap: 12px; }
.filtres-ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filtres-ligne .recherche { flex: 1 1 280px; min-width: 220px; }
.menu-filtre { position: relative; }
.menu-filtre-panneau { position: absolute; top: calc(100% + 8px); left: 0; z-index: 12; width: 290px; max-height: 380px;
  overflow: auto; padding: 8px; border-radius: 16px; background: var(--verre-fort); border: 1px solid var(--ligne);
  box-shadow: var(--ombre); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  animation: monter .25s cubic-bezier(.16, 1, .3, 1) both; }
.menu-filtre-panneau label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  cursor: pointer; font-size: 14px; }
.menu-filtre-panneau label:hover { background: var(--surface-2); }
.menu-filtre-panneau input { accent-color: var(--accent); width: 16px; height: 16px; }
.menu-filtre-panneau small { margin-left: auto; color: var(--texte-3); font-family: "Geist Mono", monospace; }
.menu-filtre-panneau .recherche-mini { margin-bottom: 6px; }
.filtres-actifs { display: flex; gap: 6px; flex-wrap: wrap; }
.filtres-actifs .pastille i { font-size: 13px; }

.grille-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.carte-contact { position: relative; display: grid; gap: 12px; padding: 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--ligne); cursor: pointer; text-align: left; color: inherit;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), border-color .25s, box-shadow .25s;
  animation: monter .5s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(min(var(--i, 0), 24) * 18ms); }
.carte-contact:hover { transform: translateY(-3px); border-color: var(--ligne-forte); box-shadow: var(--ombre); }
.carte-contact-tete { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; }
.carte-contact h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-contact p { margin: 0; font-size: 13px; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-contact-pied { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.carte-contact-pied .etoiles { margin-left: auto; }
.qui-court { font-size: 13px; color: var(--texte-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }

.vide { display: grid; place-items: center; gap: 10px; padding: 70px 20px; text-align: center; color: var(--texte-2); }
.vide i { font-size: 42px; color: var(--texte-3); }
.notation-bandeau { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px;
  border-radius: 16px; margin-bottom: 14px; background: var(--or-doux); color: var(--texte); }
.notation-bandeau i { font-size: 22px; color: var(--or); }
.notation-bandeau .bouton { margin-left: auto; }

/* ------------------------------------------------------------------ tiroir (fiche) */
.tiroir { position: fixed; inset: 0; z-index: 40; }
.tiroir-voile { position: absolute; inset: 0; background: rgba(3, 7, 16, 0.55); backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px); animation: apparaitre .3s ease both; }
.tiroir-panneau { position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100%); overflow: auto;
  background: var(--fond-2); border-left: 1px solid var(--ligne); box-shadow: var(--ombre);
  animation: tiroir .45s cubic-bezier(.16, 1, .3, 1) both; outline: none; }
@keyframes tiroir { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.fiche-tete { position: relative; padding: 28px 28px 22px; display: grid; gap: 16px;
  background: radial-gradient(500px 220px at 20% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.fiche-barre { display: flex; gap: 8px; justify-content: space-between; }
.fiche-identite { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: center; }
.fiche-identite h1 { margin: 0; font-size: 28px; letter-spacing: -0.025em; line-height: 1.1; overflow-wrap: anywhere; }
.fiche-identite p { margin: 6px 0 0; color: var(--texte-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fiche-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.fiche-action { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--ligne); text-decoration: none; color: var(--texte);
  font-size: 12.5px; font-weight: 560; cursor: pointer; transition: transform .2s cubic-bezier(.16, 1, .3, 1), border-color .2s; }
.fiche-action i { font-size: 22px; color: var(--accent); }
.fiche-action:hover { transform: translateY(-2px); border-color: var(--accent); }
.fiche-action[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.fiche-corps { padding: 6px 28px 40px; display: grid; gap: 26px; }
.bloc h2 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--texte-2); display: flex; align-items: center; gap: 8px; }
.bloc h2 i { font-size: 16px; color: var(--accent); }
.infos { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 16px; overflow: hidden;
  background: var(--ligne); border: 1px solid var(--ligne); }
.info { background: var(--surface); padding: 12px 14px; min-width: 0; }
.info-large { grid-column: 1 / -1; }
.info dt { font-size: 12px; color: var(--texte-3); margin-bottom: 2px; }
.info dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.info dd.vide-info { color: var(--texte-3); font-style: italic; }
.journal { list-style: none; margin: 0; padding: 0 0 0 18px; display: grid; gap: 14px; border-left: 2px solid var(--ligne-forte); }
.journal li { position: relative; }
.journal li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-doux); }
.journal time { font-size: 12.5px; color: var(--texte-3); }
.journal p { margin: 2px 0 0; white-space: pre-wrap; }
.journal .retirer { border: 0; background: none; color: var(--texte-3); cursor: pointer; font-size: 12px; padding: 0 0 0 8px; }
.journal-saisie { display: grid; gap: 8px; margin-top: 14px; }
.journal-saisie .ligne-boutons { display: flex; gap: 8px; align-items: center; }
.journal-saisie input[type="date"] { width: auto; }
.fiche-pied { font-size: 12.5px; color: var(--texte-3); }

/* édition */
.edition { display: grid; gap: 22px; }
.edition fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.edition legend { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 4px; padding: 0; }
.multi { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.multi select { width: auto; min-height: 34px; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.ligne-champ { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; }
.edition-pied { position: sticky; bottom: 0; display: flex; gap: 8px; justify-content: flex-end; padding: 14px 0;
  background: linear-gradient(transparent, var(--fond-2) 30%); }

/* ------------------------------------------------------------------ ajout rapide */
.ajout { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px; }
.ajout-voile { position: absolute; inset: 0; background: rgba(3, 7, 16, 0.55); backdrop-filter: blur(3px); animation: apparaitre .25s both; }
.ajout-carte { position: relative; width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px;
  border-radius: 22px; background: var(--fond-2); border: 1px solid var(--ligne); box-shadow: var(--ombre);
  animation: monter .4s cubic-bezier(.16, 1, .3, 1) both; display: grid; gap: 16px; }
.ajout-carte h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.ajout-entete { display: flex; align-items: center; justify-content: space-between; }
.deroulant { border: 1px solid var(--ligne); border-radius: 14px; }
.deroulant summary { cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 8px; font-size: 14px;
  font-weight: 560; color: var(--texte-2); list-style: none; }
.deroulant summary::-webkit-details-marker { display: none; }
.deroulant summary i { transition: rotate .25s; }
.deroulant[open] summary i { rotate: 90deg; }
.deroulant-corps { padding: 4px 14px 14px; display: grid; gap: 14px; }

/* ------------------------------------------------------------------ réglages */
.vue-reglages { padding: 26px clamp(16px, 3vw, 40px) 120px; }
.reglages { display: grid; gap: 22px; max-width: 980px; }
.reglages h1 { margin: 0; font-size: 30px; letter-spacing: -0.025em; }
.carte { padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--ligne); display: grid; gap: 14px; }
.carte h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.membres { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.membres li { display: flex; align-items: center; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.membres li > div { flex: 1; min-width: 180px; }
.membres small { color: var(--texte-3); display: block; }
.lien-invitation { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px;
  background: var(--accent-doux); }
.lien-invitation code { flex: 1; overflow-wrap: anywhere; font-family: "Geist Mono", monospace; font-size: 12.5px; }
.journal-modifs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; max-height: 480px; overflow: auto; }
.journal-modifs time { color: var(--texte-3); font-family: "Geist Mono", monospace; font-size: 12px; margin-right: 8px; }
.reglages-preferences { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ toasts */
.toasts { position: fixed; z-index: 60; left: 50%; bottom: 24px; translate: -50% 0; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px;
  background: var(--verre-fort); border: 1px solid var(--ligne); box-shadow: var(--ombre);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: monter .35s cubic-bezier(.16, 1, .3, 1) both; }
.toast i { font-size: 20px; color: var(--accent); }
.toast.erreur i { color: var(--danger); }
.toast .bouton { margin-left: auto; }

.squelette { border-radius: 14px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: miroiter 1.4s linear infinite; }
@keyframes miroiter { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ téléphone */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .scene { grid-row: 1; }
  .rail { grid-row: 2; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--ligne); gap: 0; background: var(--verre-fort);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .rail-marque, .rail-pied { display: none; }
  .rail-liens { grid-template-columns: repeat(4, 1fr); width: 100%; gap: 0; }
  .rail-liens a, .rail-liens button { flex-direction: column; gap: 2px; min-height: 54px; padding: 4px; font-size: 11px;
    justify-content: center; text-align: center; }
  .rail-liens a[aria-current="page"] { background: none; }
  .rail-ajouter i { width: 46px; height: 32px; border-radius: 999px; background: var(--accent); color: var(--accent-texte) !important;
    display: grid; place-items: center; }
  .globe-entete { top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; width: auto; padding: 14px 16px; gap: 10px; }
  .globe-entete h1 { font-size: 18px; }
  .compteur b { font-size: 20px; }
  .globe-classement { display: none; }
  .legende { left: 12px; bottom: 12px; width: auto; right: 72px; padding: 10px 14px; }
  .globe-outils { right: 12px; bottom: 12px; flex-direction: column; }
  /* l'animation d'entrée (fill both) l'emporterait sur opacity : on la coupe ici */
  .pays-choisi .globe-entete, .pays-choisi .legende { animation: none; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility .3s; }
  .panneau-pays { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 60%; border-radius: 22px 22px 0 0;
    animation-name: remonter; }
  @keyframes remonter { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .vue-liste, .vue-reglages { padding: 18px 14px 40px; }
  .barre-filtres { top: -18px; margin: 0 -14px 12px; padding: 12px 14px; }
  .liste-tete h1, .reglages h1 { font-size: 24px; }
  .grille-contacts { grid-template-columns: 1fr; gap: 8px; }
  .menu-filtre-panneau { position: fixed; left: 12px; right: 12px; top: auto; bottom: 90px; width: auto; max-height: 60dvh; }
  .tiroir-panneau { width: 100%; border-left: 0; animation-name: remonter; }
  .fiche-tete { padding: calc(18px + env(safe-area-inset-top)) 18px 18px; }
  .fiche-corps { padding: 4px 18px 40px; }
  .fiche-identite { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
  .avatar-grand { width: 64px; height: 64px; font-size: 22px; }
  .fiche-identite h1 { font-size: 23px; }
  .infos { grid-template-columns: 1fr; }
  .fiche-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .fiche-action { padding: 10px 2px; font-size: 11px; border-radius: 14px; }
  .grille-2 { grid-template-columns: 1fr; }
  .ajout { place-items: end stretch; padding: 0; }
  .ajout-carte { width: 100%; border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation-name: remonter; }
  .toasts { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .ligne-champ { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; }
  .epingle::after { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .flottant, .acces-carte, .toast, .menu-filtre-panneau { background: var(--surface); backdrop-filter: none; }
}
