/* =========================================================================
   Tempo Solutions — Feuille de style commune (charte graphique)
   Mobile first. Aucune dépendance externe (pas de CDN).
   Servie depuis www/assets/ ; app/ et admin/ la référencent via l'URL du site.
   ========================================================================= */

:root {
    --navy: #1a3a5c;
    --navy-light: #2d5a8e;
    --navy-dark: #0f2338;
    --orange: #e07b39;
    --orange-soft: #faeeda;
    --bg: #f4f8ff;
    --white: #ffffff;
    --text-primary: #1a2940;
    --text-secondary: #8899bb;
    --border: #dce8f5;
    --green: #3b6d11;
    --green-bg: #eaf3de;
    --red: #a32d2d;
    --red-bg: #fcebeb;
    --amber-text: #854f0b;
    --slate: #52606d;
    --slate-bg: #e9ecf1;

    --radius-card: 14px;
    --radius-btn: 8px;
    --shadow: 0 1px 3px rgba(26, 58, 92, .08), 0 6px 24px rgba(26, 58, 92, .06);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg);
    font-size: 16px;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy); }
h1 { font-weight: 800; font-size: 1.6rem; }
h2 { font-weight: 700; font-size: 1.3rem; }
h3 { font-weight: 700; font-size: 1.1rem; }
p { margin: 0 0 1rem; }
a { color: var(--orange); }
a:hover { color: var(--navy); }

/* ── Date du jour, Accueil espace client (bien visible) ─────────────────── */
.date-jour { font-size: 2.1rem; font-weight: 800; color: var(--navy); margin: 2px 0 20px; }
@media (max-width: 640px) { .date-jour { font-size: 1.5rem; } }

/* ── Mise en page ──────────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--text-secondary); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
    .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Cartes ────────────────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: .5px solid var(--border);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--shadow);
}
.card h2:first-child, .card h3:first-child { margin-top: 0; }

/* ── Indicateurs (tableau de bord) ─────────────────────────────────────── */
.kpi { text-align: left; }
.kpi .kpi-value { font-size: 2rem; font-weight: 800; color: var(--navy); display: block; }
.kpi .kpi-label { color: var(--text-secondary); font-size: .9rem; }

/* ── Boutons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-block; border: none; cursor: pointer;
    font-family: inherit; font-size: 1rem; font-weight: 700;
    padding: 12px 24px; border-radius: var(--radius-btn);
    text-decoration: none; text-align: center; line-height: 1.2;
    transition: filter .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-loading { opacity: .6; cursor: default; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { color: #fff; filter: brightness(1.1); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { color: #fff; filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--border); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .9rem; }

/* ── Formulaires ──────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.input, select.input, textarea.input {
    width: 100%; font-family: inherit; font-size: 1rem; color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-btn);
    padding: 11px 14px; background: #fff; -webkit-appearance: none; appearance: none;
}
.input:focus, select.input:focus, textarea.input:focus {
    border-color: var(--navy); outline: 2px solid rgba(26, 58, 92, .12); outline-offset: 0;
}
textarea.input { min-height: 96px; resize: vertical; }
.field .hint { font-size: .82rem; color: var(--text-secondary); margin-top: 4px; }
.field .error-text { font-size: .85rem; color: var(--red); margin-top: 4px; }

/* ── Comptes démo (admin) : simulation interactive de l'espace client ──── */
/* Volontairement AUCUNE image : uniquement les mêmes classes CSS que
   l'espace client réel, avec des données fictives — les onglets basculent
   côté client (tempo.js), pas de rechargement de page. */
.demo-fenetre { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; margin-top: 12px; }
.demo-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #fbfdff; border-bottom: 1px solid var(--border); }
.demo-topbar .qui { display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 700; color: var(--navy); }
.demo-modifier { font-size: .78rem; color: var(--orange); text-decoration: none; font-weight: 700; white-space: nowrap; }
.demo-modifier:hover { text-decoration: underline; }
.demo-tabs { display: flex; gap: 2px; background: var(--navy); padding: 0 8px; overflow-x: auto; }
.demo-tabs button {
    background: none; border: none; cursor: pointer; font: inherit;
    color: rgba(255,255,255,.75); font-size: .82rem; font-weight: 600;
    padding: 10px 14px; white-space: nowrap; border-bottom: 2px solid transparent;
    display: inline-flex; align-items: center; gap: 6px;
}
.demo-tabs button:hover { color: #fff; }
.demo-tabs button.active { color: #fff; border-bottom-color: var(--orange); }
.demo-panel { padding: 16px; min-height: 260px; overflow-x: auto; }

/* Simulation « espace client » (admin › Comptes démo) : les MÊMES composants que l'espace client (en-tête, menu, bandeau d'accueil, cartes, liste du jour),
   simplement rangés dans la fenêtre au lieu de la page entière. */
.demo-app { background: var(--bg); }
.demo-app .shell-topbar { position: static; }
.demo-app .app-shell { min-height: 0; }
.demo-app .app-sidebar { position: static; height: auto; min-height: 420px; width: 200px; }
.demo-app .app-sidebar .nav-link { width: 100%; background: none; border: 0; font-family: inherit; text-align: left; cursor: pointer; }
.demo-app .app-sidebar .nav-link:hover { background: var(--bg); }
.demo-app .app-sidebar .nav-link.active { background: var(--orange-soft); color: var(--navy); }
.demo-app .app-content { min-height: 0; }
.demo-app .app-main { padding: 0 0 16px; }
.demo-app .app-content .container { max-width: none; padding: 0 20px 20px; }
.demo-app .demo-panel { padding: 16px 0 0; min-height: 0; overflow-x: auto; }
.demo-app .demo-panel[data-demo-panel="accueil"] { padding-top: 0; overflow-x: hidden; }
.demo-app .home-hero { margin: 0 -20px 22px; }
@media (max-width: 899px) {
    .demo-app .app-shell { flex-direction: column; }
    .demo-app .app-sidebar { position: static; transform: none; width: auto; min-height: 0; display: flex; gap: 2px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--border); box-shadow: none; }
    .demo-app .app-sidebar .nav-link { width: auto; white-space: nowrap; margin-bottom: 0; }
}

/* ── Autocomplétion « Client » (devis/factures) ─────────────────────────── */
.autocomplete-wrap { position: relative; }
.autocomplete-liste {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-btn);
    box-shadow: var(--shadow); max-height: 230px; overflow-y: auto;
}
.autocomplete-item {
    display: block; width: 100%; text-align: left; background: none; border: none;
    border-bottom: 1px solid var(--border); padding: 10px 14px; font: inherit;
    font-size: .92rem; color: var(--text-primary); cursor: pointer;
}
.autocomplete-item:last-of-type { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item:focus, .autocomplete-item.actif { background: var(--navy); color: #fff; outline: none; }

/* ── Recherche « en direct » ([data-live-search], tempo.js) ─────────────── */
.live-search-wrap { position: relative; }
.live-search-liste {
    list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-btn);
    box-shadow: var(--shadow); max-height: 340px; overflow-y: auto;
}
.live-search-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: .92rem; color: var(--text-primary); }
.live-search-item small { display: block; color: var(--text-secondary); font-size: .82rem; }
.live-search-item:hover, .live-search-item.actif { background: var(--navy); color: #fff; }
.live-search-item:hover small, .live-search-item.actif small { color: rgba(255, 255, 255, .8); }
.live-search-vide, .live-search-aide { padding: 10px 14px; font-size: .85rem; color: var(--text-secondary); }
.check-line { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; }
.check-line input { margin-top: 4px; }

/* ── Messages / alertes ───────────────────────────────────────────────── */
.alert { border-radius: var(--radius-btn); padding: 12px 16px; margin-bottom: 16px; font-size: .95rem; border: 1px solid transparent; }
.alert-success { background: var(--green-bg); color: var(--green); border-color: #cfe6b6; }
.alert-error   { background: var(--red-bg);  color: var(--red);  border-color: #f2c9c9; }
.alert-info    { background: #e9f1ff;        color: var(--navy); border-color: #cfe0fb; }
.alert-warning { background: var(--orange-soft); color: var(--amber-text); border-color: #efd7b0; }

/* ── Encadré conditions (tarifs) ─────────────────────────────────────── */
.notice-orange {
    background: var(--orange-soft); color: var(--amber-text);
    border: 1px solid #efd7b0; border-radius: var(--radius-card); padding: 16px 20px;
}

/* ── Badges ───────────────────────────────────────────────────────────── */
.badge { display: inline-block; border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.badge-green  { background: var(--green-bg); color: var(--green); }
.badge-orange { background: var(--orange-soft); color: var(--amber-text); }
.badge-red    { background: var(--red-bg); color: var(--red); }
.badge-navy   { background: #e3ecf9; color: var(--navy); }
.badge-auto::before { content: "⚙ "; }

/* ── Tableaux ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.data th { color: var(--text-secondary); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
table.data tbody tr:nth-child(even) { background: #fbfdff; }
table.data tbody tr:hover { background: #f2f7ff; }

/* ── État vide ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
.empty-state .emoji { font-size: 2.4rem; display: block; margin-bottom: 8px; }

/* ── En-tête applicative (admin) : bande pleine largeur, sticky, menu latéral en dessous ── */
.app-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
.app-header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 60px; gap: 16px; padding: 0 20px; }
.app-header-gauche { display: flex; align-items: center; min-width: 0; justify-self: start; }
.app-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; min-width: 0; justify-self: center; }
.app-brand img { width: 32px; height: 32px; display: block; flex: none; }
.app-header .who { font-size: .88rem; color: rgba(255, 255, 255, .75); white-space: nowrap; justify-self: end; }
.app-header .who a { color: #fff; }
.app-header .who-compte { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-left: 4px; border-radius: 8px; vertical-align: middle; color: rgba(255, 255, 255, .8); }
.app-header .who-compte:hover, .app-header .who-compte.active { background: rgba(255, 255, 255, .12); color: #fff; }
.app-header .who-compte svg { display: block; }
table.data th[scope="row"] { width: 190px; white-space: nowrap; }
.app-header .hamburger { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); color: #fff; }
.app-header .hamburger:hover { border-color: rgba(255, 255, 255, .6); }
@media (max-width: 420px) { .app-brand span { display: none; } }

.app-main { padding: 24px 0 64px; flex: 1 0 auto; }
.app-footer { text-align: center; color: var(--text-secondary); font-size: .75rem; padding: 14px 0 18px; border-top: 1px solid var(--border); margin-top: auto; }

/* ── Coquille sidebar gauche (espace client : en-tête 3 zones ; admin : app-header ci-dessus) ── */
.shell-topbar {
    position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--border);
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
    padding: 0 14px; height: 60px;
}
.shell-topbar .zone-gauche { display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 800; }
.shell-topbar .zone-gauche img { width: 28px; height: 28px; }
.shell-topbar .zone-gauche span { display: none; }
@media (min-width: 560px) { .shell-topbar .zone-gauche span { display: inline; } }
.shell-topbar .zone-centre { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; overflow: hidden; }
.shell-topbar .zone-centre .entreprise-logo {
    width: 30px; height: 30px; border-radius: 8px; object-fit: contain; flex: none;
}
.shell-topbar .zone-centre .entreprise-initiales {
    width: 30px; height: 30px; border-radius: 8px; background: var(--orange-soft); color: var(--amber-text);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; flex: none;
}
.shell-topbar .zone-centre .entreprise-nom { font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell-topbar .zone-droite { display: flex; align-items: center; gap: 6px; }
/* Caisse : pastille « bon cadeau » — n'apparaît que si le client choisi a un bon actif */
.bon-pastille { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--orange-soft); border: 1px solid #efd7b0; color: var(--amber-text); border-radius: 999px; padding: 5px 6px 5px 14px; margin: 6px 0; font-size: .9rem; }
.bon-pastille-autre { background: #f1f4f9; border-color: var(--border); color: var(--text-secondary); }
.bon-pastille-ok { background: var(--green-bg); border-color: transparent; color: var(--green); }
.btn-icon {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: 38px; height: 38px; border-radius: var(--radius-btn); border: 1px solid var(--border);
    background: #fff; color: var(--navy); cursor: pointer; text-decoration: none;
}
.btn-icon.wide { width: auto; padding: 0 14px; font-weight: 700; font-size: .88rem; gap: 6px; }
@media (max-width: 420px) { .btn-icon.wide { width: 38px; padding: 0; overflow: hidden; white-space: nowrap; } .btn-icon.wide .btn-lbl { display: none; } }
.btn-icon:hover { border-color: var(--navy-light); color: var(--navy); }
.hamburger { display: inline-flex; }
@media (min-width: 900px) { .hamburger { display: none; } }

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 216px; flex: none; background: #fff; border-right: 1px solid var(--border);
    padding: 16px 10px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto;
}
.app-sidebar .nav-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-btn);
    color: var(--text-primary); text-decoration: none; font-weight: 600; font-size: .95rem; margin-bottom: 2px;
}
.app-sidebar .nav-link .ti-icon { color: var(--text-secondary); flex: none; }
.app-sidebar .nav-link:hover { background: var(--bg); }
.app-sidebar .nav-link.active { background: var(--orange-soft); color: var(--navy); }
.app-sidebar .nav-link.active .ti-icon { color: var(--orange); }
.app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.app-content .container { max-width: 1180px; padding: 24px 20px 80px; }

@media (max-width: 899px) {
    .app-sidebar {
        position: fixed; left: 0; top: 60px; height: calc(100vh - 60px); width: 250px; z-index: 41;
        transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow);
    }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    .app-sidebar-backdrop {
        display: none; position: fixed; inset: 60px 0 0 0; background: rgba(15, 35, 56, .45); z-index: 40;
    }
    body.sidebar-open .app-sidebar-backdrop { display: block; }
}

/* ── Rythme et hiérarchie des pages (en-tête de page, sections, cartes) ──
   À la place d'un <h1> nu suivi de marges au cas par cas : un en-tête de
   page uniforme (titre + sous-texte optionnel + actions alignées à droite),
   un espacement vertical réglé une fois pour toutes entre sections
   (.stack-lg), et un en-tête de carte pour le motif titre + action. */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0 0 4px; }
.page-head-sub { margin: 0; color: var(--text-secondary); font-size: .95rem; max-width: 70ch; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: none; }

.stack-lg > * + * { margin-top: 24px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Ligne de liste « discrète » (avis, logo, modèle…) dans une carte : même
   forme qu'une carte mais fondue dans le fond, sans ombre. */
.card-soft {
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-btn);
    padding: 14px 16px; box-shadow: none;
}
.card-soft + .card-soft { margin-top: 10px; }

/* ── Calendrier du jour (page Accueil) ─────────────────────────────────── */
.jour-cal { display: flex; flex-direction: column; gap: 6px; }
.jour-cal .creneau {
    display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center;
    padding: 10px 12px; border-radius: var(--radius-btn); border: 1px solid transparent; cursor: pointer;
}
.jour-cal .creneau:hover { background: var(--bg); }
.jour-cal .creneau.occupe { background: rgba(var(--st-rgb), .12); border: 1px solid rgba(var(--st-rgb), .28); border-left: 4px solid var(--st); }
.jour-cal .creneau.occupe:hover { background: rgba(var(--st-rgb), .2); }
.jour-cal .creneau.occupe .heure { color: var(--st); }
.jour-cal .creneau.statut-annule .detail strong { text-decoration: line-through; }
.jour-cal .creneau .heure { font-weight: 700; color: var(--navy); font-size: .9rem; }
.jour-cal .creneau .detail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; }
.jour-cal .creneau .detail .prestation { color: var(--text-secondary); overflow-wrap: anywhere; min-width: 0; }
.jour-cal .creneau.libre .detail { color: var(--text-secondary); font-style: italic; }

/* ── Agenda hebdomadaire / journalier (page Rendez-vous) ───────────────── */
.agenda-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.agenda-toolbar .switch { display: flex; gap: 4px; background: var(--bg); border-radius: var(--radius-btn); padding: 3px; }
.agenda-toolbar .switch a { padding: 7px 14px; border-radius: 6px; font-size: .88rem; font-weight: 700; color: var(--text-secondary); text-decoration: none; }
.agenda-toolbar .switch a.active { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.agenda-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: #fff; }
.agenda-grid { min-width: 640px; }
.agenda-head { display: flex; border-bottom: 1px solid var(--border); background: #fff; }
.agenda-head .agenda-colheures { flex: none; }
.agenda-head .cell { flex: 1; min-width: 96px; padding: 10px 8px; text-align: center; font-size: .82rem; font-weight: 700; color: var(--navy); border-left: 1px solid var(--border); }
.agenda-head .cell.today { background: var(--orange-soft); }
.agenda-body { display: flex; position: relative; }
.agenda-heurelabel { height: 60px; box-sizing: border-box; font-size: .74rem; color: var(--text-secondary); text-align: right; padding: 2px 8px; border-top: 1px solid var(--border); }
.agenda-colheures { width: 52px; flex: none; }
.agenda-jour { position: relative; border-left: 1px solid var(--border); flex: 1; min-width: 96px; cursor: pointer; }
.agenda-jour .ligne-heure { height: 60px; box-sizing: border-box; border-top: 1px solid var(--border); }
/* ── Couleurs par STATUT : fond teinté sur toute la carte + liseré gauche foncé ──
   --st = teinte foncée (liseré, texte), --st-rgb = même couleur pour le fond à ~13 %.
   Reconnaissance du statut au premier coup d'œil ; la couleur de la PRESTATION
   n'apparaît plus que dans la pastille .pastille-presta. */
.statut-prevu    { --st: #1f5fae; --st-rgb: 47, 111, 187; }
.statut-confirme { --st: #237a45; --st-rgb: 46, 158, 91; }
.statut-paye     { --st: #0b7a86; --st-rgb: 14, 154, 167; }
.statut-termine  { --st: #47536a; --st-rgb: 100, 116, 139; }
.statut-annule   { --st: #a32d2d; --st-rgb: 214, 69, 69; }
.type-personnel  { --st: var(--slate); --st-rgb: 82, 96, 109; }
.agenda-bloc, .mois-chip, .jour-cal .creneau.occupe {
    --st: var(--navy); --st-rgb: 26, 58, 92;
}
.agenda-bloc.statut-prevu, .mois-chip.statut-prevu, .jour-cal .creneau.statut-prevu { --st: #1f5fae; --st-rgb: 47, 111, 187; }
.agenda-bloc.statut-confirme, .mois-chip.statut-confirme, .jour-cal .creneau.statut-confirme { --st: #237a45; --st-rgb: 46, 158, 91; }
.agenda-bloc.statut-paye, .mois-chip.statut-paye, .jour-cal .creneau.statut-paye { --st: #0b7a86; --st-rgb: 14, 154, 167; }
.agenda-bloc.statut-termine, .mois-chip.statut-termine, .jour-cal .creneau.statut-termine { --st: #47536a; --st-rgb: 100, 116, 139; }
.agenda-bloc.statut-annule, .mois-chip.statut-annule, .jour-cal .creneau.statut-annule { --st: #a32d2d; --st-rgb: 214, 69, 69; }
.agenda-bloc.type-personnel, .mois-chip.type-personnel, .jour-cal .creneau.type-personnel { --st: var(--slate); --st-rgb: 82, 96, 109; }

.agenda-bloc {
    position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 6px; overflow: hidden;
    font-size: 12.5px; line-height: 1.15; cursor: pointer; overflow-wrap: anywhere;
    background: rgba(var(--st-rgb), .13); border-left: 4px solid var(--st); color: var(--st);
}
.agenda-bloc strong { display: block; font-size: 1em; }
.agenda-bloc.statut-annule, .mois-chip.statut-annule { text-decoration: line-through; }
.agenda-bloc.statut-paye, .mois-chip.statut-paye { font-weight: 700; }
.agenda-bloc.type-personnel { background-image: repeating-linear-gradient(135deg, rgba(82,96,109,.08) 0 6px, transparent 6px 12px); }
.agenda-bloc:hover { filter: brightness(0.97); }
.pastille-presta { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: baseline; box-shadow: 0 0 0 1.5px #fff; }
.badge-statut { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: rgba(var(--st-rgb), .16); color: var(--st); }

/* Caisse : total encaissé du jour, en évidence au-dessus du détail */
.caisse-total-jour { text-align: center; padding: 16px 18px; margin: 0 0 16px; border-radius: 16px; background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.caisse-total-jour-lib { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.caisse-total-jour-val { display: block; font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.caisse-total-jour-sous { display: block; font-size: .82rem; opacity: .75; }
/* Paramètres › Automatisations */
.auto-ligne { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.auto-ligne:last-child { border-bottom: 0; }
.auto-ligne .auto-texte { min-width: 0; }
.auto-ligne .btn { flex: none; min-width: 108px; }
@media (max-width: 480px) { .auto-ligne { flex-direction: column; align-items: stretch; gap: 8px; } }
.agenda-passe { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; background: rgba(15, 35, 56, .045); }
.agenda-info {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
    max-width: min(92vw, 420px); padding: 10px 16px; border-radius: var(--radius-btn);
    background: var(--navy); color: #fff; font-size: .88rem; box-shadow: var(--shadow);
}
.agenda-pause {
    position: absolute; left: 0; right: 0; pointer-events: none;
    background: repeating-linear-gradient(45deg, #f1f3f7, #f1f3f7 6px, #e6e9ef 6px, #e6e9ef 12px);
    border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: .68rem; color: var(--text-secondary);
}

/* ── Vue Mois (Rendez-vous) ─────────────────────────────────────────────── */
.mois-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; background: #fff; }
.mois-entete { padding: 8px; text-align: center; font-size: .74rem; font-weight: 700; color: var(--text-secondary); background: var(--bg); border-bottom: 1px solid var(--border); text-transform: uppercase; }
.mois-cell { min-height: 88px; padding: 5px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); position: relative; }
.mois-cell.hors-mois { background: #fafbfd; }
.mois-cell.hors-mois .jn { color: var(--text-secondary); }
.mois-cell .jn { font-size: .78rem; font-weight: 700; color: var(--navy); text-decoration: none; display: inline-block; margin-bottom: 3px; }
.mois-cell.aujourdhui .jn { background: var(--orange); color: #fff; border-radius: 50%; width: 21px; height: 21px; line-height: 21px; text-align: center; display: inline-block; padding: 0; }
.mois-chip {
    display: block; font-size: .66rem; line-height: 1.2; padding: 2px 5px; border-radius: 4px; margin-bottom: 2px;
    background: rgba(var(--st-rgb), .13); border: none; border-left: 3px solid var(--st); color: var(--st);
    cursor: pointer; width: 100%; text-align: left; font-family: inherit;
    white-space: normal; overflow-wrap: anywhere; /* texte COMPLET : il passe à la ligne, jamais de « … » */
}

.mois-plus { font-size: .66rem; color: var(--text-secondary); }

/* ── Filtres pilule (Clients) ──────────────────────────────────────────── */
.pilules { display: flex; gap: 6px; flex-wrap: wrap; }
.pilules a { padding: 7px 14px; border-radius: 20px; font-size: .85rem; font-weight: 700; text-decoration: none; color: var(--text-secondary); background: var(--bg); }
.pilules a.active { background: var(--navy); color: #fff; }

/* ── Hub Paramètres ────────────────────────────────────────────────────── */
.reglages-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .reglages-grid { grid-template-columns: repeat(2, 1fr); } }
.reglage-carte {
    display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit;
    padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-card); background: #fff;
}
.reglage-carte:hover { border-color: var(--navy-light); box-shadow: var(--shadow); }
.reglage-carte .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--orange-soft); color: var(--orange); display: flex; align-items: center; justify-content: center; flex: none; }
.reglage-carte h3 { margin: 0 0 4px; font-size: 1rem; }
.reglage-carte p { margin: 0; color: var(--text-secondary); font-size: .85rem; }

/* ── Parrainage (gamification) ─────────────────────────────────────────── */
.modal-box-code { max-width: 420px; text-align: center; }
.modal-box-code .code-affiche {
    font-size: 1.9rem; font-weight: 800; letter-spacing: .05em; color: var(--navy);
    background: var(--orange-soft); border-radius: var(--radius-btn); padding: 12px 20px;
    display: inline-block; margin: 16px 0;
}
.modal-box-code .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.modal-box-code ul { text-align: left; }
.parr-jauge { margin: 24px 0; }
.parr-jauge .barre { height: 14px; border-radius: 20px; background: var(--border); overflow: hidden; }
.parr-jauge .barre > span { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), #f2a35f); border-radius: 20px; transition: width .4s ease; }
.parr-jauge .legende { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-secondary); margin-top: 6px; }
.paliers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.palier { text-align: center; padding: 14px 6px; border-radius: var(--radius-btn); border: 2px solid var(--border); background: #fff; }
.palier.atteint { border-color: var(--orange); background: var(--orange-soft); }
.palier .n { font-weight: 800; color: var(--navy); font-size: 1.1rem; }
.palier .lib { font-size: .76rem; color: var(--text-secondary); margin-top: 2px; }

/* ── FAQ / accordéon (partagé vitrine + espace client) ─────────────────── */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-btn); margin-bottom: 8px; overflow: hidden; background: #fff; }
.accordion-item > button {
    width: 100%; text-align: left; background: none; border: none; cursor: pointer; font: inherit;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 16px 18px; font-weight: 700; color: var(--text-primary);
}
.accordion-item .chev { transition: transform .15s ease; color: var(--text-secondary); flex: none; }
.accordion-item.open .chev { transform: rotate(90deg); }
.accordion-item [data-accordion-panel] { padding: 0 18px 16px; color: var(--text-secondary); line-height: 1.6; }

/* ── Guides (liste de fichiers) ─────────────────────────────────────────── */
.guide-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.guide-row:last-child { border-bottom: none; }
.guide-row .ic { color: var(--orange); flex: none; }
.guide-row .titre { font-weight: 600; flex: 1; }

/* ── Écran d'authentification ─────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo-line { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 20px; }
.auth-card .logo-line img { width: 40px; height: 40px; }
.auth-card .logo-line span { font-weight: 800; font-size: 1.2rem; color: var(--navy); }
.auth-links { margin-top: 16px; text-align: center; font-size: .9rem; }

/* ── Divers ───────────────────────────────────────────────────────────── */
.hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.spinner {
    display: inline-block; width: 1em; height: 1em; vertical-align: -.15em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: tempo-spin .6s linear infinite;
}
@keyframes tempo-spin { to { transform: rotate(360deg); } }

/* ── Modale de confirmation ──────────────────────────────────────────── */
/* Fond fixe qui DÉFILE quand la boîte est plus haute que l'écran ; la boîte se
   centre par margin:auto (et non align-items:center, qui rogne le haut du
   contenu inaccessible dès que la boîte dépasse la hauteur visible). */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(15, 35, 56, .55);
    display: flex; padding: 16px; z-index: 50;
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.modal-box {
    background: #fff; border-radius: var(--radius-card); padding: 24px; margin: auto;
    width: 100%; max-width: 380px; box-sizing: border-box; overflow-wrap: anywhere;
}
.modal-box input, .modal-box select, .modal-box textarea { max-width: 100%; box-sizing: border-box; }
.modal-box .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 20px; }
@media (max-width: 480px) {
    .modal-backdrop { padding: 10px; }
    .modal-box { padding: 18px 16px; max-width: 100%; }
    .modal-box .grid.cols-2, .modal-box .grid.cols-3 { grid-template-columns: 1fr; }
    .modal-box .actions .btn { flex: 1 1 auto; }
}

/* Message de Tempo Solutions (src/messages_admin.php) : fenêtre plus large, croix en haut à droite (seule façon de la fermer). */
.modal-box-msgadm { position: relative; max-width: 560px; padding-top: 22px; }
.modal-box-msgadm h2 { padding-right: 34px; }
.msgadm-fermer { position: absolute; top: 10px; right: 10px; margin: 0; }
.msgadm-croix {
    display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    border: 0; border-radius: 50%; background: var(--bg); color: var(--navy, #1a3a5c); cursor: pointer;
}
.msgadm-croix:hover, .msgadm-croix:focus-visible { background: var(--border); }
.msgadm-de { margin: 0 0 6px; padding-right: 40px; font-size: .82rem; }
.msgadm-texte { line-height: 1.6; }
.msgadm-texte a { overflow-wrap: anywhere; }
.msgadm-pied { margin: 18px 0 0; font-size: .82rem; }

[hidden] { display: none !important; }

/* ── Wizard d'inscription ─────────────────────────────────────────────── */
.wizard-wrap { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
.wizard-wrap .logo-line { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 24px; }
.wizard-wrap .logo-line img { width: 40px; height: 40px; }
.wizard-wrap .logo-line span { font-weight: 800; font-size: 1.2rem; color: var(--navy); }

.steps { display: flex; gap: 6px; margin-bottom: 24px; }
.steps .step {
    flex: 1; text-align: center; font-size: .78rem; color: var(--text-secondary);
    padding-top: 34px; position: relative;
}
.steps .step::before {
    content: attr(data-n); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--border);
    color: var(--text-secondary); font-weight: 700; line-height: 22px;
}
.steps .step::after {
    content: ""; position: absolute; top: 12px; left: calc(-50% + 13px); width: 100%;
    height: 2px; background: var(--border); z-index: -1;
}
.steps .step:first-child::after { display: none; }
.steps .step.done::before { content: "✓"; background: var(--navy); border-color: var(--navy); color: #fff; }
.steps .step.current::before { border-color: var(--orange); color: var(--orange); }
.steps .step.done::after { background: var(--navy); }
.steps .step.done, .steps .step.current { color: var(--text-primary); }

.formules { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 8px 0 4px; }
@media (min-width: 720px) { .formules { grid-template-columns: repeat(3, 1fr); } }
.formule-card {
    display: block; border: 2px solid var(--border); border-radius: var(--radius-card);
    padding: 18px; cursor: pointer; background: #fff; position: relative;
}
.formule-card:hover { border-color: var(--navy-light); }
.formule-card:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.formule-card input[type="radio"] { position: absolute; top: 16px; right: 16px; }
.formule-card .ftitre { font-weight: 800; color: var(--navy); font-size: 1.1rem; }
.formule-card .fsous { font-size: .8rem; color: var(--text-secondary); margin-bottom: 8px; }
.formule-card .fprix { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }
.formule-card .fprix small { font-size: .8rem; font-weight: 600; color: var(--text-secondary); }
.formule-card .fbarre { text-decoration: line-through; color: var(--text-secondary); font-size: .85rem; }
.formule-card ul { margin: 10px 0 0; padding-left: 18px; font-size: .85rem; }
.formule-card .ribbon {
    position: absolute; top: -10px; left: 18px; background: var(--orange); color: #fff;
    font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 6px;
}
.sub-choice { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: .9rem; }
.sub-choice label { display: block; margin-top: 6px; }

.recap dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.recap dt { color: var(--text-secondary); font-size: .9rem; }
.recap dd { margin: 0; font-weight: 600; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* =========================================================================
   Vitrine (temposolutions.fr) — landing page marketing
   ========================================================================= */
/* Conteneur généreux, pour les sections qui doivent respirer sur grand écran
   (le .container standard, 1080px, reste utilisé où la lecture prime : FAQ,
   contact). */
.container-wide { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .container-wide { padding: 0 20px; } }

/* En-tête plus haute et plus aérée (espace vertical), mais le CONTENU
   (texte, logo, boutons) garde ses tailles d'origine — seule la boîte qui
   les contient est plus grande. */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--border);
}
.site-header .container-wide { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.site-header .brand { display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 800; text-decoration: none; font-size: 1.05rem; flex: none; }
.site-header .brand img { width: 30px; height: 30px; }
.site-header nav.site-nav { display: none; gap: 28px; flex: 1; justify-content: center; }
@media (min-width: 860px) { .site-header nav.site-nav { display: flex; } }
.site-header nav.site-nav a { color: var(--text-primary); text-decoration: none; font-weight: 600; font-size: .93rem; }
.site-header nav.site-nav a:hover { color: var(--orange); }
.site-header .actions { display: flex; align-items: center; gap: 10px; flex: none; }
.site-header .actions .btn-ghost { display: none; }
@media (min-width: 620px) { .site-header .actions .btn-ghost { display: inline-block; } }

.hero { padding: 128px 0 64px; background: linear-gradient(180deg, #f4f8ff 0%, #ffffff 100%); }
.hero .container-wide { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero .container-wide { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font-size: 2.3rem; font-weight: 800; letter-spacing: -.01em; }
@media (min-width: 640px) { .hero h1 { font-size: 3rem; } }
.hero .lead { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 28px; max-width: 46ch; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-mock {
    background: #fff; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--border);
    padding: 18px; transform: rotate(1deg);
}
.hero-mock .bar { height: 10px; border-radius: 6px; background: var(--border); margin-bottom: 10px; }
.hero-mock .bar.w60 { width: 60%; } .hero-mock .bar.w40 { width: 40%; } .hero-mock .bar.w80 { width: 80%; }
.hero-mock .kpi-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 14px 0; }
.hero-mock .kpi-row div { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; }
.hero-mock .kpi-row strong { display: block; color: var(--navy); font-size: 1.2rem; }
.hero-mock .kpi-row span { font-size: .7rem; color: var(--text-secondary); }

section[id] { scroll-margin-top: 76px; }
.section { padding: 64px 0; }
.section.alt { background: var(--bg); }
.section .kicker { color: var(--orange); font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.section h2 { font-size: 1.7rem; max-width: 34ch; }
.section .section-lead { color: var(--text-secondary); max-width: 60ch; font-size: 1.05rem; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

.probleme-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 720px) { .probleme-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .probleme-grid { grid-template-columns: repeat(3, 1fr); } }
.probleme-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 22px; }
.probleme-item .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--red-bg); color: var(--red); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.probleme-item h3 { font-size: 1rem; margin-bottom: 6px; }
.probleme-item p { color: var(--text-secondary); font-size: .9rem; margin: 0; }

.solution-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 720px) { .solution-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .solution-grid { grid-template-columns: repeat(3, 1fr); } }
.solution-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 22px; }
.solution-item .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--green-bg); color: var(--green); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.solution-item h3 { font-size: 1rem; margin-bottom: 6px; } .solution-item p { color: var(--text-secondary); font-size: .9rem; margin: 0; }

.etapes { display: grid; gap: 24px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 720px) { .etapes { grid-template-columns: repeat(3, 1fr); } }
.etape { text-align: center; }
.etape .n { width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.etape h3 { font-size: 1rem; }
.etape p { color: var(--text-secondary); font-size: .9rem; }

.secteurs-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin-top: 32px; }
@media (min-width: 720px) { .secteurs-grid { grid-template-columns: repeat(4, 1fr); } }
.secteur-carte { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 22px 16px; text-align: center; }
.secteur-carte .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--orange-soft); color: var(--orange); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.secteur-carte h3 { font-size: .95rem; margin-bottom: 4px; }
.secteur-carte p { font-size: .82rem; color: var(--text-secondary); margin: 0; }

.tarifs-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 860px) { .tarifs-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.tarif-carte { background: #fff; border: 2px solid var(--border); border-radius: var(--radius-card); padding: 26px; position: relative; display: flex; flex-direction: column; }
.tarif-carte.recommande { border-color: var(--orange); }
.tarif-carte .ribbon { position: absolute; top: -12px; left: 24px; background: var(--orange); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.tarif-carte h3 { font-size: 1.05rem; margin-bottom: 2px; }
.tarif-carte .sous { color: var(--text-secondary); font-size: .82rem; margin-bottom: 14px; }
.tarif-carte .prix { font-size: 2.1rem; font-weight: 800; color: var(--navy); }
.tarif-carte .prix small { font-size: .9rem; font-weight: 600; color: var(--text-secondary); }
.tarif-carte .barre { text-decoration: line-through; color: var(--text-secondary); font-size: .85rem; }
.tarif-carte .annuel { color: var(--text-secondary); font-size: .82rem; margin-bottom: 16px; }
.tarif-carte ul { list-style: none; margin: 0 0 20px; padding: 0; flex: 1; }
.tarif-carte ul li { padding: 6px 0 6px 26px; position: relative; font-size: .88rem; }
.tarif-carte ul li::before { content: "\2713"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

.temoignages-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 780px) { .temoignages-grid { grid-template-columns: repeat(3, 1fr); } }
.temoignage { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 22px; }
.temoignage .etoiles { color: var(--orange); letter-spacing: .12em; margin-bottom: 10px; }
.temoignage p.citation { font-style: italic; color: var(--text-primary); }
.temoignage .auteur { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.temoignage .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .82rem; }
.temoignage .auteur .nom { font-weight: 700; font-size: .9rem; }
.temoignage .auteur .role { font-size: .8rem; color: var(--text-secondary); }

.cta-final { background: var(--navy); color: #fff; text-align: center; padding: 72px 0; }
.cta-final h2 { color: #fff; font-size: 1.9rem; }
.cta-final p { color: rgba(255,255,255,.75); max-width: 46ch; margin: 0 auto 28px; }

.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.7); padding: 40px 0 24px; font-size: .88rem; }
.site-footer .brand { color: #fff; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.site-footer .brand img { width: 26px; height: 26px; }
.site-footer .links { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.site-footer .links a { color: rgba(255,255,255,.7); text-decoration: none; }
.site-footer .links a:hover { color: #fff; }
.site-footer .bas { border-top: 1px solid rgba(255,255,255,.12); margin-top: 20px; padding-top: 16px; font-size: .8rem; color: rgba(255,255,255,.5); }

/* ── Carrousel de logos clients (défilement infini, CSS pur) ───────────── */
.logos-carrousel {
    overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logos-piste { display: flex; align-items: center; gap: 48px; width: max-content; animation: logos-defiler 28s linear infinite; }
.logos-carrousel:hover .logos-piste { animation-play-state: paused; }
@keyframes logos-defiler { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.logos-item { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); white-space: nowrap; flex: none; }
/* Boîte CARRÉE identique pour tous les logos (les fichiers sont des PNG carrés 512 × 512, src/logo.php) : « contain » = jamais rogné ni déformé,
   et deux logos de formes différentes occupent exactement la même place. Les anciens fichiers non normalisés restent cohérents grâce à la boîte fixe. */
.logos-item img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; flex: none; }
@media (max-width: 560px) { .logos-item img { width: 44px; height: 44px; } }
.logos-item-initiales {
    width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; flex: none;
}
.logos-item-nom { font-weight: 600; font-size: .92rem; color: var(--text-secondary); }
.logos-item:hover .logos-item-nom { color: var(--navy); }
@media (prefers-reduced-motion: reduce) { .logos-piste { animation: none; } }

/* Texte réservé aux lecteurs d'écran */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ── Accueil (espace client) : bandeau vivant, horloge, sections ─────────────────
   Charte inchangée : marine #1a3a5c + orange #e07b39, mais plus d'énergie. */
.home-hero {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; padding: 28px 30px; margin-bottom: 26px; border-radius: 20px; color: #fff;
    background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
    box-shadow: 0 14px 34px rgba(26, 58, 92, .28);
}
.home-hero::before {
    content: ""; position: absolute; right: -70px; top: -90px; width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(224, 123, 57, .55), rgba(224, 123, 57, 0) 68%);
}
.home-hero::after {
    content: ""; position: absolute; left: -40px; bottom: -110px; width: 240px; height: 240px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 70%);
}
.home-hero > * { position: relative; z-index: 1; }
.home-hero h1 { color: #fff; margin: 0 0 4px; font-size: clamp(1.5rem, 4vw, 2.2rem); }
.home-date { margin: 0; font-size: 1.05rem; font-weight: 600; color: #ffd9bd; }
.home-resume { margin: 10px 0 0; color: rgba(255, 255, 255, .88); font-size: .98rem; }
.home-resume strong { color: #fff; }
.home-compte { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: var(--orange); color: #fff; font-size: .8rem; font-weight: 700; }
.home-compte:empty { display: none; }

.home-titre { display: flex; align-items: center; gap: 10px; margin: 30px 0 12px; }
.home-titre h2 { margin: 0; font-size: 1.25rem; }
.home-titre-barre { width: 5px; height: 24px; border-radius: 3px; background: var(--orange); }
.home-kpis { margin-top: 0; }
.kpi-vivant { position: relative; padding: 18px 18px 16px; border-top: 4px solid var(--navy); transition: transform .15s ease, box-shadow .15s ease; }
.kpi-vivant:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(26, 58, 92, .14); }
.kpi-vivant.kpi-orange { border-top-color: var(--orange); }
.kpi-vivant .kpi-ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(26, 58, 92, .09); color: var(--navy); margin-bottom: 8px; }
.kpi-vivant.kpi-orange .kpi-ic { background: var(--orange-soft); color: var(--orange); }
.kpi-vivant .kpi-value { font-size: 1.9rem; }
.home-carte { margin-top: 0; }
.alertes-liste, .activite-liste { list-style: none; margin: 0; padding: 0; }
.alertes-liste li + li { margin-top: 8px; }
.alerte { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--text-primary); border-left: 5px solid var(--navy); background: #f4f8ff; }
.alerte:hover { filter: brightness(.98); }
.alerte-ic { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; flex: none; }
.alerte-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.alerte-txt span { color: var(--text-secondary); font-size: .88rem; }
.alerte-fl { color: var(--text-secondary); }
.alerte-urgent { background: #fcebeb; border-left-color: #a32d2d; }
.alerte-urgent .alerte-ic { color: #a32d2d; }
.alerte-warn { background: var(--orange-soft); border-left-color: var(--orange); }
.alerte-warn .alerte-ic { color: var(--orange); }
.alerte-info .alerte-ic { color: var(--navy); }
.home-ok { display: flex; align-items: center; gap: 14px; }
.home-ok-ic { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: var(--green-bg); color: var(--green); flex: none; }
.activite-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.activite-chiffres > div { background: #f4f8ff; border-radius: 12px; padding: 12px 14px; }
.activite-chiffres strong { display: block; font-size: 1.5rem; color: var(--navy); line-height: 1.2; }
.activite-chiffres span { font-size: .82rem; color: var(--text-secondary); }
.activite-prochain { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--orange-soft); color: var(--amber-text); font-size: .92rem; }
.activite-liste li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.activite-ic { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; background: #e3ecf9; color: var(--navy); flex: none; }
.activite-sms { background: var(--orange-soft); color: var(--orange); }
.activite-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.activite-quand { font-size: .8rem; color: var(--text-secondary); white-space: nowrap; text-align: right; }
@media (max-width: 560px) {
    .home-hero { padding: 22px 20px; }
    .activite-liste li { flex-wrap: wrap; }
    .activite-quand { width: 100%; text-align: left; padding-left: 44px; white-space: normal; }
}

/* ── Accueil : bandeau pleine largeur, date en avant, mois ───────────────────── */
.app-content .container:has(> .home-hero) { max-width: none; padding-top: 0; }
.home-hero { display: block; margin: 0 -20px 26px; padding: 30px 20px 32px; border-radius: 0 0 24px 24px; }
.home-hero-in, .home-corps { max-width: 1180px; margin-left: auto; margin-right: auto; width: 100%; }
.home-date { margin: 4px 0 0; font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 800; color: #ffd9bd; letter-spacing: -.01em; }
.home-titre-mois { font-weight: 600; color: var(--text-secondary); font-size: .95rem; margin-left: 4px; }

/* ── Caisse : LE chiffre fort = ce que le client paie maintenant ─────────────── */
.caisse-total { background: var(--bg); box-shadow: none; margin-top: 8px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.caisse-apayer { flex: 1 1 260px; text-align: center; padding: 16px 18px; border-radius: 16px; background: #fff; border: 2px solid var(--orange); box-shadow: 0 6px 18px rgba(224, 123, 57, .16); }
.caisse-apayer-lib { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.caisse-apayer-val { display: block; font-size: clamp(2.3rem, 7vw, 3.3rem); font-weight: 800; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
.caisse-apayer-sous { display: block; font-size: .8rem; color: var(--text-secondary); }
.caisse-detail { flex: 1 1 240px; margin: 0; font-size: .82rem; color: var(--text-secondary); }
.caisse-detail > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.caisse-detail dt { margin: 0; }
.caisse-detail dd { margin: 0; font-weight: 700; color: var(--text-primary); text-align: right; }
.caisse-detail small { display: block; font-weight: 400; color: var(--text-secondary); font-size: .74rem; }

/* ── Fenêtre d'un rendez-vous : Modifier / Encaisser / Supprimer / Fermer sur UNE ligne ── */
.modal-box-rdv { max-width: 460px; }
.modal-box-rdv .actions { flex-wrap: nowrap !important; gap: 6px; justify-content: space-between; }
.modal-box-rdv .actions > .btn, .modal-box-rdv .actions > form { flex: 1 1 0; min-width: 0; }
.modal-box-rdv .actions > form { display: flex !important; margin: 0 !important; }
.modal-box-rdv .actions .btn { width: 100%; padding-left: 6px; padding-right: 6px; white-space: nowrap; text-align: center; }
@media (max-width: 400px) { .modal-box-rdv .actions .btn { font-size: .74rem; padding-left: 3px; padding-right: 3px; } }

/* ── Création d'un avoir (fiche facture) ─────────────────────────────────────── */
.avoir-panel > summary { cursor: pointer; list-style: none; }
.avoir-panel > summary::-webkit-details-marker { display: none; }
.avoir-panel[open] > summary { background: var(--orange-soft); color: var(--amber-text); }
.avoir-form { margin-top: 10px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg); max-width: 560px; }

/* ── Agenda, option B : FOND = couleur de la prestation (teinte claire, fine bordure de
   la même couleur), BORDURE GAUCHE ÉPAISSE = statut (--st, posé par .statut-*).
   --pc-rgb est posé en style inline (Rdv::varsCouleur) ; sans prestation colorée le fond
   retombe sur la teinte du statut. */
.agenda-bloc, .mois-chip, .jour-cal .creneau.occupe {
    background: rgba(var(--pc-rgb, var(--st-rgb)), .22);
    border: 1px solid rgba(var(--pc-rgb, var(--st-rgb)), .6);
    border-left: 6px solid var(--st);
    color: var(--text-primary);
}
.mois-chip { border-left-width: 4px; }
.jour-cal .creneau.occupe:hover { background: rgba(var(--pc-rgb, var(--st-rgb)), .34); }
.jour-cal .creneau.occupe .heure { color: var(--navy); }
.agenda-bloc.statut-annule, .mois-chip.statut-annule, .jour-cal .creneau.statut-annule { opacity: .7; }
.agenda-bloc.type-personnel, .mois-chip.type-personnel, .jour-cal .creneau.type-personnel { border-left-color: var(--slate); }
.agenda-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: -4px 0 14px; font-size: .78rem; color: var(--text-secondary); }

/* ── Accueil : heure en temps réel à droite du bandeau (séparateurs fixes, aucune animation) ── */
.home-hero-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.home-horloge {
    text-align: center; padding: 12px 22px; border-radius: 16px; min-width: 200px;
    background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .22);
}
.home-horloge .hh { display: block; font-variant-numeric: tabular-nums; font-weight: 800; font-size: clamp(1.9rem, 5vw, 2.7rem); letter-spacing: .02em; line-height: 1.1; }
.home-horloge .sep { color: var(--orange); margin: 0 2px; }
@media (max-width: 560px) { .home-horloge { width: 100%; } }

/* ── Rendez-vous déjà passés (repliés sous la liste du jour) ── */
.jour-passes { margin-top: 14px; }
.jour-passes > summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--text-secondary); }
.jour-passes .creneau { opacity: .8; }

/* ── Fiche client : onglets + petite recherche à droite ── */
.fiche-onglets { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.fiche-recherche { width: 170px; max-width: 100%; padding: 6px 12px; font-size: .85rem; border-radius: 20px; margin-left: auto; }
.fiche-resultats { margin: -6px 0 10px; font-size: .82rem; }
tr.trouve td { background: var(--orange-soft); }

/* ── Fiche client : statistiques (gros chiffre AU-DESSUS du libellé) ── */
.stat-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat-grille-2 { grid-template-columns: repeat(2, 1fr); }
.stat-tuile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border-top: 3px solid var(--navy); }
.stat-tuile .stat-val { order: 1; font-size: 1.6rem; font-weight: 800; line-height: 1.15; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat-tuile .stat-lib { order: 2; font-size: .82rem; color: var(--text-secondary); }
.stat-avoirs { border-top-color: var(--slate); }
.stat-avoirs .stat-val { color: var(--slate); }
.stat-cagnotte { border-top-color: var(--orange); background: var(--orange-soft); }
.stat-cagnotte .stat-val { color: var(--orange); }
.stat-sep { margin: 18px 0 8px; font-size: .85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .03em; }

/* ── Avoir : choix de la ou des lignes concernées ── */
.avoir-ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.avoir-ligne:has(input[type="checkbox"]:checked) { border-color: var(--orange); background: var(--orange-soft); }
.avoir-ligne .al-lib { flex: 1 1 200px; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.avoir-ligne .al-qt { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
.avoir-ligne .al-qt .input { width: 84px; padding: 6px 8px; }

/* ── Caisse : détail à GAUCHE (petit), montant « À payer » à DROITE (gros) ── */
.caisse-total { align-items: stretch; }
.caisse-detail { flex: 1 1 260px; min-width: 0; font-size: .84rem; color: var(--text-secondary); }
.caisse-apayer { flex: 0 1 340px; display: flex; flex-direction: column; justify-content: center; }
.cd-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.cd-row strong { color: var(--text-primary); text-align: right; }
#recap-tva-lignes { display: contents; }
.caisse-detail .caisse-offre { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap;
    margin-top: 10px; padding: 8px 10px; border: 1px solid var(--orange); border-radius: 10px; background: var(--orange-soft); color: var(--amber-text); }
.caisse-detail .caisse-offre[hidden] { display: none; }
@media (max-width: 640px) { .caisse-apayer { flex-basis: 100%; } }

/* ── État calculé « À encaisser » (RDV passé, non payé, avec un montant à régler) ── */
.statut-a_encaisser { --st: #b4560f; --st-rgb: 224, 123, 57; }
.agenda-bloc.statut-a_encaisser, .mois-chip.statut-a_encaisser, .jour-cal .creneau.statut-a_encaisser { --st: #b4560f; --st-rgb: 224, 123, 57; }

/* ── Traitement d'un avoir : UN SEUL choix (pastilles radio) ── */
.choix-unique { display: flex; gap: 8px; flex-wrap: wrap; }
.choix-pilule { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; font-size: .92rem; }
.choix-pilule input { accent-color: var(--orange); margin: 0; }
.choix-pilule:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); color: var(--amber-text); }
.choix-pilule.off { opacity: .5; cursor: not-allowed; }
.choix-pilule small { font-weight: 400; }

/* ── Paramètres : section TVA & caisse repliable ── */
.tva-section > summary { cursor: pointer; font-weight: 800; font-size: 1.1rem; color: var(--navy); list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tva-section > summary::-webkit-details-marker { display: none; }
.tva-section > summary::after { content: "＋"; margin-left: auto; color: var(--text-secondary); }
.tva-section[open] > summary::after { content: "－"; }

/* ── Cloche de notifications (nouveaux rendez-vous en ligne) ─────────────── */
/* La cloche est suivie du NOMBRE exact de notifications non lues (à côté de l'icône, pas une pastille en surimpression). */
.btn-icon.notif-bell { width: auto; min-width: 38px; padding: 0 8px; }
.notif-badge {
    min-width: 22px; height: 22px; padding: 0 7px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 11px;
    background: #d64545; color: #fff; font-size: .82rem; font-weight: 800; line-height: 1;
}
.notif-badge[hidden] { display: none; }

.notif-barre { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; }
.notif-barre form { margin: 0; }
.notif-ligne { display: flex; align-items: center; gap: 10px; padding: 0 16px 0 0; border-bottom: 1px solid var(--border); background: #fff; }
.notif-ligne:last-child { border-bottom: 0; }
.notif-ligne:hover { background: var(--bg); }
/* Non lue : en gras, fond grisé et liseré orange ; lue : style normal (blanc, texte courant). */
.notif-ligne.nouveau { background: #e9edf3; box-shadow: inset 3px 0 0 var(--orange); }
.notif-ligne.nouveau:hover { background: #e1e6ee; }
.notif-ouvrir { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; padding: 14px 0 14px 16px; text-decoration: none; color: inherit; }
.notif-point { flex: none; width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: transparent; }
.notif-ligne.nouveau .notif-point { background: var(--orange); }
.notif-corps { flex: 1; min-width: 0; }
.notif-titre, .notif-sous { display: block; }
.notif-ligne.nouveau .notif-titre { font-weight: 800; color: var(--navy); }
.notif-ligne:not(.nouveau) .notif-titre { font-weight: 400; }
.notif-quand { flex: none; font-size: .78rem; color: var(--text-secondary); white-space: nowrap; }
.notif-bascule { flex: none; margin: 0; }
.notif-bascule .btn { white-space: nowrap; }
@media (max-width: 640px) {
    .notif-ligne { flex-wrap: wrap; padding: 0 12px 10px 0; }
    .notif-ouvrir { flex: 1 1 100%; }
    .notif-bascule { margin-left: 37px; }
    .notif-quand { margin-left: auto; }
}
.modal-box.modal-box-notif { max-width: 540px; }
.notif-detail { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 14px 0 0; }
.notif-detail dt { color: var(--text-secondary); font-size: .85rem; }
.notif-detail dd { margin: 0; font-weight: 600; }
.notif-detail dd a { font-weight: 600; }
@media (max-width: 420px) { .notif-detail { grid-template-columns: 1fr; gap: 2px; } .notif-detail dd { margin-bottom: 8px; } }

/* ── Tableau de bord (app/tableau-de-bord.php) ─────────────────────────── */
.tb-bar { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: flex-end; padding: 14px 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); }
.tb-bar-histo { padding: 0; border: 0; background: transparent; }
.tb-champ { min-width: 0; }
.tb-lbl { display: block; margin-bottom: 4px; font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-secondary); }
.tb-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-btn); overflow: hidden; background: var(--white); }
.tb-seg a { padding: 8px 16px; font-size: .88rem; font-weight: 700; text-decoration: none; color: var(--slate); white-space: nowrap; }
.tb-seg a:hover { background: var(--bg); }
.tb-seg a.on { background: var(--navy); color: #fff; }
.tb-nav { display: inline-flex; align-items: center; gap: 6px; }
.tb-nav .input { min-width: 170px; }
.tb-fl { width: 36px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-btn); background: var(--white); color: var(--navy); font-size: 1.5rem; line-height: 1; text-decoration: none; }
a.tb-fl:hover { background: var(--bg); }
.tb-fl.off { opacity: .35; }
.tb-titre { margin: 22px 0 4px; font-size: 1.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.tb-vs { font-size: .9rem; font-weight: 400; color: var(--text-secondary); }
.tb-note { margin: 0 0 12px; font-size: .84rem; color: var(--text-secondary); }
.tb-info { margin: 12px 0; padding: 12px 14px; border-radius: var(--radius-btn); background: var(--bg); border: 1px solid var(--border); font-size: .9rem; color: var(--slate); }

.tb-cartes { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
@media (min-width: 560px) { .tb-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .tb-cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tb-carte { min-width: 0; padding: 14px 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.tb-nom { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--text-secondary); }
.tb-val { margin: 4px 0 2px; font-size: 1.7rem; font-weight: 800; line-height: 1.2; color: var(--navy); overflow-wrap: anywhere; }
.tb-cmp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .82rem; color: var(--text-secondary); }
.tb-cmp strong { color: var(--text-primary); }
.tb-pastille { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.tb-pastille.ok { background: var(--green-bg); color: var(--green); }
.tb-pastille.ko { background: var(--red-bg); color: var(--red); }
.tb-pastille.neutre { background: var(--slate-bg); color: var(--slate); }
.tb-pastille.pt { margin-left: 4px; padding: 0 7px; font-size: .68rem; }
.tb-spark { display: flex; align-items: flex-end; gap: 3px; height: 30px; margin-top: 12px; }
.tb-spark i { display: block; flex: 1 1 0; min-width: 0; max-width: 28px; background: #c9d8ea; border-radius: 2px 2px 0 0; }
.tb-spark i.cur { background: var(--navy); }
.tb-spark i.vide { background: var(--border); opacity: .7; }
.tb-spark-lbl { margin-top: 3px; font-size: .7rem; color: var(--text-secondary); }

.tb-histo { margin-top: 24px; }
.tb-table { table-layout: auto; min-width: 480px; }
.tb-table th, .tb-table td { text-align: right; white-space: nowrap; min-width: 118px; }
.tb-table th:first-child, .tb-table td:first-child { text-align: left; min-width: 104px; }
.tb-table tbody th { font-weight: 600; color: var(--navy); text-transform: none; letter-spacing: 0; font-size: .9rem; }
.tb-table tfoot th, .tb-table tfoot td { border-top: 2px solid var(--border); background: var(--bg); }
.tb-table .vide { color: #b6c3d6; }
.tb-table .tb-sel { background: var(--orange-soft); }
.tb-mini { display: block; font-size: .7rem; font-weight: 400; color: var(--text-secondary); }

.tb-graph-titre { margin: 14px 0 8px; font-size: .9rem; font-weight: 700; color: var(--navy); }
.tb-graph, .tb-evo { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 220px; align-items: stretch; padding: 0 2px; border-bottom: 1px solid var(--border); }
.tb-graph .col, .tb-evo .col { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%; }
.tb-graph .barres { flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; gap: 2px; min-height: 0; }
.tb-graph .barres i { display: block; flex: 1 1 0; min-width: 0; max-width: 22px; border-radius: 3px 3px 0 0; }
.tb-graph .barres i.a { background: #c9d8ea; }
.tb-graph .barres i.b { background: var(--navy); }
.tb-graph .mois, .tb-evo .mois { position: absolute; left: 0; right: 0; bottom: -22px; text-align: center; font-size: .72rem; color: var(--text-secondary); }
.tb-evo { position: relative; margin-bottom: 0; }
.tb-evo .haut, .tb-evo .bas { flex: 0 0 50%; display: flex; justify-content: center; min-height: 0; }
.tb-evo .haut { align-items: flex-end; border-bottom: 1px solid var(--border-strong, #b6c3d6); }
.tb-evo .bas { align-items: flex-start; }
.tb-evo i { display: block; width: 60%; max-width: 26px; }
.tb-evo .haut i { border-radius: 3px 3px 0 0; }
.tb-evo .bas i { border-radius: 0 0 3px 3px; }
.tb-evo i.ok { background: #5fa02b; }
.tb-evo i.ko { background: #cf4a4a; }
.tb-evo .pct { position: absolute; left: 0; right: 0; bottom: -38px; text-align: center; font-size: .66rem; font-weight: 700; color: var(--slate); white-space: nowrap; }
.tb-evo .mois { bottom: -22px; }
.tb-evo + .tb-legende { margin-top: 52px; }
.tb-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 32px 0 6px; font-size: .8rem; color: var(--slate); }
.tb-legende span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.tb-legende .a::before { background: #c9d8ea; }
.tb-legende .b::before { background: var(--navy); }
.tb-legende .ok::before { background: #5fa02b; }
.tb-legende .ko::before { background: #cf4a4a; }
.tb-legende .mut { color: var(--text-secondary); }
.tb-legende .mut::before { display: none; }
@media (max-width: 480px) {
    .tb-nav .input { min-width: 0; flex: 1 1 auto; }
    .tb-champ { flex: 1 1 100%; }
    .tb-seg a { padding: 8px 12px; }
    .tb-graph .mois, .tb-evo .mois { font-size: .6rem; }
}

/* ── Champs mot de passe : bouton « œil » (tempo.js) ── */
.pw-wrap { position: relative; display: block; }
.pw-wrap > .input { padding-right: 48px; }
.pw-wrap > input::-ms-reveal, .pw-wrap > input::-ms-clear { display: none; } /* œil natif d'Edge : remplacé par le nôtre */
.pw-toggle {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--text-secondary); cursor: pointer;
}
.pw-toggle:hover { color: var(--navy); background: rgba(26, 58, 92, .07); }
.pw-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.pw-toggle[aria-pressed="true"] { color: var(--navy); }
.pw-toggle svg { display: block; }

/* Échéance (garage / bâtiment) : menu de présets + icône calendrier ; le champ date réel est invisible, ouvert par l'icône (tempo.js). */
.echeance-ligne { position: relative; display: flex; gap: 8px; align-items: stretch; }
.echeance-ligne select { flex: 1; min-width: 0; }
.echeance-cal {
    flex: 0 0 auto; width: 46px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    background: #fff; color: var(--navy); border: 1px solid var(--border); border-radius: var(--radius-btn);
}
.echeance-cal:hover { background: rgba(26, 58, 92, .07); }
.echeance-cal:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.echeance-cal.actif { background: var(--navy); color: #fff; border-color: var(--navy); }
.echeance-date { position: absolute; right: 0; bottom: 0; width: 46px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

/* Caisse : la colonne « Remise » (remise par prestation) n'apparaît qu'en mode « Par prestation » (tempo.js, caisseMajRemiseUI). */
#caisse-lignes:not([data-remise-ligne="1"]) .col-remise-ligne { display: none; }
#caisse-lignes td.col-remise-ligne { white-space: nowrap; }
#caisse-lignes td.col-remise-ligne .input { display: inline-block; width: 64px; }
#caisse-lignes td.col-remise-ligne select.input { width: 62px; margin-left: 4px; }

/* Suivi des paiements : échéance dépassée / retard (fiche client, fiche facture, tableau de bord). */
.txt-retard { color: #b42318; font-weight: 700; }
.suivi-alerte { border-left: 4px solid #b42318; margin-bottom: 24px; }
.suivi-alerte .suivi-titre { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.suivi-alerte ul { margin: 0; padding-left: 18px; font-size: .92rem; }
.suivi-alerte li { margin-bottom: 6px; }

/* Admin › Questions reçues : une ligne compacte (nom + objet), le détail se déplie au clic. */
.question { padding: 0; }
.question > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 44px 14px 18px; position: relative; }
.question > summary::-webkit-details-marker { display: none; }
.question > summary::after { content: "▸"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); transition: transform .15s; }
.question[open] > summary::after { transform: translateY(-50%) rotate(90deg); }
.question > summary:hover { background: rgba(26, 58, 92, .04); }
.question > summary:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.question-nom { font-weight: 800; }
.question-objet { flex: 1; min-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.question-date { font-size: .82rem; white-space: nowrap; }
.question-nouveau { border-left: 4px solid var(--orange); }
.question-detail { padding: 4px 18px 16px; border-top: 1px solid var(--border); }
.question-message { margin: 12px 0; white-space: pre-wrap; }
.question-coordonnees { margin: 0 0 12px; }
.question-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Rendez-vous › Demandes (demandes de visite, migration 053) + compteur dans le menu */
.demande-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin-top: 12px; }
.demande-actions > details[open] { flex: 1 1 100%; }
.demande-actions summary, .data details > summary { list-style: none; cursor: pointer; }
.demande-actions summary::-webkit-details-marker, .data details > summary::-webkit-details-marker { display: none; }
.app-sidebar .nav-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--orange); color: #12293f; font-size: .75rem; font-weight: 800; text-align: center; }
.agenda-toolbar .switch .nav-count { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #12293f; font-size: .72rem; }
