/* Pages de texte (confidentialité, suppression de compte, mentions légales) et page 404.
   Maquette : Texte-*-{1440,390} et Page404-{1440,390}. Le gabarit commun (barre, pied) vient de gabarit.css. */

/* ---------- Page de texte ---------- */
.texte { position: relative; padding: var(--e7) 0 var(--e8); }
/* Le sentier pointillé sur le bord gauche, comme dans la maquette */
.texte::before {
  content: ""; position: absolute; left: 6px; top: var(--e7); bottom: var(--e6);
  border-left: 3px dotted var(--gris-clair); pointer-events: none;
}
@media (min-width: 1200px) { .texte::before { left: 50px; } }
.texte > .conteneur { max-width: 744px; padding: 0 var(--e5); }
.texte--large > .conteneur { max-width: 1084px; }
@media (min-width: 900px) {
  .texte { padding-top: var(--e8); }
  .texte > .conteneur { padding: 0 var(--e6); }
}
.texte h1 { font-size: clamp(2.25rem, 1.7rem + 2vw, 3.25rem); line-height: 1.1; }

/* Pastille « Dernière mise à jour » */
.texte .maj {
  display: inline-flex; align-items: center; gap: var(--e2);
  min-height: 36px; margin-top: var(--e4); padding: 4px var(--e4);
  border-radius: var(--r-pastille); background: var(--sable);
  font: 700 var(--t-petit)/1.3 var(--police-texte); color: var(--encre);
}
.texte .maj::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--vert-action);
}

.texte__corps { margin-top: var(--e6); }
@media (min-width: 1100px) {
  .texte__corps--sommaire { display: grid; grid-template-columns: 280px minmax(0, 680px); gap: 60px; align-items: start; margin-top: var(--e7); }
}
@media (min-width: 900px) { .texte__corps { margin-top: var(--e7); } }

/* ---------- Sommaire : déplié à côté du texte sur grand écran, repliable sur téléphone ---------- */
.sommaire { margin-bottom: var(--e6); border: 1px solid var(--filet); border-radius: var(--r-carte); background: var(--papier); box-shadow: var(--ombre-carte); }
.sommaire summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--e3);
  min-height: 56px; padding: 0 var(--e3) 0 var(--e4); cursor: pointer; list-style: none;
  font: 600 1.125rem/1 var(--police-titre); color: var(--vert-nuit); border-radius: var(--r-carte);
}
.sommaire summary::-webkit-details-marker { display: none; }
.sommaire summary::after {
  content: ""; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--sable);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23017746' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-size: 24px; background-position: center; background-repeat: no-repeat;
  transition: transform var(--duree-micro) var(--courbe-sortie);
}
.sommaire[open] summary::after { transform: rotate(180deg); }
.sommaire ol { margin: 0; padding: 0 var(--e2) var(--e3); list-style: none; }
.sommaire a {
  display: flex; align-items: center; gap: var(--e3); min-height: var(--cible); padding: 0 var(--e3);
  border-radius: 14px; color: var(--encre); text-decoration: none; font: 700 .9375rem/1.3 var(--police-texte);
}
.sommaire a:hover { background: var(--sable); color: var(--vert-nuit); }
.sommaire a[aria-current] { background: var(--sable); }
.sommaire .n { flex: none; width: 22px; text-align: right; font: 600 .9375rem var(--police-titre); color: var(--vert-action); }
@media (min-width: 1100px) {
  .sommaire { position: sticky; top: calc(var(--barre-fine) + var(--e5)); margin-bottom: 0; max-height: calc(100vh - var(--barre-fine) - var(--e6)); overflow-y: auto; }
  .sommaire summary { pointer-events: none; }
  .sommaire summary::after { display: none; }
}

/* ---------- Texte courant ---------- */
.prose { font-size: var(--t-base); line-height: 1.7; color: var(--encre); min-width: 0; }
.prose h2 { margin-top: var(--e8); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); line-height: 1.2; scroll-margin-top: calc(var(--barre-fine) + var(--e5)); }
.prose > h2:first-child { margin-top: 0; }
.prose h2 .n { color: var(--vert-action); }
.prose p { margin-top: var(--e4); }
.prose h2 + p, .prose h2 + .tableau, .prose h2 + ol { margin-top: var(--e3); }
.prose ul, .prose ol { margin: 14px 0 0; padding-left: var(--e5); }
.prose li { margin-top: var(--e2); }
.prose li > ul { margin-top: var(--e2); }
.prose a { color: var(--vert-foret); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--vert-nuit); }
.prose a.bouton { color: #fff; text-decoration: none; }
.prose a.bouton:hover { color: #fff; }
.prose strong { font-weight: 700; }
.prose .bouton { margin-top: 0; }

/* Tableaux : dans un cadre arrondi */
.tableau { margin-top: 18px; border: 1px solid var(--filet); border-radius: 16px; background: var(--papier); overflow-x: auto; }
.tableau table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
.tableau th { text-align: left; padding: 12px 18px; background: var(--sable); font: 800 var(--t-petit) var(--police-texte); color: var(--encre); }
.tableau td { vertical-align: top; padding: 14px 18px; border-top: 1px solid var(--filet); }
.tableau td:first-child { width: 44%; }
@media (max-width: 599px) {
  .tableau th, .tableau td { padding: 10px 12px; font-size: .9375rem; }
  .tableau td:first-child { width: 40%; }
}

/* Encadré d'alerte (suppression définitive) */
.encadre {
  display: flex; align-items: flex-start; gap: var(--e3); margin-top: var(--e5); padding: var(--e4);
  border: 1px solid var(--ambre); border-radius: var(--r-carte); background: var(--ambre-pale);
  font-size: 1.125rem; line-height: 1.45; color: var(--encre);
}
.encadre::before {
  content: "!"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ambre); color: var(--vert-nuit); font: 600 1rem/1 var(--police-titre);
}
.prose .chapo { margin-top: 0; font-size: 1.1875rem; color: var(--encre-douce); }
.prose .chapo strong { color: var(--encre); }

/* Étapes numérotées reliées par un sentier pointillé */
.prose ol.etapes { padding-left: 0; list-style: none; counter-reset: etape; }
.etapes li {
  position: relative; counter-increment: etape; margin-top: var(--e4); min-height: 44px;
  padding: var(--e3) var(--e4) var(--e3) 68px; border: 1px solid var(--filet); border-radius: var(--r-carte); background: var(--papier);
}
.etapes li::before {
  content: counter(etape); position: absolute; left: var(--e4); top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--vert-action); color: #fff; font: 600 1.125rem/1 var(--police-titre);
}

/* Fiches de la page Mentions légales */
.fiches { margin: var(--e3) 0 0; padding: 0; }
.fiche { margin-top: 10px; padding: 14px var(--e4); border: 1px solid var(--filet); border-radius: 16px; background: var(--papier); }
.fiche dt { margin-bottom: 2px; font: 800 .75rem/1.3 var(--police-texte); letter-spacing: .04em; text-transform: uppercase; color: var(--encre-douce); }
.fiche dd { margin: 0; overflow-wrap: anywhere; }
.a-fournir {
  display: inline-block; padding: 2px 10px; border: 1.5px dashed var(--ambre-texte); border-radius: var(--r-petit);
  background: var(--ambre-pale); font: 700 .9375rem/1.45 var(--police-texte); color: var(--encre);
}
.texte .maj .a-fournir { font-size: .8125rem; }

/* Lien de la page courante dans le pied de page */
.pied a[aria-current] { color: var(--ambre); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Page 404 ---------- */
.perdu { position: relative; padding: var(--e7) 0 var(--e8); text-align: center; overflow: hidden; }
.perdu__etiquette {
  display: inline-flex; align-items: center; gap: var(--e2); min-height: 36px; padding: 0 var(--e4);
  border-radius: var(--r-pastille); background: var(--sable); font: 700 var(--t-petit) var(--police-texte); color: var(--encre);
}
.perdu__etiquette::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--vert-action); }
.perdu h1 { margin-top: var(--e4); font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); }
.perdu h1 span { color: var(--vert-action); }
.perdu__mot { max-width: 35em; margin: var(--e4) auto 0; font-size: var(--t-grand); line-height: 1.5; color: var(--encre-douce); text-wrap: pretty; }
.perdu__sentier { width: 100vw; max-width: none; height: 150px; margin: var(--e5) calc(50% - 50vw) 0; }
.perdu__bouton { min-height: 64px; margin-top: var(--e5); padding: 0 28px; font-size: 1.3125rem; max-width: 100%; }
.perdu__liens { margin-top: var(--e7); }
.perdu__liens p { font: 700 .9375rem var(--police-texte); color: var(--encre-douce); }
.perdu__liens ul { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--e3); margin: var(--e3) 0 0; padding: 0; list-style: none; }
.perdu__liens a {
  display: inline-flex; align-items: center; min-height: var(--cible); padding: 0 var(--e5);
  border-radius: var(--r-pastille); background: var(--sable); color: var(--encre); text-decoration: none; font: 700 1rem var(--police-texte);
}
.perdu__liens a:hover { background: var(--filet); color: var(--encre); }
.etoile-perdue { transform-box: fill-box; transform-origin: center; animation: scintille 3.4s ease-in-out infinite; }
.etoile-perdue--2 { animation-delay: -1.2s; }
.etoile-perdue--3 { animation-delay: -2.3s; }
.etoile-perdue--flotte { animation: scintille 3.4s ease-in-out infinite, flotte 7s ease-in-out infinite; }
@keyframes scintille { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
@keyframes flotte { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.sn-bande { stroke: var(--sable); stroke-width: 40; fill: none; }
.sn-pointille { stroke: var(--gris-clair); stroke-width: 3; stroke-dasharray: 1 11; stroke-linecap: round; fill: none; }
.sn-trait { stroke: var(--vert-action); stroke-width: 5; stroke-linecap: round; fill: none; }
.sn-fantome { stroke: var(--gris-clair); stroke-width: 3; stroke-dasharray: 1 11; stroke-linecap: round; fill: none; opacity: .7; }
.sn-noeud-vide { fill: var(--creme); stroke: var(--vert-action); stroke-width: 4; }
.sn-noeud-plein { fill: var(--vert-action); stroke: var(--vert-menthe); stroke-width: 4; }
.sn-etoile { fill: var(--ambre); stroke: var(--ambre); stroke-width: 2.4; stroke-linejoin: round; }
