/* ============================================================
   Créations Adélice — système de design de l'espace de gestion
   L'identité d'octobre 2026 : noir et blanc, filets gris clair
   (#dedede), comme le site et la papeterie. Serif pour les titres,
   sans pour tout ce qui se lit vite. Le noir plein est réservé aux
   actions principales ; seuls les états (payé, en retard, à faire)
   gardent une couleur, parce qu'ils se lisent d'un coup d'œil.
   Les noms des jetons (--creme, --brun…) sont restés pour ne rien
   casser : ce sont désormais des gris et du noir.
   ============================================================ */

:root {
    --creme:        #F7F7F7;   /* le fond des écrans */
    --creme-2:      #F0F0F0;   /* survols, fonds doux */
    --creme-3:      #E8E8E8;
    --carte:        #FFFFFF;
    --bord:         #DEDEDE;
    --bord-fort:    #C9C9C9;
    --separateur:   #EBEBEB;

    --encre:        #111111;
    --encre-2:      #555555;
    --encre-3:      #6E6E6E;

    --brun:         #000000;   /* l'action principale : le noir plein */
    --brun-fonce:   #333333;
    --brun-clair:   #EDEDED;

    --or:           #000000;   /* l'accent : le noir (focus, repères) */
    --or-clair:     #F2F2F2;
    --or-texte:     #333333;

    --succes:       #3E7A4B;
    --succes-clair: #E4F0E2;
    --info:         #3C6E9E;
    --info-clair:   #E5EEF7;
    --attention:    #A8621B;
    --attention-clair: #FBEFDF;
    --danger:       #B4413A;
    --danger-clair: #FBEAE7;
    --rose:         #F2F2F2;

    --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --sans:  "Jost", "Segoe UI", -apple-system, system-ui, sans-serif;

    --rayon:    8px;
    --rayon-sm: 4px;
    --ombre:    0 1px 2px rgba(0, 0, 0, .03), 0 4px 14px rgba(0, 0, 0, .04);
    --ombre-md: 0 8px 28px rgba(0, 0, 0, .10);

    --barre:    236px;
    --entete:   64px;
    --barre-mobile: 62px;
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--encre);
    background: var(--creme);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brun); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.15; }
h1, h2 { font-family: var(--serif); }
h1 { font-size: 2.35rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
small, .discret { color: var(--encre-3); font-size: .86rem; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--creme-2); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--separateur); margin: 1.25rem 0; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
/* Le titre reçoit le focus à chaque page (lecteurs d'écran) : pas de cadre pour autant. */
h1:focus, h1:focus-visible { outline: none; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Squelette de l'application ─────────────────────────────── */
.app { min-height: 100vh; display: flex; }
.menu-bascule { display: none; }

.barre {
    width: var(--barre);
    flex: none;
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--carte);
    border-right: 1px solid var(--bord);
    display: flex;
    flex-direction: column;
    padding: 18px 14px 14px;
    overflow-y: auto;
    z-index: 30;
}
.barre-marque { display: flex; justify-content: center; margin: 2px 0 18px; }
.barre-marque img { width: 120px; height: 120px; }
.barre-titre {
    margin: 0 10px 8px;
    font-size: .68rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--encre-3);
    font-weight: 500;
}
.barre-liens { display: flex; flex-direction: column; gap: 3px; }
.barre-bas { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--separateur); display: flex; flex-direction: column; gap: 3px; }
.barre-sortie { margin: 0; }
.nav-lien {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--encre-2);
    font-weight: 500;
    font-size: .95rem;
    text-decoration: none;
    transition: background .15s, color .15s;
    width: 100%;
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
.nav-lien svg { width: 21px; height: 21px; flex: none; }
.nav-lien:hover { background: var(--creme-2); color: var(--encre); text-decoration: none; }
.nav-lien.active { background: var(--brun-clair); color: var(--brun-fonce); }
.nav-lien .pastille-compte { margin-left: auto; }
.pastille-compte {
    min-width: 22px; height: 22px; padding: 0 7px;
    display: inline-grid; place-items: center;
    background: var(--brun); color: #fff;
    border-radius: 11px; font-size: .76rem; font-weight: 600;
}

.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entete {
    height: var(--entete);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bord);
    position: sticky;
    top: 0;
    z-index: 20;
}
.menu-bouton { display: none; width: 40px; height: 40px; place-items: center; border-radius: 10px; cursor: pointer; color: var(--encre); }
.menu-bouton svg { width: 24px; height: 24px; }
.entete-marque { display: none; }
.entete-marque img { width: 52px; height: 52px; }
.recherche {
    flex: 1; max-width: 560px;
    display: flex; align-items: center; gap: 10px;
    background: var(--carte); border: 1px solid var(--bord); border-radius: 12px;
    padding: 0 14px; height: 42px; margin: 0;
}
.recherche svg { width: 18px; height: 18px; color: var(--encre-3); flex: none; }
.recherche input { flex: 1; border: 0; background: none; font: inherit; color: var(--encre); outline: none; min-width: 0; }
.recherche input::placeholder { color: var(--encre-3); }
.cloche { margin-left: auto; position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--encre); }
.cloche:hover { background: var(--creme-2); text-decoration: none; }
.cloche svg { width: 22px; height: 22px; }
.cloche-point { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--brun); border: 2px solid var(--creme); }

.contenu { padding: 26px 28px 40px; max-width: 1240px; width: 100%; }

.barre-mobile { display: none; }
.menu-voile { display: none; }

@media (max-width: 899px) {
    .barre {
        position: fixed; left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: none;
        width: min(300px, 84vw);
    }
    .menu-bascule:checked ~ .barre { transform: none; box-shadow: var(--ombre-md); }
    .menu-voile { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 25; }
    .menu-bascule:checked ~ .menu-voile { opacity: 1; pointer-events: auto; }
    .menu-bouton { display: grid; }
    .entete { padding: 0 14px; gap: 8px; }
    .entete-marque { display: block; }
    .recherche { height: 38px; }
    .contenu { padding: 18px 16px calc(var(--barre-mobile) + 24px); }
    .barre-mobile {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
        height: calc(var(--barre-mobile) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: var(--carte); border-top: 1px solid var(--bord);
    }
    .bm-lien { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .68rem; color: var(--encre-3); position: relative; text-decoration: none; }
    .bm-lien svg { width: 22px; height: 22px; }
    .bm-lien.active { color: var(--brun-fonce); }
    .bm-lien .pastille-compte { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: .68rem; }
}
@media (max-width: 480px) {
    .recherche input::placeholder { font-size: .9rem; }
    h1 { font-size: 1.9rem; }
}

/* ── Portail (sans session) ──────────────────────────────────── */
.portail { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.portail-boite { width: 100%; max-width: 440px; background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; box-shadow: var(--ombre-md); padding: 36px 34px; }
.portail-pied { margin-top: 22px; color: var(--encre-3); font-size: .84rem; }
.connexion { display: flex; flex-direction: column; align-items: center; text-align: center; }
.connexion-logo { width: 132px; height: 132px; margin: 0 auto 16px; }
.connexion h1 { font-size: 2.1rem; }
.connexion-sous { color: var(--encre-2); margin-bottom: 20px; }
.connexion .formulaire { width: 100%; text-align: left; }
.connexion-liens { text-align: center; margin-top: 14px; font-size: .92rem; }

/* ── Pages ──────────────────────────────────────────────────── */
.page-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-tete .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.titre-page { font-family: var(--serif); font-size: 2.35rem; font-weight: 500; line-height: 1.1; }
.sous-titre { color: var(--encre-2); margin-top: 4px; font-size: 1.05rem; }
.fil { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--encre-3); margin-bottom: 10px; flex-wrap: wrap; }
.fil a { color: var(--encre-2); }

.grille { display: grid; gap: 18px; }
.grille-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grille-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grille-principale { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
@media (max-width: 1100px) { .grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grille-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) { .grille-principale { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grille-2, .grille-3, .grille-4 { grid-template-columns: 1fr; } }

/* ── Cartes ─────────────────────────────────────────────────── */
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
.carte-corps { padding: 20px 22px; }
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--separateur); }
.carte-tete h2 { font-size: 1.45rem; }
.carte-tete .lien-plus { font-size: .92rem; font-weight: 500; }
.carte-pied { padding: 14px 22px; border-top: 1px solid var(--separateur); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.carte-lien { display: block; color: inherit; transition: box-shadow .15s, transform .15s; }
.carte-lien:hover { text-decoration: none; box-shadow: var(--ombre-md); transform: translateY(-1px); }

/* Les tuiles de chiffres du tableau de bord */
.tuile { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.tuile-icone { width: 52px; height: 52px; border-radius: 50%; background: var(--creme-2); display: grid; place-items: center; color: var(--encre); flex: none; }
.tuile-icone svg { width: 24px; height: 24px; }
.tuile-icone.vert { background: var(--creme-2); color: var(--encre); }
.tuile-icone.or { background: var(--or-clair); color: var(--or-texte); }
.tuile-icone.info { background: var(--creme-2); color: var(--encre); }
.tuile-libelle { font-size: .92rem; color: var(--encre-2); }
.tuile-valeur { font-family: var(--serif); font-size: 2.2rem; line-height: 1; font-weight: 500; margin-top: 2px; }
.tuile-valeur.petite { font-size: 1.7rem; }

/* ── Listes d'éléments (à faire, prochains gâteaux) ─────────── */
.liste { display: flex; flex-direction: column; }
.element { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--separateur); color: inherit; }
.element:last-child { border-bottom: 0; }
a.element:hover { background: var(--creme); text-decoration: none; }
.element-icone { width: 44px; height: 44px; border-radius: 50%; background: var(--creme-2); display: grid; place-items: center; color: var(--brun); flex: none; }
.element-icone svg { width: 20px; height: 20px; }
.element-corps { flex: 1; min-width: 0; }
.element-titre { font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.element-sous { color: var(--encre-2); font-size: .9rem; margin-top: 1px; }
.element-droite { text-align: right; flex: none; }
.element > svg { color: var(--encre-3); }
.element-date { flex: none; width: 54px; text-align: center; background: var(--creme-2); border-radius: 10px; padding: 6px 4px; line-height: 1.05; }
.element-date b { display: block; font-family: var(--serif); font-size: 1.55rem; font-weight: 500; }
.element-date span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-2); }
.element-vignette { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; flex: none; background: var(--creme-2); }

/* ── Pastilles d'état ───────────────────────────────────────── */
.pastille { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .8rem; font-weight: 500; white-space: nowrap; line-height: 1.5; }
.pastille.neutre { background: var(--creme-3); color: var(--encre-2); }
.pastille.succes { background: var(--succes-clair); color: var(--succes); }
.pastille.info { background: var(--info-clair); color: var(--info); }
.pastille.or { background: var(--or-clair); color: var(--or-texte); }
.pastille.attention { background: var(--attention-clair); color: var(--attention); }
.pastille.danger { background: var(--danger-clair); color: var(--danger); }
.pastille.rose { background: var(--rose); color: var(--brun-fonce); }
.pastille svg { width: 14px; height: 14px; }

/* ── Boutons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 18px; border-radius: 4px; border: 1px solid var(--bord-fort);
    background: var(--carte); color: var(--encre); font: inherit; font-weight: 500; font-size: .95rem;
    cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap; line-height: 1.3;
}
.btn:hover { background: var(--creme-2); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn-principal { background: var(--brun); border-color: var(--brun); color: #fff; }
.btn-principal:hover { background: var(--brun-fonce); border-color: var(--brun-fonce); }
.btn-secondaire { background: var(--brun-clair); border-color: var(--brun-clair); color: var(--brun-fonce); }
.btn-secondaire:hover { background: #E2E2E2; }
.btn-danger { color: var(--danger); border-color: #E8C6C2; }
.btn-danger:hover { background: var(--danger-clair); }
.btn-lien { border-color: transparent; background: none; color: var(--brun); padding-inline: 8px; }
.btn-lien:hover { background: var(--brun-clair); }
.btn-petit { padding: 5px 12px; font-size: .86rem; border-radius: 4px; }
.btn-large { padding: 13px 24px; font-size: 1.05rem; border-radius: 4px; }
.btn-bloc { width: 100%; }
.btn-icone { width: 38px; height: 38px; padding: 0; border-radius: 4px; }

/* ── Formulaires ────────────────────────────────────────────── */
.formulaire { display: flex; flex-direction: column; gap: 16px; }
.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ label, .champ-libelle { font-size: .86rem; font-weight: 500; color: var(--encre-2); }
.champ label em { font-style: normal; font-weight: 400; color: var(--encre-3); }
.champ input, .champ textarea, .champ select, .champ .saisie {
    width: 100%; padding: 10px 13px; border: 1px solid var(--bord-fort); border-radius: 4px;
    background: var(--carte); font: inherit; color: var(--encre); transition: border-color .15s, box-shadow .15s;
}
.champ input:focus, .champ textarea:focus, .champ select:focus { outline: none; border-color: var(--brun); box-shadow: 0 0 0 3px var(--brun-clair); }
.champ textarea { min-height: 96px; resize: vertical; }
.champ input[type="checkbox"], .champ input[type="radio"] { width: auto; }
.champ-aide { font-size: .84rem; color: var(--encre-3); }
.champ-erreur, .validation-message { font-size: .84rem; color: var(--danger); }
.champ .invalid { border-color: var(--danger); }
.rangee { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rangee-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rangee-auto { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (max-width: 640px) { .rangee, .rangee-3 { grid-template-columns: 1fr; } }
.case { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .95rem; }
.case input { margin-top: 4px; accent-color: var(--brun); width: 17px; height: 17px; flex: none; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix label { position: relative; cursor: pointer; }
.choix input { position: absolute; opacity: 0; pointer-events: none; }
.choix span { display: inline-block; padding: 7px 14px; border: 1px solid var(--bord-fort); border-radius: 999px; font-size: .9rem; background: var(--carte); transition: all .15s; }
.choix input:checked + span { background: var(--encre); border-color: var(--encre); color: #fff; }
.choix input:focus-visible + span { outline: 2px solid var(--or); outline-offset: 2px; }
.entree-montant { position: relative; }
.entree-montant input { padding-right: 30px; text-align: right; }
.entree-montant::after { content: "$"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--encre-3); }
.repli { border: 1px solid var(--bord); border-radius: 10px; }
.repli summary { padding: 12px 16px; cursor: pointer; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 8px; }
.repli summary::before { content: "▸"; color: var(--encre-3); transition: transform .15s; }
.repli[open] summary::before { transform: rotate(90deg); }
.repli-corps { padding: 4px 16px 16px; }

/* ── Avis ───────────────────────────────────────────────────── */
.avis { padding: 12px 16px; border-radius: 10px; border: 1px solid; font-size: .94rem; display: flex; gap: 10px; align-items: flex-start; }
.avis svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.avis-succes { background: var(--succes-clair); border-color: #C9E0C4; color: var(--succes); }
.avis-info { background: var(--info-clair); border-color: #C6D8EA; color: var(--info); }
.avis-attention { background: var(--attention-clair); border-color: #EFD6B5; color: var(--attention); }
.avis-danger { background: var(--danger-clair); border-color: #EFC3BE; color: var(--danger); }
.avis-interne { background: var(--or-clair); border-color: #D6D6D6; color: var(--or-texte); }

/* ── Onglets ────────────────────────────────────────────────── */
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--bord); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglet { padding: 10px 14px; color: var(--encre-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; cursor: pointer; }
.onglet:hover { color: var(--encre); text-decoration: none; }
.onglet.active { color: var(--brun-fonce); border-bottom-color: var(--brun); }

/* ── Tableaux ───────────────────────────────────────────────── */
.tableau { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tableau th { text-align: left; font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); padding: 10px 14px; border-bottom: 1px solid var(--bord); }
.tableau td { padding: 12px 14px; border-bottom: 1px solid var(--separateur); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau .num, .tableau th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tableau tbody tr.lien { cursor: pointer; }
.tableau tbody tr.lien:hover { background: var(--creme); }
.tableau tfoot td { font-weight: 600; border-top: 2px solid var(--bord); }
.tableau-defile { overflow-x: auto; }
.montant { font-variant-numeric: tabular-nums; }
.montant-fort { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }

/* Le bloc des montants d'une soumission ou d'une facture */
.totaux { display: flex; flex-direction: column; gap: 6px; max-width: 360px; margin-left: auto; }
.totaux div { display: flex; justify-content: space-between; gap: 20px; padding: 4px 0; }
.totaux .total { border-top: 1px solid var(--bord); margin-top: 4px; padding-top: 10px; font-weight: 600; font-size: 1.1rem; }
.totaux .solde { background: var(--rose); border-radius: 8px; padding: 8px 12px; font-weight: 600; }

/* ── États vides, chargement ────────────────────────────────── */
.vide { text-align: center; padding: 52px 20px; color: var(--encre-2); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vide h2, .vide h1 { color: var(--encre); }
.vide svg { width: 42px; height: 42px; color: var(--encre-3); }
.vide p { max-width: 440px; }
.chargement { padding: 30px; text-align: center; color: var(--encre-3); }
.squelette { background: linear-gradient(90deg, var(--creme-2) 25%, var(--creme-3) 50%, var(--creme-2) 75%); background-size: 200% 100%; animation: brille 1.3s infinite; border-radius: 6px; min-height: 14px; }
@keyframes brille { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Conversation ───────────────────────────────────────────── */
.conversation { display: flex; flex-direction: column; gap: 14px; }
.bulle { max-width: 78%; padding: 12px 16px; border-radius: 14px; background: var(--creme-2); position: relative; }
.bulle.sortant { align-self: flex-end; background: var(--brun-clair); }
.bulle.note { align-self: stretch; max-width: none; background: var(--or-clair); border: 1px dashed #C9C9C9; }
.bulle-tete { display: flex; gap: 10px; align-items: baseline; font-size: .82rem; color: var(--encre-3); margin-bottom: 4px; flex-wrap: wrap; }
.bulle-tete b { color: var(--encre-2); font-weight: 500; }
.bulle-corps { white-space: pre-wrap; word-break: break-word; }
.bulle-pieces { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bulle-pieces img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; }
@media (max-width: 640px) { .bulle { max-width: 92%; } }

/* ── Divers ─────────────────────────────────────────────────── */
.separe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.point::before { content: "•"; color: var(--encre-3); margin: 0 6px; }
.etiquette { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--encre-3); font-weight: 500; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.galerie a, .galerie figure { margin: 0; position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--creme-2); }
.galerie img { width: 100%; height: 100%; object-fit: cover; }
.galerie figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .78rem; }
.actions-ligne { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.interne { border-left: 3px solid var(--or); padding-left: 12px; }
.icone-interne { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--or-texte); background: var(--or-clair); padding: 2px 8px; border-radius: 999px; }
.jauge { height: 8px; background: var(--creme-3); border-radius: 4px; overflow: hidden; }
.jauge > span { display: block; height: 100%; background: var(--succes); border-radius: 4px; }
.jauge.plein > span { background: var(--danger); }
.jauge.charge > span { background: var(--attention); }
.etapes { display: flex; align-items: flex-start; justify-content: space-between; position: relative; }
.etapes::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 2px; background: var(--bord); }
.etape { position: relative; flex: 1; text-align: center; font-size: .84rem; color: var(--encre-3); }
.etape i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; margin: 0 auto 8px; background: var(--carte); border: 2px solid var(--bord); font-style: normal; color: var(--encre-3); }
.etape.faite i { background: var(--encre); border-color: var(--encre); color: #fff; }
.etape.faite { color: var(--encre); }
.etape.courante i { border-color: var(--brun); color: var(--brun); }
.etape.courante { color: var(--brun-fonce); font-weight: 500; }

/* La boîte de dialogue */
dialog.boite { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--ombre-md); }
dialog.boite::backdrop { background: rgba(0, 0, 0, .45); }
dialog.boite .carte-tete h2 { font-size: 1.35rem; }

/* Reconnexion Blazor */
#components-reconnect-modal { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(255, 255, 255, .85); place-items: center; }
#components-reconnect-modal.components-reconnect-show, #components-reconnect-modal.components-reconnect-failed, #components-reconnect-modal.components-reconnect-rejected { display: grid; }
.reconnexion { background: var(--carte); border: 1px solid var(--bord); border-radius: 14px; padding: 22px 26px; box-shadow: var(--ombre-md); text-align: center; }
.reconnexion p { display: none; margin: 0; }
.components-reconnect-show .reconnexion-pendant, .components-reconnect-failed .reconnexion-echouee, .components-reconnect-rejected .reconnexion-rejetee { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--attention-clair); color: var(--attention); padding: 12px 20px; z-index: 1001; border-top: 1px solid #EFD6B5; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 14px; top: 10px; }

/* ── Impression ─────────────────────────────────────────────── */
@media print {
    .barre, .entete, .barre-mobile, .menu-voile, .page-tete .actions, .onglets, .btn, .sans-impression { display: none !important; }
    .contenu { padding: 0; max-width: none; }
    .carte { box-shadow: none; border-color: #ccc; break-inside: avoid; }
    body { background: #fff; color: #000; font-size: 12pt; }
    a { color: inherit; }
}

/* ── Fiches (listes clé/valeur) ─────────────────────────────── */
.fiche-liste { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .93rem; }
.fiche-liste dt { color: var(--encre-3); }
.fiche-liste dd { margin: 0; }
.interne-carte { border-left: 3px solid var(--or); }

/* ── Les documents (contrat, conditions) rendus à l'écran ────── */
.document-html { line-height: 1.6; }
.document-html h1 { font-size: 1.7rem; margin-bottom: 8px; }
.document-html h2 { font-size: 1.15rem; font-family: var(--sans); font-weight: 600; color: var(--brun-fonce); margin: 22px 0 8px; }
.document-html p { margin: 0 0 10px; }
.document-html p.intro { background: var(--creme-2); padding: 10px 14px; border-radius: 8px; }
.document-html p.note { font-size: .86rem; color: var(--encre-2); }
.document-html table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: .93rem; }
.document-html th, .document-html td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--separateur); vertical-align: top; }
.document-html table.fiche th { width: 210px; color: var(--encre-2); font-weight: 500; }
.document-html table.lignes thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); }
.document-html .num, .document-html th.num { text-align: right; }
.document-html table.totaux { max-width: 420px; margin-left: auto; }
.document-html table.totaux th { font-weight: 500; }
.document-html table.totaux tr.total th, .document-html table.totaux tr.total td { font-weight: 700; border-top: 2px solid var(--brun); }
.document-html hr { margin: 28px 0; }

/* ── Aucun débordement horizontal sur téléphone ──────────────── */
.principal, .public { min-width: 0; overflow-x: clip; }
.grille > *, .contenu > * { min-width: 0; }
.recherche { min-width: 0; }
.entete { min-width: 0; }
@media (max-width: 480px) { .element { gap: 10px; } .element .btn { white-space: normal; text-align: center; } .tuile-valeur { font-size: 1.9rem; } }

/* Les chiffres en Cormorant sont « elzéviriens » par défaut : un 1 s'y lit
   comme un I. Les chiffres alignés, partout où l'on affiche un nombre. */
.tuile-valeur, .montant-fort, .element-date b, .dossier-chiffres b, .titre-page, h1, h2 { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* Sur téléphone : les tuiles en deux colonnes compactes, un titre moins haut. */
@media (max-width: 640px) {
    .grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tuile { padding: 12px; gap: 10px; align-items: flex-start; flex-direction: column; }
    .tuile-icone { width: 36px; height: 36px; }
    .tuile-icone svg { width: 18px; height: 18px; }
    .tuile-libelle { font-size: .82rem; line-height: 1.25; }
    .tuile-valeur { font-size: 1.7rem; }
    .tuile-valeur.petite { font-size: 1.35rem; }
    .titre-page { font-size: 1.85rem; }
    .page-tete { margin-bottom: 16px; }
}
.carte-tete { flex-wrap: wrap; row-gap: 8px; }

/* ── Site web : galerie, avis, dates complètes ─────────────────── */
.editeur-galerie-corps { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.editeur-galerie-image { width: 220px; max-width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; background: var(--creme-2); }
.galerie-site { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.galerie-site-element { display: flex; flex-direction: column; border: 1px solid var(--separateur); border-radius: 12px; overflow: hidden; background: var(--carte); }
.galerie-site-element.masquee img { opacity: .55; }
.galerie-site-element img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--creme-2); }
.galerie-site-texte { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.galerie-site-pastilles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.galerie-site-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 12px 12px; margin-top: auto; }
.avis-element { align-items: flex-start; flex-wrap: wrap; }
.avis-texte { margin: 6px 0 4px; padding-left: 12px; border-left: 3px solid var(--creme-2); font-style: italic; white-space: pre-line; overflow-wrap: anywhere; }
.dates-completes { columns: 2 220px; margin: 8px 0 0; padding-left: 18px; }
.photos-site { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.photos-site button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; width: 96px; aspect-ratio: 1; background: var(--creme-2); cursor: pointer; position: relative; }
.photos-site button img { width: 100%; height: 100%; object-fit: cover; }
.photos-site button.sur-le-site { border-color: var(--succes); }
.photos-site button:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
.espace-avis textarea { width: 100%; }

/* ── Rendez-vous : choisir un moment libre ──────────────────────── */
.creneaux-jours { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.creneau-jour { flex: none; display: grid; justify-items: center; gap: 1px; width: 64px; padding: 8px 4px; border: 1px solid var(--bord-fort); border-radius: 4px; background: var(--carte); color: var(--encre); font: inherit; cursor: pointer; }
.creneau-jour span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); }
.creneau-jour b { font-size: 1.25rem; font-weight: 500; line-height: 1.2; }
.creneau-jour.choisi { background: var(--encre); border-color: var(--encre); color: #fff; }
.creneau-jour.choisi span { color: #d9d9d9; }
.creneaux-titre { margin: 14px 0 8px; font-weight: 500; }
.creneaux-heures { display: flex; flex-wrap: wrap; gap: 8px; }
.creneau-heure { min-width: 76px; padding: 8px 12px; border: 1px solid var(--bord-fort); border-radius: 4px; background: var(--carte); font: inherit; cursor: pointer; }
.creneau-heure.choisi { background: var(--encre); border-color: var(--encre); color: #fff; }
.creneau-jour:focus-visible, .creneau-heure:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
.rdv-resume { display: flex; gap: 14px; align-items: flex-start; }

/* Réglages › Réseaux sociaux : les listes d'étapes et de possibilités. */
.etapes-meta { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; }
