/* Pages de connexion, d'inscription et de mot de passe oublié (voir app/pages.py). Réutilise les couleurs de style.css. */
.page-auth { min-height: 100vh; min-height: 100dvh; }
.auth { max-width: 440px; margin: 0 auto; padding: 14px 16px 40px; }
.auth-marque { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; color: var(--fg); text-decoration: none; }
.auth-nom { font-family: var(--font-titre); font-size: clamp(1.5rem, 6vw, 1.9rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.05; }
.auth-carte { padding: 22px 22px 20px; }
.auth-carte h1, .auth-carte h2 { font-size: var(--t-2xl); letter-spacing: -.01em; margin-bottom: 14px; }
.auth-carte p { margin: 0 0 12px; }
.auth-form { display: block; margin: 0; }
.auth-form button { width: 100%; margin-top: 18px; padding: 11px 16px; }
.auth-form + .auth-form button { margin-top: 10px; }
.aide-champ { display: block; color: var(--muted); font-size: var(--t-s); margin-top: 4px; }
.message { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-m); font-size: var(--t-base); line-height: 1.4; border: 1px solid transparent; }
.message.ok { background: var(--herbe-soft); color: var(--fg); border-color: color-mix(in srgb, var(--herbe) 35%, transparent); }
.message.info { background: var(--surface-2); color: var(--fg); border-color: var(--line); }
.message.erreur { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--fg); border-color: color-mix(in srgb, var(--down) 45%, transparent); }
.auth-liens { text-align: center; margin: 16px 0 0 !important; font-size: var(--t-m); }
.auth-pied { text-align: center; color: var(--muted); font-size: var(--t-m); line-height: 1.4; margin: 18px 0 0; }

/* En-tête : retour à l'accueil + thème, bandeau illustré (même look que le reste du site) */
.auth-haut { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 440px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px 0; }
.auth-retour { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 16px 0 10px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--fg); font-weight: 600; font-size: var(--t-base); text-decoration: none; }
.auth-retour svg { width: 18px; height: 18px; flex: none; }
.auth-retour { transition: background-color var(--d-rapide), color var(--d-rapide), transform var(--d-rapide) var(--ressort); }
.auth-retour:active { transform: scale(.97); }
.auth-retour:hover { background: var(--accent-soft); color: var(--accent); }
.auth-retour:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth .bandeau { margin: 0 0 14px; height: 108px; }
.bandeau .bcle { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.bandeau .bplus { fill: none; stroke: var(--surface); stroke-width: 7; stroke-linecap: round; }
/* Bouton de thème (même rendu que la page d'accueil) */
.ac-theme { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--fg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.ac-theme { transition: background-color var(--d-rapide), transform var(--d-rapide) var(--ressort); }
.ac-theme:active { transform: scale(.92); }
.ac-theme:hover { background: var(--accent-soft); }
.ac-theme:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ac-theme svg { width: 20px; height: 20px; }
.ac-theme svg.ac-soleil { display: none; }
:root[data-theme="dark"] .ac-theme svg.ac-soleil { display: block; }
:root[data-theme="dark"] .ac-theme svg.ac-lune { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .ac-theme svg.ac-soleil { display: block; }
  :root:not([data-theme]) .ac-theme svg.ac-lune { display: none; }
}

/* Pages légales (confidentialité, conditions) : colonne de lecture plus large */
.page-large .auth, .page-large .auth-haut { max-width: 680px; }
.auth-carte h3 { font-size: var(--t-l); margin: 18px 0 6px; letter-spacing: -.005em; }
.auth-carte ul { margin: 0 0 12px; padding-left: 20px; }
.auth-carte li { margin: 0 0 6px; line-height: 1.45; }
.auth-pied a { color: inherit; display: inline-block; padding: 10px 4px; text-underline-offset: 2px; }
.auth-accord { text-align: center; margin-top: 10px; }

/* Formulaire Contact */
.auth-form textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid var(--line, #d7ded9); border-radius: var(--r-m); background: inherit; color: inherit; resize: vertical; min-height: 140px; }
.auth-form input[readonly] { opacity: .75; cursor: not-allowed; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.periodes { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 12px; }
.periodes legend { padding: 0 6px; color: var(--muted); font-size: var(--t-m); }
.periodes label { display: flex; gap: 8px; align-items: center; padding: 6px 0; }

/* Les styles du forfait (tableau, cadres, Merci animé) sont dans style.css : l'application les utilise aussi (#/forfait). */


/* =====================================================================================================
   « Scène » des pages de connexion (4.10.77) : à gauche la semaine d'un menu qui se compose, à droite le formulaire.
   Un seul enchaînement d'arrivée (≈ 1,3 s), puis le calme : seule la vapeur du logo continue. Les états de départ des
   animations sont des « from » avec animation-fill-mode: backwards ; l'état final est toujours le style de base, donc
   « réduire les animations » (style.css) montre simplement la page finie.
   ===================================================================================================== */
.page-scene { background: var(--bg); }
.page-scene {
  display: grid; min-height: 100vh; min-height: 100dvh;
  grid-template-columns: minmax(400px, 5fr) minmax(0, 6fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "scene haut" "scene main" "scene pied";
}
.page-scene .auth-haut { grid-area: haut; max-width: none; margin: 0; width: 100%; padding: calc(20px + env(safe-area-inset-top)) clamp(20px, 4vw, 40px) 0; }
.page-scene .auth { grid-area: main; align-self: center; width: 100%; max-width: 460px; margin: 0 auto; padding: 28px 24px 24px; }
.page-scene .auth-pied { grid-area: pied; margin: 0; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); }

/* --- panneau de gauche */
.scene {
  grid-area: scene; position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; padding: clamp(24px, 4vw, 44px);
  background: var(--surface-tint);      /* 4.10.196 : sable (avant : la teinte pâle de l'accent) */
}
.scene::before, .scene::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; background: color-mix(in srgb, var(--accent) 9%, transparent); }
.scene::before { width: 420px; height: 420px; left: -150px; top: -150px; }
.scene::after { width: 520px; height: 520px; right: -190px; bottom: -200px; }
.scene-marque { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; color: var(--fg); text-decoration: none; border-radius: var(--r-m); }
.scene-marque:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.scene-marque .logo { width: 36px; height: 36px; color: var(--accent); flex: none; }
.scene-marque .auth-nom { font-size: var(--t-4xl); }
.scene-centre { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 26px; padding: 28px 0 12px; }
.scene-accroche { margin: 0; max-width: 17em; font-family: var(--font-titre); font-weight: 700; font-size: clamp(1.7rem, 1.1rem + 1.7vw, 2.4rem); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; text-align: center; }

/* --- la planche de la semaine */
.planche {
  position: relative; width: min(100%, 400px); padding: 14px 16px 10px; border-radius: var(--r-xl); transform: rotate(-1deg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--ombre-3);
}
.pl-tete { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; font-family: var(--font-display); font-weight: 700; font-size: var(--t-base); }
.pl-tete svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.pl-liste { list-style: none; margin: 0; padding: 0; }
.pl-rang { display: grid; grid-template-columns: 34px 38px 1fr; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.pl-jour { color: var(--muted); font-size: var(--t-xs); font-weight: 600; }
.pl-img { display: block; width: 38px; height: 38px; border-radius: var(--r-m); overflow: hidden; }
.pl-img svg { display: block; width: 100%; height: 100%; }
.pl-nom { font-size: var(--t-base); font-weight: 500; line-height: 1.2; }
.pl-resto .pl-img { display: grid; place-items: center; background: var(--resto-soft); color: var(--resto); }
.pl-resto .pl-img svg { width: 20px; height: 20px; }
.pl-resto .pl-nom { justify-self: start; padding: 3px 10px; border-radius: var(--r-pill); background: var(--resto-soft); color: var(--resto); font-weight: 600; font-size: var(--t-s); }
.pl-epicerie {
  position: absolute; right: -22px; bottom: -26px; display: flex; align-items: center; gap: 8px; padding: 10px 14px 10px 12px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--bg); font-size: var(--t-m); font-weight: 600; transform: rotate(2deg);
  box-shadow: var(--lueur-forte);
}
.pl-epicerie svg { width: 18px; height: 18px; flex: none; }
.pl-epicerie b { padding: 1px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--bg) 22%, transparent); font-weight: 700; }

/* --- la bande de sept assiettes (téléphone seulement) */
.bande { display: none; }
.bande-j { display: grid; justify-items: center; gap: 3px; }
.bande-j small { color: var(--muted); font-size: var(--t-2xs); font-weight: 600; }
.bande-img { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid var(--surface); }
.bande-img svg { display: block; width: 100%; height: 100%; }
.bande-j.resto .bande-img { background: var(--resto-soft); color: var(--resto); }
.bande-j.resto .bande-img svg { width: 18px; height: 18px; }

/* --- le formulaire */
.page-scene .auth-carte { padding: 0; margin: 0; background: none; border: 0; border-radius: 0; }
.auth-badge { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: var(--r-xl); background: var(--accent-soft); color: var(--accent); }
.auth-badge svg { width: 26px; height: 26px; }
.page-scene .auth-carte h1 { font-family: var(--font-titre); font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.4rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 8px; }
.auth-sous { color: var(--muted); font-size: var(--t-l); line-height: 1.45; margin: 0 0 8px !important; max-width: 30em; }
.page-scene .champ label { margin: 18px 0 6px; font-size: var(--t-m); font-weight: 600; color: var(--fg); }
.page-scene .champ input { padding: 12px 14px; border-radius: var(--r-m); font-size: var(--t-l); }
.page-scene .aide-champ { margin-top: 6px; }
.champ-mdp { position: relative; display: block; }
.champ-mdp input { padding-right: 48px !important; }
.auth-form .oeil { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.auth-form .oeil:hover { border: 0; background: var(--surface-2); color: var(--fg); }
.auth-form .oeil:active { transform: translateY(-50%) scale(.92); }
.oeil svg { width: 20px; height: 20px; }
.oeil .o-ferme, .oeil[aria-pressed="true"] .o-ouvert { display: none; }
.oeil[aria-pressed="true"] .o-ferme { display: block; }
.auth-oubli { margin: 8px 0 0 !important; text-align: right; font-size: var(--t-m); }
.page-scene .auth-form button.primaire { height: 52px; margin-top: 24px; font-size: var(--t-l); letter-spacing: .005em; }
.page-scene .auth-form button.primaire:hover { transform: translateY(-1px); }
.page-scene .auth-form button.primaire:active { transform: scale(.98); }
.auth-form button.occupe::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .8s linear infinite; }
.champ-mdp + .aide-champ.accord-mdp { color: var(--muted); }
.aide-champ.mdp-ok { color: var(--herbe); }
.aide-champ.mdp-non { color: var(--down); }
.page-scene .auth-liens { margin-top: 22px !important; color: var(--muted); }
.page-scene .auth-liens a { font-weight: 600; }
.page-scene .auth-carte p { margin-bottom: 12px; }
.page-scene .message { border-radius: var(--r-m); margin: 14px 0 0; }
.page-scene .auth-pied { font-size: var(--t-s); }
.page-scene .auth-pied a { color: var(--muted); }

/* --- l'arrivée */
@keyframes sc-monte { from { opacity: 0; transform: translateY(14px); } }
@keyframes sc-planche { from { opacity: 0; transform: translateY(26px) rotate(-3.5deg) scale(.96); } }
@keyframes sc-rang { from { opacity: 0; transform: translateX(-16px); } }
@keyframes sc-pop { from { opacity: 0; transform: scale(.4); } }
@keyframes sc-epicerie { from { opacity: 0; transform: translateY(18px) rotate(7deg) scale(.7); } }
@keyframes sc-secoue { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.scene-marque { animation: sc-monte .5s var(--glisse) backwards; }
.scene-accroche { animation: sc-monte .6s var(--glisse) .1s backwards; }
.planche { animation: sc-planche .7s var(--glisse) .2s backwards; }
.pl-tete { animation: sc-rang .45s var(--glisse) .45s backwards; }
.pl-rang { animation: sc-rang .45s var(--glisse) backwards; animation-delay: calc(.5s + var(--r) * 80ms); }
.pl-rang .pl-img { animation: sc-pop .5s var(--ressort) backwards; animation-delay: calc(.6s + var(--r) * 80ms); }
.pl-epicerie { animation: sc-epicerie .6s var(--ressort) 1.3s backwards; }
.bande-j { animation: sc-pop .5s var(--ressort) backwards; animation-delay: calc(.25s + var(--r) * 70ms); }
.pl-rang:nth-child(1), .bande-j:nth-child(1) { --r: 0; } .pl-rang:nth-child(2), .bande-j:nth-child(2) { --r: 1; }
.pl-rang:nth-child(3), .bande-j:nth-child(3) { --r: 2; } .pl-rang:nth-child(4), .bande-j:nth-child(4) { --r: 3; }
.pl-rang:nth-child(5), .bande-j:nth-child(5) { --r: 4; } .pl-rang:nth-child(6), .bande-j:nth-child(6) { --r: 5; }
.pl-rang:nth-child(7), .bande-j:nth-child(7) { --r: 6; }

.auth-badge { animation: sc-pop .55s var(--ressort) .1s backwards; }
.page-scene .auth-carte > h1 { animation: sc-monte .55s var(--glisse) .16s backwards; }
.auth-sous { animation: sc-monte .55s var(--glisse) .22s backwards; }
.page-scene .auth-carte > .message { animation: sc-monte .5s var(--glisse) .24s backwards, sc-secoue .5s ease-in-out .7s; }
.page-scene .auth-carte > p, .page-scene .auth-carte > .auth-liens { animation: sc-monte .5s var(--glisse) .3s backwards; }
.page-scene .auth-form > * { animation: sc-monte .5s var(--glisse) backwards; animation-delay: calc(.26s + var(--i, 0) * 60ms); }
.page-scene .auth-form > :nth-child(1) { --i: 0; } .page-scene .auth-form > :nth-child(2) { --i: 1; }
.page-scene .auth-form > :nth-child(3) { --i: 2; } .page-scene .auth-form > :nth-child(4) { --i: 3; }
.page-scene .auth-form > :nth-child(5) { --i: 4; } .page-scene .auth-form > :nth-child(6) { --i: 5; }
.page-scene .auth-form > :nth-child(n+7) { --i: 6; }
.page-scene .auth-form + .auth-liens, .page-scene .auth-form + .auth-form { animation-delay: .75s; }
@media (prefers-reduced-motion: reduce) { .auth-form button.occupe::after { animation: tourne 1.5s linear infinite !important; } }

/* --- écrans moyens et téléphones : la planche devient une bande d'assiettes au-dessus du formulaire */
@media (max-width: 860px) {
  .page-scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; grid-template-areas: "haut" "scene" "main" "pied"; }
  .page-scene .auth-haut { padding: calc(14px + env(safe-area-inset-top)) 16px 0; }
  .scene { align-items: center; padding: 14px 16px 6px; background: none; overflow: visible; }
  .scene::before, .scene::after { display: none; }
  .scene-marque { align-self: center; }
  .scene-marque .logo { width: 32px; height: 32px; }
  .scene-marque .auth-nom { font-size: var(--t-3xl); }
  .scene-centre { flex: none; gap: 0; padding: 10px 0 0; }
  .scene-accroche, .planche { display: none; }
  .bande { display: flex; justify-content: center; gap: clamp(6px, 2.4vw, 14px); }
  .bande-img { width: clamp(34px, 10vw, 46px); height: clamp(34px, 10vw, 46px); border-color: var(--bg); }
  .page-scene .auth { padding: 18px 20px 16px; max-width: 480px; }
  .auth-badge { width: 46px; height: 46px; margin-bottom: 12px; border-radius: var(--r-l); }
  .page-scene .champ input { font-size: var(--t-l); }   /* 16 px : iOS ne zoome pas sur le champ */
}
@media (max-width: 860px) and (max-height: 720px) { .auth-badge { display: none; } .bande-j small { display: none; } }
/* Bureau peu haut : on garde la planche mais on la resserre */
@media (min-width: 861px) and (max-height: 760px) {
  .scene-accroche { display: none; }
  .pl-rang { padding: 4px 0; }
  .scene-centre { gap: 18px; }
}
@media (min-width: 861px) and (max-height: 600px) { .pl-rang:nth-child(n+6) { display: none; } }


/* =====================================================================================================
   « Nous écrire » (4.10.78) : même scène, mais à gauche une petite conversation qui s'écrit toute seule
   (question → trois points → réponse). Les composants du formulaire (pastilles, compteur, « Message envoyé »)
   sont dans style.css : l'application les utilise aussi.
   ===================================================================================================== */
.fil { width: min(100%, 400px); display: grid; gap: 12px; }
.bulle { max-width: 88%; padding: 12px 16px; font-size: var(--t-base); line-height: 1.4; border-radius: var(--r-xl); }
.bulle-moi { justify-self: end; background: var(--accent); color: var(--bg); border-bottom-right-radius: 6px; transform-origin: 100% 100%; }
.bulle-eux { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; transform-origin: 0 100%;
  box-shadow: var(--ombre-2); }
.fil-reponse { display: grid; }
.fil-reponse > .bulle { grid-area: 1 / 1; }
.bulle.points { display: flex; align-items: center; gap: 5px; align-self: start; width: fit-content; padding: 17px 18px; opacity: 0; }
.points i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }

@keyframes fil-bulle { from { opacity: 0; transform: translateY(14px) scale(.9); } }
@keyframes fil-points { 0% { opacity: 0; transform: scale(.7); } 14% { opacity: 1; transform: none; } 86% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fil-saute { 50% { transform: translateY(-4px); opacity: .45; } }
.bulle-moi { animation: fil-bulle .55s var(--ressort) .5s backwards; }
.bulle.points { animation: fil-points 1.5s ease 1.3s both; }
.points i { animation: fil-saute .9s ease-in-out infinite; }
.points i:nth-child(2) { animation-delay: .15s; } .points i:nth-child(3) { animation-delay: .3s; }
.fil-reponse > .bulle-eux:not(.points) { animation: fil-bulle .55s var(--ressort) 2.8s backwards; }

.auth-badge.succes { width: auto; height: auto; margin-bottom: 6px; background: none; border-radius: 0; animation: none; }
.auth-badge.succes { display: flex; justify-content: flex-start; align-items: flex-start; }
.auth-badge.succes .cs-icone { width: 88px; height: 88px; }
.auth-badge.succes .cs-icone svg { width: 100%; height: 100%; }
.auth-form .pastille-sujet { width: auto; margin: 0; padding: 0 14px 0 10px; }
.page-scene .champ-message textarea { padding: 12px 14px; border-radius: var(--r-m); font-size: var(--t-l); }
.page-scene .contact-message-tete label { margin-bottom: 6px; }
.page-scene .pastilles-sujet { margin-top: 10px; }
.page-scene .contact-message-tete .compteur { margin-top: 18px; }
.scene-contact .auth-form button.contact-envoi { gap: 8px; }

@media (max-width: 860px) {
  .scene-contact .scene-centre { display: none; }
  .scene-contact .scene { padding-bottom: 0; }
  .page-scene .champ-message textarea { font-size: var(--t-l); }
}
@media (max-width: 860px) and (max-height: 820px) { .scene-contact .auth-badge:not(.succes) { display: none; } }
@media (min-width: 861px) and (max-height: 820px) { .scene-contact .auth-badge:not(.succes) { display: none; } .scene-contact .auth { padding-top: 26px; } }

/* =====================================================================================================
   Pages légales des visiteurs (4.10.79) : à gauche, une colonne qui reste en place (les trois pages + « dans cette page »,
   dont l'indicateur suit la lecture : auth.js) ; à droite, la page se lit. Les composants de lecture sont dans style.css.
   ===================================================================================================== */
.page-scene.page-legal { grid-template-columns: minmax(300px, 4fr) minmax(0, 8fr); }
.page-scene.page-legal .auth-haut { max-width: none; }
.page-scene.page-legal .auth { align-self: start; max-width: 820px; padding: 34px clamp(20px, 5vw, 64px) 64px; }
.page-scene.page-legal .auth-carte h1 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.1rem); line-height: 1.05; margin: 0 0 16px; text-wrap: balance; }
.page-scene.page-legal .legal-corps p { margin-bottom: 14px; }
.page-scene.page-legal .legal-corps .legal-lead p { margin: 0; }
.page-scene.page-legal .legal-corps .legal-bref-note, .page-scene.page-legal .legal-corps .legal-suite p { margin-bottom: 0; }
.page-scene.page-legal .legal-corps .legal-suite p { margin-bottom: 12px; }
.page-scene.page-legal .legal-corps .legal-maj { margin-bottom: 18px; }
.page-scene.page-legal .legal-corps .legal-sec ul { margin: 0 0 14px; padding: 0; }
.page-scene.page-legal .legal-corps .legal-sec li { margin: 0 0 10px; line-height: 1.65; }

.scene-legal, .scene-forfait { position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; gap: 24px; padding: calc(clamp(22px, 3vw, 38px) + env(safe-area-inset-top, 0px)) clamp(18px, 2.4vw, 34px) 22px; }   /* 4.10.96 : sous la barre d'état (app installée sur iPad) */
.legal-docs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legal-docs li { margin: 0; }
.legal-doc { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-l); border: 1px solid transparent; color: var(--fg); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: var(--t-l); line-height: 1.2; transition: background var(--d-base), border-color var(--d-base), transform var(--d-rapide); }
.legal-doc svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.legal-doc:hover { background: color-mix(in srgb, var(--surface) 62%, transparent); }
.legal-doc:active { transform: scale(.98); }
.legal-doc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.legal-doc.actif { background: var(--surface); border-color: var(--line); box-shadow: var(--ombre-2); }

.legal-toc { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 6px 6px 2px; }
.legal-toc-titre { margin: 0 0 10px 2px; color: var(--muted); font-size: var(--t-s); font-weight: 600; }
.toc-liste { position: relative; }
.toc-liste::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.toc-liste ol { list-style: none; margin: 0; padding: 0; }
.toc-liste li { margin: 0; }
.toc-liste a { display: block; padding: 7px 8px 7px 16px; border-radius: 0 var(--r-s) var(--r-s) 0; color: var(--muted); text-decoration: none; font-size: var(--t-m); line-height: 1.35; font-weight: 500; transition: color var(--d-base); }
.toc-liste li.n3 a { padding-left: 30px; font-size: var(--t-s); }
.toc-liste a:hover { color: var(--fg); }
.toc-liste a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.toc-liste a[aria-current="location"] { color: var(--accent); font-weight: 600; }
.toc-ind { position: absolute; left: -.5px; top: 0; width: 3px; height: var(--h, 0px); border-radius: var(--r-xs); background: var(--accent); opacity: 0; transform: translateY(var(--y, 0px)); transition: transform var(--d-moyen) var(--glisse), height var(--d-moyen) var(--glisse), opacity var(--d-base); }
.toc-liste.vivant .toc-ind { opacity: 1; }

.page-legal .legal-sommaire { display: none; }     /* sur grand écran, le sommaire est dans la colonne de gauche */
.legal-progres { display: none; }

@media (prefers-reduced-motion: no-preference) {
  html:has(.page-legal) { scroll-behavior: smooth; }
  .scene-legal .legal-docs li, .scene-legal .toc-liste li, .scene-legal .legal-toc-titre { animation: sc-monte .5s var(--glisse) backwards; animation-delay: calc(.2s + var(--i, 0) * 55ms); }
  .legal-docs li:nth-child(2) { --i: 1; } .legal-docs li:nth-child(3) { --i: 2; }
  .legal-toc-titre { --i: 3; }
  .toc-liste li:nth-child(1) { --i: 4; } .toc-liste li:nth-child(2) { --i: 5; } .toc-liste li:nth-child(3) { --i: 6; } .toc-liste li:nth-child(4) { --i: 7; }
  .toc-liste li:nth-child(5) { --i: 8; } .toc-liste li:nth-child(6) { --i: 9; } .toc-liste li:nth-child(n+7) { --i: 10; }
}
/* Barre de lecture : pilotée par le défilement de la page, sans script (navigateurs qui savent le faire) */
@keyframes legal-progres { to { transform: scaleX(1); } }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .legal-progres { display: block; position: fixed; z-index: 60; left: 0; top: 0; width: 100%; height: 3px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); animation: legal-progres linear both; animation-timeline: scroll(root); }
  }
}

/* Écrans moyens et téléphones : la colonne devient une rangée de trois pastilles, le sommaire se range sous le titre */
@media (max-width: 860px) {
  .page-scene.page-legal { grid-template-columns: minmax(0, 1fr); }
  .scene-legal, .scene-forfait { position: static; height: auto; gap: 12px; padding: 10px 16px 0; }
  .scene-legal .legal-toc { display: none; }
  /* 4.10.147 : les trois pages en un seul sélecteur, comme les onglets « Me connecter / Créer un compte » */
  .legal-docs { width: 100%; }
  .legal-docs ul { display: flex; gap: 2px; width: 100%; max-width: 520px; margin: 0 auto; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); }
  .legal-docs li { flex: 1 1 auto; min-width: 0; }
  .legal-doc { justify-content: center; min-height: 40px; padding: 0 12px; gap: 7px; border: 0; border-radius: var(--r-pill); color: var(--muted); font-size: var(--t-m); white-space: nowrap; }
  .legal-doc:hover { background: transparent; color: var(--fg); }
  .legal-doc.actif { background: var(--surface); color: var(--fg); box-shadow: var(--ombre-1); }
  .legal-doc svg { width: 16px; height: 16px; }
  .page-scene.page-legal .auth { max-width: 720px; padding: 14px 20px 40px; }
  .page-scene.page-legal .auth-carte h1 { font-size: clamp(1.9rem, 1.4rem + 3vw, 2.4rem); }
  .page-legal .legal-corps .legal-sommaire { display: block; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6;   /* 4.10.96 : sous l'encoche (app installée) */
    margin: 16px -20px 0; padding: 8px 20px; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .page-legal .legal-corps .legal-h { scroll-margin-top: 76px; }
}
@media (max-width: 480px) {
  .legal-doc { padding: 0 6px; font-size: var(--t-s); }
  .legal-doc svg { display: none; }
}

/* =====================================================================================================
   Page « Passer à Plus » des visiteurs (4.10.81) : à gauche la carte Plus qui se pose (l'étoile fait des étincelles, les points
   de la liste se cochent un à un) ; à droite le titre, le prix, les boutons, puis le tableau (style.css : .forfait-*, .forfaits).
   ===================================================================================================== */
.page-scene.page-forfait { grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr); }
.page-scene.page-forfait .auth-haut { max-width: none; }
.page-scene.page-forfait .auth { align-self: start; max-width: 760px; padding: 34px clamp(20px, 5vw, 64px) 64px; }
.page-scene.page-forfait .auth-carte h1 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.1rem); line-height: 1.05; margin: 0 0 12px; text-wrap: balance; }
.page-scene.page-forfait .auth-sous { margin: 0 0 22px; max-width: 34em; color: var(--muted); font-size: var(--t-xl); line-height: 1.5; }
.page-scene.page-forfait .forfait-prix p, .page-scene.page-forfait .forfait-actif p, .page-scene.page-forfait .forfait-actions p { margin-bottom: 0; }
.page-scene.page-forfait .forfait-actions { margin: 0 0 6px; }
.forfait-actions > p { margin: 0 0 12px; color: var(--muted); }
.fa-boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.fa-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--fg); font-weight: 600; font-size: var(--t-l); text-decoration: none; transition: transform var(--d-rapide), border-color var(--d-base), box-shadow var(--d-base); }
.fa-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.fa-btn:active { transform: scale(.98); }
.fa-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fa-btn.primaire { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.fa-btn.primaire:hover { box-shadow: var(--lueur-forte); }
.page-forfait .forfait-sec { margin-top: 32px; }

/* --- la carte Plus */
.scene-forfait .scene-centre { justify-content: center; padding: 56px 0 20px; }
.plan { position: relative; width: min(100%, 340px); }
.plan-dos { position: absolute; inset: 28px -16px -22px 22px; border-radius: var(--r-2xl); background: var(--surface); border: 1px solid var(--line); opacity: .8; transform: rotate(4deg); }
.plan-carte { position: relative; padding: 0 24px 24px; border-radius: var(--r-2xl); background: var(--accent); color: var(--bg); transform: rotate(-1.5deg); box-shadow: var(--ombre-4); }
.plan-etoile { position: relative; display: grid; place-items: center; width: 68px; height: 68px; margin: 0 0 6px; top: -34px; margin-bottom: -22px; border-radius: 50%; background: var(--bg); box-shadow: var(--ombre-3); }
.plan-etoile svg { width: 38px; height: 38px; fill: var(--plus-fill); stroke: var(--plus-ln); stroke-width: 1.5; }
.plan-onde { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--plus-fill); opacity: 0; }
.plan-e { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: var(--r-xs); background: var(--plus-fill); opacity: 0; }
.plan-e:nth-of-type(even) { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; }
.plan-e1 { --a: 0deg; } .plan-e2 { --a: 60deg; } .plan-e3 { --a: 120deg; } .plan-e4 { --a: 180deg; } .plan-e5 { --a: 240deg; } .plan-e6 { --a: 300deg; }
.plan-nom { margin: 0; font-family: var(--font-titre); font-weight: 700; font-size: var(--t-7xl); line-height: 1.05; letter-spacing: -.02em; }
.plan-prix { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 0; }
.plan-prix b { font-family: var(--font-display); font-weight: 700; font-size: var(--t-4xl); }
.plan-prix small { font-size: var(--t-m); opacity: .85; }
.prix-devise { font-size: .42em; font-weight: 700; letter-spacing: 0; }   /* 4.10.189 : « CA » après un prix en grand (Internationale) */
.plan-essai { display: inline-block; margin: 12px 0 0; padding: 4px 12px; border-radius: var(--r-pill); background: var(--plus-fill); color: #1c1400; font-weight: 700; font-size: var(--t-s); }
.plan-liste { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.plan-liste li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--t-base); line-height: 1.35; }
.plan-liste li svg { flex: none; width: 22px; height: 22px; padding: 3px; margin-top: -1px; border-radius: 50%; background: color-mix(in srgb, var(--bg) 24%, transparent); }

@keyframes plan-entre { from { opacity: 0; transform: translateY(44px) rotate(2deg); } }
@keyframes plan-dos { from { opacity: 0; transform: translate(30px, 10px) rotate(9deg); } }
@keyframes plan-onde { 0% { opacity: 0; transform: scale(.7); } 15% { opacity: .9; } 100% { opacity: 0; transform: scale(2.1); } }
@keyframes plan-gicle { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.2); } 20% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-58px) scale(1); } }
.plan-liste li:nth-child(2) { --i: 1; } .plan-liste li:nth-child(3) { --i: 2; } .plan-liste li:nth-child(4) { --i: 3; } .plan-liste li:nth-child(5) { --i: 4; }
@media (prefers-reduced-motion: no-preference) {
  .plan-carte { animation: plan-entre .8s var(--glisse) .15s backwards; }
  .plan-dos { animation: plan-dos .8s var(--glisse) .3s backwards; }
  .plan-etoile svg { animation: plus-pop .6s var(--ressort) .8s backwards; }
  .plan-onde { animation: plan-onde .9s ease-out .95s backwards; }
  .plan-e { animation: plan-gicle .9s ease-out .95s backwards; }
  .plan-nom, .plan-prix, .plan-essai { animation: sc-monte .5s var(--glisse) .55s backwards; }
  .plan-liste li { animation: sc-monte .45s var(--glisse) backwards; animation-delay: calc(1s + var(--i, 0) * 150ms); }
  .plan-liste li svg path { stroke-dasharray: 1; animation: legal-trace .5s ease-out backwards; animation-delay: calc(1.1s + var(--i, 0) * 150ms); }
}
@media (max-width: 860px) {
  .page-scene.page-forfait { grid-template-columns: minmax(0, 1fr); }
  .scene-forfait .scene-centre, .scene-forfait .plan { display: none; }
  .page-scene.page-forfait .auth { max-width: 720px; padding: 14px 20px 40px; }
  .page-scene.page-forfait .auth-carte h1 { font-size: clamp(1.9rem, 1.4rem + 3vw, 2.4rem); }
}
@media (max-width: 480px) { .fa-btn { flex: 1 1 100%; } }

/* --- connexion par clé d'accès (4.10.110) : « ou », puis un bouton empreinte sous le formulaire */
.auth-cle { margin-top: 18px; }
.auth-ou { display: flex; align-items: center; gap: 12px; margin: 0 0 14px !important; color: var(--muted); font-size: var(--t-m); }
.auth-ou::before, .auth-ou::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-cle-bouton { width: 100%; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 16px; font-size: var(--t-l); font-weight: 600; border-radius: var(--r-l); }
.auth-cle-bouton svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.auth-cle-bouton.occupe { pointer-events: none; opacity: .75; }
.auth-cle-bouton.occupe::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .8s linear infinite; }
.auth-cle-aide { display: block; text-align: center; margin-top: 8px !important; color: var(--muted); }
.page-scene .auth-cle { animation: sc-monte .5s var(--glisse) .7s backwards; }
@media (prefers-reduced-motion: reduce) { .page-scene .auth-cle { animation: none; } .auth-cle-bouton.occupe::after { animation: tourne 1.5s linear infinite; } }


/* =====================================================================================================
   4.10.143 — Connexion et création de compte en carte à onglets (variante B choisie par Pascal sur la maquette avant / après).
   Le formulaire des pages « scène » est une carte blanche à traits fins, comme l'application (sauf les pages légales et
   le forfait, qui ont leurs propres cartes). En haut de la carte de connexion et de création de compte : deux onglets,
   « Me connecter » et « Créer un compte » (de vrais liens, l'adresse change). Sous la création de compte : « Avec ton
   compte gratuit ». Les pages avec une pastille (mot de passe oublié, Nous écrire…) la gardent, dans la carte.
   ===================================================================================================== */
.page-scene:not(.page-legal):not(.page-forfait) .auth-carte { padding: 20px 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); }
.page-scene:not(.page-legal):not(.page-forfait) .auth-carte h1 { font-size: clamp(1.65rem, 1.45rem + .7vw, 2rem); }
.auth-onglets { display: flex; gap: 2px; margin: 0 0 18px; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); }
.auth-onglets a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 10px; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 600; font-size: var(--t-base); color: var(--muted); text-align: center; text-decoration: none;
  transition: color var(--d-rapide), background-color var(--d-rapide); }
.auth-onglets a:hover { color: var(--fg); }
.auth-onglets a[aria-current="page"] { background: var(--surface); color: var(--fg); box-shadow: var(--ombre-1); }
.auth-onglets a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.page-scene .auth-cle-bouton { min-height: 48px; border-radius: var(--r-pill); }
.auth-gratuit { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.auth-gratuit h2 { margin: 0; padding: 14px 16px 4px; font-family: var(--font-display); font-weight: 650; font-size: var(--t-l); letter-spacing: -.005em; }
.auth-gratuit ul { list-style: none; margin: 0; padding: 0 0 4px; }
.auth-gratuit li { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; font-size: var(--t-base); line-height: 1.35; }
.auth-gratuit li + li::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; border-top: 1px solid var(--trait); }
.ag-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-m); background: var(--accent-soft); color: var(--accent); }
.ag-ic svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .page-scene .auth-onglets { animation: sc-monte .5s var(--glisse) .1s backwards; }
  .page-scene .auth-gratuit { animation: sc-monte .55s var(--glisse) .8s backwards; }
}
@media (max-width: 860px) {
  .page-scene .auth { padding: 16px 16px 16px; }
}
/* 4.10.143 : les deux cartes du forfait dans la page des visiteurs (les règles générales de .auth-carte ne s'y appliquent pas) */
.page-forfait .auth-carte .cf-liste, .page-forfait .auth-carte .cf-lignes { margin: 0; padding: 0; }
.page-forfait .auth-carte .cf-liste li, .page-forfait .auth-carte .cf-ligne { margin: 0; }
.page-forfait .auth-carte .cf-nom, .page-forfait .auth-carte .cf-entete { margin-bottom: 0; }
.page-forfait .auth-carte .cf-entete { margin-bottom: 14px; }
.page-forfait .forfait-cartes > .forfait-sec { margin-top: 18px; }
.page-scene.page-forfait .cf-corps .forfait-actions { margin: 16px 0 0; }

/* ===== Refonte, étape 2 (4.10.199) : les pages de connexion, de contact, de forfait et légales s'accordent à l'accueil
   des visiteurs. Boutons à coins doux (plus de pilules), scène sable unie séparée par un filet (plus de halos).
   Les bascules à deux ou trois choix (Me connecter | Créer un compte, documents légaux) restent des pilules. ===== */
.auth-retour, .ac-theme { border-radius: var(--r-m); }
.auth-retour:hover, .ac-theme:hover { border-color: var(--accent); color: var(--accent); }
.auth-form button.primaire, .page-scene .auth-cle-bouton, .fa-btn { border-radius: var(--r-m); }
.auth-form button.primaire:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.scene::before, .scene::after { display: none; }
@media (min-width: 861px) { .scene { border-right: 1px solid var(--line); } }
