/* =============================================================================
   MonAuditNIS2 — feuille de style du site public
   =============================================================================
   Registre cybersécurité B2B : sobre, dense, technique. Pas de dégradés
   décoratifs, pas d'ombres portées molles, pas d'illustrations 3D.
   Couleurs issues de config/produit.php — ne pas en inventer d'autres ici.

   CSS vanilla. Bootstrap est admis en complément s'il fait gagner du temps
   (décision G, 13/09/2026), mais la base reste maîtrisée à la main.
   ============================================================================= */

:root {
  --primaire:        #0f766e;   /* produit.php color_primary */
  --primaire-fonce:  #0b5852;
  --primaire-clair:  #ccfbf1;
  --secondaire:      #f59e0b;   /* produit.php color_secondary */
  --secondaire-clair:#fef3c7;

  --encre:      #0f172a;
  --texte:      #334155;
  --discret:    #64748b;
  --tres-discret:#94a3b8;
  --bordure:    #e2e8f0;
  --fond:       #ffffff;
  --fond-doux:  #f8fafc;
  --fond-sombre:#0f172a;

  --alerte:     #b45309;
  --alerte-fond:#fffbeb;
  --erreur:     #b91c1c;
  --ok:         #15803d;

  --large:      1140px;
  --etroit:     760px;
  --rayon:      8px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--texte);
  background: var(--fond);
}

h1, h2, h3, h4 { color: var(--encre); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: 2.1rem; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1em; }
a  { color: var(--primaire); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--primaire-fonce); }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em;
       background: var(--fond-doux); padding: .1em .4em; border-radius: 4px; }

/* ── Structure ────────────────────────────────────────────────────────────── */
.contenant { max-width: var(--large); margin: 0 auto; padding: 0 20px; }
.contenant-etroit { max-width: var(--etroit); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-douce { background: var(--fond-doux); border-block: 1px solid var(--bordure); }
main { min-height: 60vh; }

/* ── En-tête ──────────────────────────────────────────────────────────────── */
.entete {
  border-bottom: 1px solid var(--bordure);
  background: var(--fond);
  position: sticky; top: 0; z-index: 50;
}
.entete-inner { display: flex; align-items: center; gap: 26px; height: 62px; }
.logo { font-weight: 800; font-size: 1.05rem; color: var(--encre); text-decoration: none;
        letter-spacing: -.02em; white-space: nowrap; }
.logo span { color: var(--primaire); }
.nav { display: flex; gap: 20px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--texte); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav a:hover, .nav a.actif { color: var(--primaire); }
.nav a.actif { font-weight: 700; }

/* ── Boutons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: var(--rayon);
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; font-family: inherit; line-height: 1.3;
  transition: background .12s, border-color .12s;
}
.btn-principal { background: var(--primaire); color: #fff; }
.btn-principal:hover { background: var(--primaire-fonce); color: #fff; }
.btn-secondaire { background: var(--fond); color: var(--primaire); border-color: var(--primaire); }
.btn-secondaire:hover { background: var(--primaire-clair); }
.btn-discret { background: transparent; color: var(--texte); border-color: var(--bordure); }
.btn-petit { padding: 6px 12px; font-size: .85rem; }

/* ── Accroche ─────────────────────────────────────────────────────────────── */
.accroche { padding: 68px 0 52px; }
.accroche h1 { max-width: 20ch; }
.accroche .chapeau { font-size: 1.15rem; color: var(--discret); max-width: 62ch; margin-bottom: 1.6em; }
.accroche .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.accroche .sous-action { font-size: .85rem; color: var(--tres-discret); }

/* ── Grilles et cartes ────────────────────────────────────────────────────── */
.grille { display: grid; gap: 18px; }
.grille-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grille-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.carte { background: var(--fond); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 22px; }
.carte h3 { margin-bottom: .45em; }
.carte p:last-child { margin-bottom: 0; }
.carte-etape { border-top: 3px solid var(--primaire); }
.carte-numero { display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--primaire-clair);
  color: var(--primaire); font-weight: 800; font-size: .82rem; margin-bottom: 10px; }

/* ── Étiquettes ───────────────────────────────────────────────────────────── */
.etiquette { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px;
  border-radius: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.et-ei      { background: var(--primaire-clair); color: var(--primaire); }
.et-ee      { background: #e2e8f0; color: #475569; }
.et-pilier  { background: var(--secondaire-clair); color: #92400e; }
.et-neutre  { background: var(--fond-doux); color: var(--discret); border: 1px solid var(--bordure); }

/* ── Encadré d'avertissement juridique ────────────────────────────────────── */
/* Utilisé partout où l'on affiche un résultat d'assujettissement : rien n'est
   opposable tant que la loi n'est pas promulguée, et ça doit se voir. */
.avertissement {
  background: var(--alerte-fond); border: 1px solid #fde68a; border-left: 3px solid var(--secondaire);
  border-radius: 0 var(--rayon) var(--rayon) 0; padding: 14px 16px;
  font-size: .88rem; color: var(--alerte); margin: 20px 0;
}
.avertissement strong { color: #92400e; }

/* ── Tableaux ─────────────────────────────────────────────────────────────── */
.tableau { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tableau th { text-align: left; padding: 10px 12px; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--discret); border-bottom: 2px solid var(--bordure); }
.tableau td { padding: 11px 12px; border-bottom: 1px solid var(--bordure); vertical-align: top; }
.tableau tbody tr:hover td { background: var(--fond-doux); }

/* ── Formulaires ──────────────────────────────────────────────────────────── */
.champ { margin-bottom: 16px; }
.champ label { display: block; font-size: .82rem; font-weight: 600; color: var(--texte); margin-bottom: 5px; }
.champ .aide { font-size: .78rem; color: var(--tres-discret); margin-top: 4px; }
.champ input[type=text], .champ input[type=number], .champ input[type=email], .champ select {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: var(--rayon);
  font-size: .95rem; font-family: inherit; background: #fff; color: var(--encre);
}
.champ input:focus, .champ select:focus { outline: 2px solid var(--primaire-clair); border-color: var(--primaire); }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq details { border-bottom: 1px solid var(--bordure); padding: 15px 0; }
.faq summary { font-weight: 600; color: var(--encre); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; color: var(--primaire); font-weight: 800; }
.faq details[open] summary::before { content: "− "; }
.faq details p { margin: 12px 0 0; color: var(--texte); }

/* ── Pied de page ─────────────────────────────────────────────────────────── */
.pied { background: var(--fond-sombre); color: #94a3b8; padding: 44px 0 26px; margin-top: 64px; font-size: .9rem; }
.pied a { color: #cbd5e1; text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied h4 { color: #f1f5f9; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: 7px; }
.pied-bas { border-top: 1px solid #1e293b; margin-top: 28px; padding-top: 18px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: #64748b; }

/* ── Fil d'Ariane ─────────────────────────────────────────────────────────── */
.ariane { font-size: .82rem; color: var(--tres-discret); padding: 16px 0 0; }
.ariane a { color: var(--discret); text-decoration: none; }
.ariane a:hover { color: var(--primaire); text-decoration: underline; }

/* ── Coquille (page annoncée, pas encore écrite) ──────────────────────────── */
.coquille { background: var(--fond-doux); border: 1px dashed #cbd5e1; border-radius: var(--rayon);
  padding: 28px; text-align: center; color: var(--discret); }
.coquille h3 { color: var(--texte); }

/* ── « Notre lecture de cet objectif » ────────────────────────────────────── */
/* Le seul texte des pages d'objectif qui ne vienne pas de l'ANSSI. Il est
   rédigé en markdown et rendu par LegalContent::markdownToHtml() : les styles
   ci-dessous portent donc sur les balises produites, pas sur des classes. */
.lecture-dativo { border-left: 3px solid var(--primaire); padding: 4px 0 4px 26px; }
.lecture-dativo > h2 { font-size: 1.18rem; margin: 0 0 18px; color: var(--primaire-fonce); }
.lecture-dativo p { color: var(--texte); line-height: 1.78; margin: 0 0 1.05em; }
.lecture-dativo p:last-child { margin-bottom: 0; }
.lecture-dativo strong { color: var(--encre); }
/* Les blocs de citation portent le texte officiel du ReCyF : on les distingue
   nettement de notre commentaire, sinon on s'attribue les mots de l'ANSSI. */
.lecture-dativo blockquote { margin: 0 0 1.05em; padding: 14px 18px; background: var(--fond-doux);
  border-radius: var(--rayon); color: var(--encre); font-style: italic; }
.lecture-dativo code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .86em; background: var(--primaire-clair); color: var(--primaire-fonce);
  padding: 1px 6px; border-radius: 4px; font-style: normal; }
.lecture-dativo hr { border: 0; border-top: 1px solid var(--bordure); margin: 22px 0; }
.lecture-dativo table { width: 100%; border-collapse: collapse; margin: 0 0 1.05em; font-size: .93rem; }
.lecture-dativo th, .lecture-dativo td { border: 1px solid var(--bordure); padding: 7px 10px; text-align: left; }
.lecture-dativo th { background: var(--fond-doux); font-weight: 600; color: var(--encre); }

@media (max-width: 720px) {
  h1 { font-size: 1.65rem; }
  .lecture-dativo { padding-left: 16px; }
  .entete-inner { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 12px; }
  .nav { gap: 14px; margin-left: 0; width: 100%; }
  .section { padding: 40px 0; }
  .accroche { padding: 40px 0 32px; }
}
