/* =====================================================================
   DevNot — site vitrine
   Bleu nuit pour l'encre et les actions ; rouge réservé au logo, au badge
   « Nouveau », au sceau du décompte et aux icônes des modules. Pièce maîtresse : le décompte.
   ===================================================================== */

:root {
    --encre: #172033;
    --nuit: #0f172a;
    --texte: #2a3142;
    --gris: #5d687a;
    --brume: #f3f5f9;
    --filet: #dfe3ea;
    --papier: #ffffff;
    --sceau: #c8161d;
    --rayon: 12px;
    --largeur: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
    margin: 0;
    color: var(--texte);
    background: var(--papier);
    font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; }
a { color: var(--encre); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--sceau); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { color: var(--encre); line-height: 1.12; font-weight: 600; letter-spacing: -.02em; }
h1 { margin: 0 0 20px; font-size: clamp(2.3rem, 4.4vw, 3.7rem); letter-spacing: -.035em; }
h2 { margin: 0 0 16px; font-size: clamp(1.75rem, 2.8vw, 2.45rem); }
h3 { margin: 0 0 6px; font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.conteneur { width: min(var(--largeur), calc(100% - 40px)); margin: 0 auto; }

.lien-evitement {
    position: fixed; left: 12px; top: -100px; z-index: 9999;
    padding: 10px 14px; border-radius: 8px; background: var(--papier); color: var(--encre);
}
.lien-evitement:focus { top: 12px; }

/* ------------------------------------------------------------------ En-tête */

.entete {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--filet);
}
.entete__barre { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }

.marque { color: var(--encre); font-size: 1.4rem; font-weight: 700; letter-spacing: -.04em; text-decoration: none; }
.marque span { color: var(--sceau); }
.marque--claire { color: var(--papier); }

.menu { display: flex; align-items: center; gap: 24px; font-size: .95rem; font-weight: 500; }
.menu a { color: #3b4557; text-decoration: none; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--encre); text-decoration: underline; text-decoration-thickness: 2px; }
.menu .menu__action { color: var(--papier); text-decoration: none; }
.badge-nouveau {
    display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 20px;
    background: var(--sceau); color: #fff; font-size: .7rem; font-weight: 600; vertical-align: 2px;
}

.menu-bouton {
    display: none; width: 42px; height: 42px; align-items: center; justify-content: center;
    border: 1px solid var(--filet); border-radius: 9px; background: var(--papier); color: var(--encre); cursor: pointer;
}

.ariane { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; color: var(--gris); font-size: .88rem; }
.ariane a { color: var(--gris); }

/* ------------------------------------------------------------------ Boutons */

.bouton {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 11px 20px; border-radius: 9px; border: 1px solid transparent;
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: background-color .15s ease;
}
.bouton--principal { background: var(--encre); color: var(--papier); }
.bouton--principal:hover { background: var(--nuit); }
.bouton--secondaire { background: var(--papier); color: var(--encre); border-color: #c9d0db; }
.bouton--secondaire:hover { border-color: var(--encre); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ------------------------------------------------------------------ Sections */

.section { padding: 88px 0; }
.section--brume { background: var(--brume); }
.section--nuit { background: var(--nuit); color: #d6dce7; }
.section--nuit h2, .section--nuit h3 { color: var(--papier); }
.section--nuit a { color: var(--papier); }

.intro { max-width: 720px; margin-bottom: 44px; }
.intro p { color: var(--gris); font-size: 1.08rem; }
.section--nuit .intro p { color: #aeb8c9; }

.accroche { margin: 0 0 14px; color: var(--gris); font-weight: 600; }
.accroche a { color: var(--sceau); font-weight: 600; }

.texte-long { max-width: 760px; }
.texte-long p { color: var(--texte); }

/* ------------------------------------------------------------------ Héros */

.heros { padding: 64px 0 88px; background: linear-gradient(180deg, var(--brume) 0%, var(--papier) 100%); }
.heros__grille { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 64px; align-items: center; }
.heros__lead { max-width: 620px; color: #465063; font-size: 1.18rem; }
.heros--texte { padding-bottom: 72px; }
.heros--texte h1 { max-width: 900px; }
.titre-solution { margin-bottom: 12px; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.02em; }
.encadre--sous-decompte { margin-top: 22px; }

/* Accueil : ce que fait DevNot, puis les quatre solutions en vignettes */
.heros__phrase { max-width: 760px; margin: 0 0 6px; color: var(--encre); font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 500; line-height: 1.35; }
.heros__sous { max-width: 760px; margin: 0 0 30px; color: var(--gris); font-size: 1.08rem; }

.solutions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.solution {
    display: flex; flex-direction: column; gap: 8px;
    padding: 22px 22px 20px;
    background: var(--papier); border: 1px solid var(--filet); border-radius: 14px;
    color: var(--texte); text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}
.solution:hover, .solution:focus-visible { border-color: var(--encre); transform: translateY(-2px); }
.solution--vedette { border: 2px solid var(--encre); }
.solution__haut { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.solution__icone {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px;
    background: var(--brume); color: var(--encre); font-size: 1.1rem;
}
.solution--vedette .solution__icone { background: var(--encre); color: var(--papier); }
.solution__nom { color: var(--encre); font-size: 1.15rem; font-weight: 600; line-height: 1.25; }
.solution__texte { flex: 1; color: var(--gris); font-size: .95rem; line-height: 1.5; }
.solution__lien { margin-top: 6px; color: var(--encre); font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: .2em; }

/* ------------------------------------------------------------------ Le décompte (pièce maîtresse) */

.decompte {
    position: relative;
    margin: 0;
    padding: 30px 32px 24px;
    background: var(--papier);
    border: 1px solid var(--filet);
    border-radius: 4px;
    box-shadow: 0 1px 0 var(--filet), 0 30px 60px -30px rgba(23, 32, 51, .45);
    font-variant-numeric: tabular-nums;
    font-size: .95rem;
}
.decompte__sceau {
    position: absolute; top: 18px; right: 18px;
    width: 74px; height: 74px; display: grid; place-items: center;
    border: 2px solid var(--sceau); border-radius: 50%;
    color: var(--sceau); font-size: .68rem; font-weight: 700; line-height: 1.15; text-align: center;
    transform: rotate(-12deg); opacity: .85;
}
.decompte__entete { padding-right: 84px; padding-bottom: 14px; border-bottom: 2px solid var(--encre); }
.decompte__etude { margin: 0; color: var(--gris); font-size: .8rem; }
.decompte__titre { margin: 2px 0 10px; color: var(--encre); font-size: 1.12rem; font-weight: 600; line-height: 1.25; }
.decompte__meta { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; margin: 0; font-size: .82rem; }
.decompte__meta dt { color: var(--gris); }
.decompte__meta dd { margin: 0; color: var(--encre); }
.decompte__resume { margin: 12px 0 4px; color: var(--encre); font-weight: 600; }
.decompte__section { margin: 16px 0 4px; color: var(--gris); font-size: .8rem; font-weight: 600; }
.decompte__ligne { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 3px 0; }
.decompte__ligne span:first-child, .decompte__ligne span:last-child { white-space: nowrap; }
.decompte__points { flex: 1; border-bottom: 1px dotted #aeb6c3; transform: translateY(-4px); min-width: 16px; }
.decompte__total {
    display: flex; justify-content: space-between; gap: 12px;
    margin: 16px 0 0; padding-top: 10px;
    border-top: 3px double var(--encre);
    color: var(--encre); font-weight: 700; font-size: 1.05rem;
}
.decompte__pied { margin-top: 10px; color: var(--gris); font-size: .78rem; }

/* ------------------------------------------------------------------ Listes à filets (au lieu de cartes identiques) */

.filets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 40px; margin: 0; padding: 0; list-style: none; }
.filets--2 { grid-template-columns: repeat(2, 1fr); }
.filets > li { padding-top: 16px; border-top: 1px solid var(--filet); }
.filets p { margin: 0; color: var(--gris); font-size: .98rem; }
.filets i { margin-right: 8px; color: var(--encre); }
.filets--groupe { margin: 14px 0 48px; }
.filets--dernier { margin-bottom: 0; }
.section--nuit .filets > li { border-top-color: rgba(255, 255, 255, .16); }
.section--nuit .filets p { color: #aeb8c9; }

/* Icônes en cachet (double anneau), en retrait à gauche.
   S'applique sur toutes les pages à chaque élément de liste à filets dont le titre contient une icône. */
.filets, .actes {
    --cachet-couleur: var(--sceau);   /* mettre var(--encre) pour des icônes bleu nuit */
    --cachet-fond: #fbeeee;
    --cachet-anneau: rgba(200, 22, 29, .28);
    --cachet-taille: 48px;
    --cachet-retrait: 68px;
}
.section--nuit .filets {
    --cachet-couleur: #ff9ea2;
    --cachet-fond: rgba(200, 22, 29, .18);
    --cachet-anneau: rgba(255, 158, 162, .35);
}
.conteneur > h3:has(+ .filets) { margin: 44px 0 4px; font-size: 1.2rem; }
.conteneur > h3:has(+ .filets):first-of-type { margin-top: 24px; }
.filets > li:has(> h3 > i) { position: relative; padding-left: var(--cachet-retrait); min-height: calc(var(--cachet-taille) + 32px); }
.filets > li > h3:has(> i) { margin-top: 3px; }
.filets > li > h3 > i,
.acte > strong > i {
    position: absolute; left: 4px; top: 22px;
    display: grid; place-items: center;
    width: var(--cachet-taille); height: var(--cachet-taille); margin: 0;
    border-radius: 50%;
    font-size: 1.15rem; color: var(--cachet-couleur); background: var(--cachet-fond);
    box-shadow: inset 0 0 0 1px var(--cachet-anneau);
    outline: 1px solid var(--cachet-anneau); outline-offset: 3px;
}
.acte > strong > i { top: 16px; }
.filets > li:has(> h3 > i)::before {
    content: ""; position: absolute; top: -1px; left: 0;
    width: calc(var(--cachet-taille) + 8px); height: 2px;
    background: var(--cachet-couleur);
}

/* Domaines de la page d'accueil : trois colonnes reliées à leur page */
.domaines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--encre); }
.domaine { padding: 26px 28px 30px 0; }
.domaine + .domaine { padding-left: 28px; border-left: 1px solid var(--filet); }
.domaine p { color: var(--gris); }
.domaine a { font-weight: 600; }

/* Bloc produit : texte + visuel */
.produit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.produit--inverse .produit__visuel { order: -1; }
.coches { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.coches li { position: relative; padding-left: 28px; }
.coches li::before {
    content: ""; position: absolute; left: 2px; top: .5em;
    width: 12px; height: 7px; border-left: 2px solid var(--encre); border-bottom: 2px solid var(--encre);
    transform: rotate(-45deg);
}

/* Actes du module, en deux groupes */
.actes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; }
.actes h3 { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px solid var(--encre); font-size: 1.25rem; }
.acte { padding: 14px 0; border-bottom: 1px solid var(--filet); }
.acte strong { display: block; color: var(--encre); }
.acte span { color: var(--gris); font-size: .97rem; }
.acte:has(> strong > i) { position: relative; padding-left: var(--cachet-retrait); min-height: calc(var(--cachet-taille) + 30px); }

/* Étapes : vraie séquence, donc numérotée */
.etapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: 0; padding: 0; list-style: none; counter-reset: etape; }
.etapes li { counter-increment: etape; padding-top: 14px; border-top: 2px solid var(--encre); }
.etapes li::before { content: counter(etape); display: block; margin-bottom: 6px; color: var(--gris); font-weight: 700; }
.etapes p { margin: 0; color: var(--gris); font-size: .97rem; }
.etapes--3 { grid-template-columns: 1fr; gap: 20px; }
.section--nuit .etapes li { border-top-color: rgba(255, 255, 255, .5); }
.section--nuit .etapes li::before, .section--nuit .etapes p { color: #aeb8c9; }

/* Capture d'écran */
.capture { margin: 0; padding: 6px; background: var(--papier); border: 1px solid var(--filet); border-radius: var(--rayon); box-shadow: 0 30px 60px -32px rgba(23, 32, 51, .45); }
.capture img { display: block; width: 100%; border-radius: 8px; }
.capture figcaption { padding: 8px 6px 2px; color: var(--gris); font-size: .85rem; }

/* Encadré */
.encadre { padding: 22px 24px; border-left: 3px solid var(--encre); background: var(--brume); border-radius: 0 var(--rayon) var(--rayon) 0; }
.encadre p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ Questions fréquentes */

.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { padding: 18px 22px; background: var(--papier); border: 1px solid var(--filet); border-radius: var(--rayon); }
.faq summary { cursor: pointer; color: var(--encre); font-weight: 600; }
.faq details p { margin: 12px 0 0; color: var(--gris); }

/* ------------------------------------------------------------------ Contact */

.contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.contact__texte p { color: var(--gris); }
.contact__points { display: grid; gap: 12px; margin: 22px 0; padding: 0; list-style: none; }
.contact__points li { padding-left: 16px; border-left: 2px solid var(--filet); color: var(--gris); }
.contact__points strong { color: var(--encre); }

.formulaire { padding: 30px; background: var(--papier); border: 1px solid var(--filet); border-radius: 16px; }
.formulaire__ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.formulaire__note { margin: 14px 0 0; color: var(--gris); font-size: .84rem; }
.champ { margin-bottom: 16px; }
.champ label { display: block; margin-bottom: 6px; color: var(--encre); font-weight: 600; font-size: .92rem; }
.champ input, .champ textarea {
    width: 100%; padding: 11px 13px; border: 1px solid #cfd5df; border-radius: 9px;
    background: #fff; color: var(--texte); font: inherit;
}
.champ input:focus, .champ textarea:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px rgba(23, 32, 51, .12); }
.champ textarea { min-height: 140px; resize: vertical; }
.obligatoire { color: var(--sceau); }
.captcha { display: flex; gap: 12px; align-items: center; }
.captcha__question { flex: 0 0 auto; padding: 10px 13px; border-radius: 9px; background: var(--brume); font-weight: 600; }
.alerte { margin-bottom: 18px; padding: 12px 15px; border-radius: 9px; font-weight: 500; }
.alerte--succes { background: #ecfdf3; color: #067647; }
.alerte--erreur { background: #fef3f2; color: #b42318; }
.piege { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* ------------------------------------------------------------------ Documents juridiques */

.document { padding-top: 48px; }
.document__grille { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
.document__sommaire { position: sticky; top: 96px; padding: 20px 20px 16px; background: var(--brume); border-radius: var(--rayon); font-size: .9rem; }
.document__sommaire-titre { margin: 0 0 8px; color: var(--encre); font-weight: 600; }
.document__sommaire ol { margin: 0 0 16px; padding-left: 20px; }
.document__sommaire li { margin-bottom: 5px; color: var(--gris); }
.document__sommaire a { color: var(--texte); text-decoration: none; }
.document__sommaire a:hover { color: var(--encre); text-decoration: underline; }
.document__autres { display: grid; gap: 4px; margin: 0; padding-top: 12px; border-top: 1px solid var(--filet); }
.document__autres a { color: var(--gris); }

.document__texte { max-width: 760px; }
.document__texte h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-bottom: 8px; }
.document__maj { color: var(--gris); font-size: .92rem; }
.document__intro { padding: 16px 20px; border-left: 3px solid var(--encre); background: var(--brume); border-radius: 0 var(--rayon) var(--rayon) 0; }
.document__article { padding-top: 26px; margin-top: 26px; border-top: 1px solid var(--filet); scroll-margin-top: 96px; }
.document__article h2 { font-size: 1.35rem; margin-bottom: 12px; }
.document__numero { color: var(--gris); font-weight: 500; }
.document__article h3 { margin: 18px 0 6px; font-size: 1.02rem; }
.document__article ul { margin: 0 0 1em; padding-left: 20px; }
.document__article li { margin-bottom: 4px; }
.fiche { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 1em; padding: 16px 20px; border: 1px solid var(--filet); border-radius: var(--rayon); }
.fiche dt { color: var(--gris); }
.fiche dd { margin: 0; color: var(--encre); }
.a-completer { padding: 0 4px; border-radius: 4px; background: #fff3bf; color: #7a5200; }

/* ------------------------------------------------------------------ Pied de page */

.pied { padding: 56px 0 26px; background: var(--nuit); color: #aeb8c9; font-size: .93rem; }
.pied__grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.pied h2 { margin: 0 0 12px; color: var(--papier); font-size: 1rem; letter-spacing: 0; }
.pied a { display: block; margin-bottom: 6px; color: #d6dce7; text-decoration: none; }
.pied a:hover { color: var(--papier); text-decoration: underline; }
.pied .marque { display: inline-block; margin-bottom: 10px; }
.pied__bas {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
    margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem;
}
.pied__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.pied__legal a { display: inline; margin: 0; }

/* ------------------------------------------------------------------ Adaptation aux écrans */

@media (max-width: 980px) {
    .menu-bouton { display: inline-flex; }
    .menu {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--papier); border-bottom: 1px solid var(--filet);
        max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .2s ease;
    }
    .menu.est-ouvert { max-height: 480px; visibility: visible; }
    .menu a { padding: 14px 20px; border-top: 1px solid var(--filet); }
    .menu .menu__action { margin: 12px 20px; border-top: 0; }

    .heros__grille, .produit, .contact, .actes { grid-template-columns: 1fr; }
    .produit--inverse .produit__visuel { order: 0; }
    .filets, .etapes { grid-template-columns: repeat(2, 1fr); }
    .solutions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .domaines { grid-template-columns: 1fr; }
    .domaine, .domaine + .domaine { padding: 22px 0; border-left: 0; }
    .domaine + .domaine { border-top: 1px solid var(--filet); }
    .pied__grille { grid-template-columns: 1fr 1fr; }
    .document__grille { grid-template-columns: 1fr; gap: 28px; }
    .document__sommaire { position: static; }
}

@media (max-width: 640px) {
    .conteneur { width: calc(100% - 28px); }
    .section { padding: 64px 0; }
    .heros { padding: 40px 0 64px; }
    .filets, .filets--2, .etapes, .formulaire__ligne, .pied__grille, .solutions { grid-template-columns: 1fr; }
    .actions .bouton { width: 100%; }
    .formulaire { padding: 20px; }
    .decompte { padding: 24px 18px 18px; font-size: .88rem; }
    .decompte__sceau { width: 58px; height: 58px; font-size: .58rem; }
    .filets, .actes { --cachet-taille: 40px; --cachet-retrait: 58px; }
    .filets > li > h3 > i, .acte > strong > i { font-size: 1rem; }
    .decompte__entete { padding-right: 64px; }
    .captcha { flex-direction: column; align-items: stretch; }
    .fiche { grid-template-columns: 1fr; gap: 2px; }
    .fiche dd { margin-bottom: 8px; }
}

@media print {
    .entete, .pied, #contact { display: none; }
}

/* Zoom de la capture au survol, avec voile grisé */
@media (hover: hover) and (min-width: 1000px) {
    .capture {
        overflow: visible;
    }

    .capture img {
        position: relative;
        cursor: zoom-in;
        transform-origin: right center; /* la capture est dans la colonne de droite */
        transition: transform .35s ease, box-shadow .35s ease;
        box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0);
    }

    .capture img:hover {
        z-index: 1000;
        transform: scale(1.6);
        box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .55);
    }

    /* Fait passer la section au-dessus du reste (en-tête collant, etc.) */
    .section:has(.capture img:hover) {
        position: relative;
        z-index: 1000;
    }
}

@media (prefers-reduced-motion: reduce) {
    .capture img { transition: none; }
}