/* Cérès gestion — feuille de style unique, sans étape de compilation. */

/* Polices du site (Bricolage Grotesque, Source Serif 4 : licence SIL Open Font), hébergées ici. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/bricolage-grotesque-normal-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/bricolage-grotesque-normal-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/source-serif-4-italic-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/source-serif-4-normal-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/source-serif-4-normal-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


:root {
    /* Charte du site ceres-recouvrement.fr : vert champ (encre), ambre, paille claire. */
    --primaire: #26402B;
    --primaire-clair: #4A6B50;
    --primaire-pale: #E6EDDF;
    --ble: #DFA054;
    --ambre: #D08A2C;
    --ambre-texte: #A66618;
    --ambre-pale: #FBF0DE;
    --terre: #26402B;
    --paille: #EDF1E5;
    --fond: #F7FAF3;
    --carte: #FFFFFF;
    --texte: #26402B;
    --texte-doux: #5D6B5E;
    --bordure: #DDE3D4;
    --succes: #2F6B3A;
    --succes-pale: #E3F0E3;
    --rouge: #b3261e;
    --rouge-pale: #fbe9e7;
    --rayon: 12px;
    --police: "Source Serif 4", Georgia, serif;
    --police-titres: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    font-family: var(--police);
    font-size: 15px;
    line-height: 1.5;
    color: var(--texte);
    background: var(--fond);
}

a { color: var(--primaire); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
code { font-size: .9em; background: var(--primaire-pale); padding: 1px 5px; border-radius: 4px; }

/* Structure */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--paille); color: var(--terre); border-right: 1px solid var(--bordure); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--terre); text-decoration: none; font-weight: 700; font-size: 1.1rem; margin: 0 6px 18px; }
.brand img { height: 44px; width: auto; }
.nav a, .nav span { display: flex; justify-content: space-between; align-items: center; color: var(--terre); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { background: rgba(38, 64, 43, .08); }
.nav a.active { background: var(--primaire); color: #fff; font-weight: 600; }
.nav span { opacity: .55; cursor: default; }
.nav .soon { font-size: .7rem; border: 1px solid currentColor; border-radius: 99px; padding: 0 6px; }
.nav-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); margin: 14px 10px 4px; }
.sidebar-footer { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--bordure); font-size: .85rem; color: var(--texte-doux); }
.sidebar-footer button { margin-top: 8px; }
.main { padding: 28px 36px; max-width: 1150px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { color: var(--texte-doux); margin: 0; }

/* Cartes et grilles */
.card { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 18px 20px; margin-bottom: 18px; }
.card h2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.grid .card { margin-bottom: 0; }
.espace-titre { text-align: center; }
.espace-choix .card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.espace-choix .card p { flex: 1; }
.espace-choix .card h2 { justify-content: center; }
.muted { color: var(--texte-doux); }
.small { font-size: .85rem; }
.empty { color: var(--texte-doux); font-style: italic; margin: 0; }
.stat { font-size: 1.8rem; font-weight: 700; color: var(--primaire); }

/* Badges et messages */
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--primaire-pale); color: var(--primaire); white-space: nowrap; }
.badge.ambre { background: var(--ambre-pale); color: var(--ambre-texte); }
.badge.rouge { background: var(--rouge-pale); color: var(--rouge); }
.alert { padding: 12px 16px; border-radius: var(--rayon); margin-bottom: 18px; border: 1px solid; }
.alert.ok { background: var(--succes-pale); border-color: #c4d4c1; color: var(--succes); }
.alert.error { background: var(--rouge-pale); border-color: #efc2bd; color: var(--rouge); }
.alert.warn { background: var(--ambre-pale); border-color: #ecd0a6; color: #7a4d14; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--bordure); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-doux); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Formulaires */
label { display: block; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 16px; }
.hint { font-size: .85rem; color: var(--texte-doux); margin-top: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=month], input[type=tel], input[type=search], select, textarea {
    width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #CBD5C0; border-radius: 8px; background: #fff; color: var(--texte);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ambre); outline-offset: 1px; border-color: var(--ambre); }
.code-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.checkbox { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.error-text { color: var(--rouge); font-size: .85rem; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--primaire); background: var(--primaire); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--primaire-clair); }
.btn.secondary { background: #fff; color: var(--primaire); }
.btn.secondary:hover { background: var(--primaire-pale); }
.btn.danger { background: #fff; color: var(--rouge); border-color: var(--rouge); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn.link { background: none; border: 0; color: inherit; padding: 0; text-decoration: underline; font-weight: 400; }
.inline-form { display: inline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Écrans de connexion */
.guest { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.guest-card { width: 100%; max-width: 420px; background: var(--carte); border: 1px solid var(--bordure); border-radius: 14px; padding: 30px 28px; }
.guest-card .brand { color: var(--primaire); justify-content: center; margin-bottom: 22px; }
.guest-card .brand img { width: 260px; max-width: 100%; height: auto; }
.guest-card .btn { width: 100%; }
.qr { display: flex; justify-content: center; padding: 12px; background: #fff; border: 1px solid var(--bordure); border-radius: var(--rayon); margin: 12px 0; }
.secret { font-family: ui-monospace, Consolas, monospace; letter-spacing: .08em; text-align: center; word-break: break-all; }
.recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; font-family: ui-monospace, Consolas, monospace; background: var(--primaire-pale); padding: 14px; border-radius: var(--rayon); margin: 12px 0; }
details summary { cursor: pointer; color: var(--primaire); margin: 12px 0; }

/* Dépôt de pièces */
.dropzone { border: 2px dashed #CBD5C0; border-radius: var(--rayon); padding: 14px 16px; background: var(--paille); }
.dropzone.over { border-color: var(--ambre); background: var(--ambre-pale); }

/* Paramètres */
.setting-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bordure); }
.setting-row:last-child { border-bottom: 0; }
.setting-value { font-weight: 600; text-align: right; white-space: nowrap; }
.bareme-table td { padding: 4px 10px; }
.rows-editor td { padding: 4px 6px; }
.rows-editor input { padding: 6px 8px; }

/* Téléphone */
.menu-toggle { display: none; }
@media (max-width: 860px) {
    .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .main, .card, .setting-row > div { min-width: 0; }
    .main p, .main h1, .main h2, .main .setting-row a { overflow-wrap: anywhere; }
    /* Les tableaux gardent leur largeur et défilent de côté dans leur cadre. */
    .main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .main th, .main td { white-space: nowrap; }
    .main td input, .main td select { min-width: 110px; }
    .grid { grid-template-columns: minmax(0, 1fr); }
    .page-head { flex-wrap: wrap; }
    .page-head .actions { flex-wrap: wrap; }
    .table-wrap { overflow-x: auto; }
    .sidebar { position: sticky; top: 0; z-index: 10; padding: 10px 16px; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .brand { margin: 0; }
    .menu-toggle { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--terre); color: var(--terre); border-radius: 8px; padding: 6px 10px; font: inherit; }
    .nav, .sidebar-footer { display: none; width: 100%; }
    .sidebar.open .nav, .sidebar.open .sidebar-footer { display: block; }
    .main { padding: 20px 16px; }
    .setting-row { grid-template-columns: 1fr; }
    .setting-value { text-align: left; }
    /* 16 px : le téléphone ne zoome pas à chaque saisie. */
    input, select, textarea { font-size: 16px !important; }
    input[type=file] { max-width: 100%; }
    .espace-entete { padding: 10px 14px; flex-wrap: wrap; }
    .espace-entete .actions { gap: 6px; }
    .espace-entete .btn.small { padding: 5px 9px; font-size: .8rem; }
}

/* États « en règle » : seul usage du vert */
.badge.ok { background: var(--succes-pale); color: var(--succes); }
h1, h2 { color: var(--terre); }
.guest { background: radial-gradient(circle at 50% 0%, var(--paille), var(--fond) 60%); }
.rouge-texte { color: var(--rouge); }

/* Espaces en ligne (clients et débiteurs) */
body.espace { background: var(--fond); }
.espace-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: linear-gradient(180deg, var(--paille), var(--fond)); border-bottom: 1px solid var(--bordure); }
.espace-main { max-width: 860px; margin: 0 auto; padding: 24px 16px; }
.espace-bandeau-apercu { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: #fdf0d5; border-bottom: 2px solid #c9871f; font-weight: 600; text-align: center; }
.espace-apercu form { opacity: .55; pointer-events: none; }
.notice h2 { margin-top: 0; }
.notice ol, .notice ul { padding-left: 22px; }
.notice li { margin-bottom: 6px; }
@media print { .espace-entete, .espace-bandeau-apercu, .no-print, .sidebar, .topbar { display: none !important; } .app { display: block; } .notice .card { break-inside: avoid; } }
.espace-pied { max-width: 860px; margin: 0 auto; padding: 18px 16px 32px; border-top: 1px solid var(--bordure); }

/* Aide « ? » et mode d'emploi */
.main { position: relative; }
.outils-page { position: absolute; top: 18px; right: 18px; display: flex; gap: 8px; align-items: center; z-index: 2; }
.signaler-bouton { font-size: .8rem; font-weight: 600; color: var(--terre); border: 1px solid var(--bordure); background: var(--carte); border-radius: 15px; padding: 5px 10px; text-decoration: none; }
.signaler-bouton:hover { border-color: var(--terre); }
.aide-bouton { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--terre); color: var(--terre); background: var(--carte); font-weight: 700; text-decoration: none; z-index: 2; }
.aide-bouton:hover { background: var(--terre); color: #fff; }
.main > .page-head { padding-right: 130px; }
.notice details.card > summary { cursor: pointer; }
.notice details.card[open] > summary { margin-bottom: 8px; }
.aide-titre { margin: 18px 0 10px; }
.lexique dt { font-weight: 700; margin-top: 10px; color: var(--terre); }
.lexique dd { margin: 2px 0 0; }
:target { scroll-margin-top: 80px; }

/* Téléphone : optimisations sans effet sur l'ordinateur (au-delà de 860 px rien ne change). */
@media (max-width: 860px) {
    h1 { font-size: 1.35rem; }
    .card { padding: 14px 14px; margin-bottom: 14px; }
    .grid { gap: 12px; }
    .btn { min-height: 42px; }
    .btn.small { min-height: 34px; padding: 5px 11px; }
    .nav a { padding-top: 11px; padding-bottom: 11px; }
    .page-head .actions > .btn, .page-head .actions > form > .btn { flex: 1 1 auto; }
    .outils-page { position: static; justify-content: flex-end; margin: -6px 0 6px; }
    .main > .page-head { padding-right: 0; }
    .seulement-ordinateur { display: none !important; }
    details.card > summary { padding: 4px 0; }
}

/* Confirmation dans la page */
.confirmer-question { font-size: .85rem; font-weight: 600; color: var(--rouge); margin-right: 6px; }
.btn.confirmer-bouton { background: var(--rouge); border-color: var(--rouge); color: #fff; }

/* Infobulles */
.info { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 50%; border: 1px solid var(--terre); color: var(--terre); font-size: .72rem; font-weight: 700; line-height: 1; cursor: help; vertical-align: middle; background: var(--carte); }
.info .info-bulle { display: none; position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 280px; padding: 8px 10px; border-radius: 8px; background: #2B2118; color: #fff; font-size: .8rem; font-weight: 400; line-height: 1.4; text-align: left; white-space: normal; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.info .info-bulle::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #2B2118; }
.info:hover .info-bulle, .info:focus .info-bulle, .info:focus-within .info-bulle { display: block; }
@media (max-width: 860px) {
    .info .info-bulle { position: fixed; left: 16px; right: 16px; bottom: auto; top: 30%; transform: none; max-width: none; width: auto; }
    .info .info-bulle::after { display: none; }
}

/* Blocs de formulaire regroupés */
fieldset.bloc-action, details.bloc-action { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 10px 14px; margin: 4px 0 14px; }
fieldset.bloc-action legend { font-weight: 600; padding: 0 6px; }
details.bloc-action > summary { cursor: pointer; font-weight: 600; }

/* Téléphone : un tableau de saisie de factures devient une carte par facture. */
@media (max-width: 860px) {
    .factures-cartes table, .factures-cartes tbody, .factures-cartes tr, .factures-cartes td { display: block; width: 100%; }
    .factures-cartes table { overflow: visible; }
    .factures-cartes thead { display: none; }
    .factures-cartes tr { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 8px 10px; margin-bottom: 10px; }
    .factures-cartes td { border: 0; padding: 3px 0; white-space: normal; }
    .factures-cartes td::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--texte-doux); }
    .badge { white-space: normal; }
}

/* Recherche générale (menu) et sommaire de la fiche dossier */
.recherche-generale { margin: 0 0 10px; }
.recherche-generale input[type=search] { padding: 7px 10px; font-size: .85rem; }
.origine-dossier { font-size: .85rem; color: var(--texte-doux); margin-top: 4px; }
.sommaire-dossier { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 0; margin: -8px 0 14px; background: var(--fond); border-bottom: 1px solid var(--bordure); font-size: .82rem; }
.sommaire-dossier a { color: var(--texte-doux); text-decoration: none; white-space: nowrap; }
.sommaire-dossier a:hover { color: var(--primaire); text-decoration: underline; }
.alert.prescrite { border-width: 2px; font-weight: 600; }
@media (max-width: 860px) {
    .recherche-generale { margin: 8px 0 10px; }
    .sommaire-dossier { top: 64px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 6px; padding: 8px 0; margin: 0 0 12px; scrollbar-width: none; }
    .sommaire-dossier a { padding: 5px 10px; border: 1px solid var(--bordure); border-radius: 99px; background: var(--carte); color: var(--terre); font-size: .85rem; }
    .sommaire-dossier ~ :target, .sommaire-dossier ~ * :target { scroll-margin-top: 120px; }
    /* Barre collante opaque sur toute la largeur : le texte qui défile ne transparaît ni dessous ni sur les côtés. */
    .sommaire-dossier { z-index: 9; background-color: var(--fond); margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; box-shadow: 0 -8px 0 var(--fond), 0 2px 4px rgba(0, 0, 0, .06); }
    /* Titre de carte et mention à côté (« Tâches » · « Première lettre… ») : le titre ne se coupe jamais au milieu d'un mot. */
    .card h2 { flex-wrap: wrap; overflow-wrap: normal; word-break: normal; }
    .card h2 > * { min-width: 0; overflow-wrap: anywhere; }
}

/* Espaces en ligne sur téléphone : rien ne déborde de l'écran (sans effet au-delà de 860 px). */
@media (max-width: 860px) {
    .espace-main { padding: 18px 16px; overflow-wrap: anywhere; }
    .espace-main .card, .espace-main .grid > *, .espace-main .setting-row > div { min-width: 0; }
    .espace-main table { width: 100%; }
    /* Tableau de bord client : chaque dossier devient une carte, « Restant dû » compris. */
    .espace-cartes table, .espace-cartes tbody, .espace-cartes tr, .espace-cartes td { display: block; width: 100%; }
    .espace-cartes thead { display: none; }
    .espace-cartes tr { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 8px 10px; margin-bottom: 10px; }
    .espace-cartes td { border: 0; padding: 3px 0; text-align: left !important; white-space: normal; }
    .espace-cartes td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--texte-doux); }
    /* Nouveau dossier : une carte par facture, champs sur toute la largeur. */
    .espace-factures td input { width: 100%; min-width: 0; box-sizing: border-box; }
    .espace-main input[type=date] { min-width: 0; max-width: 100%; }
    /* Payer depuis le téléphone : le QR code ne sert à rien sur l'appareil qui l'affiche. */
    .espace-qr { display: none; }
}

/* Liste unique « À faire » du tableau de bord. */
.filtres-a-faire { margin: 4px 0 6px; flex-wrap: wrap; }
.ligne-a-faire + .ligne-a-faire { border-top: 1px solid var(--bordure); }
.ligne-a-faire .setting-row { border-bottom: 0; }

/* Fiche dossier : frise des étapes, prochaine action, blocs repliables. */
.frise-dossier { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0 0 12px; counter-reset: etape; flex-wrap: wrap; }
.frise-dossier li { flex: 1 1 0; min-width: 90px; text-align: center; font-size: .8rem; padding: 6px 4px; border-radius: 6px; background: var(--fond); color: var(--texte-doux, #7a6a55); border: 1px solid var(--bordure); counter-increment: etape; }
.frise-dossier li::before { content: counter(etape) ". "; }
.frise-dossier li.faite { background: var(--primaire-pale); color: var(--primaire); }
.frise-dossier li.faite::before { content: "✓ "; }
.frise-dossier li.courante { background: var(--primaire); color: #fff; font-weight: 600; border-color: var(--primaire); }
.prochaine-action { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--rayon); border: 2px solid #ecd0a6; background: var(--ambre-pale); margin-bottom: 14px; }
.prochaine-action.rouge { border-color: #efc2bd; background: var(--rouge-pale); }
.prochaine-action.ok { border-color: #c4d4c1; background: var(--succes-pale); }
.prochaine-action.muted { border-color: var(--bordure); background: var(--fond); }
.titre-repliable { cursor: pointer; }
.titre-repliable::after { content: "▾"; font-size: .8em; margin-left: 8px; opacity: .6; }
.bloc-replie > :not(h2) { display: none !important; }
.bloc-replie > h2 { margin-bottom: 0; }
.bloc-replie > .titre-repliable::after { content: "▸ afficher"; font-size: .75rem; font-weight: 400; }
@media (max-width: 860px) {
    .frise-dossier li { min-width: 30%; }
    .prochaine-action { flex-direction: column; align-items: stretch; }
}

.lot-validation { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; margin: 6px 0; background: var(--fond); border: 1px dashed var(--bordure); border-radius: var(--rayon); }
.apercu-a-faire { margin-top: 6px; }
.apercu-a-faire iframe { width: 100%; height: 520px; border: 1px solid var(--bordure); border-radius: 6px; margin: 6px 0; background: #fff; }
@media (max-width: 860px) { .apercu-a-faire iframe { height: 380px; } }

/* Menu à six entrées : sous-écrans de la rubrique ouverte. */
.sous-menu { margin: 2px 0 6px 12px; padding-left: 8px; border-left: 2px solid var(--ambre); }
.sous-menu a { font-size: .9rem; padding: 6px 10px; }
.reglages .card a { display: block; padding: 6px 0; }

/* Typographie et boutons du site : titres, menu, boutons, étiquettes et tableaux en Bricolage Grotesque ; texte en Source Serif. */
body { font-size: 16px; }
h1, h2, h3, .nav, .btn, .badge, .stat, th, label, .nav-title, .brand, .frise-dossier, .filtres-a-faire, input, select, textarea, table { font-family: var(--police-titres); }
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; }
.btn { border-radius: 999px; }
.nav a.active { background: var(--primaire); color: #FBFCF8; }
.nav a.active .badge { background: var(--ambre); color: #fff; }
.card { border-color: var(--bordure); }
a { color: var(--primaire); text-decoration-color: var(--ambre); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--ambre); outline-offset: 2px; }
.prochaine-action { border-color: var(--ambre-c, #DFA054); }

.reste-a-faire { margin: 4px 0 0 18px; padding: 0; }
.chiffres-dossier { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 8px; font-family: var(--police-titres); font-size: .95rem; color: var(--texte-doux); }
.chiffres-dossier strong { color: var(--texte); }

/* Avancement du dossier dans l'espace client. */
.jalons { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 18px; flex-wrap: wrap; }
.jalons li { flex: 1 1 0; min-width: 130px; padding: 10px 12px; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--carte); display: flex; flex-direction: column; gap: 2px; font-family: var(--police-titres); }
.jalons li.fait { background: var(--primaire-pale); border-color: #C8D6BF; }
.jalons li.fait strong::before { content: "✓ "; color: var(--primaire); }
@media (max-width: 860px) { .jalons { flex-direction: column; } .jalons li { min-width: 0; } }

/* Exemples dans les champs : lisibles mais discrets. */
input::placeholder, textarea::placeholder { color: #8C9A8B; font-style: italic; opacity: 1; }
.prochaine-action > .btn { flex-shrink: 0; white-space: nowrap; }
