/* ————————————————————————————————————————————————
   Kompa — carte interactive des possibilités de l'IA
   ———————————————————————————————————————————————— */
:root {
  --bg: #f6f4ef;
  --ink: #2b2740;
  --ink-soft: #6c6781;
  --ink-faint: #a9a4ba;
  --surface: #ffffff;
  --line: rgba(43, 39, 64, 0.10);
  --glass: rgba(255, 255, 255, 0.72);  /* chrome translucide (pilules, recherche, zoom…) */
  --bubble: #ffffff;                    /* fond opaque des bulles */
  --hint-bg: rgba(246, 244, 239, 0.8);  /* pastille d'aide en bas */
  --lav: 139, 120, 235;
  --peach: 240, 130, 92;
  --mint: 52, 168, 133;
  --gold: 214, 158, 60;
  --sky: 76, 148, 216;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
/* Thème sombre : on ne redéfinit que les tokens neutres, les accents pastel restent. */
:root[data-theme="dark"] {
  --bg: #16141f;
  --ink: #ece9f6;
  --ink-soft: #b3aec7;
  --ink-faint: #7b7691;
  --surface: #211e2d;
  --line: rgba(255, 255, 255, 0.11);
  --glass: rgba(42, 39, 58, 0.72);
  --bubble: #262233;
  --hint-bg: rgba(22, 20, 31, 0.82);
}
/* En sombre, les halos « multiply » disparaîtraient : on les passe en « screen » pour qu'ils rayonnent. */
:root[data-theme="dark"] .aurora { opacity: .42; filter: blur(90px); }
:root[data-theme="dark"] .aurora span { mix-blend-mode: screen; }

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  overflow: hidden;
}
button { font-family: inherit; }

svg { display: block; }
[data-icon] { display: inline-flex; }
/* toutes les icônes en ligne suivent la taille du texte ; le calque .links (traits) est exclu */
svg:not(.links) { width: 1em; height: 1em; }
.legend-key svg, .picto-icons svg { flex: none; }

/* ——— Halos pastel qui dérivent (repris de l'univers Kompa) ——— */
.aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(80px); opacity: .55; will-change: auto; }
.aurora span { position: absolute; display: block; border-radius: 50%; mix-blend-mode: multiply; animation: drift 30s var(--ease) infinite alternate; will-change: transform; }
.aurora .a { width: 44vw; height: 44vw; left: 6%; top: 4%;  background: radial-gradient(circle, rgba(var(--lav), .4), transparent 60%); }
.aurora .b { width: 50vw; height: 50vw; right: 2%; top: 14%; background: radial-gradient(circle, rgba(var(--peach), .3), transparent 60%); animation-duration: 36s; animation-delay: -8s; }
.aurora .c { width: 40vw; height: 40vw; left: 30%; bottom: 0%; background: radial-gradient(circle, rgba(var(--mint), .28), transparent 60%); animation-duration: 42s; animation-delay: -16s; }
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(3vw,-3vh,0) scale(1.1); }
  100% { transform: translate3d(-3vw,3vh,0) scale(.96); }
}

/* ——— Barre supérieure ——— */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 18px 26px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo-mark {
  width: 38px; height: 38px; flex: none;
  object-fit: contain;
  transition: transform .5s var(--ease);
}
.logo:hover .logo-mark { transform: scale(1.08); }
/* Logotype « Kompa » (Images/logo2.svg) affiché en masque : prend la couleur --ink,
   donc s'adapte tout seul au thème clair / sombre. */
.logo-word {
  display: inline-block; width: 82px; height: 27px; flex: none;
  background-color: var(--ink);
  -webkit-mask: url('../Images/logo2.svg') left center / contain no-repeat;
  mask: url('../Images/logo2.svg') left center / contain no-repeat;
}

/* Recherche (discrète : pour qui a déjà une idée précise) */
.search { position: relative; margin-left: auto; width: min(300px, 34vw); }
.search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: .95rem; color: var(--ink-faint); pointer-events: none; }
.search input {
  width: 100%; font: inherit; font-size: .88rem; color: var(--ink);
  background: var(--glass); border: 1px solid var(--line); border-radius: 100px;
  padding: 9px 16px 9px 36px; outline: none;
  backdrop-filter: blur(8px);
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.search input::placeholder { color: var(--ink-faint); }
.search input:focus { border-color: rgba(var(--lav), .55); background: var(--surface); box-shadow: 0 10px 30px -14px rgba(var(--lav), .7); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 6;
  max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 28px 70px -28px rgba(43,39,64,.5);
  padding: 6px;
}
.search-item {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  border-radius: 10px; padding: 9px 11px;
}
.search-item:hover, .search-item.is-active { background: rgba(var(--lav), .12); }
.search-item .si-label { display: block; font-size: .9rem; color: var(--ink); }
.search-item .si-path { display: block; font-size: .72rem; color: var(--ink-faint); margin-top: 2px; }
.search-empty { padding: 12px; font-size: .84rem; color: var(--ink-faint); text-align: center; }

/* Boutons pilule */
.actions { display: flex; gap: 10px; flex: none; }
.pill {
  font-size: .82rem; font-weight: 500; color: var(--ink);
  background: var(--glass); border: 1px solid var(--line); border-radius: 100px;
  padding: 9px 17px; cursor: pointer; backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px -6px rgba(43,39,64,.25);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .4s;
}
.pill:hover { transform: translateY(-2px); border-color: rgba(var(--lav), .55); box-shadow: 0 12px 30px -14px rgba(var(--lav), .8); }
.pill--ghost { background: transparent; box-shadow: none; color: var(--ink-soft); }
.pill--active { background: rgb(var(--lav)); color: #fff; border-color: rgb(var(--lav)); }
.pill--active:hover { background: rgb(var(--lav)); border-color: rgb(var(--lav)); }

/* ——— Menu déroulant ——— */
.menu-wrap { position: relative; flex: none; }
.menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 7;
  min-width: 236px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 28px 70px -28px rgba(43,39,64,.5);
  animation: fadeIn .2s var(--ease) both;
}
.menu[hidden] { display: none; }
.menu-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; color: var(--ink);
  border-radius: 10px; padding: 10px 12px; font: inherit; font-size: .88rem;
  transition: background .2s;
}
.menu-item:hover { background: rgba(var(--lav), .12); }
.menu-ico { display: inline-flex; flex: none; color: rgb(var(--lav)); font-size: 1.05rem; }
.menu-ico svg { width: 1em; height: 1em; }
.menu-label { white-space: nowrap; }

/* ——— La carte (viewport + monde déplaçable) ——— */
.viewport {
  position: fixed; inset: 0; z-index: 1;
  overflow: hidden; cursor: grab; touch-action: none;
}
.viewport.is-dragging { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; will-change: transform; }
.world.is-animated { transition: transform .65s var(--ease); }
.links { position: absolute; left: 0; top: 0; overflow: visible; }
.links path {
  fill: none; stroke: rgba(var(--c, var(--lav)), .45); stroke-width: calc(3 * var(--bs, 1));
  transition: opacity .5s var(--ease), stroke-width .3s var(--ease);
}
.links path.is-hidden { opacity: 0; }
/* Pointe lumineuse en tête du tracé d'un trait (dégradé radial : éclat plein au centre) */
.links .link-tip { pointer-events: none; transition: opacity .3s; }

/* ——— Bulles ——— */
.node {
  position: absolute; left: 0; top: 0;
  width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  transition: transform .6s var(--ease), opacity .45s var(--ease);
  will-change: transform, opacity;
  pointer-events: none;
}
.node[hidden] { display: none; }
.bubble {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 16px; text-align: center; cursor: pointer;
  transform: scale(var(--bs, 1));
  transition: transform .4s var(--ease), box-shadow .45s, border-color .35s, background .35s;
  -webkit-user-select: none; user-select: none;
  pointer-events: auto;
}
.node:hover .bubble { transform: scale(calc(var(--bs, 1) * 1.05)); }

.n-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2em; height: 2.2em; border-radius: 50%; font-size: var(--ico, 1.1rem);
  background: rgba(var(--c), .14); color: rgb(var(--c));
  flex: none;
}
.n-label { font-size: var(--fs, .84rem); font-weight: 500; line-height: 1.25; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* Bulle intermédiaire : allume / éteint ses bulles filles */
.t-domaine .bubble {
  /* fond opaque (dégradé posé sur la surface) : rien ne doit transparaître derrière la bulle */
  background: linear-gradient(160deg, var(--bubble) 0%, rgba(var(--c), .10) 100%) var(--bubble);
  border: 1.5px solid rgba(var(--c), .35);
  box-shadow: 0 10px 30px -16px rgba(var(--c), .55);
}
.t-domaine .bubble:hover { border-color: rgba(var(--c), .65); box-shadow: 0 18px 44px -18px rgba(var(--c), .8); }
.badge {
  position: absolute; left: 50%;
  bottom: calc(var(--size) * (1 - var(--bs, 1)) / 2 - 11px);
  transform: translateX(-50%) scale(var(--bs, 1));
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  font-size: .72rem; font-weight: 600; color: #fff;
  background: rgb(var(--c)); box-shadow: 0 6px 14px -6px rgba(var(--c), .9);
  pointer-events: none; transition: background .3s, transform .4s var(--ease), bottom .3s var(--ease);
}
.badge svg { width: .95em; height: .95em; }
.node.is-open > .badge { background: var(--ink-faint); box-shadow: none; }

/* Bulle finale (carte) : losange arrondi, plus large que haut → plus de place pour le titre */
.t-carte {
  width: calc(var(--size) * 1.35) !important;
  margin-left: calc(var(--size) * 1.35 / -2) !important;
}
.t-carte .bubble {
  background: var(--bubble);
  border: 2px solid rgba(var(--c), .8);
  box-shadow: 0 14px 34px -16px rgba(var(--c), .7);
  border-radius: 24%;
  padding: 10px 18px;
}
.t-carte .bubble:hover { box-shadow: 0 20px 46px -18px rgba(var(--c), .9); }
.t-carte .n-icon { background: linear-gradient(135deg, rgba(var(--c), .95), rgba(var(--c), .65)); color: #fff; }
.t-carte .badge { background: var(--bubble); color: rgb(var(--c)); border: 1.5px solid rgba(var(--c), .6); font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; }

/* Bulle racine */
.t-racine .bubble {
  /* Même recette sobre que les bulles thème : léger dégradé teinté, en lavande */
  background: linear-gradient(160deg, var(--bubble) 0%, rgba(var(--lav), .10) 100%) var(--bubble);
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 2px rgba(var(--lav), .5), 0 0 0 10px rgba(var(--lav), .07), 0 24px 60px -24px rgba(var(--lav), .8);
  gap: 8px;
}
/* Logotype « Kompa » au centre (même masque que le logo de la barre) */
.t-racine .root-word {
  display: block; width: 108px; height: 36px; margin: 2px 0;
  background-color: var(--ink);
  -webkit-mask: url('../Images/logo2.svg') center / contain no-repeat;
  mask: url('../Images/logo2.svg') center / contain no-repeat;
}
.t-racine .root-tagline { font-size: .8rem; line-height: 1.45; color: var(--ink-soft); max-width: 13em; }

/* Apparition / disparition pilotées en JS via ces classes */
.node.is-ghost { opacity: 0; pointer-events: none; }

/* ——— Surbrillance : bulles correspondant à un filtre (outil / gain) ——— */
.world.is-filtering .node:not(.is-match) .bubble { opacity: .4; transition: opacity .45s var(--ease); }
.world.is-filtering .node:not(.is-match) .badge { opacity: .4; }
.node.is-match { z-index: 3; }
.node.is-match .bubble { animation: matchPulse 1.9s var(--ease) infinite; }
@keyframes matchPulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(var(--c), .22), 0 0 26px 1px rgba(var(--c), .42), 0 16px 40px -16px rgba(var(--c), .8); }
  50%      { box-shadow: 0 0 0 9px rgba(var(--c), .34), 0 0 42px 5px rgba(var(--c), .62), 0 20px 48px -16px rgba(var(--c), .95); }
}

/* ——— Aide + zoom ——— */
.hint {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 4;
  margin: 0; font-size: .76rem; letter-spacing: .04em; color: var(--ink-faint);
  background: var(--hint-bg); backdrop-filter: blur(6px);
  padding: 8px 32px 8px 16px; border-radius: 100px; border: 1px solid var(--line);
  transition: opacity .6s var(--ease);
  pointer-events: auto; white-space: nowrap;
}
.hint.is-hidden { opacity: 0; pointer-events: none; }
.hint-close {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 2px;
  color: var(--ink-faint); line-height: 0;
}
.hint-close svg { width: 14px; height: 14px; }
.hint-close:hover { color: var(--ink); }
.hint-stats { font-weight: 600; color: var(--ink-soft); }
/* Cluster bas-droite : « Tout ouvrir » à gauche de la colonne de zoom.
   L'écart horizontal (gap) entre le bouton et zoomFit = l'écart vertical entre les zbtn. */
.bottomctrl {
  position: fixed; right: 22px; bottom: 22px; z-index: 4;
  display: flex; align-items: flex-end; gap: 8px;
}
.zoomctrl { display: flex; flex-direction: column; gap: 8px; }
.zbtn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
  color: var(--ink-soft); background: var(--glass); border: 1px solid var(--line);
  cursor: pointer; backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px -6px rgba(43,39,64,.3);
  transition: transform .3s var(--ease), color .3s, border-color .3s;
}
.zbtn:hover { transform: translateY(-2px); color: var(--ink); border-color: rgba(var(--lav), .5); }

/* ——— Fiches (bulle finale ouverte) & légende ——— */
.overlay {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(43, 39, 64, .3); backdrop-filter: blur(7px);
  animation: fadeIn .35s var(--ease) both;
}
.overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.card {
  position: relative; width: 100%; max-width: 560px; max-height: min(84vh, 720px);
  overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: 0 0 0 6px rgba(var(--c, var(--lav)), .14), 0 40px 90px -30px rgba(43,39,64,.5);
  animation: popIn .5s var(--ease) both;
}
/* Le défilement se fait sur un enfant intérieur : sa barre est ainsi rognée par
   les coins arrondis de .card (overflow:hidden), donc elle ne déborde jamais. */
.card-scroll {
  max-height: inherit; overflow-y: auto; overscroll-behavior: contain;
  padding: 34px 34px 30px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--c, var(--lav)), .38) transparent;
}
.card-scroll::-webkit-scrollbar { width: 10px; }
.card-scroll::-webkit-scrollbar-track { background: transparent; margin: 8px 0; }
.card-scroll::-webkit-scrollbar-thumb {
  background: rgba(var(--c, var(--lav)), .34);
  border-radius: 100px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
.card-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--c, var(--lav)), .55);
  background-clip: padding-box;
}
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
.card-close {
  position: absolute; top: 16px; right: 16px; z-index: 1;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
  background: rgba(43,39,64,.05); border: none; cursor: pointer; color: var(--ink-soft);
  transition: background .3s, color .3s;
}
.card-close:hover { background: rgba(43,39,64,.1); color: var(--ink); }

.card-head { display: flex; gap: 16px; align-items: flex-start; padding-right: 34px; }
.card-ico {
  flex: none; width: 56px; height: 56px; border-radius: 18px; font-size: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(var(--c), .95), rgba(var(--c), .6)); color: #fff;
  box-shadow: 0 12px 26px -12px rgba(var(--c), .9);
}
.card h2 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.55rem; line-height: 1.15; margin: 4px 0 6px; }
.card-desc { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--ink-soft); }

.card-section { margin-top: 24px; }
.card-section h3 {
  margin: 0 0 10px; font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
}
.tools-reco { display: flex; }
.tools-alts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tools-alt-label {
  margin: 16px 0 9px; font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .88rem; font-weight: 500; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: 100px; padding: 8px 15px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .35s;
}
.chip:hover { transform: translateY(-2px); border-color: rgba(var(--c), .6); box-shadow: 0 10px 24px -12px rgba(var(--c), .8); }
.chip svg { width: .85em; height: .85em; color: var(--ink-faint); }
.chip--main {
  color: #fff; border: none;
  background: linear-gradient(115deg, rgba(var(--c),1), rgba(var(--c),.75));
  box-shadow: 0 10px 26px -12px rgba(var(--c), .9);
}
.chip--main svg { color: rgba(255,255,255,.85); }
.card-how { margin: 0; font-size: .93rem; line-height: 1.65; color: var(--ink-soft); }

/* Pictogrammes */
.pictos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.picto {
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
}
.picto-icons { display: inline-flex; gap: 3px; font-size: 1.05rem; color: rgb(var(--c)); }
.picto-icons .off { opacity: .18; }
.picto-name { font-size: .72rem; font-weight: 600; color: var(--ink-soft); line-height: 1.25; }
.picto-label { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); line-height: 1.3; }

/* Apports */
.apports { display: flex; flex-wrap: wrap; gap: 8px; }
.apport {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .8rem; font-weight: 500; color: rgb(var(--c));
  background: rgba(var(--c), .1); border-radius: 100px; padding: 7px 14px;
}
.apport svg { width: 1em; height: 1em; }

/* Légende */
/* ——— Formulaire « Suggérer un outil » ——— */
.card--suggest { max-width: 480px; }
.suggest-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.5rem; margin: 0 0 6px; }
.suggest-intro { margin: 0 0 20px; font-size: .92rem; line-height: 1.5; color: var(--ink-soft); }
.suggest-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 500; color: var(--ink-soft); }
.field .opt { color: var(--ink-faint); font-weight: 400; }
.suggest-form input, .suggest-form textarea {
  font: inherit; font-size: .9rem; color: var(--ink); width: 100%;
  background: var(--glass); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 13px; outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.suggest-form textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.suggest-form input::placeholder, .suggest-form textarea::placeholder { color: var(--ink-faint); }
.suggest-form input:focus, .suggest-form textarea:focus {
  border-color: rgba(var(--lav), .55); background: var(--surface);
  box-shadow: 0 8px 24px -14px rgba(var(--lav), .7);
}

/* Sélecteur déroulant personnalisé */
.cselect { position: relative; }
.cselect-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  font: inherit; font-size: .9rem; color: var(--ink); text-align: left; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 13px; outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.cselect-btn:hover { border-color: rgba(var(--lav), .4); }
.cselect.is-open .cselect-btn {
  border-color: rgba(var(--lav), .55); background: var(--surface);
  box-shadow: 0 8px 24px -14px rgba(var(--lav), .7);
}
.cselect-arrow { display: inline-flex; flex: none; color: rgb(var(--lav)); transition: transform .25s var(--ease); }
.cselect-arrow svg { width: 1.1em; height: 1.1em; }
.cselect.is-open .cselect-arrow { transform: rotate(180deg); }
.cselect-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; padding: 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 20px 50px -22px rgba(43,39,64,.5);
  animation: fadeIn .18s var(--ease) both;
}
.cselect-menu[hidden] { display: none; }
.cselect-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  font: inherit; font-size: .88rem; color: var(--ink); text-align: left; cursor: pointer;
  background: none; border: none; border-radius: 8px; padding: 9px 11px; outline: none;
  transition: background .18s;
}
.cselect-opt:hover, .cselect-opt:focus-visible { background: rgba(var(--lav), .12); }
.cselect-opt.is-selected { color: rgb(var(--lav)); font-weight: 600; }
.cselect-opt-check { display: inline-flex; flex: none; color: rgb(var(--lav)); opacity: 0; }
.cselect-opt-check svg { width: 1em; height: 1em; }
.cselect-opt.is-selected .cselect-opt-check { opacity: 1; }
.suggest-two { display: flex; gap: 12px; }
.suggest-two .field { flex: 1; min-width: 0; }
.suggest-foot { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.pill--send { background: linear-gradient(135deg, rgb(var(--lav)), rgb(var(--sky))); color: #fff; border: none; font-weight: 600; padding: 10px 22px; }
.pill--send:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.suggest-status { font-size: .82rem; color: var(--ink-soft); }
.suggest-status.is-error { color: rgb(var(--peach)); }
.suggest-done { display: flex; align-items: center; gap: 9px; margin: 10px 0; font-size: .98rem; color: var(--ink); }
.suggest-done svg { flex: none; color: rgb(var(--mint)); width: 1.2em; height: 1.2em; }
@media (max-width: 520px) { .suggest-two { flex-direction: column; gap: 14px; } }

/* ——— À propos ——— */
.card--about { max-width: 480px; }
.about-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.5rem; margin: 0 0 14px; }
.about-p { margin: 0 0 12px; font-size: .93rem; line-height: 1.6; color: var(--ink-soft); }
.about-p:last-child { margin-bottom: 0; }
.about-p strong { color: var(--ink); font-weight: 600; }
.about-link { color: rgb(var(--lav)); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.about-link:hover { text-decoration: underline; }
.about-link svg { width: .8em; height: .8em; }
.about-suggest {
  font: inherit; font-weight: 500; color: rgb(var(--lav));
  background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline;
}

/* ——— Partager ——— */
.card--share { max-width: 480px; }
.share-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.5rem; margin: 0 0 10px; }
.share-p { margin: 0 0 18px; font-size: .93rem; line-height: 1.6; color: var(--ink-soft); }
.share-row { display: flex; gap: 10px; align-items: stretch; }
.share-url {
  flex: 1; min-width: 0;
  font: inherit; font-size: .86rem; color: var(--ink);
  background: var(--glass); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 13px; outline: none;
}
.share-url:focus { border-color: rgba(var(--lav), .55); }
.share-copy { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; flex: none; }
.share-copy svg { width: .95em; height: .95em; }
@media (max-width: 520px) { .share-row { flex-direction: column; } .share-copy { justify-content: center; } }

/* ——— Filtrer (par outil / par gain) ——— */
/* Popup Filtrer : hauteur FIXE (identique quel que soit l'onglet). L'en-tête (titre,
   sous-titre, onglets) reste figé ; seule la liste défile. */
.card--filter {
  max-width: 460px; height: min(80vh, 560px);
  display: flex; flex-direction: column;
}
.filter-head { flex: none; padding: 34px 34px 0; }
.filter-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.4rem; margin: 0 34px 4px 0; }
.filter-sub { margin: 0 0 16px; font-size: .9rem; line-height: 1.5; color: var(--ink-soft); }
.filter-tabs {
  display: flex; gap: 4px; margin-bottom: 14px; padding: 4px;
  background: rgba(var(--lav), .09); border-radius: 13px;
}
.filter-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 34px 30px;
  scrollbar-width: thin; scrollbar-color: rgba(var(--lav), .38) transparent;
}
.filter-scroll::-webkit-scrollbar { width: 10px; }
.filter-scroll::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
.filter-scroll::-webkit-scrollbar-thumb { background: rgba(var(--lav), .34); border-radius: 100px; border: 3px solid transparent; background-clip: padding-box; }
.filter-scroll::-webkit-scrollbar-thumb:hover { background: rgba(var(--lav), .55); background-clip: padding-box; }
.filter-tab {
  flex: 1; padding: 9px 12px; border: none; background: none; border-radius: 9px;
  font: inherit; font-size: .86rem; font-weight: 500; color: var(--ink-soft); cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.filter-tab.is-on {
  background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: 0 2px 10px -5px rgba(43,39,64,.35);
}
.filter-list { display: flex; flex-direction: column; gap: 4px; }
.filter-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  text-align: left; background: none; border: 1px solid transparent; border-radius: 11px;
  padding: 11px 13px; font: inherit; font-size: .92rem; color: var(--ink); cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.filter-item:hover { background: rgba(var(--lav), .1); border-color: var(--line); transform: translateX(2px); }
.filter-item .fi-main { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.filter-item .fi-ico { display: inline-flex; flex: none; color: rgb(var(--lav)); }
.filter-item .fi-ico svg { width: 1.05em; height: 1.05em; }
.filter-item .fi-count {
  flex: none; font-size: .74rem; font-weight: 600; color: var(--ink-faint);
  background: rgba(var(--lav), .12); border-radius: 100px; padding: 2px 9px;
}
.filter-empty { margin: 12px 4px; font-size: .88rem; color: var(--ink-faint); }

/* ——— Toast (retour d'action : lien copié…) ——— */
.site-toast {
  position: fixed; left: 50%; bottom: 64px; transform: translate(-50%, 12px); z-index: 20;
  font-size: .85rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 100px;
  padding: 10px 20px; box-shadow: 0 18px 44px -18px rgba(43,39,64,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.site-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ——— Mobile ——— */
@media (max-width: 720px) {
  .topbar { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .logo-word { font-size: 1.2rem; }
  .search { order: 3; width: 100%; margin-left: 0; }
  .actions { margin-left: auto; }
  .pill { padding: 8px 13px; font-size: .78rem; }
  .hint { display: none; }
  .bottomctrl { right: 14px; bottom: 14px; }
  .card { border-radius: 22px; }
  .card-scroll { padding: 26px 22px 24px; }
  .filter-head { padding: 26px 22px 0; }
  .filter-scroll { padding: 0 22px 24px; }
  /* Garder les 3 pictos sur une seule ligne : on resserre plutôt que de renvoyer le 3e à la ligne. */
  .pictos { gap: 7px; }
  .picto { padding: 12px 6px; }
  .picto-label { letter-spacing: .04em; }
}

/* Petit lien discret pour passer d'une version à l'autre (démo) */
.version-switch {
  position: fixed; left: 22px; bottom: 22px; z-index: 4;
  font-size: .76rem; letter-spacing: .04em; color: var(--ink-faint); text-decoration: none;
  background: var(--glass); border: 1px solid var(--line); border-radius: 100px;
  padding: 8px 15px; backdrop-filter: blur(8px);
  transition: color .3s, border-color .3s, transform .3s var(--ease);
}
.version-switch:hover { color: var(--ink); border-color: rgba(var(--lav), .5); transform: translateY(-2px); }
@media (max-width: 720px) { .version-switch { left: 14px; bottom: 14px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .aurora span { animation: none; }
}
