/* ==========================================================================
   css/socle.css (Lucas) : le socle du prototype « Visuels et supports » (section Présence en ligne).
   Jetons, coque (barre du haut, menu de gauche, tiroir, barre du bas) et tous les
   composants partagés. Les valeurs viennent des CSS réelles de l'espace client
   (theme.css, client/socle.css, agence/surfaces.css, agence/fenetres.css,
   styles-portail.blade.php), relevées sur la copie de travail le 27/11/2026.

   Règles : clair uniquement ; téléphone d'abord (une rupture à 900 px, les fenêtres
   passent en feuille sous 640 px) ; cibles de 44 px ; aucun défilement horizontal ;
   mouvement 150 à 260 ms, courbe cubic-bezier(.22,1,.36,1), coupé sous
   prefers-reduced-motion. Toutes les classes du socle commencent par « llv- ».
   Une page n'écrit que dans css/pages/<ancre>.css, avec son propre préfixe.
   ========================================================================== */


/* ==========================================================================
   1. Les jetons
   ========================================================================== */
:root {
    color-scheme: light;

    /* Encre et texte (theme.css : --ag-encre…) */
    --encre: #221726;
    --encre-2: rgba(34, 23, 38, 0.72);   /* texte courant secondaire */
    --encre-3: rgba(34, 23, 38, 0.66);   /* intitulés, mentions (4,5:1 sur les creux) */
    --encre-menu: #3B3040;
    --trait: rgba(34, 23, 38, 0.08);     /* séparateur discret */
    --trait-f: rgba(34, 23, 38, 0.13);   /* bord du menu de gauche */
    --filet: 1.5px solid rgba(34, 23, 38, 0.12);   /* filet d'une fenêtre */
    --trait-champ-fenetre: rgba(34, 23, 38, 0.5);   /* contour d'un champ ou d'une tuile : 3,3:1 sur le blanc (règle « Ce qui se clique doit se voir », passe du 27/11) */
    --trait-onglet: rgba(34, 23, 38, 0.5);
    --trait-case: rgba(34, 23, 38, 0.55);

    /* Le violet commun : boutons, liens, contour clavier. Rien d'autre. */
    --violet: #6E58BE;
    --violet-f: #5A45A8;      /* survol */
    --violet-ff: #55439A;     /* survol dans une fenêtre */
    --lavande: #E4DDF7;

    /* La section « Présence en ligne » : ses couleurs dans l'app (SectionsClient.php : accent, pastel, encre, fond).
       Vague 4 (Liham) : plus de 5e section, les nouvelles pages vivent dans Présence en ligne. */
    --rub: #C9651E;
    --rub-pastel: #FCDCC7;
    --rub-encre: #9A4A12;
    --rub-fond: #FCEBDC;
    --rub-trait-titre: color-mix(in srgb, var(--rub) 38%, var(--rub-fond));

    /* Les trois niveaux de surface (agence/surfaces.css) */
    --fond: var(--rub-fond);
    --creux: color-mix(in srgb, var(--rub-fond), #221726 5%);
    --creux-fort: color-mix(in srgb, var(--rub-fond), #221726 10%);
    --objet: #FFFFFF;
    --objet-survol: color-mix(in srgb, var(--creux) 45%, #FFFFFF);
    --panneau: #FFFAF6;        /* le menu de gauche */
    --champ: #FFFFFF;
    /* Dans une fenêtre ou un menu, le creux est un sable neutre, le même partout (20/11/2026) */
    --sable: #F2EDE5;
    --sable-fort: #E6E0D6;
    --sable-survol: #F8F6F2;

    /* Cases vides (« Rien ici. ») */
    --vide-fond: rgba(255, 255, 255, 0.55);
    --vide-trait: 1.5px dashed rgba(34, 23, 38, 0.28);

    /* Les teintes douces de l'app (pastilles, ronds) */
    --menthe: #CDEFE4;  --menthe-t: #176B4B;
    --beurre: #FBE7A1;  --beurre-t: #6E5200;
    --peche: #FCDCC7;   --peche-t: #9A4A12;
    --rose: #F8D8E6;    --rose-t: #9C2F5E;
    --cyan: #CDEDF3;    --cyan-t: #1D6A7A;
    --rouge: #A8382A;   --rouge-f: #8E2E22;   /* erreurs, bouton « Supprimer » */
    --vert: #177144;

    /* Formes */
    --rayon-objet: 14px;
    --rayon-creux: 16px;
    --rayon-fenetre: 18px;
    --rayon-menu: 12px;
    --rayon-champ: 14px;
    --trait-objet: 2px solid var(--encre);
    --ombre: 3px 3px 0 0 var(--encre);
    --ombre-p: 2px 2px 0 0 var(--encre);
    --ombre-survol: 4px 4px 0 0 var(--encre);
    --ombre-fenetre: 5px 5px 0 0 var(--encre);
    --voile: rgba(34, 23, 38, 0.35);

    /* Mouvement */
    --courbe: cubic-bezier(.22, 1, .36, 1);
    --courbe-sortie: cubic-bezier(.4, 0, 1, 1);
    --courbe-deplacement: cubic-bezier(.65, 0, .35, 1);
    --t-survol: 150ms;
    --t-court: 180ms;
    --t-entree: 220ms;
    --t-fenetre: 260ms;
    --t-sortie: 160ms;

    /* Polices de l'app (celles de la marque du salon sont dans LLV.marque) */
    --police: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --police-titre: 'Luckiest Guy', 'Arial Black', sans-serif;
    --police-main: 'Caveat Brush', 'Figtree', cursive;
    --police-chiffres: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

    /* La coque */
    --menu-l: 264px;
    --menu-rail: 74px;
    --haut-h: 78px;
    --bas-h: 60px;
    --gouttiere: 32px;

    /* Les étages */
    --z-bas: 25;
    --z-haut: 30;
    --z-menu: 35;
    --z-flottants: 40;
    --z-fenetre: 60;
    --z-notif: 80;
    --z-liste: 90;
    --z-bulle: 100;
}


/* ==========================================================================
   2. La base
   ========================================================================== */
html {
    background: var(--fond);
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    margin: 0;
    min-height: 100vh;
    background: var(--fond) url('../assets/app/grain-90.webp') 0 0 / 256px 256px repeat;
    color: var(--encre);
    font: 400 16px/1.5 var(--police);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
html.llv-defilement-bloque,
html.llv-defilement-bloque body { overflow: hidden; }
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
img, svg, video, canvas { max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--violet-f); text-underline-offset: 3px; }
::selection { background: var(--lavande); color: var(--encre); }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }

/* Le contour clavier : 3 px violet, seulement au clavier (jamais après un clic de souris). */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

.llv-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}


/* ==========================================================================
   3. La coque : la place de chaque bloc
   ========================================================================== */
.llv-app { min-height: 100vh; transition: opacity 220ms ease; }
/* Au premier chargement, l'app attend ses polices (1,2 s au plus, socle.js) : sinon tout s'affiche dans la police de
   secours puis se resserre quand Figtree arrive (saut mesuré : 0,010). Sans JavaScript, elle apparaît au bout de 1,5 s. */
.llv-app.llv-attente-polices { opacity: 0; animation: llv-montrer-app 1ms linear 1500ms forwards; }
@keyframes llv-montrer-app { to { opacity: 1; } }

/* La fine barre de progression du haut (changement de page). */
.llv-progression {
    position: fixed;
    inset: 0 0 auto;
    height: 3px;
    z-index: calc(var(--z-bulle) + 1);
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease 120ms;
}
.llv-progression.est-active { opacity: 1; transition-delay: 0ms; }
.llv-progression > i {
    display: block;
    height: 100%;
    background: var(--violet);
    border-radius: 0 3px 3px 0;
    transform-origin: 0 50%;
    transform: scaleX(0);
}

/* Le contenu */
.llv-principal {
    position: relative;
    min-height: 100vh;
    padding-block: calc(var(--haut-h) + 32px) 112px;
    padding-left: calc(var(--menu-l) + var(--gouttiere));
    padding-right: max(var(--gouttiere), env(safe-area-inset-right, 0px));
}
.llv-app.llv-rail .llv-principal { padding-left: calc(var(--menu-rail) + var(--gouttiere)); }
.llv-principal:focus { outline: none; }
.llv-page { max-width: 1240px; min-width: 0; }

@media (max-width: 899.98px) {
    .llv-principal,
    .llv-app.llv-rail .llv-principal {
        padding-block: calc(var(--haut-h) + 20px) calc(var(--bas-h) + 88px + env(safe-area-inset-bottom, 0px));
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }
}


/* ==========================================================================
   4. La barre du haut : les sections dans leur capsule, les ronds à droite.
      Sans fond : elle flotte, s'efface en descendant et revient en remontant.
   ========================================================================== */
.llv-haut {
    position: fixed;
    top: 0;
    left: var(--menu-l);
    right: 0;
    z-index: var(--z-haut);
    height: calc(var(--haut-h) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(22px, env(safe-area-inset-right, 0px)) 0 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    pointer-events: none;
    transition: transform 320ms var(--courbe-deplacement), opacity 220ms ease;
}
.llv-haut > * { pointer-events: auto; }
.llv-app.llv-rail .llv-haut { left: var(--menu-rail); }
.llv-haut.est-cachee { transform: translateY(calc(-100% - 8px)); opacity: 0; }
.llv-haut.est-cachee > * { pointer-events: none; }

/* Le burger (téléphone) */
.llv-rond.llv-burger { display: none; }

/* La capsule des sections */
.llv-capsule {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
    padding: 5px;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--objet);
    box-shadow: var(--ombre);
    min-width: 0;
    list-style: none;
}
.llv-capsule__section {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--encre);
    font: 600 15px/20px var(--police);
    white-space: nowrap;
    text-decoration: none;
    transition: background-color var(--t-survol) ease;
}
.llv-capsule__section:hover { background: var(--sable-survol); }
.llv-capsule__section svg { display: none; width: 20px; height: 20px; color: var(--encre-2); flex: none; }
.llv-capsule__section[aria-current="page"],
.llv-capsule__section[aria-current="page"]:hover {
    background: var(--rub-pastel);
    border-color: var(--encre);
}
.llv-capsule__section[aria-current="page"] .llv-capsule__nom::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--rub);
    vertical-align: 1px;
}
.llv-capsule__compte {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 7px;
    background: var(--encre);
    color: #FFFFFF;
    font: 800 10.5px/1 var(--police);
}
/* Quand la place manque (mesuré par socle.js) : d'abord resserrée, puis les sections fermées en icônes. */
.llv-capsule.est-serree { gap: 0; padding: 4px; }
.llv-capsule.est-serree .llv-capsule__section { padding: 0 10px; font-size: 14px; }
.llv-capsule.est-serree [aria-current="page"] .llv-capsule__nom::before { margin-right: 6px; }
.llv-capsule.en-icones .llv-capsule__section:not([aria-current="page"]) { min-width: 42px; padding: 0 10px; justify-content: center; }
.llv-capsule.en-icones .llv-capsule__section:not([aria-current="page"]) svg { display: block; }
.llv-capsule.en-icones .llv-capsule__section:not([aria-current="page"]) .llv-capsule__nom {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.llv-capsule.en-icones .llv-capsule__section:not([aria-current="page"]) .llv-capsule__compte {
    position: absolute; top: -5px; right: -7px; min-width: 18px; height: 18px; font-size: 10px;
}

/* Les ronds de droite (voir mon site, signaler, aide, notifications, compte) */
.llv-ronds { display: flex; align-items: center; gap: 12px; flex: none; }
.llv-rond {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--objet);
    box-shadow: var(--ombre);
    color: var(--encre);
    text-decoration: none;
    transition: background-color var(--t-survol) ease, transform 120ms var(--courbe), box-shadow 120ms var(--courbe);
}
.llv-rond svg { width: 20px; height: 20px; }
.llv-rond:hover { background: var(--sable-survol); }
.llv-rond:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 0 var(--encre); }
.llv-rond--menthe { background: var(--menthe); color: var(--menthe-t); }
.llv-rond--menthe:hover { background: #B6E6D5; }
.llv-rond--beurre { background: var(--beurre); color: var(--beurre-t); }
.llv-rond--beurre:hover { background: #F7DB7C; }
.llv-rond--lavande { background: var(--lavande); color: var(--violet-f); }
.llv-rond--lavande:hover { background: #D6CCF2; }
.llv-rond--bouee { color: #C2334D; }
.llv-rond--avatar { display: none; padding: 3px; }
.llv-rond__pastille {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: #EE8434;
    color: var(--encre);
    font: 800 13px/1 var(--police);
}

.llv-avatar {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: var(--encre);
    color: #FFFFFF;
    font: 600 15px/1 var(--police);
    letter-spacing: 0.02em;
}

@media (max-width: 899.98px) {
    .llv-haut { left: 0; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); gap: 6px; }
    .llv-capsule { display: none; }
    .llv-rond.llv-burger { display: grid; box-shadow: 3px 4px 0 0 var(--encre); }
    .llv-ronds { gap: 6px; margin-left: auto; }
    .llv-rond { width: 44px; height: 44px; }
    .llv-rond--avatar { display: grid; }
}
@media (max-width: 379.98px) {
    .llv-rond--secondaire { display: none; }
}


/* ==========================================================================
   5. Le menu de gauche (ordinateur) ; au téléphone, le même bloc devient le tiroir
   ========================================================================== */
.llv-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-menu);
    width: var(--menu-l);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 12px 64px max(12px, env(safe-area-inset-left, 0px));
    background: var(--panneau);
    border-right: 1px solid var(--trait-f);
    color: var(--encre-menu);
    overflow-y: auto;
    overscroll-behavior: contain;
    /* 14 pages depuis la vague 4 : sur un écran bas le menu défile, une barre fine le dit (rien quand tout tient). */
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 23, 38, 0.28) transparent;
}

.llv-menu__haut { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; }
.llv-marque { display: inline-flex; align-items: center; gap: 7px; min-width: 0; text-decoration: none; color: var(--encre); }
.llv-marque__logo { width: auto; height: 28px; flex: none; }
.llv-marque__mot { font: 400 17px/1 var(--police-titre); padding-top: 3px; color: var(--encre); }
.llv-marque__tag {
    margin-left: -2px;
    font: 400 19px/1 var(--police-main);
    color: #C73A5E;
    white-space: nowrap;
    transform: rotate(-4deg) translateY(-1px);
}
.llv-menu__replier {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(34, 23, 38, 0.06);
    color: var(--encre);
    transition: background-color var(--t-survol) ease;
}
.llv-menu__replier:hover { background: rgba(34, 23, 38, 0.12); }
.llv-menu__replier svg { width: 18px; height: 18px; transition: transform var(--t-fenetre) var(--courbe); }
.llv-menu__fermer { display: none; }

/* La recherche : une capsule à bord encre */
.llv-recherche { position: relative; }
.llv-recherche__boite {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--objet);
    box-shadow: var(--ombre);
}
.llv-recherche__boite svg { width: 18px; height: 18px; flex: none; color: var(--encre); }
.llv-recherche__boite input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font: 400 15px/1 var(--police);
    color: var(--encre);
    outline: none;
}
.llv-recherche__boite input::placeholder { color: var(--encre-3); }
.llv-recherche__boite:focus-within { outline: 3px solid var(--violet); outline-offset: 2px; }

/* La tête de section */
.llv-menu__tete {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 4px;
    padding: 4px 4px 16px;
    border-bottom: 1px solid var(--trait);
}
.llv-menu__tete-ic {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border: 2px solid var(--encre);
    border-radius: 10px;
    background: var(--rub-pastel);
    color: var(--rub-encre);
}
.llv-menu__tete-ic svg { width: 20px; height: 20px; }
.llv-menu__tete-nom { display: block; font: 800 15px/1.5 var(--police); color: var(--encre-menu); }
.llv-menu__tete-role { display: block; margin-top: 1px; font: 400 18px/1.05 var(--police-main); color: var(--rub); }

/* Les pages de la section */
.llv-menu__pages { display: flex; flex-direction: column; gap: 2px; list-style: none; padding: 0; margin: 0; }
.llv-menu__entree {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 10px;
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--encre-2);
    font: 500 14px/20px var(--police);
    text-decoration: none;
    transform-origin: left center;
    transition: transform var(--t-survol) ease, background-color var(--t-survol) ease, color var(--t-survol) ease;
}
.llv-menu__entree svg { width: 18px; height: 18px; flex: none; color: var(--rub-encre); opacity: 0.85; }
.llv-menu__entree:hover { transform: scale(1.04); color: var(--encre); }
.llv-menu__entree[aria-current="page"],
.llv-menu__entree[aria-current="page"]:hover {
    border-color: var(--encre);
    background: var(--rub-pastel);
    color: var(--rub-encre);
    font-weight: 700;
    transform: none;
}
.llv-menu__entree[aria-current="page"] svg { opacity: 1; }
.llv-menu__nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.llv-menu__entree { width: 100%; background: transparent; text-align: left; cursor: pointer; }
@media (min-width: 900px) {
    .llv-menu__pages { gap: 1px; }
    .llv-menu__entree { min-height: 35px; }
}
.llv-menu__pages--nouvelles { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--trait); }

/* Le compte, en bas du menu */
.llv-menu__pied { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--trait); }
.llv-compte-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 6px 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    transition: background-color var(--t-survol) ease;
}
.llv-compte-btn:hover, .llv-compte-btn[aria-expanded="true"] { background: rgba(34, 23, 38, 0.06); }
.llv-compte-btn .llv-avatar { width: 40px; height: 40px; flex: none; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--encre); font-size: 14px; }
.llv-compte-btn__textes { flex: 1; min-width: 0; display: grid; }
.llv-compte-btn__nom { font: 700 14px/1.3 var(--police); color: var(--encre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llv-compte-btn__org { font: 400 13px/1.3 var(--police); color: var(--encre-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llv-compte-btn > svg { width: 18px; height: 18px; color: var(--encre-3); flex: none; }

/* Menu replié (le rail de 74 px) : les icônes seules, le nom en bulle */
@media (min-width: 900px) {
    .llv-app.llv-rail .llv-menu { width: var(--menu-rail); padding-inline: 10px; align-items: center; }
    .llv-app.llv-rail .llv-menu__haut { flex-direction: column; }
    .llv-app.llv-rail .llv-marque__mot,
    .llv-app.llv-rail .llv-marque__tag,
    .llv-app.llv-rail .llv-recherche,
    .llv-app.llv-rail .llv-menu__tete-textes,
    .llv-app.llv-rail .llv-menu__nom,
    .llv-app.llv-rail .llv-compte-btn__textes,
    .llv-app.llv-rail .llv-compte-btn > svg { display: none; }
    .llv-app.llv-rail .llv-menu__replier svg { transform: rotate(180deg); }
    .llv-app.llv-rail .llv-menu__tete { padding: 4px 0 16px; justify-content: center; width: 100%; }
    .llv-app.llv-rail .llv-menu__pages { width: 100%; }
    .llv-app.llv-rail .llv-menu__entree { justify-content: center; padding: 0; min-height: 42px; }
    .llv-app.llv-rail .llv-menu__entree:hover { transform: none; background: rgba(34, 23, 38, 0.06); }
    .llv-app.llv-rail .llv-menu__pied { width: 100%; display: grid; justify-items: center; }
    .llv-app.llv-rail .llv-compte-btn { justify-content: center; width: auto; }
}

/* Au téléphone : le tiroir */
.llv-voile-tiroir { display: none; }
@media (max-width: 899.98px) {
    .llv-menu {
        width: min(320px, 86vw);
        padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
        background: var(--objet);
        border-right: 2px solid var(--encre);
        box-shadow: var(--ombre-fenetre);
        transform: translateX(calc(-100% - 8px));
        visibility: hidden;
        transition: transform var(--t-fenetre) var(--courbe), visibility 0s linear var(--t-fenetre);
        gap: 14px;
    }
    .llv-app.llv-tiroir-ouvert .llv-menu { transform: none; visibility: visible; transition: transform var(--t-fenetre) var(--courbe), visibility 0s; }
    .llv-menu__haut { gap: 10px; }
    .llv-marque {
        padding: 6px 16px 6px 10px;
        border: 2px solid var(--encre);
        border-radius: 999px;
        background: var(--objet);
        box-shadow: var(--ombre);
    }
    .llv-menu__replier { display: none; }
    .llv-menu__fermer { display: grid; }
    .llv-menu__entree { min-height: 48px; font-size: 17px; gap: 12px; padding: 0 12px; }
    .llv-menu__entree svg { width: 22px; height: 22px; }
    .llv-menu__tete-nom { font-size: 17px; }
    .llv-menu__tete-role { font-size: 20px; }
    .llv-compte-btn__nom { font-size: 16px; }
    .llv-compte-btn__org { font-size: 14px; }
    .llv-recherche__boite input { font-size: 16px; }
    .llv-voile-tiroir {
        display: block;
        position: fixed;
        inset: 0;
        z-index: calc(var(--z-menu) - 1);
        background: var(--voile);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--t-fenetre) ease, visibility 0s linear var(--t-fenetre);
    }
    .llv-app.llv-tiroir-ouvert .llv-voile-tiroir { opacity: 1; visibility: visible; transition: opacity var(--t-fenetre) ease, visibility 0s; }
}


/* ==========================================================================
   6. La barre du bas (téléphone) : les cinq sections, celle ouverte marquée en haut
      par sa couleur. Les nombres en pastille sur l'icône ; les cinq noms en entier.
   ========================================================================== */
.llv-bas { display: none; }
@media (max-width: 899.98px) {
    .llv-bas {
        position: fixed;
        inset: auto 0 0;
        z-index: var(--z-bas);
        display: flex;
        justify-content: space-between;
        padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
        background: var(--objet);
        border-top: 2px solid var(--encre);
    }
    .llv-bas__section {
        position: relative;
        flex: 1 1 auto;
        min-width: 44px;
        min-height: var(--bas-h);
        margin-top: -2px;
        padding: 0 2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: 0;
        border-top: 3px solid transparent;
        background: transparent;
        color: var(--encre-2);
        font: 500 12px/1.2 var(--police);
        text-decoration: none;
        white-space: nowrap;
    }
    .llv-bas__ic { position: relative; display: block; width: 24px; height: 24px; }
    .llv-bas__ic svg { width: 24px; height: 24px; color: var(--encre-2); }
    .llv-bas__section[aria-current="page"] { border-top-color: var(--rub); color: var(--encre); font-weight: 700; }
    .llv-bas__section[aria-current="page"] .llv-bas__ic svg { color: var(--rub-encre); }
    .llv-bas__compte {
        position: absolute;
        top: -6px;
        left: 15px;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        border: 2px solid var(--objet);
        border-radius: 999px;
        background: var(--encre);
        color: #FFFFFF;
        font: 800 12px/16px var(--police);
        text-align: center;
        letter-spacing: 0;
    }
}
/* Cinq noms en entier, en 12 px au moins (vague 4) : mesurés de 320 à 430 px, ils tiennent tous, l'onglet ouvert
   en gras compris. De 360 px, 13 px. Aucun nom caché ni coupé. */
@media (min-width: 360px) and (max-width: 899.98px) {
    .llv-bas__section { font-size: 13px; }
}


/* ==========================================================================
   7. Les petits flottants : pastille « Prototype », bulle « Une question ? »
   ========================================================================== */
.llv-proto {
    position: fixed;
    left: max(12px, env(safe-area-inset-left, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: var(--z-flottants);
    min-height: 30px;
    padding: 4px 12px;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--beurre);
    box-shadow: 2px 3px 0 0 var(--encre);
    color: var(--encre);
    font: 800 13px/1.2 var(--police);
    white-space: nowrap;
}
.llv-proto:hover { background: #F7DB7C; }
.llv-question {
    position: fixed;
    right: max(20px, env(safe-area-inset-right, 0px));
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: var(--z-flottants);
    display: flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding: 0 18px 0 7px;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--objet);
    box-shadow: var(--ombre);
    color: var(--encre);
    font: 700 15px/1 var(--police);
    transition: transform 120ms var(--courbe), box-shadow 120ms var(--courbe);
}
.llv-question__ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--violet); color: #FFFFFF; }
.llv-question__ic svg { width: 20px; height: 20px; }
.llv-question:active { transform: translate(1px, 1px); box-shadow: var(--ombre-p); }
.llv-question__pastille {
    position: absolute;
    top: -8px;
    right: -6px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--rose);
    color: var(--rose-t);
    font: 800 13px/1 var(--police);
}
/* Écran d'ordinateur bas (moins de 860 px) : avec les 14 pages de Présence en ligne, le menu défile et la pastille posée
   dans son coin cachait la dernière entrée. Elle monte au-dessus de « Une question ? » (relecture de Chloé, vague 4). */
@media (min-width: 900px) and (max-height: 859.98px) {
    .llv-proto { left: auto; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 899.98px) {
    .llv-proto { bottom: calc(var(--bas-h) + 14px + env(safe-area-inset-bottom, 0px)); }
    .llv-question { width: 54px; padding: 0; justify-content: center; bottom: calc(var(--bas-h) + 10px + env(safe-area-inset-bottom, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
    .llv-question__mot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .llv-question__ic { width: 40px; height: 40px; }
}


/* ==========================================================================
   8. L'en-tête de page : fil d'Ariane, titre en Luckiest Guy surligné, phrase, actions
   ========================================================================== */
.llv-entete {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 28px;
}
.llv-entete__textes { min-width: 0; max-width: 76ch; }
.llv-ariane { margin-bottom: 8px; font: 600 13px/1.5 var(--police); color: var(--encre-3); }
.llv-titre {
    position: relative;
    isolation: isolate;
    display: inline-block;
    max-width: calc(100% + 12px);
    margin: 0 -6px;
    padding: 0 6px;
    font: 400 clamp(28px, 7.2vw, 36px)/1.12 var(--police-titre);
    letter-spacing: 0.01em;
    color: var(--encre);
    overflow-wrap: anywhere;
}
.llv-titre::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    bottom: 0.06em;
    height: 40%;
    border-radius: 4px;
    background: var(--rub-trait-titre);
    transform: rotate(-1deg);
}
.llv-titre:focus { outline: none; }
.llv-intro { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--encre-2); }
.llv-entete__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.llv-entete__actions:empty { display: none; }

/* Au téléphone : la liste des pages de la section, sous l'en-tête (comme l'app) */
.llv-sous-nav { display: none; }
@media (max-width: 899.98px) {
    .llv-entete { margin-bottom: 20px; }
    .llv-ariane { display: none; }
    .llv-entete__actions { width: 100%; }
    .llv-entete__actions > .llv-btn { flex: 1 1 100%; }
    .llv-sous-nav { display: block; margin: -4px 0 24px; }
}


/* ==========================================================================
   9. Le chargement d'une page : squelette immobile, puis arrivée du contenu
   ========================================================================== */
.llv-corps { min-width: 0; }
.llv-squelette { display: grid; gap: 20px; }
.llv-squelette__bloc { background: var(--creux); border-radius: var(--rayon-objet); }
.llv-squelette__ligne { height: 14px; border-radius: 999px; background: var(--creux); }
.llv-squelette__carte {
    display: grid;
    gap: 12px;
    padding: 20px;
    border: 2px solid var(--creux-fort);
    border-radius: var(--rayon-objet);
    background: rgba(255, 255, 255, 0.5);
}
.llv-squelette__grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.llv-squelette__deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
@media (max-width: 899.98px) { .llv-squelette__deux { grid-template-columns: minmax(0, 1fr); } }
.llv-squelette__rond { width: 44px; height: 44px; border-radius: 999px; background: var(--creux); }
.llv-squelette__rangee { display: flex; align-items: center; gap: 12px; }

.llv-arrive { animation: llv-monte var(--t-fenetre) var(--courbe) both; }
.llv-entete.llv-arrive { animation-name: llv-apparait; animation-duration: var(--t-court); }


/* ==========================================================================
   10. Textes
   ========================================================================== */
.llv-h2 { font: 800 21px/1.4 var(--police); letter-spacing: -0.01em; color: var(--encre); }
/* Un titre dans une carte : 17 px, comme .llv-carte__titre (passe de finitions : l'accueil, Demander un visuel et Imprimés
   l'écrivaient en 17 px, le kit et Objets en 21 px). Les titres de section, hors carte, restent en 21 px. */
.llv-carte .llv-h2 { font-size: 17px; line-height: 1.35; letter-spacing: 0; }
.llv-h3 { font: 800 17px/1.4 var(--police); color: var(--encre); }
.llv-texte { font-size: 16px; line-height: 1.55; color: var(--encre-2); }
.llv-texte strong, .llv-texte b { color: var(--encre); font-weight: 700; }
.llv-discret { font-size: 14px; line-height: 1.45; color: var(--encre-3); }
.llv-manuscrit { font: 400 22px/1.1 var(--police-main); color: var(--violet); }
.llv-lien {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--violet-f);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    cursor: pointer;
}
.llv-lien:hover { color: var(--violet-ff); text-decoration-thickness: 2px; }
.llv-lien svg { width: 16px; height: 16px; vertical-align: -3px; margin-left: 2px; }
.llv-section-titre { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 899.98px) {
    .llv-discret { font-size: 16px; }   /* texte lu au téléphone : 16 px au moins (passe du 27/11) */
}


/* ==========================================================================
   11. Mises en page simples (pour ne pas tout réécrire dans chaque page)
   ========================================================================== */
.llv-pile { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.llv-pile--serree { gap: 8px; }
.llv-pile--large { gap: 28px; }
.llv-rangee { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.llv-rangee--entre { justify-content: space-between; }
.llv-grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--llv-col, 260px)), 1fr)); }
.llv-deux { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 899.98px) { .llv-deux { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.llv-separateur { height: 0; border: 0; border-top: 1.5px solid var(--trait-f); margin: 4px 0; }


/* ==========================================================================
   12. Les surfaces : objet (carte), creux, case vide, sticker
   ========================================================================== */
.llv-carte {
    position: relative;
    min-width: 0;
    padding: 20px;
    border: var(--trait-objet);
    border-radius: var(--rayon-objet);
    background: var(--objet);
    box-shadow: var(--ombre);
}
.llv-carte--petite { padding: 14px 16px; box-shadow: var(--ombre-p); }
.llv-carte--sans-marge { padding: 0; overflow: hidden; }
.llv-carte__tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.llv-carte__titre { font: 800 17px/1.35 var(--police); color: var(--encre); }
.llv-carte__texte { font-size: 15px; line-height: 1.5; color: var(--encre-2); }
@media (max-width: 899.98px) { .llv-carte__texte { font-size: 16px; } }   /* texte lu au téléphone : 16 px (passe du 27/11) */
.llv-carte--cliquable {
    display: block;
    width: 100%;
    text-align: inherit;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform var(--t-survol) var(--courbe), box-shadow var(--t-survol) var(--courbe), background-color var(--t-survol) ease;
}
.llv-carte--cliquable:hover { transform: translate(-1px, -1px); box-shadow: var(--ombre-survol); }
.llv-carte--cliquable:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 0 var(--encre); }
.llv-carte--cliquable:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.llv-carte--choisie { box-shadow: var(--ombre), inset 0 0 0 2px var(--encre); }
.llv-coche {
    position: absolute;
    top: -10px;
    right: -10px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 2px solid var(--objet);
    border-radius: 999px;
    background: var(--encre);
    color: #FFFFFF;
    animation: llv-apparait var(--t-court) ease both;
}
.llv-coche svg { width: 15px; height: 15px; stroke-width: 2.5; }
@media (max-width: 899.98px) { .llv-carte { padding: 16px; } .llv-carte--petite { padding: 14px; } .llv-carte--sans-marge { padding: 0; } .llv-coche { right: 6px; } }

.llv-creux { padding: 12px; border-radius: var(--rayon-creux); background: var(--creux); }
.llv-creux--large { padding: 16px; }

.llv-vide {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 28px 24px;
    border: var(--vide-trait);
    border-radius: var(--rayon-creux);
    background: var(--vide-fond);
    text-align: center;
}
.llv-vide__ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--creux); color: var(--encre-2); }
.llv-vide__ic svg { width: 24px; height: 24px; }
.llv-vide__titre { font: 800 17px/1.35 var(--police); color: var(--encre); }
.llv-vide__texte { max-width: 46ch; font-size: 16px; line-height: 1.5; color: var(--encre-2); }
.llv-vide .llv-btn { margin-top: 6px; }

/* Un sticker de l'app : immobile, collé au coin d'une carte (qui porte position: relative). Un ou deux par écran. */
.llv-sticker { position: absolute; z-index: 1; width: 64px; height: auto; pointer-events: none; user-select: none; }
.llv-sticker--haut-droite { top: -22px; right: 10px; transform: rotate(6deg); }
.llv-sticker--haut-gauche { top: -22px; left: 10px; transform: rotate(-6deg); }
.llv-sticker--bas-droite { bottom: -18px; right: 10px; transform: rotate(-4deg); }
@media (max-width: 899.98px) { .llv-sticker { width: 52px; } }


/* ==========================================================================
   13. Les boutons
   ========================================================================== */
.llv-btn {
    --btn-fond: var(--objet);
    --btn-fond-survol: var(--objet-survol);
    --btn-texte: var(--encre);
    --btn-trait: var(--encre);
    --btn-ombre: var(--ombre-p);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    padding: 8px 18px;
    border: 2px solid var(--btn-trait);
    border-radius: 999px;
    background: var(--btn-fond);
    box-shadow: var(--btn-ombre);
    color: var(--btn-texte);
    font: 700 15px/1.25 var(--police);
    text-align: center;
    text-decoration: none;
    user-select: none;
    transition: background-color var(--t-survol) ease, color var(--t-survol) ease, transform 120ms var(--courbe), box-shadow 120ms var(--courbe);
}
.llv-btn svg { width: 20px; height: 20px; flex: none; }
.llv-btn:hover { background: var(--btn-fond-survol); }
.llv-btn:active { transform: translate(1px, 1px) scale(0.985); box-shadow: 1px 1px 0 0 var(--encre); }
.llv-btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.llv-btn__txt { min-width: 0; }

.llv-btn--principal { --btn-fond: var(--violet); --btn-fond-survol: var(--violet-f); --btn-texte: #FFFFFF; --btn-ombre: var(--ombre); }
.llv-btn--secondaire { /* les valeurs par défaut */ }
.llv-btn--discret {
    --btn-fond: transparent;
    --btn-fond-survol: var(--creux);
    --btn-texte: var(--encre-2);
    --btn-ombre: none;
    border: 1.5px dashed rgba(34, 23, 38, 0.55);   /* 3,6:1 sur le blanc */
    font-weight: 600;
}
.llv-btn--discret:hover { color: var(--encre); }
.llv-btn--discret:active { transform: scale(0.97); box-shadow: none; }
.llv-btn--danger { --btn-texte: var(--rouge); --btn-fond-survol: var(--rouge); }
.llv-btn--danger:hover { color: #FFFFFF; }
.llv-btn--danger-plein { --btn-fond: var(--rouge); --btn-fond-survol: var(--rouge-f); --btn-texte: #FFFFFF; }
.llv-btn--petit { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.llv-btn--petit svg { width: 18px; height: 18px; }
.llv-btn--plein { width: 100%; }
.llv-btn--icone { width: 44px; min-width: 44px; padding: 0; }
.llv-btn--icone.llv-btn--petit { width: 36px; min-width: 36px; }

/* Désactivé : il reste visible et dit pourquoi (bulle) ; jamais d'opacité. */
.llv-btn[aria-disabled="true"],
.llv-btn:disabled {
    --btn-fond: var(--creux);
    --btn-fond-survol: var(--creux);
    --btn-texte: var(--encre-3);
    --btn-trait: rgba(34, 23, 38, 0.5);
    --btn-ombre: none;
    cursor: not-allowed;
}
.llv-btn[aria-disabled="true"]:active,
.llv-btn:disabled:active { transform: none; box-shadow: none; }
.llv-btn--discret[aria-disabled="true"] { background: transparent; }

/* En cours : la largeur ne bouge pas, un disque tourne, le libellé dit ce qui se passe. */
.llv-btn.est-en-cours { cursor: progress; }
.llv-btn.est-en-cours:active { transform: none; box-shadow: var(--btn-ombre); }
.llv-roue {
    display: inline-block;
    flex: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    animation: llv-tourne 0.8s linear infinite;
}
.llv-roue--grande { width: 24px; height: 24px; border-width: 3px; }

.llv-groupe-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.llv-groupe-btn--centre { justify-content: center; }
.llv-groupe-btn--droite { justify-content: flex-end; }
@media (max-width: 899.98px) {
    .llv-btn--petit { min-height: 44px; }
    .llv-btn--icone.llv-btn--petit { width: 44px; min-width: 44px; }
    .llv-groupe-btn--empile { flex-direction: column; align-items: stretch; }
}


/* ==========================================================================
   14. Pastilles d'état et compteurs
   ========================================================================== */
.llv-pastille {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--creux);
    color: var(--encre);
    font: 700 13px/1.2 var(--police);
    white-space: nowrap;
}
.llv-pastille::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 999px; background: currentColor; }
.llv-pastille--sans-point::before { display: none; }
.llv-pastille--ok { background: var(--menthe); color: var(--menthe-t); }
.llv-pastille--attention { background: var(--peche); color: var(--peche-t); }
.llv-pastille--alerte { background: var(--rose); color: var(--rose-t); }
.llv-pastille--info { background: var(--cyan); color: var(--cyan-t); }
.llv-pastille--en-cours { background: var(--lavande); color: var(--violet-f); }
.llv-pastille--neutre { background: var(--creux); color: var(--encre); }
@media (max-width: 899.98px) { .llv-pastille { font-size: 14px; } }

.llv-compte {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--creux);
    color: var(--encre);
    font: 800 13px/1 var(--police);
}


/* ==========================================================================
   15. Onglets et filtres : la barre est un creux, le choisi un objet blanc à bord encre
   ========================================================================== */
.llv-onglets,
.llv-filtres {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    padding: 4px;
    border-radius: var(--rayon-creux);
    background: var(--creux);
}
.llv-onglet,
.llv-filtre {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 2px solid var(--trait-onglet);
    border-radius: 12px;
    background: transparent;
    color: var(--encre-2);
    font: 600 15px/1.2 var(--police);
    white-space: nowrap;
    transition: background-color var(--t-survol) ease, color var(--t-survol) ease, border-color var(--t-survol) ease;
}
.llv-onglet svg, .llv-filtre svg { width: 18px; height: 18px; flex: none; }
.llv-onglet:hover, .llv-filtre:hover { background: var(--creux-fort); color: var(--encre); }
.llv-onglet[aria-selected="true"],
.llv-filtre[aria-pressed="true"] {
    border-color: var(--encre);
    background: var(--objet);
    color: var(--encre);
    font-weight: 700;
}
.llv-filtre { border-radius: 999px; }
.llv-filtre__coche { display: none; }
.llv-filtre[aria-pressed="true"] .llv-filtre__coche { display: block; }
.llv-onglet .llv-compte, .llv-filtre .llv-compte { height: 22px; min-width: 22px; padding: 0 6px; font-size: 13px; background: var(--creux); }
@media (max-width: 899.98px) { .llv-onglet .llv-compte, .llv-filtre .llv-compte { height: 24px; min-width: 24px; font-size: 14px; } }
.llv-onglet[aria-selected="true"] .llv-compte, .llv-filtre[aria-pressed="true"] .llv-compte { background: var(--creux); }
.llv-onglets--plein { width: 100%; }
.llv-onglets--plein .llv-onglet { flex: 1 1 auto; }
@media (max-width: 899.98px) {
    .llv-onglets, .llv-filtres { width: 100%; }
    .llv-onglet, .llv-filtre { flex: 1 1 auto; min-height: 44px; padding: 0 12px; }
}


/* ==========================================================================
   16. Les champs : la « capsule encre » (fond blanc, trait 2 px, coins 14 px)
   ========================================================================== */
.llv-champ { display: grid; gap: 6px; min-width: 0; }
.llv-champ__libelle { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: 600 15px/1.35 var(--police); color: var(--encre); }
.llv-champ__obligatoire { margin-left: 2px; color: var(--rouge); }
.llv-champ__facultatif { font-weight: 500; font-size: 14px; color: var(--encre-3); }
.llv-saisie {
    display: flex;
    align-items: stretch;
    min-height: 44px;
    border: 2px solid var(--encre);
    border-radius: var(--rayon-champ);
    background: var(--champ);
    transition: box-shadow 120ms ease, transform 120ms ease, border-color var(--t-survol) ease;
}
.llv-saisie:focus-within { box-shadow: 3px 4px 0 0 var(--encre); transform: translate(-1px, -1px); }
.llv-saisie input,
.llv-saisie textarea {
    flex: 1;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: var(--encre);
    font: 400 16px/1.45 var(--police);
    outline: none;
}
.llv-saisie textarea { min-height: 104px; resize: vertical; }
.llv-saisie input::placeholder, .llv-saisie textarea::placeholder { color: var(--encre-3); opacity: 1; }
.llv-saisie__prefixe,
.llv-saisie__suffixe { display: grid; place-items: center; flex: none; padding: 0 12px; color: var(--encre-2); font-weight: 600; }
.llv-saisie__prefixe { border-right: 1.5px solid rgba(34, 23, 38, 0.18); }
.llv-saisie__suffixe { border-left: 1.5px solid rgba(34, 23, 38, 0.18); }
.llv-champ__pied { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.llv-champ__pied:empty { display: none; }
.llv-champ__aide { font-size: 14px; line-height: 1.45; color: var(--encre-2); }
.llv-champ__compteur { margin-left: auto; font: 600 13px/1.45 var(--police); color: var(--encre-3); white-space: nowrap; }
.llv-champ__compteur.est-proche { color: var(--beurre-t); }
.llv-champ__compteur.est-plein { color: var(--rouge); }
.llv-champ__erreur { display: flex; align-items: flex-start; gap: 6px; font: 600 14px/1.4 var(--police); color: var(--rouge); }
.llv-champ__erreur svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.llv-champ__erreur[hidden] { display: none; }
.llv-champ.est-en-erreur .llv-saisie,
.llv-champ.est-en-erreur .llv-liste-btn { border-color: var(--rouge); }
.llv-champ.est-desactive .llv-saisie { background: var(--creux); border-color: rgba(34, 23, 38, 0.5); }
.llv-champ.est-desactive .llv-saisie:focus-within { box-shadow: none; transform: none; }
.llv-champ.est-desactive input, .llv-champ.est-desactive textarea { color: var(--encre-2); -webkit-text-fill-color: var(--encre-2); cursor: not-allowed; }
@media (max-width: 899.98px) {
    .llv-saisie { min-height: 48px; }
    .llv-champ__aide, .llv-champ__erreur { font-size: 15px; }
    .llv-champ__compteur { font-size: 14px; }
}

/* La couleur : un aperçu et le code */
.llv-couleur__apercu { width: 30px; height: 30px; margin: auto 0 auto 10px; flex: none; border: 2px solid var(--encre); border-radius: 8px; }

/* La liste maison (jamais la liste du navigateur) */
.llv-liste-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 8px 44px 8px 14px;
    border: 2px solid var(--encre);
    border-radius: var(--rayon-champ);
    background: var(--champ);
    color: var(--encre);
    font: 400 16px/1.35 var(--police);
    text-align: left;
    transition: box-shadow 120ms ease, transform 120ms ease;
}
.llv-liste-btn:focus-visible { outline: none; box-shadow: 3px 4px 0 0 var(--encre); transform: translate(-1px, -1px); }
.llv-liste-btn[aria-expanded="true"] { box-shadow: 3px 4px 0 0 var(--encre); transform: translate(-1px, -1px); }
.llv-liste-btn__texte { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llv-liste-btn__texte.est-vide { color: var(--encre-3); }
.llv-liste-btn > svg:first-child { width: 20px; height: 20px; flex: none; color: var(--encre-2); }
.llv-liste-btn__chevron { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--encre-2); transition: transform var(--t-court) var(--courbe); }
.llv-liste-btn[aria-expanded="true"] .llv-liste-btn__chevron { transform: rotate(180deg); }
.llv-liste-btn[aria-disabled="true"] { background: var(--creux); border-color: rgba(34, 23, 38, 0.5); color: var(--encre-2); cursor: not-allowed; }
@media (max-width: 899.98px) { .llv-liste-btn { min-height: 48px; } }

.llv-liste {
    position: fixed;
    z-index: var(--z-liste);
    max-height: 320px;
    margin: 0;
    padding: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 2px solid var(--encre);
    border-radius: var(--rayon-menu);
    background: var(--objet);
    box-shadow: var(--ombre-fenetre);
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 23, 38, 0.3) transparent;
    animation: llv-liste-arrive 140ms var(--courbe) both;
}
.llv-liste.est-en-haut { animation-name: llv-liste-arrive-haut; }
.llv-liste.est-sortante { animation: llv-disparait 120ms var(--courbe-sortie) both; }
.llv-liste__option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--encre);
    font: 500 15px/1.3 var(--police);
    cursor: pointer;
}
.llv-liste__option svg { width: 18px; height: 18px; flex: none; color: var(--encre-2); }
.llv-liste__option-textes { flex: 1; min-width: 0; display: grid; gap: 1px; }
.llv-liste__option-detail { font-size: 13px; color: var(--encre-3); font-weight: 500; }
.llv-liste__option.est-visee { background: var(--sable); }
.llv-liste__option[aria-selected="true"] { background: var(--sable); font-weight: 700; }
.llv-liste__option-coche { visibility: hidden; color: var(--encre) !important; }
.llv-liste__option[aria-selected="true"] .llv-liste__option-coche { visibility: visible; }
.llv-liste__option[aria-disabled="true"] { color: var(--encre-3); cursor: not-allowed; }
.llv-liste__vide { padding: 10px 12px; color: var(--encre-3); font-size: 15px; }
@media (max-width: 899.98px) { .llv-liste__option { min-height: 46px; font-size: 16px; } .llv-liste__option-detail { font-size: 14px; } }

/* Cases à cocher : une vraie case, la teinte de la section cochée, une coche blanche */
.llv-case {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 10px 0;
    cursor: pointer;
}
.llv-case input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; pointer-events: none; }
.llv-case__boite {
    display: grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid var(--trait-case);
    border-radius: 6px;
    background: var(--objet);
    color: transparent;
    transition: background-color 140ms ease, border-color 140ms ease, transform 120ms ease;
}
.llv-case__boite svg { width: 16px; height: 16px; stroke-width: 3; transform: scale(0.4); opacity: 0; transition: transform var(--t-court) var(--courbe), opacity 120ms ease; }
.llv-case:hover .llv-case__boite { border-color: var(--encre); }
/* Cochée : coche blanche sur l'encre. Les cases ne servent que dans des fenêtres, où la teinte de la section
   ne va pas sur un élément choisi (Liham, 20/11 ; relecture de Chloé, 27/11). */
.llv-case input:checked + .llv-case__boite { background: var(--encre); border-color: var(--encre); color: #FFFFFF; }
.llv-case input:checked + .llv-case__boite svg { transform: none; opacity: 1; }
.llv-case:active .llv-case__boite { transform: scale(0.92); }
.llv-case input:focus-visible + .llv-case__boite { outline: 3px solid var(--violet); outline-offset: 2px; }
.llv-case__textes { display: grid; gap: 2px; min-width: 0; font: 500 16px/1.4 var(--police); color: var(--encre); }
.llv-case__detail { font-size: 14px; font-weight: 400; color: var(--encre-2); }
.llv-case.est-desactive { cursor: not-allowed; }
.llv-case.est-desactive .llv-case__boite { background: var(--creux); border-color: rgba(34, 23, 38, 0.5); }
.llv-case.est-desactive .llv-case__textes { color: var(--encre-2); }

/* L'interrupteur */
.llv-inter {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}
.llv-inter__rail {
    position: relative;
    flex: none;
    width: 48px;
    height: 28px;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--creux-fort);
    transition: background-color var(--t-court) ease;
}
.llv-inter__rail::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: #FFFFFF;
    transition: transform var(--t-court) var(--courbe);
}
.llv-inter[aria-checked="true"] .llv-inter__rail { background: var(--rub); }
/* Dans une fenêtre, un réglage activé reste neutre : jamais la teinte de la section (Liham, 20/11 ; relecture de Chloé, 27/11). */
.llv-fenetre .llv-inter[aria-checked="true"] .llv-inter__rail { background: var(--encre); }
.llv-inter[aria-checked="true"] .llv-inter__rail::after { transform: translateX(20px); }
.llv-inter:focus-visible { outline: none; }
.llv-inter:focus-visible .llv-inter__rail { outline: 3px solid var(--violet); outline-offset: 2px; }
.llv-inter__textes { display: grid; gap: 2px; font: 500 16px/1.4 var(--police); color: var(--encre); }
.llv-inter__detail { font-size: 14px; font-weight: 400; color: var(--encre-2); }
.llv-inter[aria-disabled="true"] { cursor: not-allowed; }
.llv-inter[aria-disabled="true"] .llv-inter__rail { background: var(--creux); border-color: rgba(34, 23, 38, 0.5); }
.llv-inter[aria-disabled="true"] .llv-inter__rail::after { border-color: rgba(34, 23, 38, 0.5); }

/* Le champ fichier : une zone d'ajout en pointillé, puis l'aperçu du fichier */
.llv-fichier__zone {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 22px 16px;
    border: var(--vide-trait);
    border-radius: var(--rayon-creux);
    background: var(--vide-fond);
    text-align: center;
    transition: background-color var(--t-survol) ease, border-color var(--t-survol) ease;
}
.llv-fichier__zone.est-survolee { border-style: solid; border-color: var(--encre); background: var(--creux); }
.llv-fichier__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--creux); color: var(--encre-2); }
.llv-fichier__ic svg { width: 22px; height: 22px; }
.llv-fichier__texte { font-size: 15px; color: var(--encre-2); }
.llv-fichier input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.llv-fichier__plein {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 2px solid var(--encre);
    border-radius: var(--rayon-champ);
    background: var(--objet);
}
.llv-fichier__vignette {
    display: grid;
    place-items: center;
    flex: none;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 10px;
    background-color: #FFFFFF;
    background-image: linear-gradient(45deg, #EEE9E1 25%, transparent 25%), linear-gradient(-45deg, #EEE9E1 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #EEE9E1 75%), linear-gradient(-45deg, transparent 75%, #EEE9E1 75%);
    background-size: 14px 14px;
    background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.llv-fichier__vignette img { width: 100%; height: 100%; object-fit: contain; }
.llv-fichier__infos { flex: 1; min-width: 0; display: grid; gap: 2px; }
.llv-fichier__nom { font: 700 15px/1.35 var(--police); color: var(--encre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llv-fichier__poids { font-size: 14px; color: var(--encre-3); }
.llv-fichier__actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 559.98px) {
    .llv-fichier__plein { flex-wrap: wrap; }
    .llv-fichier__actions { width: 100%; }
    .llv-fichier__actions .llv-btn { flex: 1 1 0; }
}


/* ==========================================================================
   17. Tout ce qui s'ouvre par-dessus : bulles, petites bulles d'info, menus
   ========================================================================== */
.llv-bulle {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-bulle);
    max-width: min(300px, calc(100vw - 16px));
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--encre);
    color: #FDFCF8;
    font: 600 13px/1.35 var(--police);
    white-space: pre-line;
    overflow-wrap: anywhere;
    box-shadow: 0 6px 18px rgba(34, 23, 38, 0.18);
    pointer-events: none;
    opacity: 0;
    transform: translateY(var(--llv-bulle-dy, 3px));
    transition: opacity 120ms ease, transform 120ms ease;
}
.llv-bulle.est-vue { opacity: 1; transform: none; }
.llv-bulle::before {
    content: '';
    position: absolute;
    left: var(--llv-bulle-fleche, 50%);
    width: 8px;
    height: 8px;
    margin-left: -4px;
    background: inherit;
    border-radius: 1px;
    transform: rotate(45deg);
}
.llv-bulle[data-cote="bas"]::before { top: -3px; }
.llv-bulle[data-cote="haut"] { --llv-bulle-dy: -3px; }
.llv-bulle[data-cote="haut"]::before { bottom: -3px; }

/* La petite bulle d'information (« Cette partie existe déjà dans l'app… ») */
.llv-pop {
    position: fixed;
    z-index: var(--z-liste);
    display: flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    max-width: min(360px, calc(100vw - 24px));
    padding: 12px 12px 12px 16px;
    border: 2px solid var(--encre);
    border-radius: 16px;
    background: var(--objet);
    box-shadow: var(--ombre);
    color: var(--encre);
    font: 500 15px/1.45 var(--police);
    animation: llv-descend var(--t-entree) var(--courbe) both;
}
.llv-pop.est-sortante { animation: llv-disparait var(--t-sortie) var(--courbe-sortie) both; }
.llv-pop__ok {
    flex: none;
    min-width: 64px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--encre);
    color: #FFFFFF;
    font: 800 15px/1 var(--police);
}
.llv-pop__ok:hover { background: #3A2C40; }
@media (max-width: 899.98px) { .llv-pop { font-size: 16px; } }

/* Le menu du compte */
.llv-menu-compte {
    position: fixed;
    z-index: var(--z-liste);
    width: 260px;
    max-width: calc(100vw - 24px);
    padding: 4px;
    border: 2px solid var(--encre);
    border-radius: var(--rayon-menu);
    background: var(--objet);
    box-shadow: var(--ombre-fenetre);
    animation: llv-descend 160ms var(--courbe) both;
}
.llv-menu-compte.est-au-dessus { animation-name: llv-monte-court; }
.llv-menu-compte.est-sortante { animation: llv-disparait 120ms var(--courbe-sortie) both; }
.llv-menu-compte__qui { padding: 10px 12px 12px; border-bottom: 1.5px solid rgba(34, 23, 38, 0.12); margin-bottom: 4px; }
.llv-menu-compte__nom { font: 700 15px/1.3 var(--police); color: var(--encre); }
.llv-menu-compte__mail { font-size: 14px; color: var(--encre-3); overflow-wrap: anywhere; }
.llv-menu-compte__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--encre);
    font: 600 15px/1.3 var(--police);
    text-align: left;
}
.llv-menu-compte__item svg { width: 20px; height: 20px; flex: none; color: var(--encre-2); }
.llv-menu-compte__item:hover, .llv-menu-compte__item:focus-visible { background: var(--sable); outline: none; }


/* ==========================================================================
   18. Les fenêtres : voile, boîte qui monte de 10 px ; feuille du bas au téléphone
   ========================================================================== */
.llv-voile {
    position: fixed;
    inset: 0;
    z-index: var(--z-fenetre);
    display: grid;
    place-items: center;
    padding: 24px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px));
    background: var(--voile);
    animation: llv-apparait var(--t-court) ease both;
}
.llv-voile.est-sortante { animation: llv-disparait var(--t-sortie) var(--courbe-sortie) both; }
.llv-fenetre {
    /* Dans une fenêtre, le creux est le sable neutre : la teinte de la section n'y entre pas. */
    --creux: var(--sable);
    --creux-fort: var(--sable-fort);
    --objet-survol: var(--sable-survol);
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 640px;
    max-height: calc(100dvh - 48px);
    border: 2px solid var(--encre);
    border-radius: var(--rayon-fenetre);
    background: var(--objet);
    box-shadow: var(--ombre-fenetre);
    color: var(--encre);
    animation: llv-surgit var(--t-fenetre) var(--courbe) both;
}
.llv-fenetre--petite { max-width: 460px; }
.llv-fenetre--large { max-width: 980px; }
.llv-voile.est-sortante .llv-fenetre { animation: llv-replonge var(--t-sortie) var(--courbe-sortie) both; }
.llv-fenetre__tete {
    flex: none;
    padding: 24px 72px 16px 24px;
    border-bottom: var(--filet);
}
.llv-fenetre__titre {
    font: 400 24px/1.15 var(--police-titre);
    letter-spacing: 0.01em;
    color: var(--encre);
    overflow-wrap: break-word;
}
.llv-fenetre__titre:focus { outline: none; }
.llv-fenetre__desc { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--encre-2); }
.llv-fenetre__croix {
    position: absolute;
    top: 18px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--objet);
    box-shadow: var(--ombre-p);
    color: var(--encre);
    transition: background-color var(--t-survol) ease, transform 120ms var(--courbe), box-shadow 120ms var(--courbe);
}
.llv-fenetre__croix svg { width: 20px; height: 20px; }
.llv-fenetre__croix:hover { background: var(--sable); }
.llv-fenetre__croix:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 0 var(--encre); }
.llv-fenetre__corps {
    flex: 1 1 auto;
    min-height: 0;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 23, 38, 0.3) transparent;
}
.llv-fenetre__corps::-webkit-scrollbar { width: 10px; }
.llv-fenetre__corps::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: rgba(34, 23, 38, 0.3) padding-box; }
.llv-fenetre__pied { flex: none; padding: 16px 24px 24px; border-top: var(--filet); }
.llv-fenetre__actions { display: flex; flex-flow: row wrap; justify-content: center; align-items: center; gap: 12px; }
.llv-fenetre__actions--droite { justify-content: flex-end; }
.llv-fenetre--sans-corps .llv-fenetre__tete { border-bottom: 0; padding-bottom: 8px; }
.llv-fenetre--sans-corps .llv-fenetre__pied { border-top: 0; }
.llv-fenetre .llv-btn { box-shadow: var(--ombre-p); }
.llv-fenetre .llv-btn--discret { box-shadow: none; }
.llv-fenetre .llv-btn--principal:hover { --btn-fond-survol: var(--violet-ff); }

/* Les champs dans une fenêtre : trait fin, focus en bord encre + anneau violet */
.llv-fenetre .llv-saisie,
.llv-fenetre .llv-liste-btn { border: 1.5px solid var(--trait-champ-fenetre); }
.llv-fenetre .llv-saisie:focus-within,
.llv-fenetre .llv-liste-btn:focus-visible,
.llv-fenetre .llv-liste-btn[aria-expanded="true"] { border: 2px solid var(--encre); box-shadow: none; transform: none; outline: 2px solid var(--violet); outline-offset: 2px; }
.llv-fenetre .llv-champ.est-en-erreur .llv-saisie { border-color: var(--rouge); }

/* « Abandonner la saisie ? », dans la fenêtre */
.llv-abandon { display: grid; gap: 12px; animation: llv-monte var(--t-entree) var(--courbe) both; }
.llv-abandon__titre { font: 800 17px/1.35 var(--police); color: var(--encre); }
.llv-abandon__texte { font-size: 15px; color: var(--encre-2); }

@media (max-width: 639.98px) {
    .llv-voile { place-items: end stretch; padding: 0; }
    .llv-fenetre,
    .llv-fenetre--petite,
    .llv-fenetre--large {
        max-width: none;
        max-height: 92dvh;
        border-width: 2px 0 0;
        border-radius: var(--rayon-fenetre) var(--rayon-fenetre) 0 0;
        box-shadow: none;
        animation-name: llv-feuille-monte;
        animation-duration: 280ms;
    }
    .llv-voile.est-sortante .llv-fenetre { animation: llv-feuille-descend 200ms var(--courbe-sortie) both; }
    .llv-fenetre__tete { padding: 18px 68px 12px 16px; }
    .llv-fenetre__croix { top: 12px; right: 12px; width: 44px; height: 44px; }
    .llv-fenetre__corps { padding: 16px; }
    .llv-fenetre__pied { padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
    .llv-fenetre__actions { flex-direction: column; align-items: stretch; }
    .llv-fenetre__desc { font-size: 16px; }
}

/* La confirmation dans la page (sous le bouton qui l'a demandée) */
.llv-confirmation { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-fenetre) var(--courbe); }
.llv-confirmation.est-ouverte { grid-template-rows: 1fr; }
.llv-confirmation > div { min-height: 0; overflow: hidden; }
.llv-confirmation__boite {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 16px;
    border-radius: var(--rayon-creux);
    background: var(--creux);
    text-align: center;
}
.llv-confirmation__titre { font: 800 17px/1.35 var(--police); color: var(--encre); }
.llv-confirmation__texte { font-size: 15px; line-height: 1.5; color: var(--encre-2); }
.llv-confirmation__boite .llv-groupe-btn { justify-content: center; margin-top: 4px; }


/* ==========================================================================
   19. Les notifications : par la droite à l'ordinateur, par le bas au téléphone
   ========================================================================== */
.llv-notifs {
    position: fixed;
    top: calc(var(--haut-h) + 8px + env(safe-area-inset-top, 0px));
    right: max(22px, env(safe-area-inset-right, 0px));
    z-index: var(--z-notif);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 360px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}
.llv-notif {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 10px 12px 12px;
    border: 2px solid var(--encre);
    border-radius: 16px;
    background: #FFFDF8;
    box-shadow: 3px 4px 0 0 var(--encre);
    pointer-events: auto;
    animation: llv-notif-arrive var(--t-fenetre) var(--courbe) both;
}
.llv-notif.est-sortante { animation: llv-notif-part var(--t-sortie) var(--courbe-sortie) both; }
.llv-notif__ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 12px; background: var(--lavande); color: var(--violet-f); }
.llv-notif__ic svg { width: 18px; height: 18px; }
.llv-notif--ok .llv-notif__ic { background: var(--menthe); color: var(--menthe-t); }
.llv-notif--erreur .llv-notif__ic { background: var(--rose); color: var(--rose-t); }
.llv-notif--attention .llv-notif__ic { background: var(--peche); color: var(--peche-t); }
.llv-notif--neutre .llv-notif__ic { background: var(--sable); color: var(--encre-2); }
.llv-notif__textes { flex: 1; min-width: 0; padding-top: 1px; }
.llv-notif__titre { font: 800 15px/1.3 var(--police); color: var(--encre); overflow-wrap: anywhere; }
.llv-notif__texte { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--encre-2); overflow-wrap: anywhere; }
.llv-notif__action { margin-top: 8px; }
.llv-notif__fermer {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    margin: -2px 0 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(34, 23, 38, 0.55);
}
.llv-notif__fermer:hover { background: var(--sable); color: var(--encre); }
.llv-notif__fermer svg { width: 16px; height: 16px; }
@media (max-width: 899.98px) {
    .llv-notifs {
        top: auto;
        bottom: calc(var(--bas-h) + 12px + env(safe-area-inset-bottom, 0px));
        left: max(12px, env(safe-area-inset-left, 0px));
        right: max(12px, env(safe-area-inset-right, 0px));
        width: auto;
        max-width: none;
        flex-direction: column-reverse;
    }
    .llv-notif { animation-name: llv-notif-monte; }
    .llv-notif.est-sortante { animation-name: llv-notif-descend; }
    .llv-notif__titre { font-size: 16px; }
    .llv-notif__texte { font-size: 15px; }
    .llv-notif__fermer { width: 40px; height: 40px; }
}


/* ==========================================================================
   20. La fabrication d'un fichier : les étapes et la barre d'avancement réelle
   ========================================================================== */
.llv-fab { display: grid; gap: 18px; }
.llv-fab__etapes { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.llv-fab__etape { display: flex; align-items: center; gap: 12px; min-height: 36px; font: 500 16px/1.35 var(--police); color: var(--encre-3); }
.llv-fab__puce {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    border: 2px solid rgba(34, 23, 38, 0.35);
    border-radius: 999px;
    background: var(--objet);
    color: #FFFFFF;
}
.llv-fab__puce svg { width: 15px; height: 15px; stroke-width: 2.5; }
.llv-fab__etape.est-en-cours { color: var(--encre); font-weight: 700; }
.llv-fab__etape.est-en-cours .llv-fab__puce { border: 0; color: var(--encre); }
.llv-fab__etape.est-faite { color: var(--encre-2); }
.llv-fab__etape.est-faite .llv-fab__puce { border-color: var(--encre); background: var(--encre); animation: llv-apparait var(--t-court) ease both; }
.llv-fab__etape.est-en-erreur { color: var(--rouge); font-weight: 700; }
.llv-fab__etape.est-en-erreur .llv-fab__puce { border-color: var(--rouge); background: var(--rouge); }
.llv-avancement { display: flex; align-items: center; gap: 12px; }
.llv-avancement__rail { position: relative; flex: 1; height: 14px; overflow: hidden; border: 2px solid var(--encre); border-radius: 999px; background: var(--objet); }
.llv-avancement__plein { position: absolute; inset: 0; background: var(--encre); transform-origin: 0 50%; transform: scaleX(0); transition: transform 200ms ease-out; }
.llv-avancement__pourcent { min-width: 48px; font: 800 15px/1 var(--police); text-align: right; color: var(--encre); }
.llv-fab__message { font-size: 15px; line-height: 1.5; color: var(--encre-2); }
.llv-fab__message--erreur { color: var(--rouge); font-weight: 600; }


/* ==========================================================================
   21. Le mouvement : quelques entrées, toutes courtes, toutes coupées sur demande
   ========================================================================== */
@keyframes llv-apparait { from { opacity: 0; } to { opacity: 1; } }
@keyframes llv-disparait { from { opacity: 1; } to { opacity: 0; } }
@keyframes llv-monte { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes llv-monte-court { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes llv-descend { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes llv-surgit { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes llv-replonge { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px) scale(0.985); } }
@keyframes llv-feuille-monte { from { transform: translateY(100%); } to { transform: none; } }
@keyframes llv-feuille-descend { from { transform: none; } to { transform: translateY(100%); } }
@keyframes llv-notif-arrive { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes llv-notif-part { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(10px); } }
@keyframes llv-notif-monte { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes llv-notif-descend { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px); } }
@keyframes llv-liste-arrive { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes llv-liste-arrive-haut { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes llv-tourne { to { transform: rotate(360deg); } }

/* Les classes à poser soi-même (mêmes durées que l'app). La cascade (llv-anim-1…4) : structure seulement, jamais des données. */
.llv-anim-monte { animation: llv-monte var(--t-fenetre) var(--courbe) both; }
.llv-anim-apparait { animation: llv-apparait var(--t-entree) ease-out both; }
.llv-anim-descend { animation: llv-descend var(--t-court) var(--courbe) both; }
.llv-anim-1 { animation-delay: 40ms; }
.llv-anim-2 { animation-delay: 80ms; }
.llv-anim-3 { animation-delay: 120ms; }
.llv-anim-4 { animation-delay: 160ms; }

/* Un volet qui s'ouvre (hauteur inconnue) : l'enveloppe interne est obligatoire. */
.llv-volet { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-fenetre) var(--courbe); }
.llv-volet[data-ouvert="oui"] { grid-template-rows: 1fr; }
.llv-volet > * { min-height: 0; overflow: hidden; }

/* Un aperçu qui change de contenu : fondu enchaîné (socle.js : LLV.fondu). */
.llv-fondu-sortant { animation: llv-disparait 120ms ease both; }
.llv-fondu-entrant { animation: llv-apparait var(--t-entree) ease both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
        transition-duration: 1ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }
    .llv-roue { animation: llv-tourne 1.6s linear infinite !important; animation-duration: 1.6s !important; }
    .llv-menu__entree:hover, .llv-btn:active, .llv-carte--cliquable:hover, .llv-carte--cliquable:active { transform: none; }
}


/* ==========================================================================
   22. Ajouts du 27/11 (plan d'Arthur) : avertissement, tuiles, segment, volet replié,
       erreur de page, calendrier, tiroir à droite, plein écran au téléphone, cloche
   ========================================================================== */
.llv-champ__notes { display: grid; gap: 4px; min-width: 0; }
.llv-champ__avert { display: flex; align-items: flex-start; gap: 6px; font: 600 14px/1.4 var(--police); color: #B4590F; }
.llv-champ__avert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.llv-champ__avert[hidden] { display: none; }
@media (max-width: 899.98px) { .llv-champ__avert { font-size: 15px; } }

/* Le segment : la barre d'onglets, un seul choix (role radio) */
.llv-onglet[aria-checked="true"] { border-color: var(--encre); background: var(--objet); color: var(--encre); font-weight: 700; }

/* Les tuiles à choisir (un seul choix) : choisie = creux + bord encre + coche */
.llv-tuiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.llv-tuiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.llv-tuile {
    position: relative;
    display: grid;
    align-content: start;
    gap: 4px;
    min-height: 64px;
    padding: 12px 14px;
    border: 1.5px solid var(--trait-champ-fenetre);
    border-radius: var(--rayon-champ);
    background: var(--objet);
    color: var(--encre);
    text-align: left;
    transition: background-color var(--t-survol) ease, border-color var(--t-survol) ease;
}
.llv-tuile:hover { background: var(--objet-survol); border-color: var(--encre); }
.llv-tuile[aria-checked="true"] { border: 2px solid var(--encre); padding: 11.5px 13.5px; background: var(--creux); }
.llv-tuile:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.llv-tuile__ic { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 2px; border-radius: 10px; background: var(--creux); color: var(--encre-2); }
.llv-tuile[aria-checked="true"] .llv-tuile__ic { background: var(--objet); color: var(--encre); }
.llv-tuile__ic svg { width: 18px; height: 18px; }
.llv-tuile__libelle { font: 700 16px/1.3 var(--police); }
.llv-tuile__detail { font: 400 14px/1.35 var(--police); color: var(--encre-2); }
.llv-tuile .llv-coche { top: -9px; right: -9px; }
@media (max-width: 899.98px) { .llv-tuile .llv-coche { right: 6px; } }

/* Le volet replié : une tête qui s'ouvre (environ 300 ms), son résumé visible */
.llv-repli { border-radius: var(--rayon-creux); background: var(--creux); }
.llv-repli__tete {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 0;
    border-radius: var(--rayon-creux);
    background: transparent;
    color: var(--encre);
    text-align: left;
}
.llv-repli__tete:hover { background: var(--creux-fort); }
.llv-repli__textes { flex: 1; min-width: 0; display: grid; gap: 2px; }
.llv-repli__titre { font: 700 16px/1.35 var(--police); }
.llv-repli__resume { font: 400 14px/1.4 var(--police); color: var(--encre-2); }
.llv-repli__chevron { width: 20px; height: 20px; flex: none; color: var(--encre-2); transition: transform var(--t-fenetre) var(--courbe); }
.llv-repli__tete[aria-expanded="true"] .llv-repli__chevron { transform: rotate(180deg); }
.llv-repli .llv-volet { transition-duration: 300ms; }
.llv-repli__corps { padding: 0 16px 16px; }

/* L'erreur d'une page : ce qui s'est passé et « Réessayer » */
.llv-erreur-page {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 28px 24px;
    border: 2px solid var(--encre);
    border-radius: var(--rayon-objet);
    background: var(--objet);
    box-shadow: var(--ombre);
    text-align: center;
}
.llv-erreur-page__ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--rose); color: var(--rose-t); }
.llv-erreur-page__ic svg { width: 24px; height: 24px; }

/* La place d'un bouton d'en-tête pendant le chargement (rien ne saute à l'arrivée) */
.llv-squelette__bouton { display: inline-block; width: 168px; height: 44px; border-radius: 999px; background: var(--creux); }
@media (max-width: 899.98px) { .llv-squelette__bouton { width: 100%; } }

/* Le calendrier maison */
.llv-cal {
    --creux: var(--sable);
    position: fixed;
    z-index: var(--z-liste);
    padding: 12px;
    border: 2px solid var(--encre);
    border-radius: var(--rayon-menu);
    background: var(--objet);
    box-shadow: var(--ombre-fenetre);
    animation: llv-liste-arrive 160ms var(--courbe) both;
}
.llv-cal.est-en-haut { animation-name: llv-liste-arrive-haut; }
.llv-cal.est-sortante { animation: llv-disparait 120ms var(--courbe-sortie) both; }
.llv-cal__tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.llv-cal__titre { font: 800 16px/1.3 var(--police); color: var(--encre); text-align: center; }
.llv-cal__fleche {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--objet);
    box-shadow: var(--ombre-p);
    color: var(--encre);
}
.llv-cal__fleche svg { width: 20px; height: 20px; }
.llv-cal__fleche:hover { background: var(--sable); }
.llv-cal__fleche:active { transform: translate(1px, 1px); box-shadow: none; }
.llv-cal__fleche[aria-disabled="true"] { border-color: rgba(34, 23, 38, 0.5); box-shadow: none; color: var(--encre-3); background: var(--sable); }
.llv-cal__grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.llv-cal__source { margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--encre-3); }
/* La source de données publiques (Licence Ouverte) là où leurs dates s'affichent : discrète. */
.llv-source { margin: 0; font-size: 13px; line-height: 1.45; color: var(--encre-3); }
.llv-source a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.llv-source a:hover { color: var(--encre); }
@media (max-width: 899.98px) { .llv-cal__source, .llv-source { font-size: 14px; } }
.llv-cal__entete { display: grid; place-items: center; height: 32px; font: 700 13px/1 var(--police); color: var(--encre-3); }
.llv-cal__jour {
    position: relative;
    display: grid;
    place-items: center;
    height: 42px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--encre);
    font: 600 15px/1 var(--police);
}
.llv-cal__jour:hover { background: var(--sable-survol); border-color: rgba(34, 23, 38, 0.2); }
.llv-cal__jour.est-aujourdhui { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.llv-cal__jour.est-ferie::after { content: ''; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 999px; background: #B4590F; }
.llv-cal__jour[aria-pressed="true"] { border-color: var(--encre); background: var(--sable); font-weight: 800; }
.llv-cal__jour[aria-disabled="true"] { color: rgba(34, 23, 38, 0.38); cursor: not-allowed; background: transparent; border-color: transparent; text-decoration: none; }
.llv-cal__jour:focus-visible { outline: 3px solid var(--violet); outline-offset: 1px; }
@media (max-width: 899.98px) { .llv-cal__jour { height: 44px; font-size: 16px; } }

/* Les fenêtres : en-tête (flèche de retour au téléphone), tiroir à droite à l'ordinateur */
.llv-fenetre__tete { display: flex; align-items: flex-start; gap: 12px; }
.llv-fenetre__textes { flex: 1; min-width: 0; }
.llv-fenetre__retour {
    display: none;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin: -6px 0 0 -4px;
    padding: 0;
    border: 2px solid var(--encre);
    border-radius: 999px;
    background: var(--objet);
    box-shadow: var(--ombre-p);
    color: var(--encre);
}
.llv-fenetre__retour svg { width: 20px; height: 20px; }
@media (min-width: 640px) {
    .llv-voile--tiroir { place-items: stretch end; padding: 12px max(12px, env(safe-area-inset-right, 0px)) 12px 12px; }
    .llv-fenetre--tiroir { width: 600px; max-width: calc(100vw - 24px); height: calc(100dvh - 24px); max-height: none; animation-name: llv-tiroir-arrive; }
    .llv-fenetre--tiroir.llv-fenetre--large { width: 760px; }
    .llv-voile.est-sortante .llv-fenetre--tiroir { animation: llv-tiroir-part var(--t-sortie) var(--courbe-sortie) both; }
}
@media (max-width: 639.98px) {
    .llv-fenetre--tel-plein,
    .llv-fenetre--tel-plein.llv-fenetre--petite,
    .llv-fenetre--tel-plein.llv-fenetre--large { height: 100dvh; max-height: 100dvh; border-width: 0; border-radius: 0; }
    .llv-fenetre--tel-plein .llv-fenetre__tete { padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; }
    .llv-fenetre--tel-plein .llv-fenetre__retour { display: grid; }
    .llv-fenetre--tel-plein:has(.llv-fenetre__retour) .llv-fenetre__croix { display: none; }
    .llv-fenetre--tel-plein .llv-fenetre__titre { font-size: 22px; padding-top: 6px; }
}
@keyframes llv-tiroir-arrive { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes llv-tiroir-part { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(24px); } }

/* Plusieurs fichiers : des vignettes avec leur croix */
.llv-fichier { display: grid; gap: 10px; }
.llv-fichier__liste { display: grid; gap: 8px; }
.llv-fichier__liste:empty { display: none; }

/* La cloche : la liste des notifications */
.llv-cloche { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.llv-cloche__item { display: flex; gap: 12px; padding: 12px; border-radius: 12px; }
.llv-cloche__item.est-non-lue { background: var(--creux); }
.llv-cloche__point { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 999px; background: transparent; }
.llv-cloche__item.est-non-lue .llv-cloche__point { background: #EE8434; box-shadow: 0 0 0 2px var(--encre); }
.llv-cloche__textes { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.llv-cloche__texte { font: 600 16px/1.4 var(--police); color: var(--encre); }
.llv-cloche__date { font-size: 14px; color: var(--encre-3); }

/* États forcés, pour montrer chaque état côte à côte dans la vitrine (#vitrine) */
.llv-btn.est-survole { background: var(--btn-fond-survol); }
.llv-btn--danger.est-survole { color: #FFFFFF; }
.llv-btn.est-appuye { transform: translate(1px, 1px) scale(0.985); box-shadow: 1px 1px 0 0 var(--encre); }
.llv-btn.est-focus, .llv-onglet.est-focus, .llv-carte.est-focus { outline: 3px solid var(--violet); outline-offset: 3px; }
.llv-carte--cliquable.est-survole { transform: translate(-1px, -1px); box-shadow: var(--ombre-survol); }
.llv-onglet.est-survole, .llv-filtre.est-survole { background: var(--creux-fort); color: var(--encre); }
.llv-saisie.est-focus { box-shadow: 3px 4px 0 0 var(--encre); transform: translate(-1px, -1px); }
.llv-rond.est-survole { background: var(--sable-survol); }

/* Le rond « Rechercher » n'existe qu'au téléphone (à l'ordinateur, la recherche est dans le menu). */
.llv-rond--tel { display: none; }
@media (max-width: 899.98px) { .llv-rond--tel { display: grid; } }
.llv-capsule-nav { display: contents; }
.llv-capsule > li { display: flex; }

/* Le tiroir ouvert passe devant la pastille « Prototype » et la bulle « Une question ? ». */
@media (max-width: 899.98px) {
    .llv-app.llv-tiroir-ouvert .llv-menu { z-index: calc(var(--z-flottants) + 2); }
    .llv-app.llv-tiroir-ouvert .llv-voile-tiroir { z-index: calc(var(--z-flottants) + 1); }
}
/* Une liste ou un calendrier ouverts : le choix visé est marqué, la boîte n'a pas besoin de contour. */
.llv-liste:focus, .llv-liste:focus-visible, .llv-cal:focus, .llv-cal:focus-visible { outline: none; }

/* Le pied d'un champ sans aide, ni compteur, ni message : il ne prend pas de place. */
.llv-champ__pied:not(:has(.llv-champ__compteur, .llv-champ__aide, .llv-champ__erreur:not([hidden]), .llv-champ__avert:not([hidden]))) { display: none; }
[hidden] { display: none !important; }
