/* Iris, site vitrine
   Identité : noir + jaune, fort contraste (public DMLA). Cible WCAG AAA (7:1) pour le texte.
   Couleurs reprises de l'application (static/index.html) et des schémas du README. */

/* ---------- Jetons ---------- */
:root {
  /* Palette de l'application */
  --noir: #000000;
  --noir-doux: #0A0A0A;
  --blanc: #FFFFFF;
  --jaune: #FFD400;
  --bleu: #7CC4FF;
  --rouge: #FF6B6B;
  --violet: #6236E0;
  --vert: #0E7F58;
  --orange: #FF8A1F;

  /* Rôles (thème sombre par défaut, comme l'application) */
  --fond: var(--noir);
  --fond-alt: #111111;
  --surface: #1A1A1A;
  --texte: var(--blanc);          /* 21:1 */
  --texte-doux: #E6E6E6;          /* 16:1 */
  --accent: var(--jaune);         /* jaune sur noir : 14:1 */
  --accent-bleu: var(--bleu);     /* 10:1 */
  --accent-rouge: var(--rouge);   /* 7.3:1 */
  --bordure: #5A5A5A;
  --focus: var(--jaune);

  /* Typographie : pile système, lisible et rapide */
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Espacements (base 4px, exprimés en rem pour suivre la taille du texte) */
  --e1: .25rem; --e2: .5rem; --e3: .75rem; --e4: 1rem; --e5: 1.5rem;
  --e6: 2rem; --e7: 3rem; --e8: 4rem; --e9: 6rem;

  --rayon: 14px;
  --rayon-l: 24px;
  --largeur: 72rem;
}

/* Fond clair (choix du visiteur) */
:root[data-fond="clair"] {
  --fond: #FFFFFF;
  --fond-alt: #F4F4EF;
  --surface: #FFFFFF;
  --texte: #000000;
  --texte-doux: #1F1F1F;
  --accent: #5C4A00;              /* brun-jaune foncé sur blanc : 9:1 */
  --accent-bleu: #0B4F8A;         /* 8.6:1 */
  --accent-rouge: #A3150F;        /* 8:1 */
  --bordure: #6E6E6E;
  --focus: #000000;
}

/* Taille du texte (réglage visiteur). Base 20px. */
html { font-size: 125%; }
html[data-taille="grand"] { font-size: 143.75%; }
html[data-taille="tres-grand"] { font-size: 162.5%; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--e4); letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 5.2vw + .5rem, 3.6rem); font-weight: 850; }
h2 { font-size: clamp(1.7rem, 3vw + .6rem, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 750; }
p { margin: 0 0 var(--e4); }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .1em; }
img, svg { display: block; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 4px;
  border-radius: 6px;
}
.section--jaune :focus-visible { outline-color: var(--noir); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.evitement {
  position: absolute; left: var(--e4); top: -100px; z-index: 100;
  background: var(--jaune); color: var(--noir); font-weight: 800;
  padding: var(--e3) var(--e5); border-radius: var(--rayon);
}
.evitement:focus { top: var(--e4); }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48em) { .conteneur { padding: 0 var(--e6); } }
.conteneur--etroit { max-width: 52rem; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e3);
  min-height: 3.2rem; padding: .7rem 1.5rem;
  font: inherit; font-weight: 800; font-size: 1.05rem; text-decoration: none;
  border: 3px solid transparent; border-radius: 999px; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.bouton svg { width: 1.2em; height: 1.2em; transition: transform .2s ease; }
.bouton:hover svg { transform: translateX(4px); }
.bouton:active { transform: scale(.98); }
.bouton--jaune { background: var(--jaune); color: var(--noir); border-color: var(--jaune); }
.bouton--jaune:hover { box-shadow: 0 0 0 4px rgba(255, 212, 0, .35); }
.bouton--contour { background: transparent; color: var(--texte); border-color: var(--texte); }
.bouton--contour:hover { background: var(--texte); color: var(--fond); }
.bouton--petit { min-height: 2.6rem; padding: .4rem 1.1rem; font-size: .9rem; }
.bouton--plein { width: 100%; }

/* ---------- Barre d'accessibilité ---------- */
.barre-acces { background: var(--fond-alt); border-bottom: 1px solid var(--bordure); font-size: .85rem; }
.barre-acces__rang { display: flex; flex-wrap: wrap; gap: var(--e3); align-items: center; justify-content: flex-end; padding-top: var(--e2); padding-bottom: var(--e2); }
.groupe { display: flex; align-items: center; gap: var(--e2); }
.groupe__titre { font-weight: 700; margin-right: var(--e1); }
.pastille {
  display: inline-flex; align-items: center; gap: var(--e2);
  min-width: 2.4rem; min-height: 2.4rem; padding: 0 .6rem;
  font: inherit; font-weight: 800; color: var(--texte);
  background: transparent; border: 2px solid var(--bordure); border-radius: 10px; cursor: pointer;
}
.pastille--m { font-size: 1.15em; }
.pastille--l { font-size: 1.35em; }
.pastille--large { padding: 0 .9rem; }
.pastille svg { width: 1.2em; height: 1.2em; }
.pastille[aria-pressed="true"] { background: var(--jaune); color: var(--noir); border-color: var(--jaune); }
.pastille:hover { border-color: var(--texte); }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--fond) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bordure);
}
.entete__rang { display: flex; align-items: center; justify-content: space-between; gap: var(--e4); min-height: 4.2rem; }
.logo { display: inline-flex; align-items: center; gap: var(--e3); font-weight: 900; font-size: 1.3rem; text-decoration: none; letter-spacing: -0.02em; }
.logo__pastille svg { width: 2.1rem; height: 2.1rem; }
.nav { display: none; list-style: none; gap: var(--e5); }
.nav a { text-decoration: none; font-weight: 650; font-size: .95rem; padding: var(--e2) 0; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--accent); }
@media (min-width: 62em) { .nav { display: flex; } }
@media (max-width: 30em) { .entete .bouton--petit { padding: .3rem .8rem; font-size: .8rem; } }

/* ---------- Commun aux sections ---------- */
.section { padding: var(--e8) 0; }
@media (min-width: 48em) { .section { padding: var(--e9) 0; } }
.section--sombre { background: var(--fond-alt); }
.section--jaune { background: var(--jaune); color: var(--noir); }
.section--jaune .surtitre { color: var(--noir); }
.section--jaune .surtitre::before { background: var(--noir); }

.surtitre {
  display: inline-flex; align-items: center; gap: var(--e3);
  font-weight: 800; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); margin-bottom: var(--e4);
}
.surtitre::before { content: ""; width: 1.6rem; height: 4px; background: var(--accent); border-radius: 2px; }
.entete-section { max-width: 46rem; margin-bottom: var(--e7); }
.intro { font-size: 1.12rem; color: inherit; }
.section:not(.section--jaune) .intro { color: var(--texte-doux); }

/* ---------- Hero ---------- */
.hero { padding: var(--e7) 0 var(--e8); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto -20% -40% auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(255, 212, 0, .14), transparent 62%);
  pointer-events: none;
}
:root[data-fond="clair"] .hero::before { background: radial-gradient(circle, rgba(255, 212, 0, .45), transparent 62%); }
.hero__grille { display: grid; gap: var(--e7); align-items: center; position: relative; }
@media (min-width: 62em) { .hero__grille { grid-template-columns: 1.15fr .85fr; gap: var(--e8); } .hero { padding: var(--e9) 0; } }
.souligne { color: var(--accent); display: block; }
.chapeau { font-size: 1.2rem; max-width: 36rem; color: var(--texte-doux); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--e4); margin: var(--e6) 0 var(--e5); }
.hero__note { font-size: .9rem; color: var(--texte-doux); display: flex; align-items: center; gap: var(--e2); }
.hero__note::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--jaune); box-shadow: 0 0 0 4px rgba(255, 212, 0, .25); }

/* Téléphone : vraie capture de l'application dans une coque */
.telephone { margin: 0 auto; width: 100%; max-width: 20rem; }
.telephone__coque {
  position: relative; background: #141414;
  border-radius: 2.8rem; padding: 3.2rem .8rem 4rem;
  box-shadow: 0 0 0 2px #3A3A3A, inset 0 0 0 1px #2A2A2A, 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(255, 212, 0, .12);
}
.telephone__hautparleur {
  position: absolute; top: 1.45rem; left: 50%; transform: translateX(-50%);
  width: 3.6rem; height: .4rem; border-radius: 1rem; background: #2E2E2E;
}
.telephone__ecran { display: block; width: 100%; height: auto; border-radius: .4rem; background: var(--noir); }
.telephone__accueil {
  position: absolute; bottom: .9rem; left: 50%; transform: translateX(-50%);
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid #3A3A3A;
}
.telephone__legende { margin-top: var(--e4); text-align: center; color: var(--texte-doux); font-size: .95rem; }

/* ---------- Constat ---------- */
.constat { padding: var(--e8) 0; border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.constat__grille { display: grid; gap: var(--e5); margin-bottom: var(--e6); }
@media (min-width: 48em) { .constat__grille { grid-template-columns: repeat(3, 1fr); } }
.chiffre { margin: 0; padding-left: var(--e5); border-left: 5px solid var(--jaune); }
.chiffre strong { display: block; font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 900; color: var(--accent); line-height: 1.1; }
.chiffre span { display: block; font-size: 1rem; color: var(--texte-doux); margin-top: var(--e2); }
.constat__texte { font-size: 1.3rem; font-weight: 600; max-width: 48rem; }
.source { font-size: .85rem; color: var(--texte-doux); margin: 0; }

/* ---------- Cartes de fonctions ---------- */
.cartes { list-style: none; display: grid; gap: var(--e4); }
@media (min-width: 40em) { .cartes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 70em) { .cartes { grid-template-columns: repeat(3, 1fr); } }
.carte {
  background: var(--surface); border: 2px solid var(--bordure); border-radius: var(--rayon-l);
  padding: var(--e5); display: flex; flex-direction: column;
  transition: border-color .2s ease, transform .2s ease;
}
.carte:hover { border-color: var(--jaune); transform: translateY(-3px); }
.carte p { color: var(--texte-doux); margin: 0; font-size: .98rem; }
.carte h3 { margin: var(--e4) 0 var(--e3); }
.carte .carte__dit {
  color: var(--texte); font-weight: 700; font-style: italic; margin-bottom: var(--e3);
  padding-left: var(--e3); border-left: 3px solid var(--accent-bleu);
}
.carte__icone { width: 3.2rem; height: 3.2rem; border-radius: 1rem; display: grid; place-items: center; }
.carte__icone svg { width: 1.9rem; height: 1.9rem; }
.carte__icone--jaune { background: var(--jaune); color: var(--noir); }
.carte__icone--violet { background: var(--violet); color: var(--blanc); }
.carte__icone--vert { background: var(--vert); color: var(--blanc); }
.carte__icone--orange { background: var(--orange); color: var(--noir); }

/* ---------- Étapes ---------- */
.etapes { list-style: none; display: grid; gap: var(--e5); counter-reset: none; }
@media (min-width: 52em) { .etapes { grid-template-columns: repeat(3, 1fr); } }
.etape { background: var(--noir); color: var(--blanc); border-radius: var(--rayon-l); padding: var(--e6) var(--e5); }
.etape p { margin: 0; color: #E6E6E6; }
.etape__num { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--jaune); color: var(--noir); font-weight: 900; font-size: 1.4rem; margin-bottom: var(--e4); }

/* ---------- Garde-fous ---------- */
.garde-fous { display: grid; gap: var(--e4); }
@media (min-width: 48em) { .garde-fous { grid-template-columns: repeat(2, 1fr); } }
.garde { border: 2px solid var(--bordure); border-radius: var(--rayon-l); padding: var(--e6) var(--e5); background: var(--fond); }
.garde h3 { display: flex; align-items: center; gap: var(--e3); }
.garde p { margin: 0; color: var(--texte-doux); }
.garde__marque { flex: none; width: 1rem; height: 1rem; border-radius: 4px; }
.garde__marque--vert { background: #3DDC97; }
.garde__marque--rouge { background: var(--rouge); }
.garde__marque--jaune { background: var(--jaune); }
.garde__marque--violet { background: var(--bleu); }

/* ---------- Proches ---------- */
.proches { display: grid; gap: var(--e7); align-items: center; }
@media (min-width: 62em) { .proches { grid-template-columns: 1fr 1fr; } }
.liste-coche { list-style: none; display: grid; gap: var(--e3); margin-top: var(--e5); }
.liste-coche li { position: relative; padding-left: 2.2rem; }
.liste-coche li::before {
  content: ""; position: absolute; left: 0; top: .25em; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: var(--jaune) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat;
}
.section--jaune .liste-coche li::before { background-color: var(--noir); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23FFD400' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.tableau-proche { margin: 0; background: var(--noir); color: var(--blanc); border: 2px solid #3A3A3A; border-radius: var(--rayon-l); padding: var(--e5); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.tableau-proche__tete { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--e2); font-weight: 800; color: var(--jaune); padding-bottom: var(--e4); border-bottom: 1px solid #3A3A3A; margin-bottom: var(--e4); }
.tableau-proche__liste { margin: 0; display: grid; gap: var(--e3); }
.ligne { display: grid; gap: .2rem; padding: var(--e3) var(--e4); border-radius: var(--rayon); background: #161616; border-left: 6px solid; }
.ligne dt { font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.ligne dd { margin: 0; font-size: .98rem; }
.ligne--rouge { border-color: var(--rouge); } .ligne--rouge dt { color: var(--rouge); }
.ligne--jaune { border-color: var(--jaune); } .ligne--jaune dt { color: var(--jaune); }
.ligne--vert { border-color: #3DDC97; } .ligne--vert dt { color: #3DDC97; }
.ligne--orange { border-color: var(--orange); } .ligne--orange dt { color: var(--orange); }
.tableau-proche__legende { margin-top: var(--e4); font-size: .8rem; color: #BDBDBD; }

/* ---------- État du projet ---------- */
.etat { display: grid; gap: var(--e4); }
@media (min-width: 52em) { .etat { grid-template-columns: 1fr 1fr; } }
.etat__colonne { background: var(--fond); border: 2px solid var(--bordure); border-radius: var(--rayon-l); padding: var(--e6) var(--e5); }
.etat__colonne h3 { display: flex; align-items: center; gap: var(--e3); }
.etat__colonne ul { list-style: none; display: grid; gap: var(--e3); }
.etat__colonne li { padding-left: var(--e5); position: relative; color: var(--texte-doux); }
.etat__colonne li::before { content: ""; position: absolute; left: 0; top: .7em; width: .6rem; height: 3px; background: var(--texte); }
.etat__puce { width: 1rem; height: 1rem; border-radius: 50%; flex: none; }
.etat__puce--vert { background: #3DDC97; }
.etat__puce--orange { background: var(--orange); }

/* ---------- Essais (appel à l'action) ---------- */
.essais { display: grid; gap: var(--e7); align-items: start; }
@media (min-width: 62em) { .essais { grid-template-columns: 1fr 1fr; } }
.formulaire { background: var(--noir); color: var(--blanc); border-radius: var(--rayon-l); padding: var(--e6) var(--e5); box-shadow: 0 30px 70px rgba(0, 0, 0, .3); }
@media (min-width: 48em) { .formulaire { padding: var(--e6); } }
.formulaire__titre { color: var(--jaune); font-size: 1.4rem; }
.champ { margin: 0 0 var(--e5); border: 0; padding: 0; }
.champ label, .champ legend { display: block; font-weight: 750; margin-bottom: var(--e2); }
.facultatif { font-weight: 400; color: #CFCFCF; }
.champ input[type="text"], .champ input[type="tel"], .champ input[type="email"], .champ textarea {
  width: 100%; font: inherit; color: var(--blanc); background: #161616;
  border: 2px solid #8A8A8A; border-radius: var(--rayon); padding: .7rem .9rem; min-height: 3.2rem;
}
.champ input:focus, .champ textarea:focus { border-color: var(--jaune); outline: 3px solid var(--jaune); outline-offset: 2px; }
.champ--choix legend { margin-bottom: var(--e3); }
.choix { display: flex !important; align-items: center; gap: var(--e3); font-weight: 500 !important; padding: var(--e2) 0; cursor: pointer; }
.choix input { width: 1.5rem; height: 1.5rem; accent-color: var(--jaune); flex: none; }
.formulaire__erreur { color: var(--rouge); font-weight: 700; min-height: 0; margin: 0 0 var(--e3); }
.formulaire__erreur:empty { display: none; }
.formulaire__note { font-size: .85rem; color: #CFCFCF; margin: var(--e4) 0 0; }
.formulaire .bouton--jaune:focus-visible { outline-color: var(--blanc); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--e3); }
.faq details { border: 2px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); }
.faq details[open] { border-color: var(--accent); }
.faq summary {
  list-style: none; cursor: pointer; padding: var(--e4) var(--e5); font-weight: 750; font-size: 1.08rem;
  display: flex; justify-content: space-between; align-items: center; gap: var(--e4); min-height: 3.2rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.6rem; font-weight: 400; line-height: 1; color: var(--accent); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 var(--e5) var(--e5); margin: 0; color: var(--texte-doux); }

/* ---------- Pied de page ---------- */
.pied { border-top: 1px solid var(--bordure); padding: var(--e7) 0; font-size: .95rem; }
.pied__rang { display: grid; gap: var(--e3); }
.pied p { margin: 0; color: var(--texte-doux); }
.logo--pied { color: var(--accent) !important; }

/* ---------- Lecture à voix haute : passage en cours ---------- */
.en-lecture { outline: 4px dashed var(--jaune); outline-offset: 8px; border-radius: 8px; }
.section--jaune .en-lecture { outline-color: var(--noir); }

/* ---------- Animations (seulement si le visiteur ne les a pas désactivées) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .revele { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
  .js .revele.visible { opacity: 1; transform: none; }

  .telephone { animation: flotte 6s ease-in-out infinite; }
  @keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
}

/* ---------- Impression ---------- */
@media print {
  .barre-acces, .entete nav, .formulaire, .telephone { display: none; }
  body { background: #fff; color: #000; }
}

/* Note sous la liste du proche : la confidentialité des alertes */
.proches__note { margin-top: var(--e5); padding-left: var(--e4); border-left: 4px solid var(--accent); color: var(--texte-doux); }

/* Fonctions à venir, selon les retours des testeurs */
.bientot { margin-top: var(--e7); padding: var(--e6); border: 2px dashed var(--bordure); border-radius: var(--rayon-l); }
.bientot__titre { color: var(--accent); margin-bottom: var(--e3); }
.bientot__liste { list-style: none; padding: 0; margin: var(--e4) 0 0; display: flex; flex-wrap: wrap; gap: var(--e3); }
.bientot__liste li { padding: .45rem 1rem; border: 2px solid var(--bordure); border-radius: 999px; font-weight: 700; }

/* Formulaire envoyé à Netlify : message de confirmation */
[hidden] { display: none !important; }
.formulaire__merci { font-size: 1.15rem; font-weight: 700; color: var(--jaune); padding: var(--e4); border: 2px solid var(--jaune); border-radius: var(--rayon); }
