/* =====================================================================
   BH Cleaning Auto – système de design (Apple Human Interface Guidelines)
   · iPhone d'abord : listes groupées inset, grand titre, barre d'onglets,
     cibles 44 px, rampe typographique iOS (17 px)
   · iPad : même rampe, onglets flottants en haut, largeur lisible
   · Ordinateur (admin, pointeur fin) : rampe resserrée façon macOS
   · Clair / sombre selon l'appareil (prefers-color-scheme), teinte =
     setting('brand_color') injecté dans --brand par les layouts
   Référence : scratchpad/wf/SPEC.md §1–2.

   Composants ajoutés (en plus des classes historiques, toutes conservées) :
   · .btn--tinted / .btn--gray / .btn--plain / .btn--brand (4 styles),
     .btn[aria-busy="true"] (spinner à la place du libellé)
   · .item__icon--{blue,green,orange,red,purple,gray,teal,indigo,pink}
     (icône de rangée, remplace style="background:#…")
   · .item--action (rangée qui agit : texte teinte), .item--danger
     (rangée destructive rouge centrée), .item.is-checked (coche à droite)
   · .frow__value (valeur en lecture à droite), .frow--stack (libellé au-dessus)
   · details.more > summary : divulgation « Plus d'options » (chevron 90°)
   · .footnote : texte 13 px label-2 sous un groupe
   · .hit : étend la zone tactile d'un petit élément à 44 px
   · .tabular : chiffres à chasse fixe
   · dialog.alert (confirmation), dialog.action-sheet, dialog.sheet
     (+ .sheet__bar, .sheet__title, .sheet__body, .sheet__grabber)
     → pilotés par window.confirmDialog / window.actionSheet (common.js)
   · .toolbar__search / .search-field : champ de recherche iOS 36 px
   Écrans : styles propres dans assets/css/screens/*.css (liés par les layouts).
   ===================================================================== */

:root {
    color-scheme: light dark;

    /* ---- Teinte (surchargée par setting('brand_color')) ---- */
    --brand: #0071e3;
    --tint: var(--brand);
    --on-brand: #fff;
    --brand-text: color-mix(in srgb, var(--brand) 88%, #000);
    --brand-tinted: color-mix(in srgb, var(--brand) 14%, transparent);

    /* ---- Fonds ---- */
    --bg: #f2f2f7;
    --surface: #fff;
    --surface-2: #f2f2f7;
    --elevated: #fff;
    --elevated-surface: #fff;
    --pressed: rgba(120, 120, 128, .16);

    /* ---- Libellés ---- */
    --label: #000;
    --label-2: #6e6e73;
    --label-3: rgba(60, 60, 67, .3);   /* décoratif uniquement (placeholder, chevrons) */

    /* ---- Séparateurs, remplissages ---- */
    --separator: rgba(60, 60, 67, .29);
    --separator-opaque: #c6c6c8;
    --separator-strong: var(--separator);   /* compat */
    --hairline: .5px;
    --fill: rgba(120, 120, 128, .12);
    --fill-2: rgba(120, 120, 128, .16);
    --fill-3: rgba(118, 118, 128, .2);
    --seg-thumb: #fff;
    --seg-thumb-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04);

    /* ---- Couleurs système ---- */
    --green: #248a3d; --orange: #c93400; --red: #d70015;
    --blue: #0066cc;  --purple: #8944ab; --gray: #8e8e93; --teal: #0071a4; --indigo: #3634a3; --pink: #d30f45;
    --green-bg: color-mix(in srgb, var(--green) 15%, transparent);
    --orange-bg: color-mix(in srgb, var(--orange) 15%, transparent);
    --red-bg: color-mix(in srgb, var(--red) 12%, transparent);
    --blue-bg: color-mix(in srgb, var(--blue) 13%, transparent);
    --purple-bg: color-mix(in srgb, var(--purple) 14%, transparent);
    --gray-bg: var(--fill-2);
    --destructive: var(--red); --success: var(--green); --warning: var(--orange);
    --switch-on: #34c759;   /* seule occurrence autorisée : fond du toggle */

    /* ---- Matériaux ---- */
    --bar: rgba(249, 249, 251, .8);
    --sidebar: rgba(236, 236, 240, .82);
    --blur: saturate(180%) blur(20px);
    --scrim: rgba(0, 0, 0, .3);
    --overlay-photo: rgba(0, 0, 0, .5);

    /* ---- Ombres (2 seulement) ---- */
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-float: 0 8px 32px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .08);

    /* ---- Typographie ---- */
    --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: var(--font);   /* compat : SF bascule Text/Display seul */
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    --t-large:    700 34px/41px var(--font);
    --t-title1:   700 28px/34px var(--font);
    --t-title2:   700 22px/28px var(--font);
    --t-title3:   600 20px/25px var(--font);
    --t-headline: 600 17px/22px var(--font);
    --t-body:     400 17px/22px var(--font);
    --t-callout:  400 16px/21px var(--font);
    --t-sub:      400 15px/20px var(--font);
    --t-foot:     400 13px/18px var(--font);
    --t-cap:      400 12px/16px var(--font);
    --t-cap2:     500 11px/13px var(--font);   /* UNIQUEMENT libellés de barre d'onglets */
    --fs-large: 34px; --fs-title: 22px; --fs-body: 17px; --fs-sub: 15px; --fs-foot: 13px; --fs-cap: 12px;   /* compat */

    /* ---- Espacements (grille 4 pt) ---- */
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
    --space-6: 24px; --space-8: 32px; --hit: 44px;
    --gutter: 16px; --section-gap: 35px; --header-gap: 7px;
    --row-min: 44px; --row-pad: 11px 16px; --sep-inset: 16px; --sep-inset-icon: 58px;
    --control-h: 44px; --btn-primary-h: 50px; --btn-sm-h: 34px; --seg-h: 32px;
    --readable: 600px; --wide: 1080px;
    --tabbar-h: 49px; --bottombar-pad: calc(96px + env(safe-area-inset-bottom));

    /* ---- Rayons ---- */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 12px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    /* ---- Mouvement ---- */
    --ease-out: cubic-bezier(.32, .72, 0, 1);
    --ease-std: cubic-bezier(.25, .1, .25, 1);
    --t-press: 100ms; --t-fast: 200ms; --t-sheet: 350ms;
}
@media (max-resolution: 1.49dppx) { :root { --hairline: 1px; } }
@media (min-width: 700px) { :root { --gutter: 20px; } }

@media (prefers-color-scheme: dark) {
    :root {
        --brand-text: color-mix(in srgb, var(--brand) 70%, #fff);
        --brand-tinted: color-mix(in srgb, var(--brand) 24%, transparent);
        --bg: #000; --surface: #1c1c1e; --surface-2: #2c2c2e;
        --elevated: #1c1c1e; --elevated-surface: #2c2c2e; --pressed: #3a3a3c;
        --label: #fff; --label-2: rgba(235, 235, 245, .7); --label-3: rgba(235, 235, 245, .3);
        --separator: rgba(84, 84, 88, .65); --separator-opaque: #38383a;
        --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .32); --fill-3: rgba(118, 118, 128, .36);
        --seg-thumb: #5a5a5e; --seg-thumb-shadow: none;
        --green: #30d158; --orange: #ff9f0a; --red: #ff6961; --blue: #409cff; --purple: #da8fff;
        --gray: #98989d; --teal: #5ac8f5; --indigo: #7d7aff; --pink: #ff6482; --switch-on: #30d158;
        --green-bg: color-mix(in srgb, var(--green) 20%, transparent);
        --orange-bg: color-mix(in srgb, var(--orange) 20%, transparent);
        --red-bg: color-mix(in srgb, var(--red) 20%, transparent);
        --blue-bg: color-mix(in srgb, var(--blue) 22%, transparent);
        --purple-bg: color-mix(in srgb, var(--purple) 22%, transparent);
        --bar: rgba(22, 22, 24, .8); --sidebar: rgba(36, 36, 40, .82); --scrim: rgba(0, 0, 0, .5);
        --shadow-card: none;
        --shadow-float: 0 8px 32px rgba(0, 0, 0, .5), 0 0 0 .5px rgba(255, 255, 255, .08);
    }
}
@media (prefers-contrast: more) { :root { --label-2: #3a3a3c; --separator: var(--separator-opaque); } }
@media (prefers-contrast: more) and (prefers-color-scheme: dark) { :root { --label-2: #d1d1d6; } }

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    font: var(--t-body);
    letter-spacing: normal;
    color: var(--label);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
input, select, textarea, button { font: inherit; letter-spacing: inherit; color: inherit; }
a { color: var(--brand-text); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font); margin: 0; letter-spacing: normal; }
h1 { font: var(--t-title1); }
h2 { font: var(--t-title2); }
h3 { font: var(--t-headline); }
h4 { font: var(--t-headline); }
p { margin: 0 0 12px; }
small { font: var(--t-foot); color: var(--label-2); }
.muted { color: var(--label-2); font: var(--t-sub); }
hr { border: 0; border-top: var(--hairline) solid var(--separator); margin: 20px 0; }
code, .mono { font-family: var(--font-mono); font-size: .9em; }
.icon { flex: none; }
.tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap {
    width: 100%; max-width: var(--wide); margin: 0 auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.wrap--narrow { max-width: calc(var(--readable) + 2 * var(--gutter)); }
.stack > * + * { margin-top: 12px; }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.footnote { font: var(--t-foot); color: var(--label-2); margin: var(--header-gap) 16px 0; }
.hit { position: relative; }
.hit::after { content: ""; position: absolute; inset: -6px -2px; }
@media (max-width: 699px) { .hide-mobile { display: none !important; } }
@media (min-width: 700px) { .hide-desktop { display: none !important; } }
.desk-only { display: none; }
@media (min-width: 900px) { .desk-only { display: block; } }

/* ---------- Boutons (Filled · Tinted · Gray · Plain) ---------- */

.btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: var(--control-h); padding: 0 16px;
    font: var(--t-headline);
    color: var(--brand-text); background: var(--fill-2);
    border: 0; border-radius: var(--radius-sm); cursor: pointer;
    text-decoration: none !important; white-space: nowrap;
    user-select: none; -webkit-user-select: none;
    transition: opacity var(--t-press) var(--ease-std), background-color var(--t-fast) var(--ease-std);
}
.btn:active { opacity: .7; }
.btn .icon { width: 18px; height: 18px; }
.btn--brand, .btn--success, .btn--white { background: var(--brand); color: var(--on-brand); }
.btn--tinted { background: var(--brand-tinted); color: var(--brand-text); }
.btn--gray { background: var(--fill-2); color: var(--label); }
.btn--plain { background: transparent; padding: 0 8px; color: var(--brand-text); }
.btn--danger { color: var(--red); }
.btn--sm { min-height: var(--btn-sm-h); padding: 0 14px; font: 600 15px/20px var(--font); border-radius: var(--radius-pill); }
.btn--sm::after { content: ""; position: absolute; inset: -5px -2px; }
.btn--lg { min-height: var(--btn-primary-h); border-radius: var(--radius); padding: 0 20px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled, .btn[aria-disabled="true"] {
    background: var(--fill); color: var(--label-3); cursor: default; pointer-events: none;
}
.btn--plain[disabled], .btn--plain.is-disabled { background: transparent; }
.btn[aria-busy="true"] { color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::before {
    content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
    border-radius: 50%; border: 2px solid color-mix(in srgb, var(--on-brand) 35%, transparent); border-top-color: var(--on-brand);
    animation: spin .8s linear infinite;
}
.btn:not(.btn--brand)[aria-busy="true"]::before { border-color: var(--fill-3); border-top-color: var(--label-2); }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.link-btn {
    position: relative; background: none; border: 0; padding: 0; font: inherit; color: var(--brand-text); cursor: pointer;
    min-height: 32px;
}
.link-btn::after { content: ""; position: absolute; inset: -6px -4px; }
.link-btn--danger { color: var(--red); }
@media (hover: hover) and (pointer: fine) {
    .btn:hover { filter: brightness(.96); }
    .btn[disabled]:hover { filter: none; }
    a:hover { text-decoration: underline; text-underline-offset: 2px; }
    .btn:hover, a.item:hover, .tbtn:hover, .menu__list a:hover, .sidebar__link:hover, .tabbar__item:hover { text-decoration: none; }
}

/* ---------- Titres de page ---------- */

.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 8px 0 20px; }
.page-head h1 { font: var(--t-large); }
.page-head__sub { color: var(--label-2); font: var(--t-sub); margin-top: 4px; }
.page-head__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 2px; font: var(--t-body); margin: 4px 0 6px -6px; min-height: var(--hit); }

/* ---------- Listes groupées inset ---------- */

.section { margin: 0 0 var(--section-gap); }
.section__title {
    font: var(--t-foot); color: var(--label-2); text-transform: none; letter-spacing: normal;
    margin: 0 16px var(--header-gap);
}
.section__title--lg {
    font: var(--t-title3); color: var(--label); margin: 0 0 var(--space-3);
    display: flex; align-items: center; gap: 8px;
}
.section__foot { font: var(--t-foot); color: var(--label-2); margin: var(--header-gap) 16px 0; }
.group { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.public .group { box-shadow: var(--shadow-card); }
/* Séparateurs inset (hairline), jamais pleine largeur */
.group > :not(input[type=hidden], template, script, style, [hidden]) ~ :not(input[type=hidden], template, script, style, [hidden], [style*="display:contents"]) { position: relative; }
.group > :not(input[type=hidden], template, script, style, [hidden]) ~ :not(input[type=hidden], template, script, style, [hidden], [style*="display:contents"])::before {
    content: ""; position: absolute; z-index: 1; top: 0; left: var(--sep-inset); right: 0;
    border-top: var(--hairline) solid var(--separator); pointer-events: none;
}
.group > :has(> .item__icon) ~ :has(> .item__icon)::before,
.group > .item:has(> .item__icon) ~ .item:has(> .item__icon)::before { left: var(--sep-inset-icon); }
/* Rangées regroupées dans un conteneur intermédiaire (ex. <div id="new-client">) */
.group > div:not([class]) > :is(.frow, .item, .choice) + :is(.frow, .item, .choice),
.group > div:not([class]) > :is(.frow, .item, .choice) { position: relative; }
.group > div:not([class]) > :is(.frow, .item, .choice) + :is(.frow, .item, .choice)::before {
    content: ""; position: absolute; z-index: 1; top: 0; left: var(--sep-inset); right: 0;
    border-top: var(--hairline) solid var(--separator); pointer-events: none;
}
.group--pad { padding: 16px; }
.group--pad > * ~ *::before { display: none; }
.group > .group__label + *::before { display: none; }

.item {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    min-height: var(--row-min); padding: var(--row-pad);
    color: var(--label); text-decoration: none !important;
    transition: background-color var(--t-press) var(--ease-std);
}
a.item:active, button.item:active, label.item:active { background: var(--pressed); }
button.item { width: 100%; font: inherit; text-align: left; border: 0; background: none; cursor: pointer; color: var(--label); }
.item__icon {
    width: 29px; height: 29px; border-radius: 7px; display: grid; place-items: center; flex: none;
    background: var(--brand); color: #fff;
}
.item__icon .icon { width: 18px; height: 18px; }
.item__icon--blue { background: var(--blue); }
.item__icon--green { background: var(--green); }
.item__icon--orange { background: var(--orange); }
.item__icon--red { background: var(--red); }
.item__icon--purple { background: var(--purple); }
.item__icon--gray { background: var(--gray); }
.item__icon--teal { background: var(--teal); }
.item__icon--indigo { background: var(--indigo); }
.item__icon--pink { background: var(--pink); }
.item__body { flex: 1; min-width: 0; }
.item__title { font: var(--t-body); }
.item__title strong { font-weight: 600; }
.item__sub { font: var(--t-sub); color: var(--label-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.item__value { font: var(--t-body); color: var(--label-2); text-align: right; flex: 0 1 auto; max-width: 55%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item__chev { color: var(--label-3); flex: none; margin-right: -4px; display: inline-grid; place-items: center; }
.item__chev .icon { width: 14px; height: 14px; stroke-width: 2.6; }
a.item__chev { position: relative; min-width: 24px; }
a.item__chev::after { content: ""; position: absolute; inset: -10px -12px; }
.item--muted { color: var(--label-2); }
.item--muted .item__title { color: var(--label-2); }
.item--action { color: var(--brand-text); }
.item--danger { color: var(--red) !important; justify-content: center; text-align: center; }
.item.is-checked::after {
    content: ""; flex: none; order: 9; width: 14px; height: 8px; margin: 0 2px 4px 0;
    border: solid var(--brand-text); border-width: 0 0 2.4px 2.4px; transform: rotate(-45deg);
}
.item__time { flex: none; min-width: 58px; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.item__time small { display: block; font-weight: 400; font: var(--t-foot); color: var(--label-2); }

.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; }
.kv > div { position: relative; padding: 11px 16px; min-height: var(--row-min); }
.kv > div:nth-child(n+3)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: var(--hairline) solid var(--separator); }
.kv > div:nth-child(2n+3)::before { left: var(--sep-inset); }
.kv > div:nth-child(odd) { color: var(--label); }
.kv > div:nth-child(even) { color: var(--label-2); overflow-wrap: anywhere; text-align: right; font-variant-numeric: tabular-nums; }

/* Divulgation « Plus d'options » */
details.more > summary {
    display: flex; align-items: center; gap: 8px; min-height: var(--row-min); padding: var(--row-pad);
    color: var(--brand-text); cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after {
    content: ""; margin-left: auto; width: 8px; height: 8px; border: solid var(--label-3); border-width: 2px 2px 0 0;
    transform: rotate(45deg); transition: transform var(--t-fast) var(--ease-out);
}
details.more[open] > summary::after { transform: rotate(135deg); }
.group > details.more[open] > summary { border-bottom: 0; }

/* ---------- Formulaires ---------- */

.field { display: block; }
.field + .field { margin-top: 12px; }
.field__label { display: block; font: var(--t-foot); color: var(--label-2); margin: 0 0 6px 4px; }
.field__hint { font: var(--t-foot); color: var(--label-2); margin: 6px 4px 0; }
.field__error { font: var(--t-foot); color: var(--red); margin: 6px 4px 0; }
.input, .select, .textarea {
    width: 100%; min-height: var(--control-h); padding: 10px 12px;
    font: var(--t-body); color: var(--label);
    background-color: var(--fill); border: 0; border-radius: var(--radius-sm);
    appearance: none; -webkit-appearance: none;
    transition: box-shadow var(--t-fast) var(--ease-std), background-color var(--t-fast) var(--ease-std);
}
.input::placeholder, .textarea::placeholder { color: var(--label-3); opacity: 1; }
.group .input, .group .select, .group .textarea, .input--fill { background-color: var(--fill); }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 40%, transparent); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { box-shadow: 0 0 0 1.5px var(--red); }
.textarea { min-height: 96px; resize: vertical; }
.select {
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9l5-5 5 5M7 15l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.select:invalid, .select.is-empty { color: var(--label-2); }
.input--code { font: 600 28px/1 var(--font-mono); letter-spacing: .35em; text-align: center; padding-left: .35em; font-variant-numeric: tabular-nums; }
.input--plate { font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.input-affix { display: flex; align-items: stretch; }
.input-affix .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-affix__suffix { display: grid; place-items: center; padding: 0 12px; background: var(--fill-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--label-2); font: var(--t-sub); }
input[type=date], input[type=time], input[type=datetime-local] { font-variant-numeric: tabular-nums; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.grid-2 > .field + .field, .grid-3 > .field + .field { margin-top: 0; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }

/* Rangée de formulaire : libellé à gauche, contrôle transparent à droite */
.frow { display: flex; align-items: center; gap: 12px; min-height: var(--row-min); padding: 5px 16px; }
.frow__label { flex: 1 1 30%; min-width: 0; color: var(--label); }
.frow__label small { display: block; font: var(--t-foot); color: var(--label-2); }
.frow__value { color: var(--label-2); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.frow .input, .frow .select {
    flex: 1 1 50%; width: auto; max-width: 62%; min-width: 0; min-height: 34px;
    text-align: right; background-color: transparent; border: 0; box-shadow: none; padding: 6px 0;
    color: var(--label); text-overflow: ellipsis;
}
.frow .select { flex: 0 1 auto; padding-right: 22px; background-position: right 2px center; }
.frow .input:focus, .frow .select:focus { box-shadow: none; }
.frow .textarea { background: transparent; padding: 0; min-height: 72px; }
.frow--stack { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 16px; }
.frow--stack > .frow__label { font: var(--t-foot); color: var(--label-2); flex: none; }
.frow--stack .input, .frow--stack .select { max-width: none; width: 100%; text-align: left; padding: 4px 0; min-height: 30px; }
.frow--stack .select { padding-right: 22px; }
.frow .seg { flex: 0 1 auto; }
.group > .textarea, .group > textarea { display: block; width: 100%; background: transparent; border-radius: 0; padding: var(--row-pad); min-height: 96px; }

/* Interrupteur iOS 51 × 31 */
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: -6px -2px; width: calc(100% + 4px); height: calc(100% + 12px); opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch__track { width: 51px; height: 31px; border-radius: var(--radius-pill); background: var(--fill-3); transition: background-color var(--t-fast) var(--ease-std); position: relative; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06); transition: transform var(--t-fast) var(--ease-out); }
.switch input:checked + .switch__track { background: var(--switch-on); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: .5; }

/* Case ronde (sélection multiple iOS) */
.check { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; position: relative; }
.check input { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); opacity: 0; margin: 0; cursor: pointer; }
.check__box { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--label-3); display: grid; place-items: center; transition: background-color var(--t-fast), border-color var(--t-fast); }
.check input:checked + .check__box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check__box::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.2px 2.2px; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible + .check__box { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Contrôle segmenté */
.seg {
    position: relative; display: inline-flex; align-items: stretch; padding: 2px; gap: 0;
    min-height: var(--seg-h); max-width: 100%; background: var(--fill); border-radius: 9px;
    user-select: none; -webkit-user-select: none;
}
.seg a, .seg label, .seg button {
    position: relative; flex: 1 1 0; min-width: 0; display: grid; place-items: center; min-height: 28px; padding: 0 12px;
    font: 500 13px/18px var(--font); color: var(--label); border-radius: 7px; border: 0; background: none;
    cursor: pointer; white-space: nowrap; overflow: visible; text-overflow: ellipsis; text-decoration: none !important;
    transition: background-color var(--t-fast) var(--ease-std);
}
.seg a::after, .seg label::after, .seg button::after { content: ""; position: absolute; inset: -8px 0; }
.seg > * + *::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; border-left: 1px solid var(--separator); }
.seg > .is-active::before, .seg > .is-active + *::before,
.seg > label:has(input:checked)::before, .seg > label:has(input:checked) + *::before { display: none; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg .is-active, .seg input:checked + span { background: var(--seg-thumb); box-shadow: var(--seg-thumb-shadow); font-weight: 600; }
.seg label span { display: grid; place-items: center; width: calc(100% + 24px); margin: 0 -12px; min-height: 28px; border-radius: 7px; padding: 0 12px; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.seg--scroll { width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg--scroll::-webkit-scrollbar { display: none; }
.seg--scroll button { flex: 1 0 auto; }
.seg--scroll a::after, .seg--scroll button::after { inset: 0; }

/* ---------- Badges, alertes, états vides ---------- */

.badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-pill);
    font: 600 12px/16px var(--font); white-space: nowrap; background: var(--gray-bg); color: var(--label-2);
}
.badge--pending { background: var(--orange-bg); color: var(--orange); }
.badge--confirmed { display: none; }   /* confirmé = état normal, pas de badge */
.badge--in_progress { background: var(--blue-bg); color: var(--blue); }
.badge--done { background: var(--green-bg); color: var(--green); }
.badge--cancelled { background: var(--red-bg); color: var(--red); }
.badge--brand { background: var(--brand-tinted); color: var(--brand-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; flex: none; }

.alert:not(dialog) {
    display: flex; gap: 10px; align-items: flex-start;
    margin: 12px 0; padding: 12px 16px; border-radius: var(--radius); font: var(--t-sub);
    background: var(--surface); color: var(--label);
}
.alert:not(dialog)::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--blue); }
.alert--success:not(dialog)::before { background: var(--green); }
.alert--error:not(dialog)::before { background: var(--red); }
.alert--warning:not(dialog)::before { background: var(--orange); }
.alert--info:not(dialog)::before { background: var(--brand); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); background: var(--orange-bg); color: var(--label); font: var(--t-sub); }
.notice .icon { color: var(--orange); margin-top: 1px; }
.notice--info { background: var(--blue-bg); }
.notice--info .icon { color: var(--blue); }
.empty { text-align: center; padding: 32px 16px; color: var(--label-2); font: var(--t-sub); }
.empty .icon { width: 40px; height: 40px; color: var(--label-3); margin: 0 auto 8px; }
.group > .empty { text-align: left; padding: var(--row-pad); min-height: var(--row-min); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.group > .empty .icon { display: none; }
.group > .empty br { display: none; }

/* ---------- Tableaux ---------- */

.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
.public .table-wrap { box-shadow: var(--shadow-card); }
.table { width: 100%; border-collapse: collapse; font: var(--t-sub); }
.table th { text-align: left; font: 600 13px/18px var(--font); color: var(--label-2); padding: 10px 12px; border-bottom: var(--hairline) solid var(--separator); white-space: nowrap; }
.table td { padding: 10px 12px; border-top: var(--hairline) solid var(--separator); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table th:first-child, .table td:first-child { padding-left: 16px; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table input.input, .table select.select, .table textarea.textarea { min-height: 36px; padding: 6px 10px; font: var(--t-sub); border-radius: var(--radius-xs); }
.table textarea.textarea { min-height: 38px; }

/* ---------- Menus contextuels « ⋯ » (génériques, cf. admin.css pour la barre) ---------- */

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }

/* ---------- Dialogues : alerte, action sheet, sheet ---------- */

dialog { color: var(--label); }
dialog::backdrop { background: var(--scrim); }
dialog.alert {
    width: 270px; max-width: calc(100vw - 40px); padding: 0; border: 0; border-radius: 14px; overflow: hidden;
    background: var(--elevated); box-shadow: var(--shadow-float); text-align: center;
}
dialog.alert[open] { animation: alert-in var(--t-fast) var(--ease-out); }
@keyframes alert-in { from { opacity: 0; transform: scale(1.08); } }
.alert__body { padding: 19px 16px 16px; }
.alert__title { font: var(--t-headline); margin: 0; }
.alert__msg { font: var(--t-foot); color: var(--label); margin: 4px 0 0; }
.alert__actions { display: flex; border-top: var(--hairline) solid var(--separator); }
.alert__actions button {
    flex: 1; min-height: var(--hit); border: 0; background: none; font: var(--t-body); color: var(--brand-text); cursor: pointer;
}
.alert__actions button + button { border-left: var(--hairline) solid var(--separator); }
.alert__actions .is-cancel { font-weight: 600; }
.alert__actions .is-danger { color: var(--red); }
.alert__actions button:active { background: var(--pressed); }

dialog.action-sheet {
    position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 480px;
    padding: 0 8px calc(8px + env(safe-area-inset-bottom)); border: 0; background: transparent; box-shadow: none;
}
dialog.action-sheet[open] { animation: sheet-up var(--t-sheet) var(--ease-out); }
.action-sheet__group { background: var(--elevated); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.action-sheet__head { padding: 14px 16px; text-align: center; font: var(--t-foot); color: var(--label-2); border-bottom: var(--hairline) solid var(--separator); }
.action-sheet__head strong { display: block; font-weight: 600; }
.action-sheet__group button {
    display: block; width: 100%; min-height: 57px; border: 0; background: none; font: 400 20px/25px var(--font);
    color: var(--brand-text); cursor: pointer;
}
.action-sheet__group button + button { border-top: var(--hairline) solid var(--separator); }
.action-sheet__group button:active { background: var(--pressed); }
.action-sheet__group .is-danger { color: var(--red); }
.action-sheet__group .is-cancel { font-weight: 600; }
@media (min-width: 700px) {
    dialog.action-sheet { inset: 0; margin: auto; width: 320px; height: fit-content; padding: 0; }
    dialog.action-sheet[open] { animation: alert-in var(--t-fast) var(--ease-out); }
    .action-sheet__group { box-shadow: var(--shadow-float); }
    .action-sheet__group button { min-height: var(--hit); font: var(--t-body); }
    .action-sheet__group:last-child { margin-bottom: 0; }
}

dialog.sheet {
    position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none;
    max-height: calc(100dvh - 44px - env(safe-area-inset-top));
    padding: 0 0 env(safe-area-inset-bottom); border: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--bg); overflow: auto; overscroll-behavior: contain; box-shadow: var(--shadow-float);
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-up var(--t-sheet) var(--ease-out); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet__grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); margin: 5px auto 0; flex: none; }
.sheet__bar {
    position: sticky; top: 0; z-index: 2; display: grid; align-items: center;
    grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); column-gap: 8px;
    min-height: 56px; padding: 0 8px; background: var(--bg);
}
.sheet__bar > :first-child { justify-self: start; }
.sheet__bar > :last-child { justify-self: end; }
.sheet__bar .btn--plain { font-weight: 400; }
.sheet__bar .btn--plain.is-primary, .sheet__bar [type=submit] { font-weight: 600; }
.sheet__title { font: var(--t-headline); margin: 0; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__body { padding: 8px var(--gutter) 24px; }
@media (min-width: 700px) {
    dialog.sheet { inset: 0; margin: auto; width: min(540px, 100% - 40px); max-height: min(720px, 100dvh - 80px); border-radius: var(--radius); padding-bottom: 0; }
    dialog.sheet[open] { animation: alert-in var(--t-fast) var(--ease-out); }
    .sheet__grabber { display: none; }
}

/* ---------- Toast ---------- */

.floating-toast {
    position: fixed; z-index: 150; left: 50%; top: calc(56px + env(safe-area-inset-top)); transform: translate(-50%, -8px);
    max-width: min(92vw, 440px); padding: 12px 20px; border-radius: var(--radius-pill);
    background: var(--bar); color: var(--label); font: var(--t-sub);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow-float);
    opacity: 0; pointer-events: none; transition: opacity var(--t-fast) var(--ease-std), transform var(--t-fast) var(--ease-out);
}
.floating-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   SITE PUBLIC
   ===================================================================== */

.site-header {
    position: sticky; top: 0; z-index: 40;
    background: var(--bar);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border-bottom: var(--hairline) solid transparent;
    padding-top: env(safe-area-inset-top);
    transition: border-color var(--t-fast) var(--ease-std);
}
.site-header.is-scrolled { border-bottom-color: var(--separator); }
.site-header__inner { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--label); font-weight: 600; text-decoration: none !important; min-height: var(--hit); }
.logo__mark {
    width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center;
    font: 700 12px/1 var(--font); color: var(--on-brand); background: var(--brand);
}
.logo__text { font: var(--t-headline); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { color: var(--label); font: var(--t-sub); padding: 12px 10px; border-radius: var(--radius-sm); display: none; min-height: var(--hit); }
.site-nav a:not(.btn):last-of-type { display: inline-flex; align-items: center; }
.site-nav .btn--sm { min-height: var(--btn-sm-h); position: relative; }
.site-nav .btn--sm::after { content: ''; position: absolute; inset: -5px -4px; } /* zone de toucher 44px, pilule visuelle 34px */
.is-booking .site-nav .btn, .is-booking-done .site-nav .btn { display: none; }

/* Pied de page collé en bas sur les pages courtes */
body.public { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.public > main { flex: 1 0 auto; }
body.public > .site-footer { flex: none; }

.site-footer {
    margin-top: 56px; padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
    border-top: var(--hairline) solid var(--separator); font: var(--t-foot); color: var(--label-2);
}
.site-footer__inner { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.site-footer strong { color: var(--label); font-weight: 600; }
.site-footer p { margin: 2px 0 0; }
.site-footer__contact { display: flex; flex-direction: column; gap: 0; }
.site-footer__contact a, .site-footer__contact span { display: flex; align-items: center; min-height: var(--hit); padding: 0; font: var(--t-sub); }
@media (hover: hover) and (pointer: fine), (min-width: 700px) {
    .site-footer__contact { flex-direction: row; flex-wrap: wrap; gap: 0 20px; align-items: center; }
}
.site-footer__legal { margin-top: 12px; }
@media (max-width: 1023px) { body:has(.bk-bar:not([hidden])) .site-footer { padding-bottom: var(--bottombar-pad); } body:has(.bk-bar) .booking { padding-bottom: 24px; } }

/* Accueil (structure ; détails dans screens/public.css) */
.hero { padding: 32px 0 12px; }
.hero__eyebrow { font: 600 15px/20px var(--font); color: var(--brand-text); margin-bottom: 8px; display: inline-flex; gap: 6px; align-items: center; }
.hero h1 { font: 700 clamp(34px, 7vw, 56px)/1.08 var(--font); max-width: 14em; }
.hero__lead { font: 400 clamp(17px, 2.4vw, 21px)/1.4 var(--font); color: var(--label-2); margin: 12px 0 20px; max-width: 34em; }
.hero__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero__next { margin-top: 16px; font: var(--t-sub); color: var(--label-2); display: flex; align-items: center; gap: 8px; }
.hero__next .dot { color: var(--green); }

.plans { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 12px; }
.plan { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow-card); position: relative; }
.plan--highlight { box-shadow: 0 0 0 2px var(--brand), var(--shadow-card); }
.plan__flag { position: absolute; top: 20px; right: 20px; }
.plan__name { font: var(--t-title2); }
.plan__tag { color: var(--label-2); font: var(--t-sub); margin-top: 4px; }
.plan__price { margin: 16px 0 4px; font: var(--t-large); font-variant-numeric: tabular-nums; }
.plan__price small { font: 400 15px/20px var(--font); color: var(--label-2); }
.plan__meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--label-2); font: var(--t-sub); margin-bottom: 16px; }
.plan__meta span { display: inline-flex; align-items: center; gap: 4px; }
.plan__list { list-style: none; margin: 0 0 20px; padding: 0; font: var(--t-sub); }
.plan__list li { position: relative; display: flex; gap: 8px; padding: 8px 0; }
.plan__list li + li::before { content: ""; position: absolute; top: 0; left: 26px; right: 0; border-top: var(--hairline) solid var(--separator); }
.plan__list .icon { color: var(--green); margin-top: 1px; }
.plan__list .is-off { display: none; }
.plan__next { font: var(--t-foot); color: var(--label-2); margin-top: 8px; text-align: center; }
.plan .btn { margin-top: auto; }

.compare { margin-top: 40px; }
.compare .table td:first-child { font-weight: 500; }
.feat-yes { display: inline-flex; gap: 6px; align-items: center; color: var(--green); font-weight: 500; }
.feat-no { color: var(--label-2); }
.options-list { margin-top: 40px; }
.how { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 40px; }
.how__step { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card); }
.how__step .item__icon { margin-bottom: 12px; }
.how__step h3 { font: var(--t-headline); margin-bottom: 4px; }
.how__step p { color: var(--label-2); font: var(--t-sub); margin: 0; }

/* Grille tarifaire publique */
.price-table { display: none; }
@media (min-width: 1024px) { .price-picker { display: none; } .price-table { display: block; } }
.price-table .table { table-layout: fixed; }
.price-table .table td.num, .price-table .table th.num { text-align: right; }

/* ---------- Réservation (structure ; détails dans screens/booking.css) ---------- */

.booking > * { min-width: 0; }
.booking { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); padding-top: 8px; padding-bottom: var(--bottombar-pad); }
html:has(.booking) { scroll-padding-bottom: var(--bottombar-pad); scroll-padding-top: 64px; }
.bk-step { scroll-margin-top: 64px; animation: step-in var(--t-sheet) var(--ease-out); }
.bk-step.is-locked { display: none; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } }
.bk-step__num { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: inline-grid; place-items: center; font: 600 13px/1 var(--font); flex: none; font-variant-numeric: tabular-nums; }
.bk-step.is-done .bk-step__num { background: var(--green); color: #fff; }

.choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 11px 16px; cursor: pointer; min-height: var(--row-min); transition: background-color var(--t-press); }
.choice:active { background: var(--pressed); }
.choice input[type=radio], .choice input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.choice__mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--label-3); flex: none; margin-top: 0; display: grid; place-items: center; transition: background-color var(--t-fast), border-color var(--t-fast); }
.choice input:checked ~ .choice__mark { background: var(--brand); border-color: var(--brand); }
.choice input:checked ~ .choice__mark::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.2px 2.2px; transform: translateY(-1px) rotate(-45deg); }
.choice input:focus-visible ~ .choice__mark { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice input:disabled ~ * { color: var(--label-3); }
.choice__body { flex: 1; min-width: 0; }
.choice__title { font: var(--t-body); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.choice__sub { font: var(--t-sub); color: var(--label-2); margin-top: 1px; }
.choice__price { flex: none; font: var(--t-body); color: var(--label-2); font-variant-numeric: tabular-nums; text-align: right; }
.choice__price small { display: block; font: var(--t-foot); color: var(--label-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; flex-direction: column; justify-content: center; min-height: var(--hit); padding: 6px 14px; border-radius: var(--radius-sm); background: var(--fill); cursor: pointer; font: var(--t-sub); color: var(--label); user-select: none; -webkit-user-select: none; }
.chip span small { font: var(--t-cap); color: var(--label-2); }
.chip input:checked + span { background: var(--brand); color: var(--on-brand); }
.chip input:checked + span small { color: color-mix(in srgb, var(--on-brand) 80%, transparent); }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Calendrier */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head__title { font: var(--t-headline); }
.cal-head .btn { position: relative; min-height: 36px; min-width: var(--hit); padding: 0 10px; border-radius: var(--radius-pill); }
.cal-head .btn::after { content: ""; position: absolute; inset: -4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid__dow { font: 600 12px/16px var(--font); color: var(--label-2); padding: 4px 0; }
.cal-day {
    position: relative; aspect-ratio: 1; min-height: var(--hit); border-radius: 50%; border: 0; background: none;
    font: 400 17px/1 var(--font); color: var(--label); cursor: pointer; font-variant-numeric: tabular-nums;
    display: grid; place-items: center; max-width: 52px; margin: 0 auto; width: 100%;
}
.cal-day[disabled] { color: var(--label-3); cursor: default; }
.cal-day.is-available { color: var(--brand-text); font-weight: 600; background: color-mix(in srgb, var(--brand) 12%, transparent); }
.cal-day.is-selected { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.cal-day.is-today { color: var(--red); font-weight: 600; }
.cal-day.is-today.is-selected { background: var(--red); color: #fff; }
.cal-legend { display: flex; gap: 12px; font: var(--t-foot); color: var(--label-2); margin-top: 8px; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) { .cal-day.is-available:not(.is-selected) { background: color-mix(in srgb, var(--brand) 22%, transparent); } }

.slots { margin-top: 16px; }
.slots__group + .slots__group { margin-top: 12px; }
.slots__label { font: var(--t-foot); color: var(--label-2); margin: 0 0 8px 4px; }
.slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.slot {
    min-height: var(--hit); border-radius: var(--radius-sm); border: 0; background: var(--fill);
    font: 600 15px/1 var(--font); color: var(--brand-text); cursor: pointer; font-variant-numeric: tabular-nums;
    user-select: none; -webkit-user-select: none; transition: background-color var(--t-press);
}
.slot:active { background: var(--fill-3); }
.slot.is-selected { background: var(--brand); color: var(--on-brand); }
.slot[disabled] { color: var(--label-3); text-decoration: line-through; cursor: default; }
.slots__empty { color: var(--label-2); font: var(--t-sub); padding: 8px 4px; }

.skeleton { background: linear-gradient(90deg, var(--fill) 0%, var(--fill-2) 50%, var(--fill) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius-sm); min-height: var(--hit); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Récapitulatif / devis */
.summary { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card); }
.summary h3 { font: var(--t-title3); margin-bottom: 12px; }
.summary__lines { list-style: none; margin: 0; padding: 0; font: var(--t-sub); }
.summary__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.summary__lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary__inc { display: block; font: var(--t-cap); color: var(--label-2); margin-top: 2px; }
.summary__tax { font: var(--t-foot); color: var(--label-2); border-top: var(--hairline) solid var(--separator); margin-top: 6px; padding-top: 8px; }
.summary__tax div { display: flex; justify-content: space-between; padding: 2px 0; font-variant-numeric: tabular-nums; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: var(--hairline) solid var(--separator); margin-top: 8px; padding-top: 12px; }
.summary__total strong { font: var(--t-title1); font-variant-numeric: tabular-nums; }
.summary__when { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--brand-tinted); color: var(--brand-text); font: 600 15px/20px var(--font); display: flex; gap: 8px; align-items: center; }
.summary__meta { font: var(--t-foot); color: var(--label-2); margin-top: 8px; display: flex; gap: 6px; align-items: center; }

/* Barre de réservation (bas d'écran) */
.bk-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: flex; align-items: center; gap: 12px;
    padding: 12px max(var(--gutter), env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border-top: var(--hairline) solid var(--separator);
}
.bk-bar__total { flex: 1; min-width: 0; }
.bk-bar__total small { display: block; font: var(--t-foot); color: var(--label-2); }
.bk-bar__total strong { display: block; font: var(--t-title3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-bar .btn { min-height: var(--btn-primary-h); border-radius: var(--radius); padding: 0 24px; }

.done-hero { text-align: center; padding: 28px 0 8px; }
.done-hero__check { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; }
.done-hero__check .icon { width: 34px; height: 34px; stroke-width: 2.6; }
.done-hero h1 { font: var(--t-title1); }
.done-hero p { color: var(--label-2); margin-top: 8px; }

/* Connexion / installation */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) var(--gutter) max(24px, env(safe-area-inset-bottom)); }
.auth__card { width: 100%; max-width: 400px; }
.auth__head { text-align: center; margin-bottom: 24px; }
.auth__head .logo__mark { width: 60px; height: 60px; border-radius: 14px; font-size: 20px; margin: 0 auto 16px; }
.auth__head h1 { font: var(--t-title1); }
.auth__head p { color: var(--label-2); margin-top: 6px; font: var(--t-sub); }
.install { max-width: 640px; margin: 0 auto; padding: 32px var(--gutter) 64px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; display: flex; gap: 10px; align-items: center; min-height: var(--row-min); padding: 10px 16px; font: var(--t-sub); }
.checklist li + li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: var(--hairline) solid var(--separator); }
.checklist .ok { color: var(--green); }
.checklist .ko { color: var(--red); }

/* ---------- Photos & comparateur avant / après ---------- */

.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.photo-grid a, .photo-grid .ph { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--fill); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.ph__label, .ba__tag, .shot__count {
    color: #fff; background: var(--overlay-photo); font: 600 12px/16px var(--font);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.ph__label { position: absolute; left: 4px; bottom: 4px; padding: 2px 6px; border-radius: var(--radius-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: fit-content; max-width: calc(100% - 8px); }
.ph__del { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--overlay-photo); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ph__del::after { content: ""; position: absolute; inset: -8px; }

.ba { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #000; user-select: none; -webkit-user-select: none; touch-action: pan-y; --pos: 50%; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__after { clip-path: inset(0 0 0 var(--pos)); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .4); pointer-events: none; }
.ba__handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center no-repeat; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.ba__tag { position: absolute; top: 8px; padding: 4px 8px; border-radius: var(--radius-pill); }
.ba__tag--before { left: 8px; }
.ba__tag--after { right: 8px; }
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba-caption { font: var(--t-foot); color: var(--label-2); margin-top: 8px; text-align: center; }
.ba-seg { margin-top: 10px; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 16px; }
.lightbox img { max-height: 90vh; max-height: 90dvh; border-radius: var(--radius-sm); }
.lightbox__close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: var(--hit); height: var(--hit); border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* =====================================================================
   ADMINISTRATION (blocs partagés ; barres et navigation dans admin.css)
   ===================================================================== */

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: var(--section-gap); }
.stat { background: var(--surface); border-radius: var(--radius); padding: 12px 16px; }
.stat__label { font: var(--t-foot); color: var(--label-2); display: flex; align-items: center; gap: 6px; }
.stat__value { font: var(--t-title2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.live-card {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px;
    background: var(--surface); color: var(--label); text-decoration: none !important;
}
.live-card .item__icon { background: var(--blue); }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* Agenda – liste / semaine / mois */
.agenda-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.agenda-toolbar__nav { display: flex; gap: 4px; }
.agenda-toolbar__nav .btn { min-height: 36px; min-width: var(--hit); padding: 0 10px; border-radius: var(--radius-pill); }
.agenda-toolbar__nav .btn::after { content: ""; position: absolute; inset: -4px 0; }
.agenda-toolbar__label { font: var(--t-headline); }
.week { display: none; }
.day-list .section__title { display: flex; justify-content: space-between; }
.day-list .is-today .section__title { color: var(--red); font-weight: 600; }
.ev-block { display: flex; gap: 8px; padding: 8px 16px; color: var(--label-2); font: var(--t-sub); align-items: center; }
.ev-block .icon { color: var(--label-2); }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.month__dow { padding: 8px 4px; font: 600 12px/16px var(--font); color: var(--label-2); text-align: center; border-bottom: var(--hairline) solid var(--separator); }
.month__cell { min-height: 64px; padding: 4px; border-top: var(--hairline) solid var(--separator); border-left: var(--hairline) solid var(--separator); font: var(--t-cap); color: var(--label); text-decoration: none !important; display: flex; flex-direction: column; gap: 2px; overflow: hidden; min-width: 0; }
.month__cell:nth-child(7n+1) { border-left: 0; }
.month__cell:active { background: var(--pressed); }
.month__cell.is-out { color: var(--label-3); }
.month__cell.is-closed { background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--fill) 6px 7px); }
.month__num { font: 600 13px/1 var(--font); font-variant-numeric: tabular-nums; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.month__cell.is-today .month__num { background: var(--red); color: #fff; }
.month__ev { border-radius: 4px; padding: 1px 4px; background: var(--brand-tinted); color: var(--brand-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month__ev--pending { background: var(--orange-bg); color: var(--orange); }
.month__ev--done { background: var(--green-bg); color: var(--green); }
.month__ev--busy { background: var(--fill-2); color: var(--label-2); }
.month__ev--cancelled { text-decoration: line-through; color: var(--label-2); background: var(--fill); }

/* Fiche RDV */
.appt-hero { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.appt-hero__when { font: var(--t-title2); }
.big-actions { display: grid; gap: 8px; grid-template-columns: 1fr; margin: 16px 0 var(--section-gap); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 16px 0 24px; }
.quick a, .quick button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; min-height: 60px;
    border-radius: var(--radius); background: var(--surface); color: var(--brand-text); font: 500 12px/16px var(--font);
    border: 0; cursor: pointer; text-decoration: none !important;
}
.quick a:active, .quick button:active { background: var(--pressed); }

/* Mode intervention */
.stepper { display: flex; gap: 6px; margin: 4px 0 16px; }
.stepper__s { flex: 1; text-align: center; font: 600 12px/16px var(--font); color: var(--label-2); }
.stepper__s::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--fill-2); margin-bottom: 6px; }
.stepper__s.is-done::before { background: var(--green); }
.stepper__s.is-current { color: var(--label); }
.stepper__s.is-current::before { background: var(--brand); }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.shot {
    position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
    background: var(--fill); box-shadow: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: var(--brand-text); font: 600 13px/16px var(--font); text-align: center; cursor: pointer; padding: 8px; border: 0;
}
.shot input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.shot .icon { width: 26px; height: 26px; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot__label { position: relative; z-index: 1; }
.shot.has-photo .shot__label { position: absolute; left: 4px; bottom: 4px; color: #fff; background: var(--overlay-photo); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 2px 8px; border-radius: var(--radius-pill); font: 600 12px/16px var(--font); max-width: calc(100% - 8px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot__state { position: absolute; top: 4px; right: 4px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; }
.shot__state .icon { width: 16px; height: 16px; stroke-width: 3; }
.shot__state--up { background: var(--overlay-photo); }
.shot__state--err { background: var(--red); }
.shot__count { position: absolute; top: 4px; left: 4px; z-index: 2; border-radius: var(--radius-pill); padding: 2px 8px; }
.shot--extra { background: var(--fill); }
.progress { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; margin: 8px 0 4px; }
.progress__bar { height: 100%; background: var(--brand); border-radius: 2px; transition: width var(--t-fast) var(--ease-std); }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Horaires */
.hours-day { padding: 8px 16px; }
.hours-day__head { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.hours-day__name { flex: 1; }
.hours-day__ranges { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.hours-day.is-closed .hours-day__ranges { display: none; }
.range { display: flex; align-items: center; gap: 8px; }
.range .input { width: auto; flex: 1 1 0; min-width: 0; min-height: var(--hit); padding: 6px 10px; font-variant-numeric: tabular-nums; }
.range span { color: var(--label-2); }
.weekday-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.weekday-picks .chip span { min-height: var(--hit); min-width: var(--hit); align-items: center; padding: 6px 10px; }

/* Onglets ancres */
.anchors { display: flex; gap: 8px; overflow-x: auto; margin: -4px 0 20px; padding-bottom: 4px; scrollbar-width: none; }
.anchors::-webkit-scrollbar { display: none; }
.anchors a { flex: none; display: inline-flex; align-items: center; min-height: 36px; font: 500 13px/18px var(--font); padding: 0 14px; border-radius: var(--radius-pill); background: var(--fill); color: var(--label); text-decoration: none !important; }

.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-family: var(--font-mono); font-size: 13px; }

/* ---------- Devis imprimable (le document reste blanc, encre noire) ---------- */

.doc { max-width: 820px; margin: 24px auto; background: #fff; color: #111; padding: 40px 44px; border-radius: 8px; box-shadow: 0 2px 20px rgba(0, 0, 0, .08); font-size: 14px; line-height: 1.45; }
.doc__top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.doc h1 { font-size: 28px; line-height: 1.2; }
.doc__muted { color: #555; }
.doc table { width: 100%; border-collapse: collapse; margin: 24px 0 12px; }
.doc th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #555; border-bottom: 1.5px solid #111; padding: 8px 6px; }
.doc td { padding: 9px 6px; border-bottom: .5px solid #ddd; vertical-align: top; }
.doc .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc__totals { margin-left: auto; width: 300px; max-width: 100%; }
.doc__totals div { display: flex; justify-content: space-between; padding: 4px 6px; }
.doc__totals .grand { font-size: 18px; font-weight: 700; border-top: 1.5px solid #111; margin-top: 4px; padding-top: 8px; }
.doc__foot { margin-top: 32px; font-size: 12px; color: #555; border-top: .5px solid #ddd; padding-top: 12px; }
.doc-toolbar { max-width: 820px; margin: 16px auto 0; padding: 0 16px; display: flex; gap: 8px; }
@media print {
    body { background: #fff !important; }
    .doc-toolbar, .site-header, .site-footer, .tabbar, .sidebar, .bk-bar { display: none !important; }
    .doc { box-shadow: none; margin: 0; padding: 0; max-width: none; }
}

/* ---------- Recherche de modèle ---------- */

.car-results { margin-top: 8px; border-radius: var(--radius); overflow: hidden; background: var(--elevated); box-shadow: var(--shadow-float); max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
.car-result { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: var(--row-min); padding: 8px 16px; border: 0; background: none; font: inherit; color: var(--label); text-align: left; cursor: pointer; }
.car-result + .car-result::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: var(--hairline) solid var(--separator); }
.car-result:active, .car-result.is-active { background: var(--pressed); }
.car-result__brand { color: var(--label-2); }
.car-result__name { font-weight: 500; }
.car-result__meta { color: var(--label-2); font: var(--t-foot); white-space: nowrap; }
.car-results__empty { padding: 12px 16px; color: var(--label-2); font: var(--t-sub); }
.car-picked { display: flex; align-items: center; gap: 12px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--fill-3); border-top-color: var(--label-2); animation: spin .8s linear infinite; }
.btn--brand .spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.group__label { padding: 12px 16px 4px; font: var(--t-foot); color: var(--label-2); background: none; text-transform: none; letter-spacing: normal; }

/* =====================================================================
   SURVOL (pointeur précis uniquement : pas d'état collé au toucher)
   ===================================================================== */

@media (hover: hover) and (pointer: fine) {
    a.item:hover, button.item:hover, label.item:hover, .choice:hover, .car-result:hover, details.more > summary:hover { background: var(--fill); }
    .slot:hover:not(.is-selected):not([disabled]) { background: var(--fill-2); }
    .cal-day:hover:not([disabled]):not(.is-selected) { background: var(--fill-2); }
    .month__cell:hover { background: var(--fill); }
    .quick a:hover, .quick button:hover { background: var(--fill); }
    .anchors a:hover { background: var(--fill-2); }
    .site-nav a:not(.btn):hover { background: var(--fill); }
    .chip span:hover { filter: brightness(.97); }
}

/* =====================================================================
   TABLETTE – ≥ 700 px
   ===================================================================== */

@media (min-width: 700px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .site-nav a:not(.btn) { display: inline-flex; align-items: center; }
    .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .how { grid-template-columns: repeat(3, 1fr); }
    .stats { grid-template-columns: repeat(4, 1fr); }
    .big-actions { grid-template-columns: repeat(2, 1fr); }
    .month__cell { min-height: 96px; }
    .bk-bar { padding-left: max(var(--gutter), calc((100% - var(--readable)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--readable)) / 2)); }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .booking { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; padding-top: 24px; padding-bottom: 48px; }
    .booking__aside { position: sticky; top: 76px; }
    .bk-bar { display: none; }
    html:has(.booking) { scroll-padding-bottom: 0; }
}
@media (min-width: 900px) {
    .week { display: grid; }
    .day-list--week { display: none; }
    .two-col > * { min-width: 0; }
    .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
    .two-col--wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}

/* Grille semaine (tablette paysage / ordinateur) */
.week { grid-template-columns: 52px repeat(7, minmax(0, 1fr)); background: var(--surface); border-radius: var(--radius); overflow: hidden; position: relative; }
.week__corner { border-bottom: var(--hairline) solid var(--separator); }
.week__dh { padding: 8px 6px; text-align: center; border-bottom: var(--hairline) solid var(--separator); border-left: var(--hairline) solid var(--separator); font: var(--t-foot); color: var(--label-2); text-decoration: none !important; }
.week__dh strong { display: block; font: 600 20px/25px var(--font); color: var(--label); margin-top: 2px; font-variant-numeric: tabular-nums; }
.week__dh.is-today { color: var(--red); }
.week__dh.is-today strong { color: #fff; background: var(--red); border-radius: 50%; width: 34px; height: 34px; line-height: 34px; margin: 2px auto 0; }
.week__hours { position: relative; }
.week__hour { position: absolute; right: 6px; font: var(--t-cap); color: var(--label-2); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.week__col { position: relative; border-left: var(--hairline) solid var(--separator); }
.week__line { position: absolute; left: 0; right: 0; border-top: var(--hairline) solid var(--separator); }
.week__open { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--brand) 4%, transparent); }
.week__closed { position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--fill) 6px 7px); display: flex; justify-content: center; padding-top: 12px; font: var(--t-cap); color: var(--label-2); }
.week__ev {
    position: absolute; left: 3px; right: 3px; border-radius: var(--radius-xs); padding: 4px 6px; overflow: hidden;
    font: var(--t-cap); color: var(--label); text-decoration: none !important;
    background: color-mix(in srgb, var(--brand) 18%, var(--surface)); border-left: 3px solid var(--brand);
}
.week__ev strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week__ev--pending { background: color-mix(in srgb, var(--orange) 18%, var(--surface)); border-left-color: var(--orange); }
.week__ev--in_progress { background: color-mix(in srgb, var(--blue) 18%, var(--surface)); border-left-color: var(--blue); }
.week__ev--done { background: color-mix(in srgb, var(--green) 18%, var(--surface)); border-left-color: var(--green); }
.week__ev--cancelled { background: var(--fill); border-left-color: var(--label-3); color: var(--label-2); text-decoration: line-through !important; }
.week__ev--busy { background: var(--fill); border-left-color: var(--label-3); color: var(--label-2); }
.week__now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--red); z-index: 3; }
.week__now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
@media (hover: hover) and (pointer: fine) { .week__ev:hover { filter: brightness(.96); z-index: 2; } }

/* =====================================================================
   ORDINATEUR – admin, ≥ 1024 px et pointeur précis : rampe resserrée
   (le site public garde la rampe iOS 17 px)
   ===================================================================== */

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    body.admin {
        --t-large:    700 28px/34px var(--font);
        --t-title1:   700 24px/30px var(--font);
        --t-title2:   700 20px/25px var(--font);
        --t-title3:   600 17px/22px var(--font);
        --t-headline: 600 15px/20px var(--font);
        --t-body:     400 15px/20px var(--font);
        --t-callout:  400 14px/19px var(--font);
        --t-sub:      400 13px/18px var(--font);
        --t-foot:     400 12px/16px var(--font);
        --t-cap:      400 12px/16px var(--font);
        --fs-large: 28px; --fs-title: 20px; --fs-body: 15px; --fs-sub: 13px; --fs-foot: 12px; --fs-cap: 12px;
        --row-min: 36px; --row-pad: 8px 16px; --control-h: 32px; --btn-primary-h: 36px; --btn-sm-h: 28px; --seg-h: 28px;
        --sep-inset-icon: 52px; --section-gap: 28px;
    }
    .admin .btn { padding: 0 14px; }
    .admin .btn .icon { width: 16px; height: 16px; }
    .admin .btn--sm { font: 600 13px/18px var(--font); padding: 0 12px; }
    .admin .btn--sm::after { display: none; }
    .admin .input, .admin .select, .admin .textarea { padding: 5px 10px; border-radius: var(--radius-xs); }
    .admin .textarea { min-height: 72px; }
    .admin .select { padding-right: 26px; background-position: right 8px center; background-size: 10px; }
    .admin .input--code { font-size: 22px; min-height: 44px; }
    .admin .frow .input, .admin .frow .select {
        width: 240px; max-width: 55%; min-height: 26px; padding: 3px 8px; text-align: left;
        background-color: var(--fill); border-radius: var(--radius-xs);
    }
    .admin .frow .select { padding-right: 24px; background-position: right 6px center; }
    .admin .frow .input:focus, .admin .frow .select:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 40%, transparent); }
    .admin .frow--stack .input, .admin .frow--stack .select { width: 100%; max-width: none; }
    .admin .field__label { margin-left: 0; }
    .admin .item__icon { width: 24px; height: 24px; border-radius: 6px; }
    .admin .item__icon .icon { width: 15px; height: 15px; }
    .admin .item__time { min-width: 52px; }
    .admin .switch__track { width: 38px; height: 22px; }
    .admin .switch__track::after { width: 20px; height: 20px; top: 1px; left: 1px; }
    .admin .switch input:checked + .switch__track { background: var(--brand); }
    .admin .switch input:checked + .switch__track::after { transform: translateX(16px); }
    .admin .check, .admin .check__box { width: 16px; height: 16px; }
    .admin .check__box { border-radius: 4px; border-width: 1px; }
    .admin .check input:checked + .check__box::after { width: 8px; height: 4px; border-width: 0 0 2px 2px; }
    .admin .choice__mark { width: 18px; height: 18px; }
    .admin .choice__mark::after { width: 8px !important; height: 5px !important; border-width: 0 0 2px 2px !important; }
    .admin .choice { padding: 8px 16px; }
    .admin .seg a, .admin .seg label, .admin .seg button { min-height: 24px; font-size: 12px; }
    .admin .seg label span { min-height: 24px; }
    .admin .seg a::after, .admin .seg label::after, .admin .seg button::after { display: none; }
    .admin .chip span { min-height: 30px; padding: 4px 12px; border-radius: var(--radius-xs); font-size: 13px; }
    .admin .slot { min-height: 32px; font-size: 13px; }
    .admin .slots__grid { gap: 6px; }
    .admin .cal-day { font-size: 14px; min-height: 36px; max-width: 42px; }
    .admin .table { font: var(--t-body); }
    .admin .range .input { min-height: 28px; flex: none; width: 104px; }
    .admin .anchors a { min-height: 28px; font-size: 12px; }
    .admin .stats { gap: 12px; }
    .admin .stat__value { font: var(--t-title2); }
    .admin .quick a, .admin .quick button { min-height: 52px; }
    .admin .hours-day { padding: 6px 16px; }
    .admin .link-btn::after, .admin a.item__chev::after, .admin .hit::after { display: none; }
    .page-head { align-items: center; }
    .back-link { min-height: 28px; }
    .site-nav a:not(.btn) { min-height: 36px; padding: 8px 10px; }
}

/* =====================================================================
   ACCESSIBILITÉ : mouvement, transparence, contraste
   ===================================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
    .bk-step, dialog[open], dialog.sheet[open], dialog.action-sheet[open], dialog.alert[open] { animation: fade-in 150ms linear !important; }
    .skeleton, .pulse { animation: none !important; }
    .floating-toast { transform: translate(-50%, 0); transition: opacity 150ms linear; }
    .spinner, .btn[aria-busy="true"]::before { animation-duration: 1.6s; }
}
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .site-header, .bk-bar, .floating-toast { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header, .bk-bar, .floating-toast { background: var(--bg); }
}
@media (prefers-contrast: more) {
    .group, .stat, .plan, .summary, .table-wrap { box-shadow: 0 0 0 1px var(--separator-opaque); }
    .input, .select, .textarea { box-shadow: inset 0 0 0 1px var(--separator-opaque); }
}
