/* Espace parents CENIT Juniors : direction « Clarté » (refonte de novembre
   2026). D'abord pour le téléphone, sans outil de compilation : jetons,
   base, ossature (barre d'onglets, feuille du bouton +), composants, puis
   pages. Mode sombre standard (gris neutres, bleu adouci). Les noms des
   jetons et des classes d'avant sont gardés : la « vue parent » du
   backoffice (fiche d'inscription) se sert de cette feuille. */

/* ---------- Police de la marque (Fraunces, licence OFL : fonts/OFL.txt) ---------- */
@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url("/espace/fonts/fraunces-latin.woff2") format("woff2");
}

/* ---------- Jetons ---------- */
:root {
    color-scheme: light;

    --police: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --police-titre: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;

    --fond: #f2f3f7;
    --carte: #ffffff;
    --carte-2: #f6f7fa;
    --surface-2: #e9ebf0;
    --encre: #0b0d12;
    --encre-2: #3d4350;
    --doux: #646a77;
    --trait: rgba(12, 16, 24, .08);
    --trait-fort: rgba(12, 16, 24, .17);

    /* Couleur d'action : un bleu franc. */
    --accent: #2c5bff;
    --accent-fonce: #1e47e6;
    --accent-encre: #1d3fc4;
    --accent-pale: #e8eeff;
    --accent-clair: #c9d6ff;
    --marque: var(--accent);
    --marque-fonce: var(--accent-fonce);
    --marque-texte: #ffffff;
    --marque-pale: var(--accent-pale);
    --marque-clair: var(--accent-clair);
    --marque-encre: var(--accent-encre);
    --lien: #2449e0;
    --lien-fonce: var(--accent-encre);

    --succes: #067647;
    --succes-fond: #e1f5ea;
    --alerte: #a9480a;
    --alerte-fond: #fff1de;
    --danger: #c0262d;
    --danger-fond: #fdecec;
    --info: #1d3fc4;
    --info-fond: #e8eeff;
    --neutre: #4b5260;
    --neutre-fond: #eceef2;
    --whatsapp: #0e7466;
    --whatsapp-fond: #e1f4ee;
    --whatsapp-fonce: #0a5a4f;

    /* La carte « En direct » : un bleu plein, le seul aplat fort de l'espace. */
    --hero-fond: linear-gradient(155deg, #3c69ff 0%, #2046e6 100%);
    --hero-encre: #ffffff;
    --hero-doux: rgba(255, 255, 255, .82);
    --hero-trait: rgba(255, 255, 255, .24);
    --hero-bouton: rgba(255, 255, 255, .16);
    --hero-accent: #ffffff;
    --hero-accent-encre: #0b0d12;
    --hero-ombre: 0 24px 44px -26px rgba(44, 91, 255, .65);

    /* Jours de séance de la vue mois : un fond par état, comme les vacances. */
    --seance-prevue-fond: #e4d9ff;
    --seance-prevue-encre: #4f33b3;
    --seance-passee-fond: #ccefd8;
    --seance-passee-encre: #0c5e33;
    --seance-deplacee-fond: #ffd6a8;
    --seance-deplacee-encre: #8f3c00;
    --seance-annulee-fond: #ffdcdc;
    --seance-annulee-encre: #a8202a;

    /* Couleurs des enfants (avatars, points du planning). */
    --enfant-0: #2c5bff;
    --enfant-1: #e8590c;
    --enfant-2: #7048e8;
    --enfant-3: #0c8599;
    --enfant-4: #d6336c;
    --enfant-5: #2f9e44;
    --enfant-encre: #ffffff;

    --onglets-fond: rgba(255, 255, 255, .84);
    --onglets-trait: rgba(12, 16, 24, .07);
    --voile: rgba(10, 12, 18, .44);

    --ombre: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -18px rgba(16, 24, 40, .22);
    --ombre-haute: 0 18px 40px -20px rgba(16, 24, 40, .35);
    --ombre-bouton: 0 10px 20px -12px rgba(44, 91, 255, .7);
    --anneau: 0 0 0 4px rgba(44, 91, 255, .2);

    --rayon: 1.375rem;
    --rayon-moyen: 1rem;
    --rayon-petit: .875rem;
    --vite: 180ms cubic-bezier(.2, .7, .3, 1);
    --ressort: 320ms cubic-bezier(.2, .9, .25, 1.05);
    --entete-hauteur: 3.5rem;
    --page-largeur: 40rem;
    --onglets-hauteur: 4.5rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --fond: #111317;
        --carte: #1b1e24;
        --carte-2: #20242b;
        --surface-2: #2a2e36;
        --encre: #e8eaed;
        --encre-2: #c4c8cf;
        --doux: #9aa0a9;
        --trait: rgba(255, 255, 255, .08);
        --trait-fort: rgba(255, 255, 255, .17);

        /* Un bleu adouci, jamais fluorescent. */
        --accent: #8ab4f8;
        --accent-fonce: #a8c7fa;
        --accent-encre: #c2d7fb;
        --accent-pale: rgba(138, 180, 248, .14);
        --accent-clair: rgba(138, 180, 248, .32);
        --marque-texte: #0b1f3f;
        --lien: #8ab4f8;
        --lien-fonce: #a8c7fa;

        --succes: #6dd58c;
        --succes-fond: rgba(109, 213, 140, .13);
        --alerte: #f2b866;
        --alerte-fond: rgba(242, 184, 102, .13);
        --danger: #f28b82;
        --danger-fond: rgba(242, 139, 130, .14);
        --info: #8ab4f8;
        --info-fond: rgba(138, 180, 248, .14);
        --neutre: #c4c8cf;
        --neutre-fond: #2a2e36;
        --whatsapp: #5bd6a0;
        --whatsapp-fond: rgba(91, 214, 160, .12);
        --whatsapp-fonce: #7fe0b6;

        --hero-fond: #23272f;
        --hero-encre: #e8eaed;
        --hero-doux: #aeb4bd;
        --hero-trait: rgba(255, 255, 255, .1);
        --hero-bouton: rgba(255, 255, 255, .08);
        --hero-accent: #8ab4f8;
        --hero-accent-encre: #0b1f3f;
        --hero-ombre: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 40px -24px rgba(0, 0, 0, .8);

        --seance-prevue-fond: rgba(179, 157, 250, .22);
        --seance-prevue-encre: #d4c7ff;
        --seance-passee-fond: rgba(109, 213, 140, .2);
        --seance-passee-encre: #9be3b1;
        --seance-deplacee-fond: rgba(246, 160, 107, .28);
        --seance-deplacee-encre: #fbc39c;
        --seance-annulee-fond: rgba(242, 139, 130, .2);
        --seance-annulee-encre: #f7aca6;

        --enfant-0: #8ab4f8;
        --enfant-1: #f6a06b;
        --enfant-2: #b39dfa;
        --enfant-3: #5cc8d6;
        --enfant-4: #f48fb1;
        --enfant-5: #81c995;
        --enfant-encre: #111317;

        --onglets-fond: rgba(27, 30, 36, .88);
        --onglets-trait: rgba(255, 255, 255, .08);
        --voile: rgba(0, 0, 0, .6);

        --ombre: 0 0 0 1px rgba(255, 255, 255, .05), 0 12px 28px -20px rgba(0, 0, 0, .8);
        --ombre-haute: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 40px -20px rgba(0, 0, 0, .85);
        --ombre-bouton: none;
        --anneau: 0 0 0 4px rgba(138, 180, 248, .28);
    }
}

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

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

/* Passage d'une page à l'autre en fondu (navigateurs qui le savent), la barre d'onglets ne bouge pas. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--police);
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: -.011em;
    color: var(--encre);
    background: var(--fond);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
}
body.connecte { padding-bottom: calc(var(--onglets-hauteur) + 2.75rem + env(safe-area-inset-bottom)); }

a { color: var(--lien); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { color: var(--lien-fonce); }

h1, h2, h3 { line-height: 1.15; color: var(--encre); }
h1 {
    font-weight: 750;
    font-size: 2.125rem;
    letter-spacing: -.035em;
    margin: .25rem 0 1rem;
}
h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -.025em;
    margin: 2rem 0 .75rem;
}
h3 { font-size: 1.05rem; font-weight: 650; margin: 0 0 .25rem; letter-spacing: -.015em; }
p { margin: .35rem 0; }
strong { font-weight: 650; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: .35rem; }

.visuellement-cache {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Le lien d'évitement redevient visible quand il reçoit le focus (clavier). */
a.visuellement-cache:focus-visible {
    position: fixed;
    top: calc(.5rem + env(safe-area-inset-top, 0px));
    left: .5rem;
    z-index: 40;
    width: auto; height: auto;
    margin: 0;
    padding: .6rem 1rem;
    clip: auto;
    overflow: visible;
    background: var(--carte);
    color: var(--encre);
    font-weight: 650;
    border-radius: 999px;
    box-shadow: var(--ombre-haute);
    text-decoration: none;
}

/* Icônes au trait (Lucide) ; le logo WhatsApp porte ses propres couleurs. */
.icone { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -.3em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Marque : le sommet, en couleur courante. */
.marque-logo { display: inline-block; width: 1.9rem; height: auto; aspect-ratio: 120 / 88; fill: none; stroke: currentColor; stroke-linecap: square; flex: none; }
.marque-nom {
    font-family: var(--police-titre);
    font-weight: 500;
    font-variation-settings: "opsz" 36, "SOFT" 0;
    letter-spacing: .02em;
}

/* ---------- Ossature ---------- */
main {
    max-width: var(--page-largeur);
    margin: 0 auto;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left));
}

/* L'en-tête de marque (pages d'information hors connexion). */
.entete {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    height: calc(var(--entete-hauteur) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 1rem 0;
    background: color-mix(in srgb, var(--fond) 82%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
}
.entete + main { padding-top: 1rem; }
.entete a { color: inherit; text-decoration: none; }
.entete .marque { display: inline-flex; align-items: center; gap: .6rem; color: var(--encre); white-space: nowrap; font-size: 1.05rem; }
.entete .marque .marque-logo { width: 1.75rem; }
.entete .marque small { font-family: var(--police); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); margin-left: .1rem; }

/* L'en-tête d'une page : surtitre, grand titre, actions rondes à droite. */
.page-entete { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; margin: .5rem 0 1.25rem; }
.page-entete > div { min-width: 0; }
.page-entete h1 { margin: .2rem 0 0; }
.page-entete .surtitre { margin: 0; }
.page-entete .actions-rondes { display: flex; gap: .5rem; flex: none; }
.bouton-rond {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--carte);
    color: var(--encre);
    box-shadow: var(--ombre);
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: transform var(--vite);
}
.bouton-rond:hover { color: var(--encre); }
.bouton-rond:active { transform: scale(.94); }
.bouton-rond .icone { width: 1.25rem; height: 1.25rem; }
.bouton-rond .marque-logo { width: 1.55rem; }

/* Retour vers la page parente, comme dans une app. */
.retour {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    min-height: 2.75rem;
    margin: -.25rem 0 .25rem -.4rem;
    padding: 0 .6rem 0 .25rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--lien);
    text-decoration: none;
}
.retour .icone { width: 1.35rem; height: 1.35rem; stroke-width: 2.2; }
.retour:hover { background: var(--accent-pale); }

/* ---------- Barre d'onglets : quatre onglets et le bouton + ---------- */
.navigation {
    position: fixed;
    left: 50%;
    bottom: calc(.85rem + env(safe-area-inset-bottom));
    z-index: 30;
    display: flex;
    align-items: center;
    width: min(calc(100% - 1.75rem), 30rem);
    height: var(--onglets-hauteur);
    padding: 0 .35rem;
    transform: translateX(-50%);
    background: var(--onglets-fond);
    border: 1px solid var(--onglets-trait);
    border-radius: 1.875rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 18px 40px -18px rgba(16, 24, 40, .35);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    view-transition-name: navigation;
}
.navigation a {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .3rem 0;
    font-size: .69rem;
    font-weight: 600;
    letter-spacing: -.005em;
    color: var(--doux);
    text-decoration: none;
    white-space: nowrap;
}
.navigation .onglet-icone {
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 1.9rem;
    border-radius: 999px;
    transition: background var(--vite), transform var(--vite);
}
.navigation .onglet-icone .icone { width: 1.35rem; height: 1.35rem; stroke-width: 1.8; }
.navigation .onglet-libelle { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.navigation a:hover { color: var(--encre); }
.navigation a.actif { color: var(--accent-encre); font-weight: 700; }
.navigation a.actif .onglet-icone { background: var(--accent-pale); color: var(--accent); }
.navigation a.actif .onglet-icone .icone { stroke-width: 2.1; }
.navigation a:active .onglet-icone { transform: scale(.9); }
/* L'onglet Famille : l'initiale du parent. */
.navigation .initiale {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--encre-2);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: 0;
}
.navigation a.actif .initiale { background: var(--accent); color: var(--marque-texte); }
/* Le bouton + : prévenir l'équipe (retard, absence, rendez-vous, message). */
.navigation .plus {
    flex: 0 0 3.5rem;
    height: 3.5rem;
    margin: 0 .3rem;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--marque);
    color: var(--marque-texte);
    box-shadow: var(--ombre-bouton);
    transition: transform var(--ressort), background var(--vite);
}
.navigation .plus:hover { background: var(--marque-fonce); color: var(--marque-texte); }
.navigation .plus:active { transform: scale(.9); }
.navigation .plus .icone { width: 1.6rem; height: 1.6rem; stroke-width: 2.4; transition: transform var(--ressort); }
.navigation .plus[aria-current] .icone, html.feuille-ouverte .navigation .plus .icone { transform: rotate(45deg); }

/* ---------- Feuille du bas (bouton +, visionneuse) ---------- */
dialog.feuille-modale {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    max-width: 34rem;
    max-height: min(92dvh, 52rem);
    margin: 0 auto;
    padding: .6rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 2rem 2rem 0 0;
    background: var(--fond);
    color: var(--encre);
    box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, .45);
    overflow-y: auto;
    overscroll-behavior: contain;
}
dialog.feuille-modale[open] { animation: feuille-monte var(--ressort) backwards; }
dialog.feuille-modale::backdrop { background: var(--voile); animation: voile-apparait 200ms ease both; }
@keyframes feuille-monte { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes voile-apparait { from { opacity: 0; } to { opacity: 1; } }
.poignee { display: block; width: 2.5rem; height: .3rem; margin: 0 auto .9rem; border-radius: 999px; background: var(--trait-fort); }
.feuille-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: 0 .25rem; }
.feuille-entete h1, .feuille-entete h2 { margin: 0; font-size: 1.65rem; }
.feuille-entete p { margin: .3rem 0 0; color: var(--doux); font-size: .92rem; }
.feuille-entete .bouton-rond { width: 2.25rem; height: 2.25rem; box-shadow: none; background: var(--surface-2); color: var(--encre-2); }
.feuille-entete .bouton-rond .icone { width: 1.1rem; height: 1.1rem; }

/* ---------- Cartes ---------- */
.carte {
    position: relative;
    background: var(--carte);
    border-radius: var(--rayon);
    padding: 1rem 1.1rem;
    margin-bottom: .75rem;
    box-shadow: var(--ombre);
}
.carte > :first-child { margin-top: 0; }
.carte > :last-child { margin-bottom: 0; }
.carte h3 + .doux { margin-top: -.15rem; }
.carte h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.doux { color: var(--doux); font-size: .92rem; }
.carte .doux { margin-top: .15rem; }
.bloc { display: block; }

/* Carte cliquable : toute la surface, avec un chevron. */
a.carte, .carte.lien {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    color: inherit;
    text-decoration: none;
    padding-right: 2.4rem;
    transition: transform var(--vite), box-shadow var(--vite);
}
a.carte::after {
    content: "";
    position: absolute;
    right: 1.1rem;
    top: 50%;
    width: .5rem;
    height: .5rem;
    border-right: 2px solid var(--doux);
    border-bottom: 2px solid var(--doux);
    transform: translateY(-50%) rotate(-45deg);
    opacity: .6;
}
a.carte:hover { box-shadow: var(--ombre-haute); color: inherit; }
a.carte:active { transform: scale(.985); }
a.carte .pastille, a.carte > span:last-child { flex: none; }

/* Carte mise en avant (information clé). */
.carte.accent { background: linear-gradient(160deg, var(--accent-pale), var(--carte) 65%); }
.carte.annonce { box-shadow: inset 4px 0 0 var(--accent), var(--ombre); }

.ligne { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.ligne > :first-child { min-width: 0; }
.ligne h3 { margin: 0; }

/* Ligne de détail : icône, libellé discret, valeur. */
.detail { display: flex; align-items: flex-start; gap: .65rem; margin: .65rem 0 0; }
.detail .icone { width: 1.25rem; height: 1.25rem; margin-top: .15rem; color: var(--accent); }
.detail .libelle { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.detail .valeur { display: block; font-weight: 500; }
.detail .valeur .pastille { margin-left: .25rem; vertical-align: .05em; }

/* Lignes d'une carte, chacune menant à une section (icône, libellé, valeur, chevron). */
.lignes { list-style: none; margin: .5rem -1.1rem -1rem; padding: 0; }
.lignes li { border-top: 1px solid var(--trait); }
.lignes li > a, .lignes li > div { display: flex; align-items: center; gap: .8rem; padding: .75rem 1.1rem; color: inherit; text-decoration: none; }
.lignes li > a { padding-right: 2.4rem; position: relative; transition: background var(--vite); }
.lignes li > a::after { content: ""; position: absolute; right: 1.15rem; top: 50%; width: .5rem; height: .5rem; border-right: 2px solid var(--doux); border-bottom: 2px solid var(--doux); transform: translateY(-50%) rotate(-45deg); opacity: .6; }
.lignes li > a:hover { background: var(--carte-2); color: inherit; }
.lignes .puce { display: inline-grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: .8rem; background: var(--accent-pale); color: var(--accent); flex: none; }
.lignes .puce .icone { width: 1.2rem; height: 1.2rem; }
.lignes .texte { flex: 1; min-width: 0; }
.lignes .libelle { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.lignes .valeur { display: block; font-weight: 500; }

/* Identité : avatar et nom. */
.identite { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
a.identite { color: inherit; text-decoration: none; padding-right: 1.5rem; position: relative; }
a.identite::after { content: ""; position: absolute; right: .25rem; top: 50%; width: .5rem; height: .5rem; border-right: 2px solid var(--doux); border-bottom: 2px solid var(--doux); transform: translateY(-50%) rotate(-45deg); opacity: .6; }
.identite h2, .identite h3 { margin: 0; font-size: 1.15rem; font-weight: 650; letter-spacing: -.015em; color: var(--encre); }
.identite .doux { margin: 0; }

/* Avatar : photo de l'enfant, ou son initiale sur sa couleur. */
.avatar {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    flex: none;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0;
    color: var(--accent-encre);
    background: var(--accent-pale);
}
.avatar .icone { width: 1.3rem; height: 1.3rem; color: var(--accent); }
img.avatar { object-fit: cover; background: var(--surface-2); }
.avatar.teinte-0 { background: var(--enfant-0); color: var(--enfant-encre); }
.avatar.teinte-1 { background: var(--enfant-1); color: var(--enfant-encre); }
.avatar.teinte-2 { background: var(--enfant-2); color: var(--enfant-encre); }
.avatar.teinte-3 { background: var(--enfant-3); color: var(--enfant-encre); }
.avatar.teinte-4 { background: var(--enfant-4); color: var(--enfant-encre); }
.avatar.teinte-5 { background: var(--enfant-5); color: var(--enfant-encre); }
.avatar.petit { width: 2.1rem; height: 2.1rem; font-size: .9rem; }
.avatar.mini { width: 1.5rem; height: 1.5rem; font-size: .7rem; }
.point-enfant { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; flex: none; background: var(--accent); }
.point-enfant.teinte-0 { background: var(--enfant-0); }
.point-enfant.teinte-1 { background: var(--enfant-1); }
.point-enfant.teinte-2 { background: var(--enfant-2); }
.point-enfant.teinte-3 { background: var(--enfant-3); }
.point-enfant.teinte-4 { background: var(--enfant-4); }
.point-enfant.teinte-5 { background: var(--enfant-5); }

/* Bloc de date : jour en gros, mois en dessous. */
.date-bloc {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: var(--rayon-petit);
    background: var(--surface-2);
    color: var(--encre);
    line-height: 1.05;
}
.date-bloc .jour { font-size: 1.2rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.date-bloc .mois { margin-top: .1rem; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--doux); }
.date-bloc.passe { opacity: .7; }

/* Jauge (financier, séance en cours). */
.jauge { height: .5rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: .6rem 0 .4rem; }
.jauge > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 600ms cubic-bezier(.2, .7, .3, 1); }
.chiffres { display: flex; justify-content: space-between; gap: .75rem; font-size: .9rem; color: var(--doux); }
.chiffres strong { color: var(--encre); font-size: 1rem; font-variant-numeric: tabular-nums; }
.total { font-size: 2rem; font-weight: 750; letter-spacing: -.035em; margin: .25rem 0 0; font-variant-numeric: tabular-nums; }
.total small { font-size: .9rem; font-weight: 500; color: var(--doux); letter-spacing: -.01em; }

/* Liste d'échéances. */
.echeances { list-style: none; margin: .75rem 0 0; padding: 0; }
.echeances li { padding: .75rem 0; border-top: 1px solid var(--trait); }
.echeances .ligne { align-items: center; }
.echeances .ligne + .ligne { margin-top: .35rem; }
.echeances .montant { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.echeances .detail, .echeances .qui { font-size: .84rem; text-align: right; }
.echeances li.reglee { color: var(--doux); }
.echeances li.reglee .montant { font-weight: 500; }
.sous-titre { margin: 1.75rem 0 .6rem; }

/* ---------- Pastilles et messages ---------- */
.pastille {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .65rem .2rem .55rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: 0;
    background: var(--neutre-fond);
    color: var(--neutre);
    white-space: nowrap;
}
.pastille::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; opacity: .9; flex: none; }
.pastille.success { background: var(--succes-fond); color: var(--succes); }
.pastille.warning { background: var(--alerte-fond); color: var(--alerte); }
.pastille.danger { background: var(--danger-fond); color: var(--danger); }
.pastille.info, .pastille.primary { background: var(--info-fond); color: var(--info); }
.pastille.secondary { background: var(--neutre-fond); color: var(--neutre); }
.pastille.sans-point::before { display: none; }
/* Pastille « en direct » : un point qui respire. */
.pastille.direct::before { animation: respire 1.8s ease-out infinite; }
@keyframes respire { 0% { box-shadow: 0 0 0 0 currentColor; } 80%, 100% { box-shadow: 0 0 0 .35rem transparent; } }

.message {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    border-radius: var(--rayon-moyen);
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    font-weight: 550;
    text-decoration: none;
    background: var(--neutre-fond);
    color: var(--encre);
}
.message.success { background: var(--succes-fond); color: var(--succes); }
.message.danger { background: var(--danger-fond); color: var(--danger); }
.message.warning { background: var(--alerte-fond); color: var(--alerte); }
.message.info { background: var(--info-fond); color: var(--info); }
a.message:hover { filter: brightness(.98); }
a.message { align-items: center; padding-right: 2.2rem; position: relative; }
a.message::after { content: ""; position: absolute; right: 1rem; top: 50%; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-50%) rotate(-45deg); opacity: .7; }
a.message .icone { width: 1.3rem; height: 1.3rem; }
/* Les messages de la page apparaissent en douceur. */
main > .message { animation: message-arrive 300ms ease both; }
@keyframes message-arrive { from { opacity: 0; transform: translateY(-.35rem); } to { opacity: 1; transform: none; } }

/* État vide. */
.vide {
    text-align: center;
    color: var(--doux);
    padding: 1.75rem 1rem;
    border: 1px dashed var(--trait-fort);
    border-radius: var(--rayon);
    margin: .5rem 0 .75rem;
}
.vide .icone { width: 2rem; height: 2rem; display: block; margin: 0 auto .5rem; stroke-width: 1.5; opacity: .7; }

/* ---------- Formulaires ---------- */
label { display: block; font-weight: 600; font-size: .92rem; margin: .9rem 0 .35rem; color: var(--encre-2); }
.aide { display: block; color: var(--doux); font-size: .86rem; font-weight: 400; margin-top: .35rem; line-height: 1.4; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date],
input[type=datetime-local], input[type=number], input[type=url], input[type=search], select, textarea {
    width: 100%;
    min-height: 3.25rem;
    font: inherit;
    font-size: max(1rem, 16px); /* évite le zoom automatique sur iPhone */
    color: var(--encre);
    padding: .65rem 1rem;
    border: 1px solid var(--trait-fort);
    border-radius: var(--rayon-moyen);
    background: var(--carte);
    transition: border-color var(--vite), box-shadow var(--vite);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--anneau); }
input[readonly] { background: var(--carte-2); color: var(--doux); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; }
textarea { min-height: 7rem; resize: vertical; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--doux) 50%), linear-gradient(135deg, var(--doux) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 50%, calc(100% - .8rem) 50%; background-size: .38rem .38rem; background-repeat: no-repeat; padding-right: 2.3rem; }
input[type=checkbox], input[type=radio] { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); margin: 0; flex: none; }
input[type=file] { width: 100%; font: inherit; padding: .5rem 0; color: var(--encre-2); }
input[type=file]::file-selector-button {
    font: inherit; font-weight: 600; font-size: .9rem;
    padding: .5rem .9rem; margin-right: .75rem;
    border: 0; border-radius: 999px;
    background: var(--surface-2); color: var(--encre); cursor: pointer;
}
.champ-icone { position: relative; }
.champ-icone .icone { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--doux); width: 1.2rem; height: 1.2rem; pointer-events: none; }
.champ-icone input { padding-left: 2.8rem; }
.champ { margin-bottom: .35rem; }
.erreur { display: block; color: var(--danger); font-size: .86rem; font-weight: 550; margin-top: .35rem; }
.champ:has(.erreur) input, .champ:has(.erreur) select, .champ:has(.erreur) textarea { border-color: var(--danger); }

.choix { display: flex; gap: .5rem 1rem; flex-wrap: wrap; font-weight: 400; }
.choix label { display: flex; align-items: center; gap: .6rem; font-weight: 500; margin: .25rem 0; min-height: 2.25rem; color: var(--encre); }
.choix.liste { flex-direction: column; gap: .5rem; }
.choix.liste label {
    align-items: flex-start;
    border: 1px solid var(--trait);
    border-radius: var(--rayon-moyen);
    padding: .8rem .9rem;
    margin: 0;
    background: var(--carte);
    transition: border-color var(--vite), background var(--vite);
}
.choix.liste label:hover { border-color: var(--trait-fort); }
.choix.liste label:has(input:checked) { border-color: var(--accent); background: var(--accent-pale); }
.choix.liste input { margin-top: .2rem; }
.collection-ligne { border: 1px dashed var(--trait-fort); border-radius: var(--rayon-moyen); padding: .25rem .9rem .8rem; margin-bottom: .6rem; background: var(--carte-2); }
.collection-ligne label { font-weight: 500; margin-top: .5rem; }

/* ---------- Boutons ---------- */
.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 3.25rem;
    font: inherit;
    font-weight: 650;
    letter-spacing: -.01em;
    padding: .65rem 1.3rem;
    border-radius: 1rem;
    border: 0;
    background: var(--marque);
    color: var(--marque-texte);
    text-decoration: none;
    cursor: pointer;
    margin-top: 1rem;
    box-shadow: var(--ombre-bouton);
    transition: background var(--vite), transform var(--vite), box-shadow var(--vite);
}
.bouton:hover { background: var(--marque-fonce); color: var(--marque-texte); }
.bouton:active { transform: scale(.97); box-shadow: none; }
.bouton:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.bouton.secondaire { background: var(--carte); color: var(--encre); box-shadow: inset 0 0 0 1px var(--trait-fort); }
.bouton.secondaire:hover { background: var(--carte-2); color: var(--encre); }
.bouton.tonal { background: var(--accent-pale); color: var(--accent-encre); box-shadow: none; }
.bouton.tonal:hover { background: var(--accent-clair); color: var(--accent-encre); }
.bouton.large { width: 100%; }
.bouton.petit { min-height: 2.5rem; padding: .4rem .95rem; font-size: .9rem; margin-top: .35rem; border-radius: .8rem; }
.bouton.whatsapp { background: var(--whatsapp-fond); color: var(--whatsapp); box-shadow: none; }
.bouton.whatsapp:hover { background: var(--whatsapp-fond); color: var(--whatsapp-fonce); }

.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.actions .bouton { margin-top: 0; }

/* Grille d'actions (demandes). */
.actions-demandes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .6rem; margin: .75rem 0 1rem; }
.actions-demandes .bouton { flex-direction: column; gap: .4rem; margin-top: 0; text-align: center; padding: .9rem .75rem; border-radius: var(--rayon-moyen); font-size: .92rem; line-height: 1.3; }
.actions-demandes .bouton .icone { width: 1.5rem; height: 1.5rem; stroke-width: 1.6; }

/* ---------- Choix de l'enfant (fratries) ---------- */
.onglets {
    display: flex;
    gap: .25rem;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    margin: 0 0 1.1rem;
    padding: .25rem;
    border-radius: 999px;
    background: var(--surface-2);
    scrollbar-width: none;
}
.onglets::-webkit-scrollbar { display: none; }
.onglets a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.5rem;
    padding: .25rem 1rem .25rem .3rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    color: var(--doux);
    white-space: nowrap;
    transition: background var(--vite), color var(--vite), box-shadow var(--vite);
}
.onglets a .avatar { width: 1.9rem; height: 1.9rem; font-size: .82rem; }
.onglets a:hover { color: var(--encre); }
.onglets a.actif { background: var(--carte); color: var(--encre); box-shadow: var(--ombre); }

/* Segments (affichage liste ou mois). */
.segments { display: inline-flex; padding: .2rem; border-radius: .85rem; background: var(--surface-2); margin: 0 0 1rem; }
.segments a { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.25rem; padding: .3rem .95rem; border-radius: .65rem; font-size: .9rem; font-weight: 600; color: var(--doux); text-decoration: none; transition: background var(--vite), color var(--vite); }
.segments a.actif { background: var(--carte); color: var(--encre); box-shadow: var(--ombre); }
.segments .icone { width: 1.05rem; height: 1.05rem; }

/* ---------- Tableaux ---------- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .6rem .35rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
td.montant, th.montant { text-align: right; white-space: nowrap; }

/* ---------- Listes de réglages (Famille, suivi d'un enfant) ---------- */
.menu-liste { list-style: none; margin: 0 0 1rem; padding: 0; background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
/* Séparateurs décalés après l'icône, comme les réglages d'un téléphone. */
.menu-liste li + li { position: relative; }
.menu-liste li + li::before { content: ""; position: absolute; top: 0; left: 4rem; right: 0; height: 1px; background: var(--trait); }
.menu-liste a { display: flex; align-items: center; gap: .85rem; min-height: 3.5rem; padding: .7rem 2.4rem .7rem 1.1rem; color: var(--encre); text-decoration: none; font-weight: 550; position: relative; transition: background var(--vite); }
.menu-liste a::after { content: ""; position: absolute; right: 1.15rem; top: 50%; width: .5rem; height: .5rem; border-right: 2px solid var(--doux); border-bottom: 2px solid var(--doux); transform: translateY(-50%) rotate(-45deg); opacity: .55; }
.menu-liste a:hover { background: var(--carte-2); color: var(--encre); }
.menu-liste .puce { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; background: var(--accent); color: #fff; flex: none; }
.menu-liste .puce .icone { width: 1.1rem; height: 1.1rem; stroke-width: 2; }
.menu-liste .puce.neutre { background: var(--surface-2); color: var(--encre-2); }
.menu-liste .puce.vert { background: #12a150; color: #fff; }
.menu-liste .puce.orange { background: #f08c00; color: #fff; }
.menu-liste .puce.violet { background: #7048e8; color: #fff; }
.menu-liste .puce.rose { background: #e64980; color: #fff; }
.menu-liste .puce.gris { background: #6b7280; color: #fff; }
.menu-liste .puce.bleu-ciel { background: #1c7ed6; color: #fff; }
.menu-liste .texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.menu-liste .texte small { font-size: .84rem; font-weight: 450; color: var(--doux); }
.menu-liste .doux { margin-left: auto; margin-right: .25rem; font-size: .88rem; }
.menu-liste .pastille { margin-left: auto; }
.menu-liste .identite { margin: 0; padding: .7rem 2.4rem .7rem 1.1rem; }

/* Bouton de déconnexion : une ligne rouge, bien visible. */
.bouton.deconnexion { margin: .5rem 0 1.5rem; background: var(--carte); color: var(--danger); box-shadow: var(--ombre); }
.bouton.deconnexion:hover { background: var(--danger-fond); color: var(--danger); }

/* ---------- Aujourd'hui ---------- */
.salut { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; margin: .5rem 0 1rem; }
.salut > div { min-width: 0; }
.salut .date { margin: 0; font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); }
.salut h1 { margin: .2rem 0 0; font-size: 2.125rem; }
.salut .marque-ronde .marque-logo { width: 1.6rem; color: var(--encre); }

/* L'état de la famille : échéancier, documents. */
.etat-famille { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.etat-famille .etat { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.25rem; padding: .25rem .85rem; border-radius: 999px; background: var(--carte); box-shadow: var(--ombre); font-size: .86rem; font-weight: 650; text-decoration: none; }
.etat-famille .etat .icone { width: 1rem; height: 1rem; stroke-width: 2.4; }
.etat-famille .etat.ok { color: var(--succes); }
.etat-famille .etat.attention { color: var(--alerte); background: var(--alerte-fond); box-shadow: none; }

/* Stories : un rond par enfant, l'atelier, le centre ; anneau bleu tant que c'est nouveau. */
.stories { display: flex; gap: .9rem; overflow-x: auto; margin: 0 -1rem 1.1rem; padding: .15rem 1rem .25rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 4.3rem; text-decoration: none; color: var(--doux); font-size: .78rem; font-weight: 550; scroll-snap-align: start; }
.story.nouveau { color: var(--encre); font-weight: 650; }
.story .anneau { display: grid; place-items: center; width: 4.1rem; height: 4.1rem; border-radius: 50%; padding: 2.5px; background: var(--trait-fort); transition: transform var(--vite); }
.story.nouveau .anneau { background: var(--accent); }
.story .anneau > * { width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid var(--fond); }
.story .avatar { font-size: 1.35rem; object-fit: cover; }
.story .marque-ronde { display: grid; place-items: center; background: var(--carte); color: var(--encre); }
.story .marque-ronde .marque-logo { width: 1.8rem; }
.story .libelle { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story:active .anneau { transform: scale(.94); }
/* Le cercle + (lot 35) : pré-inscrire un frère ou une sœur. */
.story.ajouter { color: var(--accent-encre); font-weight: 650; }
.story.ajouter .anneau { background: transparent; border: 2px dashed var(--accent-clair); padding: 2.5px; }
.story.ajouter .anneau > * { border: 0; }
.story .ajouter-rond { display: grid; place-items: center; background: var(--accent-pale); color: var(--accent); }
.story .ajouter-rond .icone { width: 1.6rem; height: 1.6rem; stroke-width: 2.2; }

/* « En direct » : la carte bleue du jour de séance. */
.direct {
    margin: 0 0 1rem;
    padding: 1.1rem 1rem 1rem;
    border-radius: var(--rayon);
    background: var(--hero-fond);
    color: var(--hero-encre);
    box-shadow: var(--hero-ombre);
}
.direct-titre { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0; font-size: .76rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--hero-encre); }
.direct-titre .lieu { font-size: .84rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--hero-doux); }
.point-direct { position: relative; display: inline-block; width: .55rem; height: .55rem; margin-right: .45rem; border-radius: 50%; background: var(--hero-accent); vertical-align: .05em; }
.point-direct::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--hero-accent); animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
.direct-enfant { padding: .9rem 0 0; }
.direct-enfant + .direct-enfant { margin-top: .9rem; border-top: 1px solid var(--hero-trait); }
.direct-entete { display: flex; align-items: center; gap: .85rem; }
.direct-entete > div { min-width: 0; }
.direct-entete .avatar { width: 3.1rem; height: 3.1rem; font-size: 1.3rem; box-shadow: 0 0 0 3px var(--hero-trait); }
.direct-entete strong { display: block; font-size: 1.3rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.direct-entete .doux { display: block; font-size: .88rem; color: var(--hero-doux); }
.direct .doux { color: var(--hero-doux); }
.direct-absent { margin: .75rem 0 0; }
.direct .pastille { background: var(--hero-bouton); color: var(--hero-encre); }
.direct-jauge { margin: 1rem 0 0; }
.direct-jauge .jauge { height: .5rem; margin: 0; background: var(--hero-trait); }
.direct-jauge .jauge > span { background: var(--hero-accent); }
.direct-jauge .bornes { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .82rem; color: var(--hero-doux); font-variant-numeric: tabular-nums; }
.direct-jauge .bornes strong { color: var(--hero-encre); font-weight: 650; }
/* Le fil : arrivée, atelier, sortie. */
.fil { list-style: none; margin: .9rem 0 0; padding: .85rem 0 0; border-top: 1px solid var(--hero-trait); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.fil li { display: flex; gap: .5rem; align-items: flex-start; min-width: 0; }
.fil .point { flex: none; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 2px dashed var(--hero-trait); }
.fil li.fait .point { border: 0; background: var(--hero-accent); color: var(--hero-accent-encre); }
.fil li.fait .point::after { content: ""; width: .5rem; height: .28rem; margin-top: -.12rem; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg); }
.fil li.en-cours .point { border: 2px solid var(--hero-accent); }
.fil li.en-cours .point::after { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--hero-accent); }
.fil li > div { flex: 1; min-width: 0; }
.fil strong { display: block; font-size: .86rem; font-weight: 650; line-height: 1.25; }
.fil small { display: block; font-size: .8rem; line-height: 1.3; color: var(--hero-doux); }
.fil li.a-venir strong { color: var(--hero-doux); }
.fil .jauge { display: none; }
.fil .icone.ok { width: .95rem; height: .95rem; vertical-align: -.15rem; }
.direct-personnes { margin: .85rem 0 0; font-size: .84rem; color: var(--hero-doux); }
.direct-personnes strong { color: var(--hero-encre); font-weight: 600; }
.direct-message { display: flex; gap: .5rem; align-items: flex-start; margin: .75rem 0 0; padding: .6rem .75rem; border-radius: .85rem; background: var(--hero-bouton); font-size: .88rem; }
.direct-message .icone { flex: none; width: 1rem; height: 1rem; margin-top: .15rem; }
.direct-enfant .actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .9rem; }
.direct-enfant .actions .bouton { min-height: 2.75rem; margin: 0; padding: .4rem .6rem; border-radius: .85rem; background: var(--hero-bouton); color: var(--hero-encre); box-shadow: none; font-size: .86rem; white-space: nowrap; }
.direct-enfant .actions .bouton:hover { background: var(--hero-trait); }
.direct-enfant .actions .bouton .icone { width: 1.05rem; height: 1.05rem; }

/* L'atelier en images : photos et vidéos des groupes. */
.section-entete { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin: 1.75rem 0 .75rem; }
.section-entete h2 { margin: 0; }
.section-entete a { font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.medias { display: flex; gap: .6rem; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem .4rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.medias::-webkit-scrollbar { display: none; }
.media {
    position: relative;
    flex: 0 0 auto;
    display: block;
    width: 9.5rem;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--rayon-moyen);
    background: var(--surface-2);
    scroll-snap-align: start;
    box-shadow: var(--ombre);
    transition: transform var(--vite);
}
.media:first-child { width: 13rem; }
.media:active { transform: scale(.97); }
.media img, .media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.media .lecture { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35)); }
.media .lecture .icone { width: 2.75rem; height: 2.75rem; padding: .7rem .6rem .7rem .8rem; border-radius: 50%; background: rgba(0, 0, 0, .45); fill: currentColor; stroke: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.media .legende-media { position: absolute; left: .6rem; right: .6rem; bottom: .55rem; color: #fff; font-size: .76rem; font-weight: 650; line-height: 1.25; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.media .legende-media small { display: block; font-weight: 500; opacity: .85; }
/* Sans photo ni vidéo : l'étape du moment de chaque enfant (une carte par étape). */
.etape-moment { display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem; color: inherit; text-decoration: none; }
.etape-moment .etape-vignette { flex: none; width: 4.5rem; height: 4.5rem; border-radius: 1.1rem; box-shadow: 0 0 0 2.5px var(--carte), 0 0 0 4.5px var(--accent-clair); }
.etape-moment.franchie .etape-vignette { box-shadow: 0 0 0 2.5px var(--carte), 0 0 0 4.5px var(--accent); }
a.carte.etape-moment { justify-content: flex-start; }
a.carte.etape-moment > .texte { display: flex; flex: 1 1 auto; flex-direction: column; gap: .2rem; min-width: 0; }
.etape-moment .surtitre { color: var(--accent-encre); }
.etape-moment strong { font-size: 1.02rem; line-height: 1.3; color: var(--encre); }
.etape-moment small { color: var(--doux); font-size: .86rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.medias-vide { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; border-radius: var(--rayon); background: var(--carte); box-shadow: var(--ombre); color: var(--doux); font-size: .92rem; }
.medias-vide .icone { width: 1.6rem; height: 1.6rem; color: var(--accent); }

/* La visionneuse des photos et vidéos. */
dialog.visionneuse {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #000;
    color: #fff;
}
dialog.visionneuse[open] { display: flex; flex-direction: column; animation: voile-apparait 200ms ease both; }
dialog.visionneuse::backdrop { background: #000; }
.visionneuse-haut { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: calc(.5rem + env(safe-area-inset-top, 0px)) .75rem .5rem 1rem; }
.visionneuse-haut p { margin: 0; font-size: .9rem; font-weight: 600; }
.visionneuse-haut small { display: block; font-weight: 450; opacity: .7; }
.visionneuse button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.visionneuse button .icone { width: 1.3rem; height: 1.3rem; }
.visionneuse-scene { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; touch-action: pan-y; }
.visionneuse-scene img, .visionneuse-scene video { max-width: 100%; max-height: 100%; object-fit: contain; }
.visionneuse-scene .precedent, .visionneuse-scene .suivant { position: absolute; top: 50%; transform: translateY(-50%); }
.visionneuse-scene .precedent { left: .75rem; }
.visionneuse-scene .suivant { right: .75rem; }
.visionneuse-bas { padding: .5rem 1rem calc(.75rem + env(safe-area-inset-bottom)); text-align: center; font-size: .8rem; opacity: .7; }
/* Partager ou enregistrer un média de l'album de la famille (demande du 25/11/2026). */
.visionneuse-partage { display: flex; justify-content: center; gap: .6rem; padding: .5rem 1rem 0; }
.visionneuse-partage[hidden] { display: none; }
.visionneuse .bouton-partage { display: inline-flex; align-items: center; gap: .45rem; width: auto; height: 2.75rem; padding: 0 1.1rem; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.visionneuse .bouton-partage:disabled { opacity: .6; cursor: wait; }
.visionneuse .bouton-partage .icone { width: 1.15rem; height: 1.15rem; }

/* L'icône de partage sur la vignette d'un média de l'album de la famille. */
.partager-vignette {
    position: absolute;
    right: .35rem;
    bottom: .35rem;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    -webkit-tap-highlight-color: transparent;
    transition: transform var(--vite), background-color var(--vite);
}
.partager-vignette .icone { width: 1.05rem; height: 1.05rem; }
.partager-vignette:active { transform: scale(.9); }
.partager-vignette:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.partager-vignette.en-cours, .visionneuse .bouton-partage.en-cours { animation: partage-attente 900ms ease-in-out infinite alternate; }
.partager-vignette.pret { background: var(--accent); color: var(--marque-texte); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); }
.visionneuse .bouton-partage.pret { background: #fff; color: #000; }
@keyframes partage-attente { to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .partager-vignette.en-cours, .visionneuse .bouton-partage.en-cours { animation: none; opacity: .6; } }
/* La légende de la première vignette de l'accueil laisse la place à l'icône. */
.media .legende-media:has(~ .partager-vignette) { right: 3rem; }

/* Les enfants d'un album de famille : un filtre par prénom. */
.filtres-enfants { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.filtres-enfants a { padding: .45rem .95rem; border-radius: 999px; background: var(--carte); box-shadow: var(--ombre); color: var(--encre); font-size: .9rem; font-weight: 600; text-decoration: none; }
.filtres-enfants a[aria-current] { background: var(--accent); color: var(--marque-texte); box-shadow: none; }

/* Le mot du formateur. */
.souvenir { padding: 0; overflow: hidden; }
.souvenir-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.souvenir-corps { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .75rem; }
.souvenir-corps.avec-vignette { flex-direction: row; align-items: flex-start; gap: .9rem; }
.souvenir-corps.avec-vignette > div { min-width: 0; display: flex; flex-direction: column; gap: .7rem; }
.surtitre { margin: 0; font-size: .76rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--doux); }
.citation { margin: 0; font-size: 1.15rem; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; color: var(--encre); }
.signature { margin: 0; display: flex; align-items: center; gap: .6rem; }
.signature > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.signature small { color: var(--doux); }
.souvenir .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.souvenir .actions form { display: contents; }
.souvenir .actions .bouton { flex: 1 1 auto; margin: 0; white-space: nowrap; min-height: 2.75rem; }
.bouton.merci { background: var(--accent-pale); color: var(--accent-encre); box-shadow: none; }
.bouton.merci:hover { background: var(--accent-clair); color: var(--accent-encre); }
.bouton.merci .icone { width: 1.15rem; height: 1.15rem; }
.bouton.merci.envoye { background: var(--succes-fond); color: var(--succes); cursor: default; }

/* Le prochain rendez-vous. */
.rendez-vous, a.rendez-vous { display: flex; align-items: center; justify-content: flex-start; gap: .9rem; text-decoration: none; color: var(--encre); }
.rendez-vous .texte { display: flex; flex-direction: column; min-width: 0; }
.rendez-vous .texte strong { font-size: 1.05rem; }
.rendez-vous .date-bloc { background: var(--accent-pale); color: var(--accent-encre); }
.rendez-vous .date-bloc .mois { color: var(--accent); }

/* Les enfants, en lignes. */
.enfants-liste li { padding: 0; }
.enfants-liste .identite { margin: 0; padding-top: .8rem; padding-bottom: .8rem; }
.enfants-liste .identite .texte { display: flex; flex-direction: column; min-width: 0; }
.enfants-liste .identite small { color: var(--doux); font-weight: 450; font-size: .86rem; }
.enfants-liste .suivi { padding: 0 1.1rem .9rem; }

/* Les annonces, en cartes qui défilent. */
.annonces-cartes { display: flex; gap: .75rem; overflow-x: auto; margin: 0 -1rem; padding: .15rem 1rem .6rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.annonces-cartes::-webkit-scrollbar { display: none; }
.annonce-carte, a.annonce-carte { flex: 0 0 min(17.5rem, 82%); scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin: 0; text-decoration: none; color: var(--encre); }
a.annonce-carte { padding-right: 1.1rem; }
a.annonce-carte::after { display: none; }
.annonce-carte strong { font-size: 1.05rem; line-height: 1.3; }
.annonce-carte .doux { font-size: .9rem; line-height: 1.45; }

/* Carte « installer l'application ». */
.installer { display: flex; gap: .85rem; align-items: flex-start; background: linear-gradient(160deg, var(--accent-pale), var(--carte) 70%); }
.installer .puce { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .9rem; background: var(--accent); color: var(--marque-texte); flex: none; }
.installer .puce .icone { width: 1.4rem; height: 1.4rem; }
.installer .texte { flex: 1; min-width: 0; }
.installer h3 { margin: 0; }
.installer .actions { margin-top: .6rem; gap: .4rem; }
@media (display-mode: standalone) { .installer, .lien-installer { display: none !important; } }
html.installee .installer, html.installee .lien-installer, html.app-native .installer, html.app-native .lien-installer { display: none !important; }

/* ---------- Prévenir l'équipe (bouton +) ---------- */
.prevenir-enfants { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem; margin: 1.1rem 0 0; }
.prevenir-enfants a {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 3.6rem;
    padding: .55rem .75rem;
    border-radius: var(--rayon-moyen);
    background: var(--carte);
    border: 2px solid transparent;
    color: var(--encre);
    text-decoration: none;
    box-shadow: var(--ombre);
}
.prevenir-enfants a[aria-current] { border-color: var(--accent); box-shadow: none; }
.prevenir-enfants a .texte { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.prevenir-enfants a strong { font-size: .98rem; }
.prevenir-enfants a small { font-size: .8rem; line-height: 1.3; color: var(--doux); }
.prevenir-groupe { margin: 1.25rem .25rem .5rem; }
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tuile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: .9rem;
    min-height: 7rem;
    padding: .9rem;
    border-radius: var(--rayon-moyen);
    background: var(--carte);
    color: var(--encre);
    text-decoration: none;
    box-shadow: var(--ombre);
    font-weight: 650;
    line-height: 1.25;
    transition: transform var(--vite);
}
.tuile:hover { color: var(--encre); }
.tuile:active { transform: scale(.97); }
.tuile .puce { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: var(--accent-pale); color: var(--accent); }
.tuile .puce .icone { width: 1.3rem; height: 1.3rem; stroke-width: 2; }
.tuile small { display: block; margin-top: .15rem; font-size: .8rem; font-weight: 500; color: var(--doux); }
.lien-whatsapp { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3.25rem; margin-top: .6rem; border-radius: var(--rayon-moyen); background: var(--whatsapp-fond); color: var(--whatsapp); font-weight: 650; text-decoration: none; }
.lien-whatsapp:hover { color: var(--whatsapp-fonce); }
.lien-whatsapp .icone { width: 1.5rem; height: 1.5rem; }

/* ---------- Planning ---------- */
.semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .2rem; margin: 0 -.25rem 1rem; }
.semaine .jour-semaine {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .55rem 0 .45rem;
    border-radius: 1rem;
    color: var(--encre);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}
.semaine .jour-semaine .initiale-jour { font-size: .72rem; font-weight: 650; color: var(--doux); text-transform: uppercase; }
.semaine .jour-semaine .numero { font-size: 1.05rem; font-weight: 650; }
.semaine .jour-semaine .points { display: flex; gap: .2rem; height: .35rem; }
.semaine .jour-semaine .points span { width: .35rem; height: .35rem; border-radius: 50%; background: var(--accent); }
.semaine .jour-semaine .points span.ferme { background: var(--alerte); }
.semaine a.jour-semaine:hover { background: var(--carte); }
.semaine .jour-semaine.aujourdhui { background: var(--marque); color: var(--marque-texte); box-shadow: var(--ombre-bouton); }
.semaine .jour-semaine.aujourdhui .initiale-jour { color: inherit; opacity: .85; }
.semaine .jour-semaine.aujourdhui .points span { background: currentColor; }
.semaine .jour-semaine.ferme .numero { text-decoration: line-through; color: var(--doux); }
.jour-agenda { margin: 1.4rem .25rem .55rem; font-size: .78rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--doux); scroll-margin-top: 1rem; }
.jour-agenda.aujourdhui { color: var(--accent-encre); }

.seance { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); gap: .75rem; align-items: start; }
.seance .heures { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; }
.seance .heures strong { font-size: 1rem; }
.seance .heures span { font-size: .84rem; color: var(--doux); }
.seance .date-bloc { width: 3.4rem; }
.seance .contenu { min-width: 0; }
.seance .contenu strong { display: block; }
.seance .contenu .pastille { margin-top: .35rem; }
@media (max-width: 30rem) { .seance .ligne { flex-direction: column; align-items: flex-start; gap: .1rem; } }
.seance .actions { margin: .6rem 0 0; font-size: .92rem; }
.seance .actions a { font-weight: 600; text-decoration: none; }
.evenement { display: flex; align-items: center; gap: .85rem; }
.evenement .ligne { flex: 1; align-items: center; }

.mois-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .6rem; }
.mois-nav h2 { margin: 0; font-size: 1.15rem; }
.mois-nav .bouton { margin: 0; min-height: 2.5rem; width: 2.5rem; padding: 0; border-radius: 50%; }
.grille-mois { display: grid; grid-template-columns: repeat(7, 1fr); gap: .2rem; background: var(--carte); border-radius: var(--rayon); padding: .7rem .45rem .55rem; box-shadow: var(--ombre); }
.grille-mois .entetes { display: contents; }
.grille-mois .entetes span { text-align: center; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--doux); padding-bottom: .3rem; }
.grille-mois .jour { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 3.1rem; padding: .25rem 0; border-radius: .75rem; color: var(--encre); text-decoration: none; font-variant-numeric: tabular-nums; }
.grille-mois .jour .numero { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font-size: .92rem; font-weight: 500; }
.grille-mois .jour.hors-mois { color: var(--trait-fort); }
.grille-mois .jour.ferme { background: var(--alerte-fond); }
.grille-mois .jour.fete { background: var(--info-fond); }
.grille-mois .jour.hors-mois.ferme, .grille-mois .jour.hors-mois.fete { background: var(--carte-2); }
.grille-mois .jour.aujourdhui .numero { background: var(--accent); color: var(--marque-texte); font-weight: 700; }
.grille-mois a.jour .numero { font-weight: 700; }
/* Jours de séance : un fond selon l'état (CalendrierMois::etatDuJour()), à la place des points.
   Il l'emporte sur les vacances et les événements, rappelés alors par un liseré. */
.grille-mois .jour.seance-prevue, .legende .case.seance-prevue { background: var(--seance-prevue-fond); color: var(--seance-prevue-encre); }
.grille-mois .jour.seance-passee, .legende .case.seance-passee { background: var(--seance-passee-fond); color: var(--seance-passee-encre); }
.grille-mois .jour.seance-deplacee, .legende .case.seance-deplacee { background: var(--seance-deplacee-fond); color: var(--seance-deplacee-encre); }
.grille-mois .jour.seance-annulee, .legende .case.seance-annulee { background: var(--seance-annulee-fond); color: var(--seance-annulee-encre); }
.grille-mois .jour.seance-annulee .numero { text-decoration: line-through; }
.grille-mois .jour.fete[class*="seance-"] { box-shadow: inset 0 0 0 2px var(--info); }
.grille-mois .jour.ferme[class*="seance-"] { box-shadow: inset 0 0 0 2px var(--alerte); }
.grille-mois .jour.hors-mois[class*="seance-"] { opacity: .5; }
.grille-mois a.jour:hover, .grille-mois a.jour:focus-visible { box-shadow: inset 0 0 0 2px currentColor; outline: none; }
.legende { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: .7rem .25rem 1.1rem; font-size: .78rem; color: var(--doux); }
.legende span { display: inline-flex; align-items: center; gap: .35rem; }
.legende .case { width: .85rem; height: .85rem; border-radius: .25rem; flex: none; }
.legende .case.ferme { background: var(--alerte-fond); }
.legende .case.fete { background: var(--info-fond); }
.carte:target { box-shadow: 0 0 0 2px var(--accent), var(--ombre); }
.carte[id] { scroll-margin-top: 1rem; }

/* ---------- Famille ---------- */
.moi-entete { display: flex; align-items: center; gap: 1rem; margin: .5rem 0 1.25rem; }
.moi-entete > div { min-width: 0; flex: 1; }
.moi-entete h1 { margin: 0; font-size: 1.75rem; }
.moi-entete .doux { margin: .2rem 0 0; overflow-wrap: anywhere; }
.moi-avatar { width: 4rem; height: 4rem; font-size: 1.7rem; font-weight: 700; background: var(--encre); color: var(--fond); }
.pile-avatars { display: flex; flex: none; }
.pile-avatars .avatar { width: 2rem; height: 2rem; font-size: .8rem; border: 2px solid var(--fond); }
.pile-avatars .avatar + .avatar { margin-left: -.55rem; }
.carte-echeancier, a.carte-echeancier { display: block; padding: 1.1rem 1.15rem 1rem; color: var(--encre); text-decoration: none; }
a.carte-echeancier { padding-right: 1.15rem; }
a.carte-echeancier::after { display: none; }
.carte-echeancier .ligne { align-items: center; }
.carte-echeancier .total { font-size: 2.4rem; line-height: 1; margin: .7rem 0 0; }
.carte-echeancier .total .devise { font-size: 1.1rem; font-weight: 650; letter-spacing: 0; }
.carte-echeancier .sous-total { margin: .35rem 0 0; color: var(--doux); font-size: .92rem; }
.segments-echeances { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .25rem; margin: .9rem 0 0; }
.segments-echeances span { height: .4rem; border-radius: 999px; background: var(--surface-2); }
.segments-echeances span.reglee { background: var(--accent); }
.segments-echeances span.en-retard { background: var(--alerte); }
.prochaine-echeance { display: flex; align-items: center; gap: .8rem; margin: 1rem 0 0; padding: .9rem 0 0; border-top: 1px solid var(--trait); }
.prochaine-echeance .texte { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.prochaine-echeance small { color: var(--doux); font-size: .86rem; }
.grille-famille { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .6rem 0 0; }
.grille-famille .tuile { min-height: 6.5rem; }
.grille-famille .tuile .haut { display: flex; align-items: center; justify-content: space-between; }
.grille-famille .tuile .puce { background: var(--surface-2); color: var(--encre); }
.compteur { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--accent); color: var(--marque-texte); font-size: .74rem; font-weight: 750; }
.compteur.attention { background: var(--alerte); color: #fff; }

/* ---------- Connexion ---------- */
/* Pages sans menu (connexion, lien reçu) : la photo en haut, la feuille en dessous. */
body.plein { padding-bottom: 0; background: var(--fond); }
body.plein main { max-width: none; padding: 0; margin: 0; }
.visuel {
    position: relative;
    min-height: 54dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1.5rem 3.5rem;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.visuel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 25%; z-index: -2; }
@media (min-width: 52rem) { .visuel img { object-position: 60% 35%; } }
.visuel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, .7) 100%); }
.visuel .marque { position: absolute; top: calc(1.1rem + env(safe-area-inset-top, 0px)); left: 1.5rem; display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-size: 1.1rem; }
.visuel .marque .marque-logo { width: 2rem; }
.visuel .marque small { font-family: var(--police); font-size: .68rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; opacity: .9; }
.visuel .sur-titre { margin: 0 0 .4rem; font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.visuel h1 { margin: 0; color: #fff; font-size: 2.3rem; line-height: 1.05; font-weight: 750; letter-spacing: -.035em; }
.visuel p { margin: .6rem 0 0; max-width: 24rem; color: rgba(255, 255, 255, .88); font-size: 1rem; line-height: 1.45; }

.feuille {
    position: relative;
    margin-top: -1.75rem;
    background: var(--fond);
    color: var(--encre);
    border-radius: 1.75rem 1.75rem 0 0;
    padding: 1.6rem 1.25rem calc(2rem + env(safe-area-inset-bottom));
    min-height: 48dvh;
}
.feuille > .interieur { max-width: 26rem; margin: 0 auto; }
.feuille .carte { padding: 1.25rem; }
.feuille label:first-of-type { margin-top: 0; }
.feuille .bouton { margin-top: .9rem; }

/* Ce que l'espace apporte : trois points avec leur icône. */
.atouts { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.atouts li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .45rem; font-size: .78rem; font-weight: 600; line-height: 1.25; color: var(--encre-2); }
.atouts .puce { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .9rem; background: var(--carte); color: var(--accent); box-shadow: var(--ombre); }
.atouts .puce .icone { width: 1.3rem; height: 1.3rem; }

.separateur { display: flex; align-items: center; gap: .75rem; color: var(--doux); font-size: .86rem; margin: 1.1rem 0; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--trait-fort); }
details.carte { padding: 0; }
details.carte summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.25rem;
    font-weight: 650;
    border-radius: var(--rayon);
}
details.carte summary::-webkit-details-marker { display: none; }
details.carte summary::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid var(--doux); border-bottom: 2px solid var(--doux); transform: rotate(45deg); transition: transform var(--vite); flex: none; }
details.carte[open] summary::after { transform: rotate(-135deg); }
details.carte .contenu { padding: 0 1.25rem 1.25rem; }
.feuille .pied { text-align: center; margin-top: 1.5rem; font-size: .9rem; }
.feuille .pied a { display: inline-flex; align-items: center; gap: .35rem; margin: .25rem .5rem; font-weight: 600; }

@media (min-width: 52rem) {
    body.plein main { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100dvh; }
    .visuel { min-height: 100dvh; padding: 3rem 3.5rem 4rem; }
    .visuel .marque { top: 2rem; left: 3.5rem; }
    .visuel h1 { font-size: 3rem; }
    .visuel p { font-size: 1.1rem; max-width: 28rem; }
    .feuille { margin: 0; border-radius: 0; display: flex; align-items: center; padding: 3rem 2.5rem; min-height: 100dvh; }
    .feuille > .interieur { width: 100%; max-width: 24rem; }
}

/* ---------- Installation sur le téléphone ---------- */
.etapes { list-style: none; margin: .5rem 0 0; padding: 0; counter-reset: etape; }
.etapes li { display: flex; gap: .85rem; align-items: flex-start; padding: .65rem 0; border-top: 1px solid var(--trait); counter-increment: etape; }
.etapes li:first-child { border-top: 0; padding-top: 0; }
.etapes li::before { content: counter(etape); display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--accent); color: var(--marque-texte); font-weight: 700; font-size: .9rem; flex: none; }
.etapes .icone { width: 1.2rem; height: 1.2rem; vertical-align: -.25em; color: var(--accent); }
.etapes kbd { font: inherit; font-weight: 650; }
.plateforme[data-recommandee] { box-shadow: 0 0 0 2px var(--accent-clair), var(--ombre); }
.plateforme .ligne { align-items: center; margin-bottom: .25rem; }
.deja-installee { display: none; }
html.installee .deja-installee { display: flex; }
html.installee .a-installer { display: none; }

/* ---------- Photos ---------- */
.photo-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.photo-form input[type=file] { flex: 1 1 11rem; width: auto; }
.photo-form .bouton { margin-top: 0; }
.photo-form .aide { flex-basis: 100%; margin-top: 0; }
.photo-form label.bouton { cursor: pointer; }
/* Avec le script, le bouton « Choisir » ouvre le sélecteur puis le recadreur. */
.photo-form.recadrage-actif .champ-photo { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-form.recadrage-actif .envoyer-photo { display: none; }
.photo-form.recadrage-actif:has(.champ-photo:focus-visible) .choisir-photo { box-shadow: var(--anneau); }

/* ---------- Photo de profil et avatars (lot 37) ---------- */
.moi-avatar-lien { position: relative; flex: none; border-radius: 50%; }
.moi-avatar-lien:focus-visible { outline: none; box-shadow: var(--anneau); }
img.moi-avatar { background: var(--surface-2); }
.badge-photo {
    position: absolute;
    right: -.15rem;
    bottom: -.15rem;
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--carte);
    color: var(--encre-2);
    box-shadow: 0 0 0 2px var(--fond), var(--ombre);
}
.badge-photo .icone { width: .9rem; height: .9rem; }
.profil-image .identite { margin-bottom: .5rem; }
.navigation img.initiale { object-fit: cover; padding: 0; background: var(--surface-2); }
.navigation a.actif img.initiale { background: var(--surface-2); box-shadow: 0 0 0 2px var(--accent); }

.avatars-details { margin-top: .9rem; border-top: 1px solid var(--trait); padding-top: .75rem; }
.avatars-details summary { cursor: pointer; font-weight: 650; color: var(--lien); list-style: none; }
.avatars-details summary::-webkit-details-marker { display: none; }
.avatars-details summary::after { content: "›"; display: inline-block; margin-left: .4rem; transition: transform var(--vite); }
.avatars-details[open] summary::after { transform: rotate(90deg); }
.avatars-details > .doux { margin: .4rem 0 0; font-size: .9rem; }
.avatars-choix fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.avatars-choix legend { padding: 0; margin-bottom: .6rem; font-weight: 650; font-size: 1.05rem; }
.avatars-details .avatars-choix legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.avatars-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.9rem, 1fr)); gap: .6rem; margin-top: .6rem; }
.avatar-choix { position: relative; display: block; aspect-ratio: 1; border-radius: 50%; cursor: pointer; transition: transform var(--vite); }
.avatar-choix:active { transform: scale(.93); }
.avatar-choix input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.avatar-choix img { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 1px var(--trait); transition: box-shadow var(--vite); }
.avatar-choix input:checked + img { box-shadow: 0 0 0 3px var(--fond), 0 0 0 5.5px var(--accent); }
.avatar-choix input:focus-visible + img { box-shadow: 0 0 0 3px var(--fond), 0 0 0 5.5px var(--accent-clair); }
.avatars-choix .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.avatars-choix .actions .bouton { margin-top: 0; }
.avatars-choix.instantane .valider-avatar { display: none; }
.avatars-choix.envoi { opacity: .6; pointer-events: none; }

/* Le recadreur : la photo glisse et se zoome sous un rond. */
dialog.recadreur {
    width: min(26rem, calc(100% - 2rem));
    padding: 1.25rem;
    border: 0;
    border-radius: var(--rayon);
    background: var(--carte);
    color: var(--encre);
    box-shadow: var(--ombre-haute);
}
dialog.recadreur[open] { animation: recadreur-apparait var(--ressort) backwards; }
dialog.recadreur::backdrop { background: var(--voile); }
@keyframes recadreur-apparait { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.recadreur h2 { margin: 0 0 .9rem; font-size: 1.35rem; }
.recadreur-zone {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--rayon-moyen);
    background: #111;
    touch-action: none;
    cursor: grab;
    user-select: none;
}
.recadreur-zone:active { cursor: grabbing; }
.recadreur-zone img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; -webkit-user-drag: none; }
.recadreur-zone::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55);
    outline: 2px solid rgba(255, 255, 255, .9);
    outline-offset: -2px;
    pointer-events: none;
}
.recadreur-zoom { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 .25rem; color: var(--doux); }
.recadreur-zoom input { flex: 1; accent-color: var(--accent); }
.recadreur-zoom .icone { width: .95rem; height: .95rem; }
.recadreur-zoom .icone.grande { width: 1.3rem; height: 1.3rem; }
.recadreur .doux { margin: .25rem 0 0; font-size: .85rem; }
.recadreur .actions { display: flex; gap: .5rem; margin-top: 1rem; }
.recadreur .actions .bouton { flex: 1; margin-top: 0; }

.galerie { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; margin: 1rem -1rem; }
@media (min-width: 40rem) { .galerie { margin: 1rem 0; gap: .4rem; } .galerie a { border-radius: var(--rayon-petit); } }
.galerie a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.galerie img, .galerie video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--vite); }
.galerie a:hover img { transform: scale(1.03); }
.galerie .lecture { position: absolute; right: .4rem; top: .4rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; }
.galerie .lecture .icone { width: .8rem; height: .8rem; fill: currentColor; stroke: none; }

.album-carte, a.album-carte { display: flex; align-items: center; justify-content: flex-start; gap: .9rem; }
.album-carte .couverture { width: 4.25rem; height: 4.25rem; flex: none; border-radius: var(--rayon-petit); object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--doux); }
.album-carte .couverture .icone { width: 1.5rem; height: 1.5rem; }

/* ---------- Divers ---------- */
.reponse { padding: .6rem .85rem; margin-top: .75rem; background: var(--accent-pale); border-radius: var(--rayon-petit); }
.reponse > p:first-child { margin-top: 0; }
.reponse > p:last-child { margin-bottom: 0; }

/* Frise de suivi d'une inscription. */
.frise { list-style: none; margin: .5rem 0 0; padding: 0; }
.frise li { position: relative; padding: 0 0 .6rem 1.7rem; color: var(--doux); font-size: .9rem; }
.frise li::before { content: ""; position: absolute; left: .3rem; top: .3rem; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--trait-fort); background: var(--carte); }
.frise li:not(:last-child)::after { content: ""; position: absolute; left: .62rem; top: 1.05rem; bottom: 0; width: 2px; background: var(--trait); }
.frise li.faite { color: var(--encre-2); }
.frise li.faite::before { background: var(--succes); border-color: var(--succes); }
.frise li.faite::after { background: var(--succes); }
.frise li.courante { color: var(--accent-encre); font-weight: 650; }
.frise li.courante::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-pale); }

.note { font-size: .86rem; color: var(--doux); margin-top: 1.25rem; }

/* L'équipe consulte l'espace d'une famille (« se connecter en tant que », lot 22). */
.bandeau-equipe { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: var(--rayon-moyen); background: #fef3c7; color: #78350f; font-size: .92rem; }
.bandeau-equipe a { color: inherit; font-weight: 650; margin-left: .5rem; }
@media (prefers-color-scheme: dark) { .bandeau-equipe { background: #3a2a10; color: #f6d68a; } }

/* Texte riche écrit par l'équipe (résumés, annonces, réponses) : titres, listes, couleurs. */
.texte-riche-contenu > :first-child { margin-top: 0; }
.texte-riche-contenu > :last-child { margin-bottom: 0; }
.texte-riche-contenu h2 { font-size: 1.1rem; font-weight: 700; margin: .6rem 0 .25rem; }
.texte-riche-contenu h3 { font-size: 1rem; font-weight: 650; margin: .5rem 0 .2rem; }
.texte-riche-contenu ul, .texte-riche-contenu ol { padding-left: 1.3rem; margin: .25rem 0 .5rem; }
.texte-riche-contenu a { color: var(--lien); text-decoration: underline; }
.couleur-rouge { color: #dc2626; }
.couleur-orange { color: #ea580c; }
.couleur-vert { color: #15803d; }
.couleur-bleu { color: #2563eb; }
.couleur-violet { color: #7c3aed; }
@media (prefers-color-scheme: dark) {
    .couleur-rouge { color: #f28b82; }
    .couleur-orange { color: #f6a06b; }
    .couleur-vert { color: #81c995; }
    .couleur-bleu { color: #8ab4f8; }
    .couleur-violet { color: #c5b3fa; }
}

/* ---------- Le journal (lot 27) ---------- */
.story-entete { display: flex; align-items: center; gap: .75rem; margin: .25rem 0 1rem; }
.story-entete h1 { margin: 0; flex: 1; font-size: 1.75rem; }
.fermer-story { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--carte); box-shadow: var(--ombre); color: var(--encre); }
.fermer-story .icone { width: 1.3rem; height: 1.3rem; }

/* Invitations (lot 29) : date, lieu, image et « Je viens / Pas cette fois ». */
.invitation-carte { box-shadow: inset 4px 0 0 var(--accent), var(--ombre); }
.invitation-carte h3 { margin: .2rem 0 .5rem; font-size: 1.15rem; }
.invitation-carte h3 a { color: inherit; text-decoration: none; }
.invitation-image { display: block; width: 100%; max-height: 14rem; object-fit: cover; border-radius: var(--rayon-moyen); margin: .5rem 0; }
.invitation-quand { display: flex; align-items: center; gap: .75rem; margin: .5rem 0; }
.invitation-quand strong, .invitation-quand small { display: block; }
.invitation-quand small { color: var(--doux); }
.invitation-etat { display: inline-flex; align-items: center; gap: .35rem; margin: .25rem 0 .5rem; padding: .3rem .75rem; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.invitation-etat .icone { width: 1rem; height: 1rem; }
.invitation-etat.oui { background: var(--succes-fond); color: var(--succes); }
.invitation-etat.non { background: var(--neutre-fond); color: var(--neutre); }
.invitation-reponse { margin: 0; }
/* Bug 14 du 13/11/2026 : le message d'une invitation, entre la date et la réponse, aéré. */
.invitation [data-annonce-message] { margin: .5rem 0 .9rem; }
.invitation [data-annonce-message] + .invitation-etat, .invitation [data-annonce-message] + .invitation-reponse { margin-top: .25rem; }
.invitation-personnes { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .25rem 0 0; font-size: .92rem; color: var(--encre-2); }
.invitation-personnes select { width: auto; min-width: 4.75rem; min-height: 2.75rem; }
.invitation-reponse .actions { margin-top: .6rem; }
.invitation-reponse .actions .bouton { flex: 1 1 8rem; }

/* ---------- Enfants : « Sa progression » (lot 30) ---------- */
.progression-entete { display: flex; align-items: center; gap: 1.1rem; margin: .5rem 0 1.25rem; }
.progression-entete > div { min-width: 0; }
.progression-entete .avatar { width: 4.5rem; height: 4.5rem; font-size: 1.7rem; }
.progression-entete h1 { margin: 0; font-size: 2.1rem; }
.progression-entete .doux { margin: .4rem 0 0; }
/* L'avatar entouré de l'anneau des séances suivies. */
.anneau-avatar { position: relative; flex: none; width: 6.5rem; height: 6.5rem; display: grid; place-items: center; }
.anneau-avatar svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau-avatar circle { fill: none; stroke-width: 5; }
.anneau-avatar .fond { stroke: var(--trait-fort); }
.anneau-avatar .avance { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 800ms cubic-bezier(.2, .7, .3, 1); }
.anneau-avatar .avatar { width: 5rem; height: 5rem; font-size: 1.9rem; }
.titre-enfant { display: inline-flex; align-items: center; gap: .35rem; margin: .45rem 0 0; padding: .25rem .75rem .25rem .6rem; border-radius: 999px; background: var(--accent-pale); color: var(--accent-encre); font-weight: 650; font-size: .88rem; }
.titre-enfant .icone { width: 1rem; height: 1rem; }
/* Les chiffres clés : séances, étapes, présences. */
.chiffres-cles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0 0 1rem; }
.chiffres-cles > div { padding: .9rem .8rem; border-radius: var(--rayon-moyen); background: var(--carte); box-shadow: var(--ombre); }
.chiffres-cles strong { display: block; font-size: 1.65rem; font-weight: 750; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.chiffres-cles strong small { font-size: .9rem; font-weight: 600; color: var(--doux); letter-spacing: 0; }
.chiffres-cles span { display: block; margin-top: .4rem; font-size: .8rem; line-height: 1.25; color: var(--doux); }
.progression-anneau { display: flex; align-items: center; gap: 1.1rem; }
.progression-anneau > div { min-width: 0; }
.progression-anneau strong { display: block; font-size: 1.1rem; }
.progression-anneau .doux { display: block; font-size: .9rem; }
.anneau-progression { flex: none; width: 6.5rem; height: 6.5rem; }
.anneau-progression circle { fill: none; stroke-width: 9; }
.anneau-progression .fond { stroke: var(--accent-pale); }
.anneau-progression .avance { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.anneau-progression .nombre { font-size: 1.6rem; font-weight: 800; fill: var(--encre); }
.anneau-progression .sur { font-size: .7rem; fill: var(--doux); }
.cap { margin: .6rem 0 0; font-weight: 600; }
.cap .surtitre { display: block; margin-bottom: .1rem; }
.sait-faire { list-style: none; padding: .25rem 1.1rem; }
.sait-faire li { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem 0; }
.sait-faire li + li { border-top: 1px solid var(--trait); }
.sait-faire .icone { flex: none; width: 1.35rem; height: 1.35rem; padding: .2rem; border-radius: 50%; background: var(--succes-fond); color: var(--succes); stroke-width: 2.6; margin-top: .05rem; }
.realisation p:last-child { margin-bottom: 0; }
.realisation.avec-vignette { display: flex; gap: .9rem; align-items: flex-start; }
.realisation.avec-vignette > div { min-width: 0; }
.realisation.avec-vignette .etape-vignette { width: 3.4rem; height: 3.4rem; }

/* Le chemin des étapes : une vignette par étape, côte à côte, sans trait qui les relie. */
.chemin { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.chemin li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 650; color: var(--doux); text-align: center; }
.chemin .etape-vignette { position: relative; z-index: 1; width: 3.2rem; height: 3.2rem; border-radius: .9rem; box-shadow: 0 0 0 2.5px var(--carte), 0 0 0 4.5px var(--trait-fort); }
.chemin li.franchie .etape-vignette { box-shadow: 0 0 0 2.5px var(--carte), 0 0 0 4.5px var(--accent); }
.chemin li.en-cours { color: var(--accent-encre); }
.chemin li.en-cours .etape-vignette { box-shadow: 0 0 0 2.5px var(--carte), 0 0 0 4.5px var(--accent), 0 0 0 9px var(--accent-pale); }
.chemin li.a-venir .etape-vignette { filter: grayscale(.8); opacity: .55; }
.chemin .coche { position: absolute; z-index: 2; top: 2.35rem; left: calc(50% + .9rem); display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--accent); color: var(--marque-texte); box-shadow: 0 0 0 2px var(--carte); }
.chemin .coche .icone { width: .7rem; height: .7rem; stroke-width: 3.4; }
.carte-parcours .separation { margin: 1rem -1.1rem 0; border-top: 1px solid var(--trait); }

/* ---------- Le parcours illustré (lot 31) ---------- */
.etape-vignette { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 4.4rem; height: 4.4rem; object-fit: cover; border-radius: 1rem; background: var(--carte-2); }
.etape-vignette-vide { font-weight: 800; font-size: 1.3rem; color: var(--doux); border: 1px solid var(--trait); }
.parcours-resume { display: grid; gap: .6rem; margin-bottom: .6rem; }
.parcours-resume .carte { margin: 0; }
.parcours { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.etape { display: flex; gap: .9rem; align-items: center; padding: .75rem .9rem; }
.parcours .etape { background: var(--carte); border-radius: var(--rayon-moyen); box-shadow: var(--ombre); }
.etape .texte { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.etape .surtitre { display: flex; align-items: center; gap: .3rem; }
.etape .surtitre .icone { width: .95rem; height: .95rem; }
.etape strong { font-size: .98rem; line-height: 1.3; }
.etape small { font-size: .84rem; line-height: 1.35; }
.etape.franchie .surtitre { color: var(--succes); }
.etape.franchie .etape-vignette { box-shadow: 0 0 0 3px var(--succes-fond); }
.etape.en-cours { background: linear-gradient(100deg, var(--accent-pale), var(--carte) 60%); }
.parcours .etape.en-cours { box-shadow: 0 0 0 2px var(--accent-clair), var(--ombre); }
.etape.en-cours .surtitre { color: var(--accent-encre); }
.etape.en-cours .etape-vignette { box-shadow: 0 0 0 3px var(--accent-clair); }
.etape.a-venir { opacity: .72; }
.etape.a-venir .etape-vignette { filter: grayscale(.85) saturate(.6); opacity: .8; }
.etape.fin { display: block; font-weight: 600; }
.etape.fin .surtitre { display: block; margin-bottom: .1rem; }
.lien-parcours { display: inline-flex; align-items: center; gap: .35rem; margin: .9rem 0 0; font-weight: 600; color: var(--lien); text-decoration: none; }
.lien-parcours .icone { width: 1.1rem; height: 1.1rem; }
.etape-seance { display: flex; gap: .7rem; align-items: center; margin: 0; }
.etape-seance .etape-vignette { width: 3rem; height: 3rem; }
.etape-seance .texte { display: flex; flex-direction: column; min-width: 0; }
.etape-seance strong { font-size: .92rem; line-height: 1.3; }
@media (min-width: 600px) { .parcours, .parcours-resume { grid-template-columns: 1fr 1fr; } .parcours-resume .etape.fin { grid-column: 1 / -1; } }
.photos-groupe { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; margin-bottom: 1rem; text-decoration: none; }
.photos-groupe a { position: relative; display: block; overflow: hidden; border-radius: .75rem; background: var(--surface-2); }
.photos-groupe img, .photos-groupe video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .75rem; }
.photos-groupe .lecture { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.photos-groupe .lecture .icone { width: 1.8rem; height: 1.8rem; padding: .45rem .4rem .45rem .5rem; border-radius: 50%; background: rgba(0, 0, 0, .45); fill: currentColor; stroke: none; }
/* La barre du haut de l'onglet Enfants : le choix de l'enfant et le partage. */
.barre-enfant { align-items: center; margin: 0 0 .5rem; }
.barre-enfant .onglets { margin: 0; }
.barre-enfant .bouton-rond { margin-left: auto; }
.chiffres-cles:has(> :nth-child(3)) { grid-template-columns: 1.35fr 1fr 1fr; }
.chiffres-cles:not(:has(> :nth-child(3))) { grid-template-columns: 1.35fr 1fr; }
.bouton.partager { margin-top: 1rem; }
.petit-texte { font-size: .88rem; text-align: center; }

/* ---------- Application native (coque Android « CENIT Parent Qare », lot 34) ----------
   Dans la coque, la barre d'onglets est native : celle de la page se retire,
   seul le bouton + reste, flottant en bas à droite ; il ouvre la feuille
   native (configuration des chemins). */
html.app-native .navigation {
    left: auto;
    right: calc(1rem + env(safe-area-inset-right));
    bottom: calc(1rem + env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    padding: 0;
    transform: none;
    background: none;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
html.app-native .navigation a:not(.plus) { display: none; }
html.app-native .navigation .plus { margin: 0; }
html.app-native body.connecte { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
html.app-native main { padding-top: 1rem; }
/* Application 0.1.4 et suivantes : le + est au centre de la barre native et
   le logo dans la barre du haut ; la page retire les siens. */
html.barres-natives .navigation { display: none; }
html.barres-natives body.connecte { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
html.barres-natives .salut .marque-ronde { display: none; }

/* La barre de progression de Turbo, entre deux pages. */
.turbo-progress-bar { height: 3px; background: var(--accent); }

/* ---------- Grand écran ---------- */
@media (min-width: 52rem) {
    main { padding-top: 2rem; }
    .medias { margin: 0; padding: 0 0 .4rem; }
    .stories, .annonces-cartes { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}

/* ---------- Mouvement et impression ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
    @view-transition { navigation: none; }
}
@media print {
    .entete, .navigation, .bouton, .actions-demandes, .installer, .bouton-rond { display: none !important; }
    body { background: #fff; padding: 0; }
    .carte { box-shadow: none; break-inside: avoid; border: 1px solid #ddd; }
}
