/* Pages « Confidentialité » et « Suppression du compte » (T-092c), « Conditions d'utilisation »
   (T-108), « Aide » et « Télécharger » (T-086) : couleurs, polices et en-tête de la page
   d'accueil, colonne de lecture. */
:root {
  --forest: #123D35; --forest-deep: #082E29; --lime: #D9F47A; --coral: #F17860;
  --paper: #F7F7F0; --surface: #FFFFFF; --soft: #EDF3E6; --soft-2: #E3ECDC;
  --ink: #17352F; --muted: #56695F; --line: #DDE6DA;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body { font-family: "Noto Sans Arabic", "DM Sans", sans-serif; line-height: 1.8; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* En-tête (comme la page d'accueil) */
header { padding: 20px 0; }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--forest); }
.brand svg { width: 44px; height: 44px; flex: none; }
.brand b { font: 800 22px/1 "DM Sans", sans-serif; letter-spacing: -0.05em; display: block; }
.brand small { font: 700 13px/1.3 "Noto Sans Arabic", sans-serif; color: var(--muted); display: block; }
.lang { display: flex; background: var(--soft); border-radius: 13px; padding: 4px; }
.lang button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  min-width: 44px; min-height: 36px; border-radius: 9px; font: 700 14px "DM Sans", "Noto Sans Arabic", sans-serif;
}
.lang button[aria-pressed="true"] { background: var(--forest); color: var(--lime); }

/* Texte */
main { padding: 16px 0 56px; }
.doc { max-width: 720px; margin: 0 auto; }
.doc h1 {
  margin: 8px 0 8px; color: var(--forest);
  font-size: clamp(30px, 5vw, 44px); font-weight: 800; line-height: 1.1; letter-spacing: -0.04em;
}
html[dir="rtl"] .doc h1 { letter-spacing: 0; line-height: 1.4; }
.updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.doc h2 {
  margin: 36px 0 10px; color: var(--forest);
  font-size: 21px; font-weight: 800; line-height: 1.3; letter-spacing: -0.02em;
}
html[dir="rtl"] .doc h2 { letter-spacing: 0; }
.doc h3 { margin: 20px 0 6px; color: var(--forest); font-size: 16px; font-weight: 700; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-inline-start: 22px; }
.doc li { margin: 0 0 6px; }
.doc a { color: var(--forest); font-weight: 700; text-decoration-color: var(--coral); text-underline-offset: 3px; }
.doc strong { color: var(--forest); }
.ltr { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }

/* Encadré (étapes de la suppression) */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin: 0 0 16px; }
.box > :last-child { margin-bottom: 0; }

/* Prestataires : une carte par prestataire */
.providers { display: grid; gap: 12px; margin: 0 0 12px; }
.provider { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.provider h3 { margin: 0 0 8px; }
.provider dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 15px; }
.provider dt { color: var(--muted); font-weight: 600; }
.provider dd { margin: 0; }

/* Questions fréquentes (page « Aide », T-086) : ouvrables sans JavaScript */
.faq { display: grid; gap: 10px; margin: 0 0 24px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 18px; }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 52px; padding: 12px 0; color: var(--forest); font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--coral); font-size: 22px; font-weight: 700; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > p { margin: 0 0 16px; }
.also { color: var(--muted); }

/* Tutoriels vidéo (page « Aide », T-121) : un lien par vidéo ; le lecteur est ajouté au clic par tutos.js */
.tutos { list-style: none; display: grid; gap: 10px; margin: 0 0 24px; }
.doc ul.tutos { padding: 0; }
.tutos li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.doc a.tuto {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 18px;
  text-decoration: none;
}
.tuto::before { /* triangle « lecture », tourné vers le sens de lecture */
  content: ""; flex: none; width: 0; height: 0;
  border-block: 7px solid transparent; border-inline-start: 11px solid var(--coral);
}
.tuto[aria-expanded="true"]::before { transform: rotate(90deg); }
html[dir="rtl"] .tuto[aria-expanded="true"]::before { transform: rotate(-90deg); }
.tuto small { margin-inline-start: auto; flex: none; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tuto-player {
  display: block; width: min(100% - 36px, 300px); aspect-ratio: 720 / 1560; margin: 4px auto 18px;
  border-radius: 16px; background: var(--forest);
}

/* Boutons des stores (page « Télécharger », T-086), comme ceux de la page d'accueil */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 28px; }
.doc a.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px;
  border-radius: 13px; background: var(--forest); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none;
}
.store small { display: block; font-weight: 600; font-size: 11px; color: #C2DACC; line-height: 1.1; }
.store span { line-height: 1.2; }
.store svg { width: 22px; height: 22px; flex: none; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 20px; }

/* Stores fermés ou ouverts (T-115), sans JavaScript : un lien de store vide = store fermé.
   Fermés : boutons des stores cachés, liens de test affichés. Ouverts : l'inverse, sauf avec ?test (html.test). */
.doc:has(a.store[href=""]) .when-open,
html.test .when-open { display: none; }
html:not(.test) .doc:not(:has(a.store[href=""])) .when-test { display: none; }
.doc a.store[href=""] { display: none; } /* navigateurs sans :has() : jamais de bouton vers nulle part */
.when-test .box .store { margin: 0 0 12px; }

/* Bas de page commun aux pages du site (T-092c ; T-086 y ajoute ses liens) */
.site-foot { padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { color: var(--forest); font-weight: 700; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .ltr { direction: ltr; unicode-bidi: isolate; }

@media (max-width: 560px) {
  .brand small { display: none; }
  .provider dl { grid-template-columns: 1fr; gap: 0; }
  .provider dd { margin-bottom: 6px; }
}
