/* Un espace calme : fond de brume, une lueur qui respire, les jeux posés l'un sous l'autre.
   Le jeu choisi teinte la lueur (abricot pour le tarot, lilas pour les miroirs, rose pour les 77) ; tout le reste se tait. */
:root {
  color-scheme: light;
  --fond: #eef1ec;
  --surface: #fbfcf9;
  --surface-2: #e3e9e2;
  --trait: #d2dad2;
  --texte: #1d2725;
  --texte-2: #5f6d68;
  --accent: #2c6a5a;
  --accent-encre: #f5faf7;
  --accent-doux: #d6e7dd;
  --alerte: #b24f38;
  --tarot-a: #f3d2ae;
  --tarot-b: #d3e5d9;
  --miroirs-a: #dad5f1;
  --miroirs-b: #cfe3e8;
  --les77-a: #f3cfcd;
  --les77-b: #d6d9f2;
  --lueur-a: var(--tarot-a);
  --lueur-b: var(--miroirs-a);
  --ombre: rgba(29, 39, 37, .16);
  --voile: rgba(29, 39, 37, .38);
  --f-majeur: #7a68c0;
  --f-batons: #c8674a;
  --f-coupes: #4d88ab;
  --f-epees: #7f8a96;
  --f-pentacles: #c2952c;
  --f-miroirs: #6f7fb5;
  --c-rouge: #c6524a;
  --c-indigo: #5a5fc0;
  --police-titre: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --police-texte: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fond: #111816;
    --surface: #19221f;
    --surface-2: #222d29;
    --trait: #2f3c37;
    --texte: #e7eeea;
    --texte-2: #9aa9a3;
    --accent: #9fd1bb;
    --accent-encre: #10201a;
    --accent-doux: #24392f;
    --alerte: #f0957c;
    --tarot-a: #4a3927;
    --tarot-b: #1f352c;
    --miroirs-a: #36315a;
    --miroirs-b: #1d363d;
    --les77-a: #4b2b2e;
    --les77-b: #262b55;
    --c-rouge: #e8837a;
    --c-indigo: #9296ee;
    --ombre: rgba(0, 0, 0, .5);
    --voile: rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --fond: #111816;
  --surface: #19221f;
  --surface-2: #222d29;
  --trait: #2f3c37;
  --texte: #e7eeea;
  --texte-2: #9aa9a3;
  --accent: #9fd1bb;
  --accent-encre: #10201a;
  --accent-doux: #24392f;
  --alerte: #f0957c;
  --tarot-a: #4a3927;
  --tarot-b: #1f352c;
  --miroirs-a: #36315a;
  --miroirs-b: #1d363d;
  --les77-a: #4b2b2e;
  --les77-b: #262b55;
  --c-rouge: #e8837a;
  --c-indigo: #9296ee;
  --ombre: rgba(0, 0, 0, .5);
  --voile: rgba(0, 0, 0, .6);
}
body[data-jeu="tarot"] { --lueur-a: var(--tarot-a); --lueur-b: var(--tarot-b); }
body[data-jeu="miroirs"] { --lueur-a: var(--miroirs-a); --lueur-b: var(--miroirs-b); }
body[data-jeu="les77"] { --lueur-a: var(--les77-a); --lueur-b: var(--les77-b); }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background:
    radial-gradient(34rem 22rem at 12% -6rem, var(--lueur-a), transparent 72%),
    radial-gradient(30rem 20rem at 96% 2rem, var(--lueur-b), transparent 72%),
    var(--fond);
  background-repeat: no-repeat;
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 17px;
  line-height: 1.55;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.app { max-width: 38rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; padding-block: 1rem 0; }
h1, h2 { font-family: var(--police-titre); font-weight: 500; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
h2 { font-size: 1.9rem; line-height: 1.12; }
p { margin: 0; }
button, select, textarea, input { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.invisible { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* En-tête */
.entete { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; min-height: 2.5rem; }
.marque { display: flex; align-items: center; gap: .55rem; margin-right: auto; font-size: 1.2rem; font-weight: 500; letter-spacing: -.01em; }
.orbe { width: 1.15rem; height: 1.15rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--surface), var(--accent) 85%); box-shadow: 0 0 0 5px var(--accent-doux); }
body.occupe .orbe { animation: souffle 4s ease-in-out infinite; }
@keyframes souffle { 0%, 100% { transform: scale(.82); } 50% { transform: scale(1.18); } }
.entete-outils { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-align: center;
  padding: .85rem 1.4rem; border-radius: 999px; border: 1px solid var(--trait);
  background: var(--surface); color: var(--texte); cursor: pointer;
  transition: transform .15s, background .15s;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-plein { background: var(--accent); color: var(--accent-encre); border-color: transparent; }
.btn-grand { font-size: 1.1rem; padding: 1.05rem 1.5rem; width: 100%; }
.btn-petit { font-size: .88rem; font-weight: 500; padding: .45rem .9rem; }
.btn[aria-pressed="false"] { color: var(--texte-2); }
.btn[aria-pressed="true"] { background: var(--accent-doux); border-color: transparent; }
.lien { background: none; border: 0; padding: .3rem 0; color: var(--texte-2); text-decoration: underline; text-decoration-color: var(--trait); text-underline-offset: 4px; cursor: pointer; font-size: .95rem; }
.lien:hover { color: var(--texte); }
.icone { width: 1.2em; height: 1.2em; flex: none; }

/* Écrans */
.ecran { display: flex; flex-direction: column; gap: 1.5rem; }
.intro { display: flex; flex-direction: column; gap: .6rem; padding-top: 1.25rem; }
.intro p { color: var(--texte-2); font-size: 1.08rem; max-width: 30rem; }
.etiquette, .champ label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-2); font-weight: 500; }

/* Choix du jeu */
.jeux { display: flex; flex-direction: column; gap: .75rem; }
.jeu {
  display: flex; align-items: center; gap: 1rem; text-align: left; min-width: 0;
  background: var(--surface); border: 1px solid var(--trait); border-radius: 26px; padding: .7rem 1.1rem .7rem .7rem;
  cursor: pointer; box-shadow: 0 16px 34px -26px var(--ombre); transition: transform .2s, box-shadow .2s;
}
.jeu:hover { transform: translateY(-2px); box-shadow: 0 22px 38px -24px var(--ombre); }
.jeu[data-jeu="tarot"] { --teinte: var(--tarot-a); }
.jeu[data-jeu="miroirs"] { --teinte: var(--miroirs-a); }
.jeu[data-jeu="les77"] { --teinte: var(--les77-a); }
.jeu-image { width: 84px; aspect-ratio: 1; flex: none; color: var(--texte); }
.jeu-image .tache { fill: var(--teinte); }
.jeu-image .papier { fill: var(--surface); }
.jeu-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.jeu-nom { font-family: var(--police-titre); font-size: 1.3rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.jeu-detail { font-size: .9rem; color: var(--texte-2); line-height: 1.35; }
.jeu-fleche { width: 1.2rem; height: 1.2rem; flex: none; color: var(--texte-2); }
.mention { font-size: .85rem; color: var(--texte-2); }

/* Préparation */
.champ { display: flex; flex-direction: column; gap: .45rem; }
.champ-ligne { display: flex; gap: .5rem; align-items: flex-end; }
textarea, select, input[type="text"] {
  width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 18px;
  padding: .8rem 1rem; color: var(--texte);
}
textarea { resize: vertical; min-height: 3.4rem; }
textarea::placeholder, input::placeholder { color: var(--texte-2); opacity: .8; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.actions { display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.aide { font-size: .93rem; color: var(--texte-2); text-wrap: pretty; }
.actions .aide { text-align: center; text-wrap: balance; }
.provisoire { font-size: .9rem; font-style: italic; color: var(--texte-2); min-height: 1.2em; }

/* Bandeau */
.bandeau { position: sticky; top: max(.5rem, env(safe-area-inset-top, 0px)); z-index: 5; border: 1px solid var(--trait); border-radius: 18px; padding: .85rem 1rem; background: var(--surface); display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.bandeau p::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--alerte); margin-right: .55rem; vertical-align: .08em; }
.bandeau-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Tirage */
.photo { width: 100%; max-height: 14rem; object-fit: cover; border-radius: 22px; background: var(--surface-2); }
.attente { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; padding-block: 1.25rem; }
.attente p { color: var(--texte-2); max-width: 22rem; text-wrap: balance; }
.respire { width: 5.5rem; height: 5.5rem; border-radius: 50%; background: radial-gradient(circle at 38% 32%, var(--surface), var(--lueur-a) 55%, var(--accent-doux)); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent-doux) 45%, transparent); animation: souffle 4s ease-in-out infinite; }
.points { display: inline-flex; gap: .35rem; padding-block: .4rem; }
.points i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); animation: point 1.4s ease-in-out infinite; }
.points i:nth-child(2) { animation-delay: .2s; }
.points i:nth-child(3) { animation-delay: .4s; }
@keyframes point { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.cartes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 1rem .7rem; }
.cartes li { display: flex; flex-direction: column; gap: .3rem; align-items: center; min-width: 0; }
.carte {
  width: 100%; max-width: 120px; aspect-ratio: 2 / 3; padding: .55rem .4rem .6rem; border-radius: 14px;
  background: var(--surface); color: var(--texte); border: 1px solid var(--trait);
  box-shadow: 0 12px 22px -18px var(--ombre); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: .25rem;
}
body[data-jeu="tarot"] .carte, body[data-jeu="tarot"] .ajout { aspect-ratio: 70 / 120; }
.carte-num { font-size: .72rem; color: var(--texte-2); letter-spacing: .06em; line-height: 1; min-height: .72rem; align-self: flex-start; padding-left: .2rem; }
.carte-glyphe { width: 58%; flex: 1; min-height: 0; }
.carte.inv .carte-glyphe { transform: rotate(180deg); }
.carte-nom { font-size: .76rem; font-weight: 500; line-height: 1.15; text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.carte.inconnue { border-style: dashed; border-color: var(--alerte); justify-content: center; font-family: var(--police-titre); font-size: 1.8rem; color: var(--texte-2); }
.carte-place { font-size: .8rem; line-height: 1.25; color: var(--texte-2); text-align: center; }
.carte-place b { color: var(--texte); font-weight: 600; }
.pastille { font-size: .7rem; font-weight: 500; line-height: 1; padding: .28rem .55rem; border-radius: 999px; background: var(--accent-doux); color: var(--texte); }
.pastille.doute { background: transparent; box-shadow: inset 0 0 0 1px var(--alerte); color: var(--alerte); }
.pastille.discret { background: transparent; box-shadow: inset 0 0 0 1px var(--trait); color: var(--texte-2); }
.ajout { aspect-ratio: 2 / 3; width: 100%; max-width: 120px; border: 1px dashed var(--trait); border-radius: 14px; background: transparent; color: var(--texte-2); cursor: pointer; font-size: .88rem; padding: .4rem; }
.rangee { display: flex; flex-wrap: wrap; gap: .6rem; }
.rangee .btn { flex: 1 1 12rem; }
.erreur { color: var(--alerte); font-size: .93rem; }

/* Fenêtres */
dialog { border: 1px solid var(--trait); border-radius: 26px; background: var(--surface); color: var(--texte); padding: 1.3rem; width: min(25rem, calc(100vw - 32px)); box-shadow: 0 30px 60px -30px var(--ombre); }
dialog::backdrop { background: var(--voile); }
dialog form { display: flex; flex-direction: column; gap: 1.1rem; }
dialog h2 { font-size: 1.35rem; }
dialog select, dialog input[type="text"] { background: var(--fond); }
.case { display: flex; align-items: center; gap: .6rem; }
.case input { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); }

/* Séance */
.ruban { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .5rem; }
.ruban .carte { width: 62px; flex: none; padding: .3rem .2rem .35rem; border-radius: 10px; cursor: default; box-shadow: none; }
.ruban .carte-nom { font-size: .5rem; }
.ruban .carte-num { font-size: .5rem; min-height: .5rem; }
.resume { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; font-size: .9rem; color: var(--texte-2); }
.fil { display: flex; flex-direction: column; gap: 1.4rem; }
.msg { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.msg-qui { display: flex; align-items: center; gap: .45rem; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-2); font-weight: 500; }
.msg-qui::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }
.msg-texte { display: flex; flex-direction: column; gap: .75rem; overflow-wrap: anywhere; }
.msg-lanterne .msg-texte { font-size: 1.08rem; line-height: 1.6; max-width: 65ch; }
.msg-lanterne strong { font-weight: 600; }
.msg-moi { align-items: flex-end; }
.msg-moi .msg-texte { background: var(--accent-doux); border-radius: 20px 20px 6px 20px; padding: .65rem 1rem; max-width: 85%; }
.msg-note { font-size: .88rem; font-style: italic; color: var(--texte-2); }
.ecouter { align-self: flex-start; }
.reponses { display: flex; flex-wrap: wrap; gap: .5rem; }
.reponses .btn { font-size: .95rem; padding: .55rem 1rem; }
.pied { position: sticky; bottom: 0; background: var(--fond); padding-block: .7rem; padding-bottom: calc(.7rem + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: .5rem; }
.pied-outils { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.saisie { display: flex; gap: .4rem; align-items: flex-end; background: var(--surface); border: 1px solid var(--trait); border-radius: 26px; padding: .35rem .35rem .35rem 1rem; }
.saisie:focus-within { border-color: var(--accent); }
.saisie textarea { border: 0; background: transparent; padding: .5rem 0; min-height: 2.5rem; max-height: 9rem; resize: none; field-sizing: content; border-radius: 0; }
.saisie textarea:focus { outline: none; }
.rond { width: 2.6rem; height: 2.6rem; padding: 0; flex: none; }

@media (prefers-reduced-motion: reduce) {
  body.occupe .orbe, .respire, .points i { animation: none; }
  .btn, .jeu { transition: none; }
}

/* ---------- Site autonome : accès, clé, voix en direct ---------- */
input[type="password"] { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 18px; padding: .8rem 1rem; color: var(--texte); }
.panneau { background: var(--surface); border: 1px solid var(--trait); border-radius: 26px; padding: 1.3rem; display: flex; flex-direction: column; gap: 1rem; }
.panneau h3 { font-family: var(--police-titre); font-weight: 500; font-size: 1.15rem; margin: 0; letter-spacing: -.01em; }
.reussite { color: var(--accent); font-size: .93rem; }
.etat-voix { display: flex; align-items: center; gap: .6rem; font-size: .93rem; color: var(--texte-2); min-height: 1.6rem; }
.etat-voix::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--trait); flex: none; }
.etat-voix[data-etat="parle"]::before { background: var(--accent); animation: point 1.4s ease-in-out infinite; }
.etat-voix[data-etat="ecoute"]::before { background: var(--c-rouge); }
.etat-voix[data-etat="attente"]::before { background: var(--accent); animation: point 1.4s ease-in-out infinite; }
.micro { position: relative; width: 2.6rem; height: 2.6rem; padding: 0; flex: none; overflow: visible; }
.micro[aria-pressed="true"] { background: var(--c-rouge); color: #fff; border-color: transparent; }
.micro .halo { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--c-rouge); opacity: 0; transform: scale(var(--niveau, 1)); transition: transform .08s linear; pointer-events: none; }
.micro[aria-pressed="true"] .halo { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .etat-voix::before { animation: none !important; } .micro .halo { transition: none; } }

/* ---------- Choix du tirage et schémas ---------- */
.filtres { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
.filtres .btn { flex: none; }
.chapitre { display: flex; flex-direction: column; gap: .8rem; padding-top: .6rem; }
.chapitre + .chapitre { padding-top: 1.6rem; }
.chapitre h3 { font-family: var(--police-titre); font-weight: 500; font-size: 1.2rem; letter-spacing: -.01em; margin: 0; }
.tirages { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem .8rem; }
.tirage {
  display: flex; flex-direction: column; gap: .35rem; text-align: left; padding: 0; min-width: 0;
  background: none; border: 0; cursor: pointer; color: var(--texte);
}
.tirage img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; border: 1px solid var(--trait); background: var(--surface-2); box-shadow: 0 14px 26px -22px var(--ombre); transition: transform .2s; }
.tirage:hover img { transform: translateY(-2px); }
.tirage-titre { font-weight: 600; font-size: .95rem; line-height: 1.2; }
.tirage-taille { font-size: .82rem; color: var(--texte-2); line-height: 1.2; }
.schema { margin: 0; display: flex; flex-direction: column; gap: .4rem; align-items: center; }
.schema-image { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; max-width: 100%; }
.schema-image img { display: block; width: auto; max-width: 100%; height: auto; max-height: 52vh; border-radius: 20px; border: 1px solid var(--trait); }
.fenetre-schema { width: min(34rem, calc(100vw - 16px)); padding: .6rem; }
.fenetre-schema form { gap: .6rem; }
.fenetre-schema img { display: block; width: 100%; height: auto; border-radius: 18px; }
.resume-liens { display: inline-flex; gap: 1rem; }
@media (prefers-reduced-motion: reduce) { .tirage img { transition: none; } }

/* Navigation : retour et accueil */
.marque button { display: flex; align-items: center; gap: .55rem; background: none; border: 0; padding: .3rem 0; font: inherit; letter-spacing: inherit; cursor: pointer; }
.retour { width: 2.5rem; height: 2.5rem; padding: 0; flex: none; }

/* Plateau : les cartes reconnues, à leur place sur le schéma */
.plateau { position: relative; width: 100%; max-width: 19rem; margin-inline: auto; border-radius: 22px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--trait); }
.plateau-place { position: absolute; transform: translate(-50%, -50%); border-radius: 10px; border: 1px solid var(--trait); background: var(--surface); padding: .2rem; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; cursor: pointer; min-width: 0; line-height: 1.1; box-shadow: 0 6px 14px -10px var(--ombre); }
.plateau-place b { font-family: var(--police-titre); font-size: 1rem; font-weight: 600; color: var(--accent); }
.plateau-place span { font-size: .68rem; text-align: center; overflow-wrap: anywhere; hyphens: auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plateau-place.vide { border-style: dashed; background: transparent; box-shadow: none; cursor: default; }
.plateau-place.vide b { color: var(--texte-2); }
.plateau-place.travers { z-index: 1; transform: translate(-50%, -50%) rotate(90deg); }
.plateau-place.doute { border-color: var(--alerte); }
.plateau.large { max-width: none; }
.plateau.large .plateau-place span { font-size: .56rem; }
.plateau.serre .plateau-place span { display: none; }
.plateau.serre .plateau-place b { font-size: .72rem; }

/* Lectures de la visite, à télécharger */
.lectures { display: flex; flex-direction: column; gap: .7rem; }
.lectures h3 { font-family: var(--police-titre); font-weight: 500; font-size: 1.15rem; margin: 0; }
.lectures ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.lectures li { display: flex; align-items: center; gap: .75rem; background: var(--surface); border: 1px solid var(--trait); border-radius: 18px; padding: .6rem .6rem .6rem 1rem; }
.lectures li > span { flex: 1; min-width: 0; line-height: 1.3; }
.lectures li small { display: block; color: var(--texte-2); font-size: .82rem; }

/* Comptes et crédits */
input[type="email"], input[type="password"] { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 18px; padding: .8rem 1rem; color: var(--texte); }
.offres { display: flex; flex-direction: column; gap: .8rem; }
.offres h3 { font-family: var(--police-titre); font-weight: 500; font-size: 1.35rem; letter-spacing: -.02em; margin: 0; }
.offres .aide { margin-top: -.4rem; }
.grille { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.grille th, .grille td { text-align: right; padding: .5rem .3rem; border-bottom: 1px solid var(--trait); font-weight: 400; }
.grille th { color: var(--texte-2); font-size: .82rem; }
.grille th:first-child, .grille td:first-child { text-align: left; }
.releve { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.releve li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--trait); }
.releve small { display: block; color: var(--texte-2); }
.releve b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Le crédit : une petite lueur, partout la même */
.credit { display: inline-flex; align-items: center; gap: .32rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.credit i { width: .82em; height: .82em; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff3d6, #f0b24a 62%, #c9822a); box-shadow: 0 0 0 .16em color-mix(in srgb, #f0b24a 24%, transparent); }
.pastille-credits { gap: .4rem; }

/* Solde */
.apercu { display: flex; flex-direction: column; gap: .7rem; border: 1px dashed var(--trait); border-radius: 22px; padding: .9rem 1rem; font-size: .93rem; color: var(--texte-2); }
.apercu strong { color: var(--texte); font-weight: 600; }
.segments { display: flex; gap: .25rem; background: var(--surface-2); border-radius: 999px; padding: .25rem; }
.segments button { flex: 1; min-width: 0; border: 0; background: none; border-radius: 999px; padding: .5rem .4rem; font-size: .88rem; font-weight: 500; line-height: 1.15; color: var(--texte-2); cursor: pointer; }
.segments button[aria-pressed="true"] { background: var(--surface); color: var(--texte); box-shadow: 0 6px 14px -10px var(--ombre); }
.solde { display: flex; align-items: center; gap: 1.2rem; background: var(--surface); border: 1px solid var(--trait); border-radius: 28px; padding: 1.2rem; box-shadow: 0 18px 38px -28px var(--ombre); }
.jauge { position: relative; width: 8.2rem; aspect-ratio: 1; flex: none; display: grid; place-items: center; }
.jauge svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.jauge circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.jauge .fond { stroke: var(--surface-2); }
.jauge .part-abo { stroke: #e9a93f; }
.jauge .part-achat { stroke: var(--accent); }
.jauge-nombre { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.jauge-nombre b { font-family: var(--police-titre); font-weight: 500; font-size: 2.7rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.jauge-nombre span { font-size: .85rem; color: var(--texte-2); margin-top: .3rem; }
.solde-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .55rem; }
.solde-texte .etiquette { text-transform: none; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
.solde-detail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; font-size: .95rem; line-height: 1.3; }
.solde-detail li { display: flex; gap: .5rem; align-items: baseline; }
.solde-detail li::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; flex: none; background: var(--accent); }
.solde-detail li.abo::before { background: #e9a93f; }
.solde-detail li.rien::before { background: var(--alerte); }
.solde-detail small { display: block; color: var(--texte-2); font-size: .82rem; }
.solde-equivalent { font-size: .9rem; color: var(--texte-2); line-height: 1.35; }

/* Offres */
.formules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.formule { position: relative; display: flex; flex-direction: column; gap: .35rem; background: var(--surface); border: 1px solid var(--trait); border-radius: 24px; padding: 1.1rem 1rem 1rem; min-width: 0; }
.formule.avant { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.formule.actuelle { background: var(--accent-doux); border-color: transparent; box-shadow: none; }
.formule-nom { font-weight: 600; }
.formule-prix { font-family: var(--police-titre); font-size: 1.75rem; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.formule-prix small { font-family: var(--police-texte); font-size: .88rem; letter-spacing: 0; color: var(--texte-2); }
.formule p { font-size: .88rem; line-height: 1.35; color: var(--texte-2); }
.formule .credit { font-size: .98rem; color: var(--texte); margin-top: .25rem; white-space: normal; line-height: 1.2; }
.formule .btn { margin-top: auto; padding: .65rem .8rem; font-size: .95rem; }
.formule-plus { position: absolute; top: -.65rem; right: 1rem; font-size: .75rem; font-weight: 600; background: var(--accent); color: var(--accent-encre); border-radius: 999px; padding: .2rem .65rem; line-height: 1.3; }
.recharges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.recharge { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; background: var(--surface); border: 1px solid var(--trait); border-radius: 22px; padding: .95rem .5rem .75rem; min-width: 0; }
.recharge .credit { font-family: var(--police-titre); font-size: 1.6rem; font-weight: 500; letter-spacing: -.02em; }
.recharge .credit i { width: .5em; height: .5em; }
.recharge > span:not(.credit) { font-size: .85rem; color: var(--texte-2); line-height: 1.2; }
.recharge b { font-weight: 600; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.recharge .btn { width: 100%; padding: .55rem .3rem; font-size: .88rem; margin-top: .35rem; }

/* Coût de chaque tirage */
input[type="search"] { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 18px; padding: .75rem 1rem; color: var(--texte); }
.couts { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.couts-titre { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-2); font-weight: 500; margin: 0 0 .3rem; }
.cout { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--trait); padding: .5rem 0; cursor: pointer; }
.cout img { width: 40px; height: 50px; object-fit: cover; border-radius: 8px; border: 1px solid var(--trait); background: var(--surface-2); flex: none; }
.cout > span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.25; font-weight: 500; }
.cout small { display: block; font-weight: 400; color: var(--texte-2); font-size: .83rem; }
.cout .credit { font-size: 1.05rem; }
.tirage-image { position: relative; display: block; }
.tirage-image .credit { position: absolute; bottom: .5rem; right: .45rem; font-size: .9rem; line-height: 1; padding: .32rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--texte); box-shadow: 0 4px 12px -6px var(--ombre); }
.prix-tirage { display: flex; flex-direction: column; gap: .35rem; background: var(--surface); border: 1px solid var(--trait); border-radius: 20px; padding: .85rem 1.1rem; font-size: .95rem; line-height: 1.35; }
.prix-tirage .ligne { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.prix-tirage small { color: var(--texte-2); font-size: .86rem; }
.prix-tirage .manque { color: var(--alerte); }
.prix-tirage .btn { align-self: flex-start; margin-top: .25rem; }
.schema-prix { text-align: center; color: var(--texte-2); font-size: .95rem; margin: .6rem 0; }
@media (max-width: 400px) {
  .jauge { width: 6.8rem; }
  .jauge-nombre b { font-size: 2.2rem; }
  .solde { gap: .9rem; padding: 1rem; }
  .formule { padding: 1rem .85rem .85rem; }
  .formule-prix { font-size: 1.45rem; }
}

/* Profil et inscription */
.deux-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.case { align-items: flex-start; line-height: 1.4; font-size: .95rem; cursor: pointer; }
.case input { flex: none; margin-top: .1rem; }
a.lien { display: inline-block; }
#bonjour { text-transform: none; letter-spacing: 0; font-size: 1rem; }

.liens-bas { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; }
.champs { display: flex; flex-direction: column; gap: 1rem; }
dialog form { max-height: calc(100dvh - 6rem); overflow-y: auto; }
