/*
 * Site public de Barnabet (§7.7, §7.7 quater).
 *
 * Mêmes couleurs que l'application, pour que le site et l'outil se ressemblent. Aucune
 * police, aucune fonte d'icônes, aucune bibliothèque extérieure : rien à charger ailleurs,
 * donc rien à consentir, et une page qui s'affiche même sur une connexion lente. Les
 * pictogrammes sont dessinés en SVG dans Site.php.
 *
 * Refonte du 28/10/2026 : le site est passé d'une page unique très longue à des pages
 * séparées, et la forme a été reprise — accroche en deux colonnes avec un aperçu de
 * l'application, pictogrammes, rubans, tuiles de prix, frise verticale.
 *
 * Deux règles tenues pendant tout ce travail :
 *   - rien ne bouge pour qui a demandé « moins d'animations » (prefers-reduced-motion) ;
 *   - rien n'est caché par défaut. Les apparitions ne s'activent que si le navigateur
 *     exécute le script (classe « js » posée en tête de page) : sans lui, tout est visible.
 *     Une animation qui masque le texte et qui échoue vaut une page blanche.
 */

:root {
    --accent: #2b6e70;
    --accent-fonce: #1d4a4c;
    --accent-nuit: #122f31;
    --accent-pale: #e6f0f0;
    --accent-vif: #3f9fa1;
    --accent-clair: #8ad3d5;
    --ambre: #a96f18;
    --ambre-pale: #fdf3e3;
    --encre: #16292a;
    --discret: #5b6e6f;
    --fond: #f4f7f7;
    --carte: #ffffff;
    --bordure: #e0e9e9;
    --ombre: 0 1px 3px rgba(29, 74, 76, .07), 0 8px 24px rgba(29, 74, 76, .06);
    --ombre-haute: 0 2px 6px rgba(29, 74, 76, .08), 0 18px 44px rgba(29, 74, 76, .13);
    --ombre-portee: 0 30px 70px rgba(10, 40, 42, .3);
    --courbe: cubic-bezier(.22, .68, .32, 1);
    --rayon: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
    margin: 0;
    background: var(--fond);
    color: var(--encre);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Taille fluide : plus de palier brutal entre le téléphone et l'écran large. */
h1, h2, h3 { line-height: 1.2; letter-spacing: -.018em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.25rem + 3.2vw, 3.5rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); margin: 0 0 1.1rem; }
h3 { font-size: 1.12rem; margin: 0 0 .4rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); }
::selection { background: var(--accent-clair); color: var(--accent-nuit); }

/* Le contour de focus est la seule façon de se repérer au clavier : il ne disparaît jamais,
   il se dessine simplement mieux que celui du navigateur. */
:focus-visible { outline: 3px solid var(--accent-vif); outline-offset: 3px; border-radius: 4px; }

.centre { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

section { padding: clamp(50px, 6vw, 86px) 0; }
section.claire {
    background-color: #eef5f5;
    background-image:
        radial-gradient(rgba(29, 74, 76, .055) 1px, transparent 1px),
        linear-gradient(180deg, #e9f2f2, #f6f9f9);
    background-size: 22px 22px, auto;
}
main > section:first-child { padding-top: clamp(42px, 5vw, 70px); }

/* Premier lien de la page, invisible jusqu'à ce qu'on l'atteigne au clavier : il saute le
   menu, qui est identique sur toutes les pages. */
.evitement {
    position: absolute;
    left: -9999px;
    top: 10px;
    z-index: 90;
    background: #fff;
    color: var(--accent-fonce);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.evitement:focus { left: 16px; }

/* ------------------------------------------------- avancement de la lecture */

/* Une barre fine en haut de l'écran : elle dit où l'on en est dans la page. Posée par le
   script, absente sans lui — elle ne masque aucun contenu. */
.progression {
    position: fixed;
    inset: 0 auto auto 0;
    height: 3px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--accent-vif), var(--accent-clair));
    z-index: 60;
    will-change: transform;
}

/* ---------------------------------------------------------------- en-tête */

header.haut {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(900px 420px at 15% -10%, rgba(126, 220, 222, .3), transparent 65%),
        linear-gradient(135deg, var(--accent-nuit) 0%, var(--accent-fonce) 45%, #336f71 100%);
    color: #fff;
    padding: 16px 0 clamp(52px, 6vw, 92px);
    overflow: hidden;
}

/* Deux halos flous derrière l'en-tête : de la profondeur sans image à télécharger. Ils
   dérivent très lentement, assez pour que la page ne paraisse pas figée, pas assez pour
   accrocher l'œil pendant la lecture. */
header.haut::before,
header.haut::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .5;
    z-index: -1;
    pointer-events: none;
}

header.haut::before {
    width: 560px; height: 560px;
    top: -240px; right: -130px;
    background: radial-gradient(circle, rgba(126, 220, 222, .8), transparent 70%);
    animation: derive 24s var(--courbe) infinite alternate;
}

header.haut::after {
    width: 440px; height: 440px;
    bottom: -260px; left: -110px;
    background: radial-gradient(circle, rgba(60, 150, 152, .85), transparent 70%);
    animation: derive 31s var(--courbe) infinite alternate-reverse;
}

@keyframes derive {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(44px, 32px, 0) scale(1.14); }
}

/* La barre de titre se colle en haut et se densifie dès qu'on défile : le menu reste à
   portée sur une page longue, au lieu d'obliger à remonter. */
.barre {
    display: flex;
    align-items: center;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 50;
    margin: -16px -14px 0;
    padding: 12px 14px;
    border-radius: 0 0 16px 16px;
    transition: background .35s var(--courbe), box-shadow .35s var(--courbe);
}

.barre.posee {
    background: rgba(18, 47, 49, .82);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 10px 30px rgba(8, 30, 32, .3);
}

.barre .marque { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; }
.barre img { width: 40px; height: 40px; border-radius: 11px; transition: transform .35s var(--courbe); }
.barre .marque:hover img { transform: rotate(-6deg) scale(1.07); }
.barre .nom { font-size: 1.3rem; font-weight: 600; letter-spacing: -.015em; }

.barre nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.barre nav a {
    position: relative;
    color: rgba(255, 255, 255, .84);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    padding: 8px 13px;
    border-radius: 999px;
    white-space: nowrap;
    transition: color .22s var(--courbe), background .22s var(--courbe);
}

.barre nav a:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* La page courante porte une pastille pleine : sur un site de plusieurs pages, c'est ce
   qui dit où l'on est. */
.barre nav a.ici { color: #fff; background: rgba(255, 255, 255, .17); font-weight: 600; }

/* L'appel à l'action se distingue du reste du menu : c'est le seul lien qui ne mène pas
   à de la lecture. */
.barre nav a.appel-menu {
    margin-left: 8px;
    background: #fff;
    color: var(--accent-fonce);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(8, 30, 32, .22);
}

.barre nav a.appel-menu:hover { background: #eefafa; transform: translateY(-1px); }

/* ----------------------------------------------------------------- accroche */

.accroche { margin-top: clamp(34px, 4.5vw, 64px); }
.accroche .texte { max-width: 660px; }
.accroche h1 { color: #fff; }
.accroche .amorce { color: rgba(255, 255, 255, .9); font-size: clamp(1.05rem, .98rem + .45vw, 1.24rem); max-width: 620px; }

/* Accroche en deux colonnes quand la page apporte une illustration. */
header.haut.avec-visuel .accroche {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(30px, 4vw, 60px);
    align-items: center;
}

header.haut .embleme {
    position: absolute;
    right: clamp(-60px, -2vw, 0px);
    top: 56%;
    translate: 0 -40%;
    width: min(400px, 34vw);
    color: #fff;
    opacity: .08;
    pointer-events: none;
    z-index: -1;
}

header.haut .embleme .icone { width: 100%; height: auto; stroke-width: .75; }
header.haut.discrete .embleme { display: none; }

header.haut.discrete { padding-bottom: clamp(30px, 3vw, 44px); }
header.haut.discrete .accroche { margin-top: clamp(24px, 3vw, 40px); }

/* Le surtitre : une étiquette courte qui situe la page avant qu'on lise le grand titre. */
.chapeau {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    margin: 0 0 14px;
}

.chapeau::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.chapeau.clair {
    color: var(--accent-clair);
    background: rgba(255, 255, 255, .1);
    padding: 6px 14px 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
}

.boutons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.bouton {
    display: inline-block;
    background: #fff;
    color: var(--accent-fonce);
    padding: 13px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(8, 30, 32, .2);
    transition: transform .22s var(--courbe), box-shadow .22s var(--courbe), background .22s var(--courbe);
}

.bouton:hover { background: #f4fbfb; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(8, 30, 32, .26); }
.bouton:active { transform: translateY(0); }
.bouton.discret { background: transparent; color: #fff; box-shadow: none; border: 1.5px solid rgba(255, 255, 255, .5); }
.bouton.discret:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .8); }
.bouton.plein { background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(29, 74, 76, .28); }
.bouton.plein:hover { background: var(--accent-fonce); }
.bouton.sobre { background: transparent; color: var(--accent-fonce); box-shadow: none; border: 1.5px solid var(--bordure); }
.bouton.sobre:hover { background: #fff; border-color: #bfd8d8; }


/* ------------------------------------- l'aperçu de l'application, dans l'accroche */

/*
 * Une maquette de la fenêtre de Barnabet, dessinée en HTML. Elle montre ce qu'on achète
 * avant le moindre paragraphe — et elle ne pèse rien, puisqu'il n'y a pas d'image.
 * Les chiffres sont des exemples, et la page le dit juste en dessous.
 */
.fenetre {
    background: rgba(255, 255, 255, .97);
    color: var(--encre);
    border-radius: 20px;
    box-shadow: var(--ombre-portee);
    overflow: hidden;
    transform: perspective(1400px) rotateY(-8deg) rotateX(3deg) translateZ(0);
    transition: transform .7s var(--courbe);
    animation: flotte 9s ease-in-out infinite alternate;
}

.fenetre:hover { transform: perspective(1400px) rotateY(0) rotateX(0) scale(1.02); }

@keyframes flotte {
    from { translate: 0 0; }
    to { translate: 0 -12px; }
}

.fenetre-haut {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 16px;
    background: linear-gradient(180deg, #f2f7f7, #e8f1f1);
    border-bottom: 1px solid var(--bordure);
}

.fenetre-haut i { width: 10px; height: 10px; border-radius: 50%; background: #cfdcdc; }
.fenetre-haut b { margin-left: 8px; font-size: .84rem; color: var(--discret); font-weight: 600; }
.fenetre-corps { padding: 18px 18px 20px; }

.fenetre .etat {
    display: flex;
    align-items: center;
    gap: 13px;
    background: linear-gradient(135deg, #edf7f2, #e4f3ec);
    border: 1px solid #b9ddcc;
    border-radius: 13px;
    padding: 13px 15px;
    margin-bottom: 16px;
}

.fenetre .etat .icone { width: 26px; height: 26px; color: #2d7a5a; flex: none; }
.fenetre .etat strong { display: block; font-size: .96rem; color: #1f5a45; }
.fenetre .etat span { font-size: .82rem; color: #4a7d68; }

.fenetre .ligne {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 2px;
    border-bottom: 1px solid #eef3f3;
    font-size: .93rem;
}

.fenetre .ligne:last-of-type { border-bottom: 0; }
.fenetre .ligne .icone { width: 19px; height: 19px; color: var(--accent); flex: none; }
.fenetre .ligne span { flex: 1; }
.fenetre .ligne b { color: var(--discret); font-weight: 600; font-size: .86rem; }

.fenetre .jauge-mini { height: 9px; border-radius: 99px; background: #e3eded; overflow: hidden; margin: 14px 0 9px; }
.fenetre .jauge-mini i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-fonce), var(--accent-vif)); border-radius: 99px; }
.fenetre .pied-fenetre { font-size: .8rem; color: var(--discret); margin: 0; }

/* ------------------------------------------------------------------ titres */

.intro { max-width: 700px; margin-bottom: 36px; }
/* Un titre long — une question posée en toutes lettres — ne doit pas se briser sur son point
   d'interrogation faute de place. */
.intro.large, .accroche.large, .note.large { max-width: 900px; }
.intro p { color: var(--discret); font-size: 1.07rem; }
.intro.centree { margin-left: auto; margin-right: auto; text-align: center; }
.intro.centree .chapeau { justify-content: center; }

/* --------------------------------------------------------------- les cartes */

.grille { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grille.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.carte {
    position: relative;
    background: linear-gradient(168deg, #ffffff 0%, #fafdfd 60%, #f3f9f9 100%);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 26px;
    box-shadow: var(--ombre);
    overflow: hidden;
    transition: transform .3s var(--courbe), box-shadow .3s var(--courbe), border-color .3s var(--courbe);
}

/* Un trait de couleur se dessine en haut de la carte au survol. Décoratif : il ne porte
   aucun texte, et son absence ne cache rien. */
.carte::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-vif), var(--accent-clair));
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform .45s var(--courbe);
}

.carte:hover { transform: translateY(-4px); box-shadow: var(--ombre-haute); border-color: #cfe0e0; }
.carte:hover::after { transform: scaleX(1); }
.carte h3 { color: var(--accent-nuit); }
.carte p { color: var(--discret); font-size: .98rem; }
.carte p:last-child { margin-bottom: 0; }

/* La tuile du pictogramme. Elle s'inverse au survol : la carte entière réagit d'un bloc. */
.tuile {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, #eaf4f4, #d6ebeb);
    color: var(--accent-fonce);
    margin-bottom: 16px;
    transition: background .32s var(--courbe), color .32s var(--courbe), transform .32s var(--courbe);
}

.carte:hover .tuile {
    background: linear-gradient(140deg, var(--accent-vif), var(--accent-fonce));
    color: #fff;
    transform: rotate(-5deg) scale(1.07);
}

.icone { width: 22px; height: 22px; display: block; }

/* La pastille numérotée des étapes, à la place d'une tuile. */
.pastille {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: linear-gradient(140deg, var(--accent-vif), var(--accent-fonce));
    color: #fff;
    font-weight: 700;
    font-size: .98rem;
    flex: none;
    transition: transform .3s var(--courbe);
}

.etape { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.etape h3 { margin: 0; }
.carte:hover .pastille { transform: scale(1.09) rotate(-5deg); }

/* ------------------------------------------------- le ruban de points forts */

/*
 * Quatre faits sur une ligne, juste sous l'accroche. C'est le résumé que lit celui qui ne
 * lira rien d'autre.
 */
section.resume { padding-top: 0; }
section.resume .centre { position: relative; z-index: 5; }
/* Le chevauchement ne vaut que si le ruban suit immédiatement l’accroche. */
header.haut + section.resume .centre { margin-top: clamp(-56px, -4vw, -30px); }

.ruban { display: grid; gap: 1px; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--bordure); border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre-haute); }
.ruban .point { background: var(--carte); padding: 22px 20px; transition: background .3s var(--courbe); }
.ruban .point:hover { background: #fbfdfd; }
.ruban .icone { width: 24px; height: 24px; color: var(--accent-vif); margin-bottom: 10px; }
.ruban strong { display: block; font-size: 1rem; color: var(--accent-nuit); margin-bottom: 3px; }
.ruban span { font-size: .9rem; color: var(--discret); }

/* ------------------------------------------------- l'espace mutualisé */

.mutualise { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(26px, 4vw, 52px); align-items: center; }

.jauge {
    background: var(--carte);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 24px;
    box-shadow: var(--ombre);
}

.jauge .titre { font-size: .9rem; color: var(--discret); margin-bottom: 12px; }
.jauge .barre-espace { display: flex; height: 28px; border-radius: 9px; overflow: hidden; background: #dde8e8; }
.jauge .part { height: 100%; transition: width 1s var(--courbe); }
.jauge .legende { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: .88rem; color: var(--discret); }
.jauge .puce { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ----------------------------------------------- la vie d'un fichier, en frise */

/*
 * Une frise verticale : un trait, quatre nœuds, quatre moments. Le trait se dessine du
 * haut vers le bas pendant qu'on défile, ce qui donne au temps un sens de lecture.
 * Il est purement décoratif — aucun texte ne dépend de lui.
 */
.vie { position: relative; margin-top: 10px; padding-left: 4px; }

.vie::before {
    content: "";
    position: absolute;
    left: 24.5px;
    top: 14px;
    bottom: 36px;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-vif), var(--accent-clair) 70%, rgba(138, 211, 213, 0));
    transform-origin: 50% 0;
    transition: transform 1.3s var(--courbe);
}

.vie .moment { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding-bottom: 26px; }
.vie .moment:last-child { padding-bottom: 0; }

.vie .noeud {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, #fff, #eaf4f4);
    border: 1.5px solid #cfe4e4;
    color: var(--accent-fonce);
    box-shadow: 0 0 0 5px rgba(234, 244, 244, .9), 0 4px 14px rgba(29, 74, 76, .12);
    z-index: 1;
    transition: background .32s var(--courbe), color .32s var(--courbe), transform .32s var(--courbe);
}

.vie .noeud .icone { width: 24px; height: 24px; }

.vie .moment:hover .noeud {
    background: linear-gradient(140deg, var(--accent-vif), var(--accent-fonce));
    color: #fff;
    transform: scale(1.06);
}

.vie .texte-moment { padding-top: 3px; }
.quand { display: inline-block; font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); font-weight: 700; background: var(--accent-pale); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.vie h3 { font-size: 1.12rem; margin-bottom: 6px; }
.vie p { color: var(--discret); font-size: .98rem; margin-bottom: 0; max-width: 62ch; }

/* L'encadré qui lève le malentendu : mis en avant, car c'est le cœur de la page. */
.eclaircissement {
    margin-top: 30px;
    background: linear-gradient(135deg, var(--accent-pale), #f2f9f9);
    border: 1px solid #c8dedf;
    border-radius: var(--rayon);
    padding: 26px 28px;
}

.eclaircissement h3 { color: var(--accent-fonce); font-size: 1.22rem; }
.eclaircissement p { color: #28484a; margin-bottom: .7rem; }
.eclaircissement p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- tarifs */

/* Les tuiles de prix : ce qu'on regarde en premier sur la page d'accueil. Celle du milieu
   est mise en avant, parce que c'est celle qui convient à presque tout le monde. */
.offres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.offre {
    position: relative;
    background: var(--carte);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 24px 22px;
    text-align: center;
    box-shadow: var(--ombre);
    transition: transform .3s var(--courbe), box-shadow .3s var(--courbe), border-color .3s var(--courbe);
}

.offre:hover { transform: translateY(-5px); box-shadow: var(--ombre-haute); border-color: #cfe0e0; }
.offre .volume { font-size: .84rem; text-transform: uppercase; letter-spacing: .09em; color: var(--discret); font-weight: 700; }
.offre .prix { font-size: clamp(1.7rem, 1.3rem + 1.1vw, 2.2rem); font-weight: 700; color: var(--accent-nuit); letter-spacing: -.03em; margin: 8px 0 0; line-height: 1.1; }
.offre .prix small { font-size: .9rem; font-weight: 500; color: var(--discret); letter-spacing: 0; }
.offre .ttc { font-size: .86rem; color: var(--discret); margin: 6px 0 0; }

.offre.vedette {
    border-color: var(--accent-vif);
    box-shadow: 0 2px 6px rgba(29, 74, 76, .08), 0 20px 46px rgba(29, 74, 76, .16);
}

.offre .badge {
    position: absolute;
    top: -11px;
    left: 50%;
    translate: -50% 0;
    background: var(--ambre-pale);
    color: var(--ambre);
    border: 1px solid #ecd4a8;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 3px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

table.tarifs, table.comparatif { width: 100%; border-collapse: collapse; background: var(--carte); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
table.tarifs th, table.tarifs td, table.comparatif th, table.comparatif td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--bordure); }
table.tarifs th, table.comparatif th { background: linear-gradient(135deg, var(--accent-pale), #dbeaea); color: var(--accent-fonce); font-size: .88rem; text-transform: uppercase; letter-spacing: .04em; }
table.tarifs tr:last-child td, table.comparatif tr:last-child td { border-bottom: 0; }
table.tarifs td.volume, table.comparatif td.critere { font-weight: 600; }
table.tarifs td.ttc { color: var(--discret); }
table.tarifs tbody tr, table.comparatif tbody tr { transition: background .2s var(--courbe); }
table.tarifs tbody tr:hover, table.comparatif tbody tr:hover { background: #f7fbfb; }
table.comparatif { margin-top: 26px; }
.note { color: var(--discret); font-size: .93rem; margin-top: 18px; }

/* ------------------------------------------------- les renvois vers les pages */

/* Trois portes vers les pages de fond, à la fin de l'accueil. Une carte entière cliquable :
   sur un téléphone, viser un lien de trois mots est une épreuve. */
.renvois { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.renvoi {
    display: block;
    background: var(--carte);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--ombre);
    transition: transform .3s var(--courbe), box-shadow .3s var(--courbe), border-color .3s var(--courbe);
}

.renvoi:hover { transform: translateY(-4px); box-shadow: var(--ombre-haute); border-color: #cfe0e0; }
.renvoi h3 { color: var(--accent-nuit); }
.renvoi p { color: var(--discret); font-size: .96rem; margin-bottom: 14px; }
.renvoi .suite { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: .95rem; }
.renvoi .suite .icone { width: 18px; height: 18px; transition: transform .3s var(--courbe); }
.renvoi:hover .suite .icone { transform: translateX(5px); }

/* ---------------------------------------------------- bandeau d'appel */

.appel { padding: 0 0 clamp(50px, 6vw, 86px); }

.appel .cadre {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 24px;
    padding: clamp(34px, 4vw, 56px);
    color: #fff;
    background:
        radial-gradient(600px 300px at 85% 0%, rgba(126, 220, 222, .35), transparent 65%),
        linear-gradient(135deg, var(--accent-nuit), var(--accent-fonce) 60%, #336f71);
    box-shadow: var(--ombre-haute);
}

.appel h2 { color: #fff; margin-bottom: .6rem; }
.appel p { color: rgba(255, 255, 255, .88); max-width: 620px; margin-bottom: 0; }
.appel .boutons { margin-top: 26px; }

/* ------------------------------------------------------------ formulaire */

form.demande { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 30px; box-shadow: var(--ombre); }
.champs { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.champ.large { grid-column: 1 / -1; }
label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: 6px; }
label .facultatif { font-weight: 400; color: var(--discret); }

input[type=text], input[type=email], input[type=tel], select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--bordure);
    border-radius: 11px;
    font: inherit;
    font-size: .98rem;
    background: #fff;
    color: var(--encre);
    transition: border-color .2s var(--courbe), box-shadow .2s var(--courbe);
}

input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
textarea { min-height: 120px; resize: vertical; }

/* Piège à robots : jamais affiché, jamais atteint au clavier. */
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.controle { background: linear-gradient(135deg, var(--accent-pale), #f1f8f8); border-radius: 13px; padding: 17px 19px; }
.controle label { margin-bottom: 8px; }
.controle input { max-width: 220px; }
.controle .aide { font-size: .87rem; color: var(--discret); margin: 8px 0 0; }

.message { border-radius: 13px; padding: 17px 19px; margin-bottom: 22px; }
.message.bien { background: #edf6f1; border: 1.5px solid #a9cfc0; color: #1f5a45; }
.message.mal { background: #fdf1f0; border: 1.5px solid #e6bdb8; color: #8a332b; }
.message p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------- pied */

footer {
    background: var(--accent-nuit);
    color: rgba(255, 255, 255, .7);
    padding: 44px 0 34px;
    font-size: .92rem;
}

footer .colonnes { display: grid; grid-template-columns: 1.4fr minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
footer a { color: rgba(255, 255, 255, .86); text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer p { margin: 0 0 .4rem; }
footer .marque-pied strong { color: #fff; font-size: 1.14rem; }
footer .titre-colonne { color: #fff; font-weight: 600; font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 8px; }
footer .editeur { font-size: .82rem; color: rgba(255, 255, 255, .48); margin-top: 14px; }

/* ------------------------------------------- apparition au défilement */

/*
 * Jamais de contenu caché sans certitude de pouvoir le montrer. Trois conditions avant
 * qu'un bloc parte translucide :
 *   - le script tourne (classe « js » posée en tête de page) ;
 *   - le visiteur n'a pas demandé moins d'animations ;
 *   - et le script retire l'état dès que le bloc entre dans l'écran.
 * Si l'une manque, la règle ne s'applique pas du tout et la page est entière. C'est aussi
 * pour cela que ces règles vivent sous « no-preference » plutôt que d'être défaites plus
 * bas : une annulation qui se trompe laisserait du texte invisible.
 */
@media (prefers-reduced-motion: no-preference) {
    .js .apparait {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity .6s var(--courbe), transform .6s var(--courbe);
    }

    .js .apparait.vu { opacity: 1; transform: none; }

    /* Dans une grille, les cartes arrivent l'une après l'autre, très légèrement décalées. */
    .js .apparait:nth-child(2) { transition-delay: .07s; }
    .js .apparait:nth-child(3) { transition-delay: .14s; }
    .js .apparait:nth-child(4) { transition-delay: .21s; }
    .js .apparait:nth-child(5) { transition-delay: .28s; }
    .js .apparait:nth-child(6) { transition-delay: .35s; }

    /* Le trait de la frise se dessine du haut vers le bas : décoratif, aucun texte dessus. */
    .js .vie:not(.vu)::before { transform: scaleY(0); }

    /* Les parts de la jauge se déploient aussi. La largeur voulue reste dans l'attribut de
       style : sans script, elle s'applique telle quelle. */
    .js .jauge:not(.vu) .part { width: 0 !important; }
}

/* --------------------------------------------------------------- écrans étroits */

@media (max-width: 980px) {
    header.haut.avec-visuel .accroche { grid-template-columns: minmax(0, 1fr); }
    .fenetre { transform: none; animation: none; max-width: 460px; width: 100%; }
    .fenetre:hover { transform: scale(1.01); }
    .ruban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .offres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mutualise { grid-template-columns: minmax(0, 1fr); }
    .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .renvois { grid-template-columns: minmax(0, 1fr); }
    footer .colonnes { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    body { font-size: 16px; }
    .grille, .grille.deux, .champs, .ruban, .offres { grid-template-columns: minmax(0, 1fr); }
    .carte { padding: 22px; }
    form.demande { padding: 22px; }
    html { scroll-padding-top: 16px; }
    footer .colonnes { grid-template-columns: 1fr; gap: 24px; }

    /*
     * Le menu ne peut plus être escamoté : ce ne sont plus des ancres dans une page unique,
     * mais les pages du site. Il devient une rangée de pastilles qui défile au pouce, sous
     * le logo. La barre cesse d'être collante — deux rangées en haut de l'écran coûteraient
     * plus de place qu'elles n'en font gagner.
     */
    .barre { position: static; flex-wrap: wrap; margin: 0 -14px; }
    .barre.posee { background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

    .barre nav {
        margin: 10px 0 0;
        width: 100%;
        overflow-x: auto;
        padding: 2px 14px 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        /* Le bord droit s'estompe : c'est le seul indice qu'il reste des liens à droite. */
        mask-image: linear-gradient(90deg, #000 88%, transparent);
        -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    }

    .barre nav::-webkit-scrollbar { display: none; }
    .barre nav a { background: rgba(255, 255, 255, .1); font-size: .9rem; padding: 7px 13px; }
    .barre nav a.appel-menu { margin-left: 4px; }

    /* Les boutons de l'accroche prennent toute la largeur : cibles franches. */
    .boutons { flex-direction: column; align-items: stretch; }
    .bouton { text-align: center; padding: 14px 22px; }

    /* La frise se resserre, les nœuds rétrécissent, le trait suit. */
    .vie .moment { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; }
    .vie .noeud { width: 42px; height: 42px; border-radius: 13px; }
    .vie .noeud .icone { width: 20px; height: 20px; }
    .vie::before { left: 19.5px; }

    /* Trois colonnes de prix ne tiennent pas dans 390 pixels : chaque ligne devient une
       petite fiche, avec l'intitulé de la colonne repris devant chaque prix. */
    table.tarifs, table.comparatif { box-shadow: none; background: transparent; }
    table.tarifs thead, table.comparatif thead { display: none; }
    table.tarifs, table.tarifs tbody, table.tarifs tr, table.tarifs td,
    table.comparatif, table.comparatif tbody, table.comparatif tr, table.comparatif td { display: block; width: 100%; }

    table.tarifs tr, table.comparatif tr {
        background: var(--carte);
        border: 1px solid var(--bordure);
        border-radius: 14px;
        padding: 14px 18px;
        margin-bottom: 10px;
    }

    table.tarifs td, table.comparatif td { border: 0; padding: 3px 0; }
    table.tarifs td.volume, table.comparatif td.critere { font-size: 1.05rem; margin-bottom: 6px; }
    table.tarifs td[data-libelle]::before,
    table.comparatif td[data-libelle]::before { content: attr(data-libelle) " : "; color: var(--discret); font-size: .9rem; }
    table.tarifs td.ttc { color: var(--discret); }
}

/* ------------------------------------------------------- moins d'animations */

/*
 * Réglage du système, pas une préférence de goût : certaines personnes ont des vertiges ou
 * des migraines déclenchés par le mouvement. Tout s'arrête, et rien ne disparaît.
 */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        transition-delay: 0ms !important;
    }

    /* La maquette ne flotte plus et ne penche plus : une perspective immobile reste
       lisible, un mouvement de fond ne l'est pas pour tout le monde. */
    .fenetre { animation: none; transform: none; }

    /* Rien d'autre à défaire : les règles qui masquent sont posées sous « no-preference »
       et ne s'appliquent donc jamais ici. Seule la barre d'avancement disparaît. */
    .progression { display: none; }
}


/* ===========================================================================
 * « Barnabet en 20 secondes » (§7.7 sexies)
 *
 * Six actes. Avec le script et le mouvement autorisé, ils occupent tous la même case de
 * grille et se succèdent ; sans l'un ou l'autre, ils restent empilés et visibles, et la
 * page devient une bande dessinée.
 *
 * D'où la discipline suivie ici, qui est celle du reste du fichier : **les états de départ
 * sont l'exception, pas la règle.** Un toggle est dessiné allumé, un papier est dessiné
 * présent, le voile rouge de la panne est dessiné visible — parce que c'est l'état qui
 * informe. Ce sont les états *initiaux* de l'animation (toggle éteint, papier qui n'est pas
 * encore parti) qui sont posés par des règles préfixées « .js .scene.anime ». Si le script
 * ne tourne pas, ces règles n'existent pas et l'image montre son aboutissement.
 * =========================================================================== */

section.film { padding-top: clamp(44px, 5vw, 76px); }
/* Le surtitre de la scène est un <h2> : il annonce la section dans le plan de la page. La
   hauteur de ligne des titres (1,2) le tasserait de quelques pixels ; elle lui est rendue. */
section.film .chapeau { margin-bottom: 18px; line-height: 1.65; }

.scene { margin: 0; }

/* La barre d'avancement : six segments, aucun contenu, juste du mouvement. Elle ne dit rien
   quand il n'y a rien à faire avancer, donc elle n'existe qu'en mode animé. */
.avancement { display: none; gap: 7px; margin-bottom: 20px; }
.js .scene.anime .avancement { display: flex; }

.avancement i {
    position: relative;
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: var(--bordure);
    overflow: hidden;
}

.avancement i::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-vif), var(--accent-fonce));
    transform: scaleX(0);
    transform-origin: left;
}

/* La durée est posée sur le segment par le script : la pseudo-classe l'hérite. Une
   animation plutôt qu'une transition, parce qu'une animation sait se mettre en pause. */
.avancement i.encours::after { animation: remplit linear forwards; animation-duration: inherit; }
.avancement i.fait::after { transform: scaleX(1); animation: none; }

@keyframes remplit {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* --------------------------------------------------------------- un acte */

.acte {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: clamp(20px, 3vw, 44px);
    align-items: center;
    margin-bottom: 22px;
    padding: clamp(16px, 2.2vw, 30px);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    background: var(--carte);
    box-shadow: var(--ombre);
}

.acte:last-child { margin-bottom: 0; }

.dessin {
    padding: 8px;
    border-radius: 14px;
    background:
        radial-gradient(120% 90% at 20% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(150deg, #f3f9f9, #e4f0f0);
}

.dessin svg { display: block; width: 100%; height: auto; }

.propos .numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 0 14px;
    border-radius: 50%;
    background: var(--accent-pale);
    color: var(--accent-fonce);
    font-size: .95rem;
    font-weight: 800;
}

/* La réplique d'un acte n'est pas un titre : c'était un <h2>, et le plan de la page
   d'accueil commençait donc par six titres narratifs avant ses vraies sections. C'est un
   paragraphe, auquel la feuille de style rend la taille et le poids d'un titre. */
.propos .titre-acte {
    /* Devenue un paragraphe, la réplique tombait sous « .propos p » : elle se serait
       affichée en gris et sur 46 caractères de large. Les deux sont annulés ici. */
    color: inherit;
    max-width: none;
    font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.95rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.018em;
    text-wrap: balance;
    margin: 0 0 .7rem;
}
.propos p { color: var(--discret); margin-bottom: 0; max-width: 46ch; }
.propos .boutons { margin-top: 20px; }

/* --------------------------------------------------------------- les commandes
   Inutiles sans animation : elles n'apparaissent que quand il y a quelque chose à piloter. */

.commandes { display: none; gap: 10px; margin-top: 22px; justify-content: center; }

.pilote {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    background: var(--carte);
    color: var(--accent-fonce);
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.pilote:hover { border-color: var(--accent-clair); box-shadow: var(--ombre); transform: translateY(-1px); }
.pilote:focus-visible { outline: 3px solid var(--accent-vif); outline-offset: 2px; }

.signe-pause, .signe-rejouer { width: 13px; height: 13px; background: var(--accent); }
.signe-pause { clip-path: polygon(0 0, 36% 0, 36% 100%, 0 100%, 0 0, 64% 0, 100% 0, 100% 100%, 64% 100%, 64% 0); }
.pilote.en-pause .signe-pause { clip-path: polygon(10% 0, 100% 50%, 10% 100%); }
.signe-rejouer {
    background: none;
    border: 2.4px solid var(--accent);
    border-radius: 50%;
    border-top-color: transparent;
}

/* --------------------------------------------------------------- le mode animé */

.js .scene.anime .plateau { display: grid; }

/* Tous les actes dans la même case : la hauteur du plateau est celle du plus grand, sans
   nombre magique à maintenir. */
.js .scene.anime .acte { grid-area: 1 / 1; margin: 0; }
.js .scene.anime .commandes { display: flex; }

.js .scene.anime .acte {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(.985);
    transition: opacity .55s var(--courbe), transform .55s var(--courbe), visibility .55s;
}

.js .scene.anime .acte.joue {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

/* Le texte arrive juste après l'image : l'œil a le temps de voir avant de lire. Il se
   décale, il ne s'allume pas — une apparition en fondu qui ne se joue pas laisserait du
   texte invisible, et c'est le seul risque que cette page n'a pas le droit de prendre. */
.js .scene.anime .acte.joue .propos > * { animation: monte .5s var(--courbe) backwards; }
.js .scene.anime .acte.joue .propos > :nth-child(1) { animation-delay: .10s; }
.js .scene.anime .acte.joue .propos > :nth-child(2) { animation-delay: .18s; }
.js .scene.anime .acte.joue .propos > :nth-child(3) { animation-delay: .26s; }
.js .scene.anime .acte.joue .propos > :nth-child(4) { animation-delay: .34s; }

@keyframes monte {
    from { transform: translateY(14px); }
    to { transform: none; }
}

/* Une pause doit tout figer, y compris la barre d'avancement. */
.js .scene.anime.pause .acte *,
.js .scene.anime.pause .avancement i::after { animation-play-state: paused; }

/* --------------------------------------------------------------- acte 1 : la panne */

.js .scene.anime .acte .orage { visibility: hidden; }

.js .scene.anime .acte.joue .papier { animation: tremblote .34s linear 3; }
.js .scene.anime .acte.joue .papier:nth-child(2) { animation-delay: .05s; }
.js .scene.anime .acte.joue .papier:nth-child(3) { animation-delay: .1s; }
.js .scene.anime .acte.joue .papier:nth-child(4) { animation-delay: .15s; }
.js .scene.anime .acte.joue .papier:nth-child(5) { animation-delay: .2s; }

.js .scene.anime .acte.joue .papiers { animation: part-en-fumee .7s var(--courbe) 1.15s forwards; }
.js .scene.anime .acte.joue .orage { visibility: visible; animation: la-panne .5s var(--courbe) 1.3s backwards; }

@keyframes tremblote {
    0%, 100% { transform: none; }
    25% { transform: translate(-2.5px, 1.5px); }
    75% { transform: translate(2.5px, -1.5px); }
}

@keyframes part-en-fumee {
    to { opacity: 0; transform: translateY(-16px) scale(.9); }
}

@keyframes la-panne {
    from { opacity: 0; transform: scale(1.06); }
    to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- acte 2 : le geste */

/* Dessinés allumés : c'est l'état qui informe. Le mode animé les éteint pour les allumer. */
.acte .bascule .rail { fill: var(--accent); }
.acte .bascule .bouton-bascule { transform: translateX(36px); }
.acte .curseur { visibility: hidden; }

.js .scene.anime .acte .bascule .rail { fill: #dde8e8; }
.js .scene.anime .acte .bascule .bouton-bascule { transform: none; }

.js .scene.anime .acte.joue .bascule .rail { animation: allume .4s var(--courbe) forwards; }
.js .scene.anime .acte.joue .bascule .bouton-bascule { animation: glisse .4s var(--courbe) forwards; }
.js .scene.anime .acte.joue .rang:nth-of-type(1) .bascule * { animation-delay: .45s; }
.js .scene.anime .acte.joue .rang:nth-of-type(2) .bascule * { animation-delay: 1.05s; }
.js .scene.anime .acte.joue .rang:nth-of-type(3) .bascule * { animation-delay: 1.65s; }

.js .scene.anime .acte.joue .curseur { visibility: visible; animation: pointe 2.4s var(--courbe) .15s forwards; }

@keyframes allume { to { fill: var(--accent); } }
@keyframes glisse { to { transform: translateX(36px); } }

@keyframes pointe {
    0% { opacity: 0; transform: translate(380px, 210px); }
    8% { opacity: 1; transform: translate(452px, 150px); }
    22% { transform: translate(466px, 146px); }
    30% { transform: translate(452px, 150px); }
    47% { transform: translate(452px, 212px); }
    55% { transform: translate(466px, 208px); }
    63% { transform: translate(452px, 212px); }
    80% { transform: translate(452px, 274px); }
    88% { transform: translate(466px, 270px); }
    96% { opacity: 1; transform: translate(452px, 274px); }
    100% { opacity: 0; transform: translate(452px, 274px); }
}

/* --------------------------------------------------------------- acte 3 : le convoi */

.acte .colis:nth-child(1) { transform: translate(236px, 150px); }
.acte .colis:nth-child(2) { transform: translate(312px, 124px); }
.acte .colis:nth-child(3) { transform: translate(388px, 100px); }

/* « both » : avant son tour, le colis tient l'image 0 % — invisible — et après, l'image
   100 %. Sans cela il apparaîtrait à sa position de repos puis sauterait au départ. */
.js .scene.anime .acte.joue .colis { animation: convoie 1.7s var(--courbe) both; }
.js .scene.anime .acte.joue .colis:nth-child(1) { animation-delay: .25s; }
.js .scene.anime .acte.joue .colis:nth-child(2) { animation-delay: .75s; }
.js .scene.anime .acte.joue .colis:nth-child(3) { animation-delay: 1.25s; }
.js .scene.anime .acte.joue .voie { animation: file 1.4s linear infinite; }
.js .scene.anime .acte.joue .coffre { animation: encaisse .5s var(--courbe) 2.5s; }

@keyframes convoie {
    0% { opacity: 0; transform: translate(206px, 164px) scale(.8); }
    14% { opacity: 1; transform: translate(236px, 158px) scale(1); }
    64% { opacity: 1; transform: translate(382px, 100px) scale(1); }
    88% { opacity: 0; transform: translate(486px, 92px) scale(.45); }
    100% { opacity: 0; transform: translate(486px, 92px) scale(.45); }
}

@keyframes file { to { stroke-dashoffset: -40; } }

@keyframes encaisse {
    0%, 100% { transform: none; }
    45% { transform: scale(1.025); }
}

/* --------------------------------------------------------------- acte 4 : le mur */

.acte .etiquette { font-size: 20px; font-weight: 700; fill: var(--accent-fonce); }
.acte .etiquette.non { fill: #b3261e; }

.js .scene.anime .acte .sceau { visibility: hidden; }

.js .scene.anime .acte.joue .passe > path { animation: trace .7s var(--courbe) .3s backwards; }
.js .scene.anime .acte.joue .sceau.oui { visibility: visible; animation: tampon .45s var(--courbe) 1s backwards; }
.js .scene.anime .acte.joue .bloque > path { animation: trace .6s var(--courbe) 1.7s backwards; }
.js .scene.anime .acte.joue .mur { animation: encaisse .4s var(--courbe) 2.25s; }
.js .scene.anime .acte.joue .sceau.non { visibility: visible; animation: tampon .45s var(--courbe) 2.3s backwards; }

@keyframes trace {
    from { opacity: 0; stroke-dashoffset: 260; }
    to { opacity: 1; stroke-dashoffset: 0; }
}

@keyframes tampon {
    from { opacity: 0; transform: scale(2.1); }
    to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- acte 5 : le retour */

.acte .dossier { font-size: 21px; font-weight: 700; fill: var(--accent-nuit); }
.acte .entete-date { font-size: 19px; font-weight: 700; fill: #fff; text-anchor: middle; }
.acte .date { font-size: 28px; font-weight: 800; fill: var(--accent-fonce); text-anchor: middle; }

/* Quatre dates au même endroit : sans animation, seule la dernière a un sens. */
.acte .dates .date:not(:last-child) { display: none; }

.js .scene.anime .acte .dates .date { display: block; opacity: 0; }
.js .scene.anime .acte .revenus { visibility: hidden; }

.js .scene.anime .acte.joue .dates .date { animation: defile 2.2s var(--courbe) forwards; }
.js .scene.anime .acte.joue .dates .date:nth-child(1) { animation-delay: .1s; }
.js .scene.anime .acte.joue .dates .date:nth-child(2) { animation-delay: .45s; }
.js .scene.anime .acte.joue .dates .date:nth-child(3) { animation-delay: .8s; }
.js .scene.anime .acte.joue .dates .date:nth-child(4) { animation: aterrit .5s var(--courbe) 1.15s forwards; }
.js .scene.anime .acte.joue .fleche-retour { animation: file 1.1s linear infinite reverse; }

.js .scene.anime .acte.joue .revenus { visibility: visible; }
.js .scene.anime .acte.joue .papier-sain { animation: remonte .5s var(--courbe) backwards; }
.js .scene.anime .acte.joue .papier-sain:nth-child(1) { animation-delay: 1.65s; }
.js .scene.anime .acte.joue .papier-sain:nth-child(2) { animation-delay: 1.8s; }
.js .scene.anime .acte.joue .papier-sain:nth-child(3) { animation-delay: 1.95s; }

@keyframes defile {
    0% { opacity: 0; transform: translateY(16px); }
    10% { opacity: 1; transform: none; }
    14% { opacity: 1; }
    24% { opacity: 0; transform: translateY(-16px); }
    100% { opacity: 0; transform: translateY(-16px); }
}

@keyframes aterrit {
    from { opacity: 0; transform: translateY(18px) scale(.92); }
    to { opacity: 1; transform: none; }
}

@keyframes remonte {
    from { opacity: 0; transform: translateY(26px) scale(.9); }
    to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- acte 6 : la fin */

.js .scene.anime .acte.joue .halo { animation: respire 2.6s var(--courbe) infinite; }
.js .scene.anime .acte.joue .ecusson { animation: tampon .6s var(--courbe) .2s backwards; }
.js .scene.anime .acte.joue .poste-veille { animation: remonte .5s var(--courbe) backwards; }
.js .scene.anime .acte.joue .poste-veille:nth-child(1) { animation-delay: .65s; }
.js .scene.anime .acte.joue .poste-veille:nth-child(2) { animation-delay: .8s; }
.js .scene.anime .acte.joue .poste-veille:nth-child(3) { animation-delay: .95s; }

@keyframes respire {
    0%, 100% { opacity: .7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

/* --------------------------------------------------------------- écrans étroits */

@media (max-width: 860px) {
    .acte { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .propos p { max-width: none; }
    .avancement i { height: 4px; }
}

/* ===================================================================== le diagnostic
 *
 * « Vos données survivraient-elles ? » (§7.7 octies). Tout se fait à la souris : les
 * réponses sont de grands boutons, il n'y a pas un champ à remplir, et le mouvement sert
 * à dire où l'on en est — jamais à décorer.
 */

.diag { max-width: 820px; margin: 0 auto; }

/* Une regle de disposition l emporte sur l attribut hidden : sans cette ligne, le bouton
   « Question precedente » (display: inline-flex) restait visible des la premiere question,
   ou il ne mene nulle part. */
.diag [hidden] { display: none !important; }

/* Le bandeau de confiance, avant le formulaire : « qu'allez-vous faire de mes réponses ? »
   se demande avant de répondre, pas après. */
.diag-promesse {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--accent-pale);
    border: 1px solid #cfe4e4;
    border-radius: var(--rayon);
    padding: 16px 20px;
    margin: 0 0 30px;
    color: var(--accent-nuit);
    font-size: .95rem;
    line-height: 1.6;
}

.diag-promesse .icone { flex: 0 0 auto; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }

/* ------------------------------------------------------------------- l'entretien */

.diag-scene {
    background: var(--carte);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 30px;
}

.diag-avancement {
    height: 5px;
    border-radius: 99px;
    background: var(--accent-pale);
    overflow: hidden;
    margin-bottom: 18px;
}

/* La largeur de depart est posee sous « js » : la barre n existe que pour etre animee,
   et sans le script c est la version lisible qui s affiche, pas elle. */
.js .diag-avancement i { width: 0; }

.diag-avancement i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-vif) 100%);
    transition: width .45s var(--courbe);
}

.diag-rang {
    margin: 0 0 6px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent);
}

.diag-intitule {
    margin: 0 0 20px;
    font-size: clamp(1.2rem, 1.02rem + .7vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.015em;
    color: var(--encre);
    text-wrap: balance;
}

.diag-choix { display: grid; gap: 10px; }

.diag-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    font: inherit;
    font-size: 1rem;
    color: var(--encre);
    background: #fbfdfd;
    border: 1.5px solid var(--bordure);
    border-radius: 14px;
    padding: 15px 18px;
    cursor: pointer;
    transition: background .18s, border-color .18s, transform .18s var(--courbe), box-shadow .18s;
}

.diag-option:hover {
    background: #fff;
    border-color: var(--accent-clair);
    transform: translateX(4px);
    box-shadow: 0 6px 18px rgba(29, 74, 76, .09);
}

.diag-puce {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #c3d8d8;
    position: relative;
    transition: border-color .18s, background .18s;
}

.diag-puce::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--accent);
    transform: scale(0);
    transition: transform .2s var(--courbe);
}

.diag-option:hover .diag-puce { border-color: var(--accent-vif); }

/* La réponse retenue se remplit et les autres s'effacent : un quart de seconde pour voir
   qu'on a bien cliqué là où on croyait. */
.diag-option.retenu { border-color: var(--accent); background: var(--accent-pale); transform: translateX(4px); }
.diag-option.retenu .diag-puce { border-color: var(--accent); }
.diag-option.retenu .diag-puce::after { transform: scale(1); }
.diag-choix.choisi .diag-option { pointer-events: none; }
.diag-choix.choisi .diag-option:not(.retenu) { opacity: .35; transform: none; }

.diag-pied { margin-top: 22px; }

.diag-retour {
    font: inherit;
    font-size: .9rem;
    color: var(--discret);
    background: none;
    border: 0;
    padding: 6px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color .18s;
}

.diag-retour .icone { width: 17px; height: 17px; transform: rotate(180deg); }
.diag-retour:hover { color: var(--accent); }

/* -------------------------------------------------------------------- les verdicts */

.diag-verdict { margin-bottom: 28px; }
.diag-verdict h2 { margin-bottom: .5rem; }
.diag-phrase { color: var(--discret); font-size: 1.07rem; margin: 0; }

.diag-tableau { display: grid; gap: 12px; }

.diag-ligne {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 18px;
    align-items: start;
    background: var(--carte);
    border: 1px solid var(--bordure);
    border-left: 4px solid var(--bordure);
    border-radius: 14px;
    padding: 18px 20px;
}

.diag-situation { margin: 0; font-weight: 700; color: var(--accent-nuit); }

.diag-etat { margin: 0; grid-column: 2; grid-row: 1; }

.diag-etat span {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 4px 11px;
    border-radius: 99px;
    white-space: nowrap;
}

.diag-pourquoi {
    margin: 0;
    grid-column: 1 / -1;
    color: var(--discret);
    font-size: .96rem;
    line-height: 1.6;
}

.diag-ligne.perdu { border-left-color: #c0392b; }
.diag-ligne.perdu .diag-etat span { background: #fdecea; color: #a5281b; }
.diag-ligne.partiel { border-left-color: var(--ambre); }
.diag-ligne.partiel .diag-etat span { background: var(--ambre-pale); color: var(--ambre); }
.diag-ligne.sauve { border-left-color: var(--accent); }
.diag-ligne.sauve .diag-etat span { background: var(--accent-pale); color: var(--accent-fonce); }

.diag-manques { margin-top: 36px; }
.diag-manques > h3 { font-size: 1.3rem; margin-bottom: 16px; color: var(--accent-nuit); }
.diag-lien { margin: 12px 0 0 !important; font-size: .92rem; }
.diag-lien a { color: var(--accent); font-weight: 600; }

.diag-conseil {
    margin-top: 36px;
    background: var(--accent-nuit);
    color: #e9f3f3;
    border-radius: var(--rayon);
    padding: 30px;
}

.diag-conseil h3 {
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent-clair);
    margin-bottom: 14px;
}

.diag-titre-conseil {
    margin: 0 0 12px;
    font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.015em;
    color: #fff;
}

.diag-conseil p { margin: 0 0 12px; line-height: 1.7; color: #cfe3e3; }
.diag-conseil p:last-child { margin-bottom: 0; }
.diag-suite { font-size: .95rem; color: var(--accent-clair) !important; }

.diag-note-regle {
    font-size: .9rem !important;
    border-top: 1px solid rgba(138, 211, 213, .25);
    padding-top: 14px;
    margin-top: 18px !important;
}

.diag-reprise { margin-top: 30px; text-align: center; }
.diag-rappel { color: var(--discret); font-size: .88rem; margin: 14px 0 0; }

.diag-statique .diag-liste { padding-left: 1.3rem; }
.diag-statique .diag-liste > li { margin-bottom: 22px; }
.diag-statique .diag-liste .diag-intitule { font-size: 1.05rem; margin-bottom: .5rem; }
.diag-statique .diag-liste ul { margin: 0; padding-left: 1.1rem; color: var(--discret); }
.diag-scenarios { margin-bottom: 36px; }

/* Deux grilles qui se suivent dans une meme section ont besoin de respirer entre elles. */
.intro.espacee { margin-top: 44px; }

/* ------------------------------------------------- le mouvement, sous la classe « js » */

.js .diag-carte { opacity: 0; transform: translateY(10px); }

.js .diag-carte.entre {
    opacity: 1;
    transform: none;
    transition: opacity .35s var(--courbe), transform .35s var(--courbe);
}

.js .diag-carte .diag-option { opacity: 0; transform: translateY(8px); }

.js .diag-carte.entre .diag-option {
    opacity: 1;
    transform: none;
    transition: opacity .3s var(--courbe), transform .3s var(--courbe),
                background .18s, border-color .18s, box-shadow .18s;
}

/* Les quatre verdicts se révèlent l'un après l'autre : lus un par un ils se retiennent,
   affichés d'un coup ils se survolent. */
.js .diag-tableau .diag-ligne { opacity: 0; transform: translateY(14px); }

.js .diag-tableau.revele .diag-ligne {
    opacity: 1;
    transform: none;
    transition: opacity .45s var(--courbe), transform .45s var(--courbe);
}

@media (prefers-reduced-motion: reduce) {
    .js .diag-carte,
    .js .diag-carte .diag-option,
    .js .diag-tableau .diag-ligne { opacity: 1; transform: none; transition: none; }
    .diag-option:hover { transform: none; }
}

@media (max-width: 620px) {
    .diag-scene, .diag-conseil { padding: 22px 18px; }
    .diag-ligne { grid-template-columns: minmax(0, 1fr); }
    .diag-etat { grid-column: 1; grid-row: auto; margin: 4px 0 2px; }
    .diag-manques .grille.deux { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------- les questions à réponses multiples */

.diag-aide {
    margin: -14px 0 18px;
    color: var(--discret);
    font-size: .9rem;
}

/* Une case carrée dit « plusieurs réponses » avant même qu'on ait lu la consigne ; une
   pastille ronde dit « une seule ». C'est la convention que tout le monde connaît. */
.diag-choix.plusieurs .diag-puce { border-radius: 6px; }

.diag-choix.plusieurs .diag-puce::after {
    inset: 0;
    border-radius: 4px;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* Sur une question à réponses multiples, un clic ne fait pas avancer : rien ne doit donc
   s'effacer, et on peut décocher. */
.diag-choix.plusieurs:not(.choisi) .diag-option { pointer-events: auto; opacity: 1; }

.diag-valider { margin-top: 18px; }

.diag-valider[disabled] {
    opacity: .4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ------------------------------------ le bas de page, qui ne parait qu'avec le verdict */

.js [data-role="apres"].parait {
    animation: diagParait .55s var(--courbe) both;
}

@keyframes diagParait {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .js [data-role="apres"].parait { animation: none; }
}
