html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ===================================================================
   app.css — PR 1 : RETHEME "Le Hors-Série"
   Chemin cible : src/Webbaker.Client/wwwroot/css/app.css
   ───────────────────────────────────────────────────────────────────
   Stratégie : conserver votre app.css existant et AJOUTER à la fin
   les sections ci-dessous. Aucune suppression des règles actuelles
   (styles Blazor error-ui, loading-progress, validation…).
   =================================================================== */

/* ═══ 1. Tokens de design Hors-Série ════════════════════════════════ */
:root {
    /* Palette encre / crème / accent */
    --hs-ink:          #18160F;
    --hs-ink-2:        #2B261C;
    --hs-ink-3:        #4A4336;
    --hs-ink-4:        #6B6354;
    --hs-line:         #E5DFD2;
    --hs-line-2:       #D8D0BE;
    --hs-cream:        #F5F0E6;
    --hs-cream-2:      #EDE6D5;
    --hs-paper:        #FBF8F0;
    --hs-accent:       #C9752F;  /* terracotta — CTA et highlights */
    --hs-accent-ink:   #FFFFFF;
    --hs-ok:           #2F7A44;
    --hs-warn:         #C27A1A;
    --hs-err:          #B4452B;

    /* Typographie — Inter partout pour cohérence UI, WindSong réservé au brand mark */
    --hs-font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --hs-font-serif:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --hs-font-script:  'WindSong', cursive;
    --hs-font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

/* ═══ 2. Typographie globale ═══════════════════════════════════════ */
html, body {
    font-family: var(--hs-font-sans);
    background: var(--hs-cream);
    color: var(--hs-ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Sélection = accent */
::selection { background: var(--hs-accent); color: #fff; }

/* ═══ 3. Brand lock-up (MainLayout) ════════════════════════════════ */
.hs-brand-appbar {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin-left: .5rem;
}
.hs-brand-script {
    font-family: var(--hs-font-script);
    font-size: 1.3rem;
    line-height: 1;
    color: var(--hs-ink);
}
.hs-brand-divider {
    color: var(--hs-accent);
    letter-spacing: .1em;
    font-size: .75rem;
    opacity: .8;
}
.hs-brand-label {
    font-size: .7rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
    font-weight: 600;
}

.hs-drawer-header {
    background: var(--hs-paper);
    border-bottom: 1px solid var(--hs-line-2);
    padding: 1.25rem 1.25rem 1rem !important;
}
.hs-brand-drawer { display: flex; flex-direction: column; gap: .35rem; }
.hs-brand-script-lg {
    font-family: var(--hs-font-script);
    font-size: 1.6rem;
    line-height: 1;
    color: var(--hs-ink);
}
.hs-brand-tagline {
    font-size: .625rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
    font-weight: 500;
}

/* ═══ 4. AppBar Hors-Série ════════════════════════════════════════ */
.hs-appbar {
    background: var(--hs-paper) !important;
    color: var(--hs-ink) !important;
    border-bottom: 1px solid var(--hs-line) !important;
    backdrop-filter: blur(8px);
}
.hs-appbar .mud-appbar-appbar { background: transparent !important; }
.hs-chip-status .mud-chip {
    font-size: .7rem;
    letter-spacing: .04em;
}

/* ═══ 5. Drawer & navigation ═══════════════════════════════════════ */
.hs-drawer .mud-drawer {
    background: var(--hs-paper) !important;
    border-right: 1px solid var(--hs-line) !important;
}
.hs-nav .mud-nav-link {
    font-size: .8125rem;
    font-weight: 500;
    color: var(--hs-ink-3);
    margin: 1px 8px;
    border-radius: 3px;
    padding: 8px 12px;
    transition: background .12s, color .12s;
    border-left: 2px solid transparent;
}
.hs-nav .mud-nav-link:hover {
    background: var(--hs-cream-2) !important;
    color: var(--hs-ink) !important;
}
.hs-nav .mud-nav-link.active {
    background: var(--hs-cream-2) !important;
    color: var(--hs-ink) !important;
    font-weight: 600;
    border-left: 2px solid var(--hs-accent);
}
.hs-nav .mud-nav-link .mud-icon-root { font-size: 1.05rem; }
.hs-nav .mud-divider {
    margin: .5rem 1rem !important;
    border-color: var(--hs-line) !important;
}

/* ═══ 6. Titres (MudText H1-H6) — sans-serif, poids 500, tracking serré ═══ */
.mud-typography-h1,
.mud-typography-h2,
.mud-typography-h3,
.mud-typography-h4,
.mud-typography-h5,
.mud-typography-h6 {
    font-family: var(--hs-font-sans) !important;
    font-weight: 500 !important;
    letter-spacing: -.015em;
}

/* ═══ 7. Boutons — coins droits, type sobre ══════════════════════ */
.mud-button-root {
    border-radius: 3px !important;
    text-transform: none !important;
    letter-spacing: .02em !important;
    font-weight: 500 !important;
}
.mud-button-filled.mud-button-filled-primary {
    background-color: var(--hs-ink) !important;
    color: var(--hs-cream) !important;
}
.mud-button-filled.mud-button-filled-primary:hover {
    background-color: var(--hs-ink-2) !important;
}
.mud-button-filled.mud-button-filled-secondary {
    background-color: var(--hs-accent) !important;
    color: var(--hs-accent-ink) !important;
}

/* ═══ 8. Cards, tables, inputs ═══════════════════════════════════ */
.mud-paper, .mud-card {
    border: 1px solid var(--hs-line) !important;
    box-shadow: none !important;
    border-radius: 4px !important;
}
.mud-table-container .mud-table-head .mud-table-cell {
    background: var(--hs-cream) !important;
    color: var(--hs-ink-4) !important;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .625rem;
    font-weight: 600;
    border-bottom: 1px solid var(--hs-line) !important;
}
.mud-input-control .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--hs-line-2) !important;
    border-radius: 3px !important;
}

/* ═══ 9. Scrollbars discrets ═════════════════════════════════════ */
*::-webkit-scrollbar        { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb  { background: var(--hs-line-2); border-radius: 4px; }
*::-webkit-scrollbar-track  { background: transparent; }

/* ═══ 10. Utilitaires ════════════════════════════════════════════ */
.hs-num   { font-variant-numeric: tabular-nums; }
.hs-mono  { font-family: var(--hs-font-mono); }
.hs-serif { font-family: var(--hs-font-serif); }
.hs-dots-sep {
    display: inline-flex; align-items: center; gap: 3px;
    color: var(--hs-accent);
}
.hs-dots-sep::before,
.hs-dots-sep::after,
.hs-dots-sep > span {
    content: ''; width: 3px; height: 3px; border-radius: 50%;
    background: currentColor;
}

/* ===================================================================
   app.css — PR 2 : COMPLÉMENTS SHELL
   Chemin cible : src/Webbaker.Client/wwwroot/css/app.css
   ───────────────────────────────────────────────────────────────────
   À AJOUTER à la suite des ajouts PR1. Ce bloc ajoute le styling du
   breadcrumb, de la recherche globale, de l'horloge, des groupes de
   navigation et du footer drawer.
   =================================================================== */

/* ═══ Breadcrumb (topbar) ═══════════════════════════════════════════ */
.hs-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: .75rem;
    font-size: .8125rem;
}
.hs-breadcrumb-home {
    color: var(--hs-ink-4);
    display: inline-flex;
}
.hs-breadcrumb-home .mud-icon-root { font-size: 1rem; }
.hs-breadcrumb-sep {
    color: var(--hs-line-2);
    font-weight: 300;
}
.hs-breadcrumb-item {
    color: var(--hs-ink-3);
    letter-spacing: .01em;
}
.hs-breadcrumb-item.is-last {
    color: var(--hs-ink);
    font-weight: 600;
}

/* ═══ Recherche globale ═════════════════════════════════════════════ */
.hs-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--hs-cream-2);
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 5px 10px;
    min-width: 300px;
    transition: border-color .15s, background .15s;
}
.hs-search:focus-within {
    border-color: var(--hs-ink-4);
    background: #fff;
}
.hs-search-icon { color: var(--hs-ink-4); }
.hs-search-input {
    flex: 1;
    min-width: 0; /* autorise la compression du champ dans l'AppBar étroite */
    border: none;
    background: transparent;
    outline: none;
    font: 400 .8125rem/1 var(--hs-font-sans);
    color: var(--hs-ink);
}
.hs-search-input::placeholder { color: var(--hs-ink-4); }
.hs-search-kbd {
    font-family: var(--hs-font-mono);
    font-size: .625rem;
    color: var(--hs-ink-4);
    background: #fff;
    border: 1px solid var(--hs-line);
    border-radius: 2px;
    padding: 1px 5px;
    letter-spacing: 0;
}
/* Variante contextuelle — icône filtre + bordure accent */
.hs-search--contextual {
    border-color: var(--hs-accent);
    background: color-mix(in srgb, var(--hs-accent) 6%, var(--hs-cream));
}
.hs-search--contextual .hs-search-icon { color: var(--hs-accent); }

/* ═══ Horloge ═══════════════════════════════════════════════════════ */
.hs-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
    padding: 0 .75rem;
    margin-left: .5rem;
    border-left: 1px solid var(--hs-line);
}
.hs-clock-time {
    font-family: var(--hs-font-mono);
    font-size: .9375rem;
    font-weight: 500;
    color: var(--hs-ink);
    font-variant-numeric: tabular-nums;
}
.hs-clock-date {
    font-size: .625rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
    margin-top: 2px;
}

/* ═══ Status pill connexion ════════════════════════════════════════ */
.hs-status-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .6875rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 2px;
    margin-left: .5rem;
}
.hs-status-pill.is-online {
    background: rgba(47,122,68,.08);
    color: var(--hs-ok);
}
.hs-status-pill.is-offline {
    background: rgba(180,69,43,.08);
    color: var(--hs-err);
}
.hs-status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 2px rgba(255,255,255,.5);
}
.hs-status-pill.is-online .hs-status-dot {
    animation: hs-pulse 2s ease-in-out infinite;
}
@keyframes hs-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .4; }
}

.hs-icon-btn { color: var(--hs-ink-3) !important; }

/* ═══ Drawer — brand header ════════════════════════════════════════ */
.hs-brand-drawer {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    align-items: flex-start;
}
.hs-brand-dots {
    display: flex; gap: 4px;
    margin: .1rem 0 .1rem;
}
.hs-brand-dots span {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--hs-accent);
}

/* ═══ Drawer — groupes de navigation ═══════════════════════════════ */
.hs-nav-scroll {
    flex: 1;
    overflow-y: auto;
    padding: .25rem 0 1rem;
}
.hs-nav-group { margin-bottom: .75rem; }
.hs-nav-group-label {
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
    padding: .75rem 1.25rem .35rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.hs-nav-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hs-line);
}
.hs-nav-admin { color: var(--hs-warn) !important; }

/* ═══ Drawer — footer ══════════════════════════════════════════════ */
.hs-drawer-footer {
    border-top: 1px solid var(--hs-line);
    padding: .75rem 1.25rem;
    background: var(--hs-cream-2);
}
.hs-drawer-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .6875rem;
    padding: 2px 0;
}
.hs-drawer-footer-label {
    color: var(--hs-ink-4);
    text-transform: uppercase;
    letter-spacing: .1em;
}
.hs-drawer-footer-value {
    color: var(--hs-ink);
    font-family: var(--hs-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ===================================================================
   app.css — PR 3 : COMPOSANTS RÉUTILISABLES
   À AJOUTER à la suite des ajouts PR1 + PR2.
   =================================================================== */

/* ═══ HsPageHeader ══════════════════════════════════════════════════ */
.hs-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: .5rem 0 1rem;
}
.hs-page-header-main { flex: 1; min-width: 0; }

.hs-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
    margin-bottom: .4rem;
}
.hs-page-eyebrow-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--hs-accent);
}

.hs-page-title {
    font-family: var(--hs-font-serif);
    font-size: 2.25rem;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -.01em;
    color: var(--hs-ink);
    margin: 0;
}

.hs-page-subtitle {
    font-size: .9375rem;
    color: var(--hs-ink-3);
    margin-top: .35rem;
    max-width: 60ch;
    text-wrap: pretty;
}

.hs-page-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-shrink: 0;
    padding-top: .5rem;
}

.hs-page-header-rule {
    position: relative;
    height: 1px;
    background: var(--hs-line);
    margin: 0 0 1.75rem;
}
.hs-page-header-rule-accent {
    position: absolute;
    left: 0; top: 0;
    width: 56px; height: 1px;
    background: var(--hs-accent);
}

/* ═══ HsStatCard ════════════════════════════════════════════════════ */
.hs-stat-card {
    background: #fff;
    border: 1px solid var(--hs-line);
    border-radius: 4px;
    padding: 1.1rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-height: 130px;
    position: relative;
    transition: border-color .15s, transform .15s;
}
.hs-stat-card:hover { border-color: var(--hs-line-2); }
.hs-stat-card.is-highlight {
    background: var(--hs-ink);
    color: var(--hs-cream);
    border-color: var(--hs-ink);
}
.hs-stat-card.is-highlight .hs-stat-label,
.hs-stat-card.is-highlight .hs-stat-unit { color: rgba(245,240,230,.6); }
.hs-stat-card.is-highlight .hs-stat-value { color: var(--hs-cream); }

.hs-stat-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
}
.hs-stat-icon { color: var(--hs-accent); }

.hs-stat-value-row {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    margin-top: .2rem;
}
.hs-stat-value {
    font-family: var(--hs-font-serif);
    font-size: 2.25rem;
    font-weight: 500;
    line-height: 1;
    color: var(--hs-ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}
.hs-stat-unit {
    font-size: .8125rem;
    color: var(--hs-ink-4);
    font-weight: 500;
}

.hs-stat-delta {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    margin-top: .2rem;
}
.hs-stat-delta .mud-icon-root { font-size: .9rem; }
.hs-stat-delta.is-up   { color: var(--hs-ok); }
.hs-stat-delta.is-down { color: var(--hs-err); }
.hs-stat-delta-label {
    color: var(--hs-ink-4);
    font-weight: 400;
    margin-left: .25rem;
}

.hs-stat-footer {
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px dashed var(--hs-line);
    font-size: .75rem;
    color: var(--hs-ink-4);
}

/* ═══ HsSectionTitle ═══════════════════════════════════════════════ */
.hs-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
}
.hs-section-title-text {
    font-family: var(--hs-font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--hs-ink);
    margin: 0;
    flex-shrink: 0;
}
.hs-section-title-rule {
    flex: 1;
    height: 1px;
    background: var(--hs-line);
}
.hs-section-title-action {
    flex-shrink: 0;
    font-size: .75rem;
    color: var(--hs-ink-4);
}

/* ═══ Gantt Planning Timeline ══════════════════════════════════════ */

/* Conteneur principal */
.hs-gantt-wrap {
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-radius: 6px;
    overflow: hidden;
    transition: opacity .2s;
}
.hs-gantt-wrap.hs-gantt-loading {
    opacity: .55;
    pointer-events: none;
}

/* Table */
.hs-gantt-table {
    width: 100%;
    overflow-x: auto;
}

/* Constante : largeur de la colonne "POSTE" */
:root { --hs-gantt-label-w: 148px; }

/* ── En-tête heures ── */
.hs-gantt-header-row {
    display: flex;
    align-items: stretch;
    border-bottom: 2px solid var(--hs-line);
    position: sticky;
    top: 0;
    background: var(--hs-paper);
    z-index: 10;
}
.hs-gantt-header-label {
    font-family: var(--hs-font-sans);
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
    display: flex;
    align-items: flex-end;
    padding: .5rem .75rem .4rem;
}

.hs-gantt-label-cell {
    width: var(--hs-gantt-label-w);
    min-width: var(--hs-gantt-label-w);
    flex-shrink: 0;
    border-right: 1px solid var(--hs-line);
}

.hs-gantt-timeline-cell {
    flex: 1;
    position: relative;
    min-width: 600px;
}

/* Colonnes heures dans l'en-tête */
.hs-gantt-hours-track {
    display: flex;
    height: 100%;
    align-items: flex-end;
}
.hs-gantt-hour-mark {
    flex: 1;
    font-family: var(--hs-font-mono);
    font-size: .6875rem;
    color: var(--hs-ink-4);
    padding: .5rem 0 .35rem .3rem;
    border-left: 1px solid var(--hs-line-2);
    line-height: 1;
}
.hs-gantt-hour-mark:first-child { border-left: none; }

/* Badge heure courante */
.hs-gantt-now-badge {
    position: absolute;
    top: .25rem;
    background: var(--hs-err);
    color: #fff;
    font-family: var(--hs-font-mono);
    font-size: .6875rem;
    font-weight: 700;
    padding: .15rem .4rem;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 12;
    pointer-events: none;
}
.hs-gantt-now-badge::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--hs-err);
}

/* ── Lignes de données ── */
.hs-gantt-data-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--hs-line);
    min-height: 72px;
}
.hs-gantt-data-row:last-child { border-bottom: none; }
.hs-gantt-data-row:hover .hs-gantt-timeline-cell {
    background: color-mix(in srgb, var(--hs-cream) 60%, transparent);
}

/* Étiquette poste gauche */
.hs-gantt-label-cell {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    background: var(--hs-paper);
}
.hs-gantt-row-accent {
    width: 3px;
    align-self: stretch;
    border-radius: 3px;
    flex-shrink: 0;
}
.hs-gantt-row-label {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.hs-gantt-row-name {
    font-family: var(--hs-font-sans);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--hs-ink);
    line-height: 1.3;
}
.hs-gantt-row-type {
    font-family: var(--hs-font-sans);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
}

/* Timeline */
.hs-gantt-timeline-cell {
    position: relative;
    background: var(--hs-cream);
}

/* Lignes verticales des heures */
.hs-gantt-vline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--hs-line);
    pointer-events: none;
}

/* Ligne heure courante */
.hs-gantt-now-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--hs-err);
    opacity: .85;
    z-index: 8;
    pointer-events: none;
}

/* ── Blocs batch ── */
.hs-gantt-batch {
    position: absolute;
    top: 7px;
    bottom: 7px;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: filter .12s, transform .12s;
    min-width: 40px;
    border: 1px solid transparent;
}
.hs-gantt-batch:hover {
    filter: brightness(.94);
    transform: scaleY(1.02);
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* Couleurs par catégorie de recette */
.hs-gantt-batch--pain        { background: #F2D98E; border-color: #D9BF6E; }
.hs-gantt-batch--viennoiserie{ background: #B8D9C0; border-color: #8FBC9A; }
.hs-gantt-batch--patisserie  { background: #C8D9E8; border-color: #99BAD0; }
.hs-gantt-batch--traiteur    { background: #E8D2C4; border-color: #C9A88E; }
.hs-gantt-batch--autre       { background: #E2DDD4; border-color: #C8C2B4; }

/* Geste de conduite du levain : teinte terracotta du système, pour qu'un rafraîchi
   ne se confonde jamais avec une fournée dans la même bande horaire. */
.hs-gantt-batch--levain {
    background: var(--hs-cream-2);
    border-color: var(--hs-accent);
    border-left-width: 3px;
}

.hs-gantt-batch-inner {
    padding: .25rem .45rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}
.hs-gantt-batch-name {
    font-family: var(--hs-font-sans);
    font-size: .75rem;
    font-weight: 600;
    color: var(--hs-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.hs-gantt-batch-meta {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-family: var(--hs-font-mono);
    font-size: .6rem;
    color: var(--hs-ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.hs-gantt-batch-time { color: var(--hs-ink-4); }
.hs-gantt-batch-person { color: var(--hs-ink-3); }

/* ── État vide ── */
.hs-gantt-empty-state {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--hs-line);
}

/* ── Pied de Gantt : équipe ── */
.hs-gantt-footer {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    border-top: 1px solid var(--hs-line);
    background: var(--hs-paper);
}
.hs-gantt-footer-label {
    font-family: var(--hs-font-sans);
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
    white-space: nowrap;
}
.hs-gantt-footer-dots {
    font-size: .9rem;
    color: var(--hs-ink-4);
    letter-spacing: .05em;
}
.hs-gantt-avatars {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}
.hs-gantt-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--hs-font-sans);
    font-size: .6875rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
    letter-spacing: .02em;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   Tableur de production (« conducteur de fournil ») — BGB-1
   Grille produits × créneaux horaires, codes d'étape balisés.
   ═══════════════════════════════════════════════════════════════════════ */
.hs-tableur-wrap {
    overflow-x: auto;
    border: 1px solid var(--hs-line);
    border-radius: 4px;
    background: var(--hs-paper);
    margin-top: 1rem;
}
.hs-tableur-print-title {
    display: none; /* visible uniquement à l'impression */
    font-family: var(--hs-font-sans);
    font-weight: 600;
    padding: .5rem .75rem;
}
.hs-tableur {
    border-collapse: collapse;
    width: 100%;
    font-family: var(--hs-font-sans);
    font-size: .8125rem;
}
.hs-tableur th,
.hs-tableur td {
    border: 1px solid var(--hs-line);
}
.hs-tableur thead th {
    background: var(--hs-cream-2);
    color: var(--hs-ink-3);
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: center;
    padding: 6px 4px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.hs-tableur-rowhead {
    text-align: left;
    min-width: 220px;
    max-width: 260px;
    padding: 8px 10px;
    background: var(--hs-paper);
    position: sticky;
    left: 0;
    z-index: 2;
    vertical-align: top;
}
.hs-tableur thead .hs-tableur-rowhead { z-index: 3; }
.hs-tableur-product {
    font-weight: 600;
    color: var(--hs-ink);
}
.hs-tableur-rowmeta {
    font-size: .6875rem;
    color: var(--hs-ink-4);
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 2px;
}
.hs-tableur-row { cursor: pointer; }
.hs-tableur-row:hover .hs-tableur-rowhead { background: var(--hs-cream-2); }
.hs-tableur-cell {
    padding: 0;
    height: 34px;
    min-width: 44px;
    text-align: center;
}
.hs-tableur-code {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-weight: 700;
    font-size: .75rem;
    color: var(--hs-ink);
}

/* Palette des étapes — teintes pastel harmonisées avec les couleurs de catégorie du Gantt */
.hs-tableur-cell--preparation    .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--preparation    { background: #E8E2D4; }
.hs-tableur-cell--pesee          .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--pesee          { background: #EDE6D5; }
.hs-tableur-cell--petrissage     .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--petrissage     { background: #F2D98E; }
.hs-tableur-cell--repos          .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--repos          { background: #DCD3E8; }
.hs-tableur-cell--faconnage      .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--faconnage      { background: #C8D9E8; }
.hs-tableur-cell--pousse         .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--pousse         { background: #B8D9C0; }
.hs-tableur-cell--cuisson        .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--cuisson        { background: #E8B98E; }
.hs-tableur-cell--refroidissement .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--refroidissement { background: #CFE0E2; }
.hs-tableur-cell--finition       .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--finition       { background: #E8D2C4; }
/* Autolyse : teinte volontairement voisine de la famille des repos — c'en est un,
   mais un repos qui ne se rabat pas et ne s'étire pas (cf. StepType.Autolyse). */
.hs-tableur-cell--autolyse       .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--autolyse       { background: #CCE3DA; }
.hs-tableur-cell--autre          .hs-tableur-code,
.hs-tableur-swatch.hs-tableur-cell--autre          { background: #E2DDD4; }

/* Légende */
.hs-tableur-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .9rem;
    margin-top: .85rem;
}
.hs-tableur-legend-title {
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
}
.hs-tableur-legend-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    color: var(--hs-ink-3);
}
.hs-tableur-swatch {
    width: 26px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid var(--hs-line-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .625rem;
    font-weight: 700;
    color: var(--hs-ink);
}

/* ── Maille fine (BGB-1bis) ────────────────────────────────────────────────
   À cinq minutes, une journée de fournil compte plus de cent colonnes : les
   étapes sont fusionnées en blocs (colspan), mais les en-têtes restent unitaires
   et doivent donc devenir étroits. Le débordement reste confiné à
   .hs-tableur-wrap — la page, elle, ne défile jamais horizontalement (§15h). */
.hs-tableur--fine thead th {
    min-width: 16px;
    padding: 6px 1px;
    font-size: .5625rem;
}
.hs-tableur--fine .hs-tableur-cell { min-width: 16px; }

/* Repère visuel de l'heure ronde, seul moyen de se situer quand une colonne
   sur six porte un libellé. */
.hs-tableur th.hs-tableur-tick--hour,
.hs-tableur td.hs-tableur-tick--hour { border-left: 2px solid var(--hs-line-2); }

.hs-tableur-cell--filled { cursor: pointer; }
.hs-tableur-code {
    gap: .35rem;
    padding: 0 .3rem;
    overflow: hidden;
}
.hs-tableur-code-badge { flex-shrink: 0; }
.hs-tableur-code-label {
    font-weight: 500;
    font-size: .6875rem;
    color: var(--hs-ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hs-tableur-legend-hint {
    color: var(--hs-ink-4);
    font-style: italic;
}

/* ── Fiche d'étape (réglages + ordre d'ajout) ─────────────────────────────── */
.hs-param-key {
    color: var(--hs-ink-4);
    white-space: nowrap;
    width: 42%;
}
.hs-param-note {
    font-size: .6875rem;
    color: var(--hs-ink-4);
    font-style: italic;
}
.hs-step-list {
    border: 1px solid var(--hs-line);
    border-radius: 4px;
    max-height: 320px;
    overflow-y: auto;
}
.hs-step-list-line {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    min-width: 0;
}
.hs-step-list-time {
    font-family: var(--hs-font-mono);
    font-size: .75rem;
    color: var(--hs-ink-4);
    flex-shrink: 0;
    width: 42px;
}
.hs-step-list-dur {
    margin-left: auto;
    font-size: .6875rem;
    color: var(--hs-ink-4);
    flex-shrink: 0;
}
.hs-step-list--active { background: var(--hs-cream-2); }

/* ═══════════════════════════════════════════════════════════════════════
   PR 4 — RESPONSIVE MOBILE / TABLETTE
   ───────────────────────────────────────────────────────────────────────
   Le design Hors-Série a été dessiné pour le desktop : plusieurs blocs
   (AppBar, en-tête de page, Gantt, tableur) débordaient horizontalement
   sur téléphone. Ce bloc adapte le shell et les composants partagés.

   Points de rupture (alignés sur MudBlazor) :
     • ≤ 1279.98px (md et moins) — recherche non figée à 300px ; actions de
                                   HsPageHeader placées sous le titre
     • ≤  959.98px (sm et moins) — horloge masquée, colonne « poste » du Gantt
                                   figée, tables MudBlazor défilables
     • ≤  599.98px (xs)          — téléphone : shell compacté (fil d'Ariane
                                   réduit, pastille de statut sans texte),
                                   gouttières resserrées, cibles tactiles
                                   40px, champs de saisie à 16px
   ═══════════════════════════════════════════════════════════════════════ */

/* ── AppBar : la recherche ne doit plus imposer 300px ──────────────── */
@media (max-width: 1279.98px) {
    .hs-search {
        min-width: 0;
        flex: 1 1 200px;
        max-width: 340px;
    }
}

@media (max-width: 959.98px) {
    /* Horloge et raccourci clavier : sans valeur sur mobile, place gagnée */
    .hs-clock,
    .hs-search-kbd { display: none; }

    .hs-breadcrumb {
        margin-left: .25rem;
        min-width: 0;
        overflow: hidden;
    }
    .hs-breadcrumb-item {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 599.98px) {
    /* L'AppBar MudBlazor garde ses gouttières de 16px : trop large ici */
    .hs-appbar .mud-toolbar {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    /* Fil d'Ariane réduit à la page courante (le reste est dans le drawer) */
    .hs-breadcrumb-item:not(.is-last),
    .hs-breadcrumb-sep { display: none; }
    .hs-breadcrumb-item.is-last { max-width: 32vw; }

    .hs-search {
        flex: 1 1 60px;
        max-width: none;
        min-width: 0;
        padding: 5px 8px;
    }
    /* Le champ est forcément étroit dans une AppBar de 360px : au focus il
       se déploie sur toute la largeur de la barre, puis se rétracte. */
    .hs-appbar .mud-toolbar { position: relative; }
    .hs-search:focus-within {
        position: absolute;
        left: 8px;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        background: #fff;
    }
    /* Pastille de connexion : la pastille seule suffit (texte redondant) */
    .hs-status-pill {
        font-size: 0;
        gap: 0;
        padding: 7px;
        margin-left: .25rem;
    }
    .hs-status-pill .hs-status-dot { width: 8px; height: 8px; }

    /* Gouttières de contenu resserrées */
    .mud-main-content .mud-container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* ── HsPageHeader : titre et actions ne se disputent plus la largeur ── */
/* Dès 1280px, les barres d'actions (navigation de date + bascules de vue +
   CTA) consomment plus de place que le titre : on les passe sous le titre. */
@media (max-width: 1279.98px) {
    .hs-page-header {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .hs-page-header-main { flex: 1 1 100%; }
    .hs-page-actions {
        width: 100%;
        flex-wrap: wrap;
        padding-top: 0;
    }
}

@media (max-width: 599.98px) {
    .hs-page-header {
        padding: .25rem 0 .85rem;
        gap: .85rem;
    }
    .hs-page-title { font-size: 1.625rem; }
    .hs-page-subtitle { font-size: .875rem; }
    .hs-page-header-rule { margin-bottom: 1.25rem; }

    /* Les boutons occupent toute la largeur disponible, cible tactile 40px */
    .hs-page-actions { gap: .5rem; }
    .hs-page-actions > * { margin-right: 0 !important; }
    .hs-page-actions > .mud-button-root { flex: 1 1 auto; }
    .hs-page-actions > .mud-button-group-root,
    .hs-page-actions > .mud-toggle-group { flex: 1 1 100%; }
    .hs-page-actions .mud-button-group-root > .mud-button-root,
    .hs-page-actions .mud-toggle-group > .mud-toggle-item { flex: 1 1 0; }
    .hs-page-actions .mud-button-root { min-height: 40px; }
}

/* ── Barres d'action de page héritées (avant HsPageHeader) ─────────── */
@media (max-width: 599.98px) {
    .d-flex.justify-space-between {
        flex-wrap: wrap;
        row-gap: .5rem;
    }
}

/* ── Tables MudBlazor : défilement horizontal plutôt que débordement ── */
@media (max-width: 959.98px) {
    .mud-table-container { overflow-x: auto; }
    .mud-table-toolbar {
        flex-wrap: wrap;
        height: auto;
        row-gap: .5rem;
        padding-top: .5rem;
        padding-bottom: .5rem;
    }
}

/* ── Dialogs : plein écran utile sur téléphone ──────────────────────── */
@media (max-width: 599.98px) {
    .mud-dialog {
        margin: 8px !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
    }
    .mud-dialog-content {
        padding: 12px 16px !important;
        max-height: 70vh;
        overflow-y: auto;
    }
    .mud-dialog-actions { flex-wrap: wrap; row-gap: .5rem; }
}

/* ── HsStatCard / HsSectionTitle ────────────────────────────────────── */
@media (max-width: 599.98px) {
    .hs-stat-card {
        min-height: 0;
        padding: .85rem 1rem .9rem;
    }
    .hs-stat-value { font-size: 1.75rem; }

    .hs-section-title {
        margin: 1.5rem 0 .75rem;
        gap: .75rem;
        flex-wrap: wrap;
    }
}

/* ── Gantt : colonne « poste » figée pendant le défilement horizontal ─ */
@media (max-width: 959.98px) {
    :root { --hs-gantt-label-w: 118px; }

    /* Les lignes doivent épouser la largeur du contenu, sinon la colonne
       « poste » sticky se décroche dès que l'on défile au-delà du viewport. */
    .hs-gantt-header-row,
    .hs-gantt-data-row { min-width: max-content; }
    .hs-gantt-label-cell {
        position: sticky;
        left: 0;
        z-index: 11;
        box-shadow: 1px 0 0 var(--hs-line);
    }
    .hs-gantt-header-row .hs-gantt-label-cell { z-index: 13; }
    .hs-gantt-header-label { font-size: .5625rem; letter-spacing: .1em; }
    .hs-gantt-footer { flex-wrap: wrap; row-gap: .5rem; }
}

@media (max-width: 599.98px) {
    .hs-gantt-row-name { font-size: .75rem; }
    .hs-gantt-batch-name { font-size: .6875rem; }
    /* L'état vide reste lisible même si la timeline est défilée */
    .hs-gantt-empty-state {
        position: sticky;
        left: 0;
        padding: 1.5rem 1rem;
    }
}

/* ── Tableur de production ──────────────────────────────────────────── */
@media (max-width: 599.98px) {
    .hs-tableur { font-size: .75rem; }
    .hs-tableur-rowhead {
        min-width: 148px;
        max-width: 168px;
        padding: 6px 8px;
    }
    .hs-tableur-cell { min-width: 38px; }
    .hs-tableur--fine thead th { min-width: 12px; }
    .hs-tableur--fine .hs-tableur-cell { min-width: 12px; }
    .hs-tableur-code-label { display: none; }
    .hs-tableur-legend { gap: .6rem; }
}

/* ── Saisie tactile : pas de zoom automatique iOS au focus ─────────── */
@media (max-width: 599.98px) {
    /* Safari iOS zoome sur tout champ dont la police est < 16px. Le fournil
       travaille au téléphone : on neutralise ce zoom sur les champs de saisie. */
    input:not([type="checkbox"]):not([type="radio"]),
    textarea,
    select,
    .mud-input-slot,
    .mud-input-root input,
    .mud-input-root textarea { font-size: 16px; }

    /* Cibles tactiles : 40px minimum sur les boutons d'action */
    .mud-button-root,
    .mud-icon-button { min-height: 40px; }
}

/* ── Sécurité anti-débordement : médias et blocs préformatés ────────── */
img, video, canvas { max-width: 100%; }
pre, code { overflow-x: auto; max-width: 100%; }
/* Exception Leaflet (carte des points de vente partenaires) : contraindre
   les tuiles casse le positionnement de la carte. */
.leaflet-container img,
.leaflet-container canvas { max-width: none; }

/* Impression : le boulanger imprime le conducteur pour le fournil */
@media print {
    .hs-appbar, .hs-drawer, .mud-appbar, .mud-drawer { display: none !important; }
    .hs-tableur-print-title { display: block; }
    .hs-tableur-wrap { overflow: visible; border: none; }
    .hs-tableur-code,
    .hs-tableur-swatch {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   Mode lecture — le fil du fournil (/fournil)
   ───────────────────────────────────────────────────────────────────────
   Un même écran pour deux appareils qui ne sont pas au même endroit :

     • la tablette reste posée dans un espace — elle est lue de loin, parfois
       de biais, souvent par quelqu'un qui a les mains prises. Typo large,
       deux colonnes dès 960px, aucune interaction requise ;
     • le téléphone accompagne l'ouvrier — il est lu de près, d'un pouce, entre
       deux gestes. Une seule colonne, l'heure et le décompte d'abord.

   Aucun hexadécimal : tout passe par les jetons --hs-*. Aucune largeur fixe :
   la page ne défile jamais horizontalement (§15h).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Bandeau d'état : fraîcheur de la lecture, retard, écart ────────── */
.hs-read-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    padding: .5rem 0 .9rem;
    border-bottom: 1px solid var(--hs-line);
    margin-bottom: 1rem;
    font-size: .8125rem;
    color: var(--hs-ink-3);
}

.hs-read-freshness {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-variant-numeric: tabular-nums;
}

.hs-read-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hs-ok);
    flex: 0 0 auto;
}

/* Lecture figée : le fournil doit savoir qu'il lit une copie, pas le direct. */
.hs-read-freshness.is-stale { color: var(--hs-err); }
.hs-read-freshness.is-stale .hs-read-dot { background: var(--hs-err); }

.hs-read-status-item.is-late { color: var(--hs-warn); font-weight: 500; }

/* ── Sélecteur de portée dans l'en-tête ─────────────────────────────── */
.hs-read-scope { min-width: 220px; max-width: 100%; }

/* ── La liste des étapes ────────────────────────────────────────────── */
.hs-read-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: .6rem;
    margin-bottom: 1.25rem;
}

.hs-read-list--done { opacity: .72; }

.hs-read-card {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    min-width: 0;
    padding: .75rem .9rem;
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-left: 3px solid var(--hs-line-2);
    border-radius: 3px;
}

.hs-read-card--running { border-left-color: var(--hs-ok); }
.hs-read-card--late    { border-left-color: var(--hs-warn); background: var(--hs-cream-2); }
.hs-read-card--done    { border-left-color: var(--hs-line); }

.hs-read-when {
    flex: 0 0 auto;
    min-width: 4.75rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.hs-read-hour {
    font-family: var(--hs-font-mono);
    font-size: 1.125rem;
    line-height: 1.1;
    color: var(--hs-ink);
    font-variant-numeric: tabular-nums;
}

.hs-read-until {
    font-size: .75rem;
    color: var(--hs-ink-4);
}

.hs-read-body { flex: 1 1 auto; min-width: 0; }

.hs-read-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.hs-read-step {
    font-size: 1rem;
    font-weight: 500;
    color: var(--hs-ink);
}

.hs-read-batch {
    font-size: .875rem;
    color: var(--hs-ink-3);
    margin-top: .1rem;
}

.hs-read-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .25rem;
    font-size: .75rem;
    color: var(--hs-ink-4);
}

.hs-read-tags {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .25rem;
    max-width: 40%;
}

/* ── Continuité tablette → téléphone ────────────────────────────────── */
.hs-read-handoff {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--hs-line);
    border-radius: 3px;
    background: var(--hs-paper);
}

.hs-read-handoff-text { flex: 1 1 auto; min-width: 0; }

.hs-read-handoff-url {
    font-family: var(--hs-font-mono);
    font-size: .8125rem;
    color: var(--hs-ink-2);
    margin: .4rem 0 .2rem;
    overflow-wrap: anywhere;
}

.hs-read-handoff-qr {
    flex: 0 0 auto;
    width: 132px;
    height: 132px;
    background: #FFFFFF;
    padding: 6px;
    border: 1px solid var(--hs-line);
}

/* ── Tablette posée dans une zone : lisible de loin, deux colonnes ──── */
@media (min-width: 960px) {
    .hs-read-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* « Maintenant » garde une colonne pleine : c'est ce qu'on lit de loin. */
    .hs-read-list--now { grid-template-columns: 1fr; }

    .hs-read-hour { font-size: 1.5rem; }
    .hs-read-step { font-size: 1.125rem; }
    .hs-read-when { min-width: 6rem; }
    .hs-read-status { font-size: .875rem; }
}

/* ── Téléphone dans la poche : une colonne, cibles larges ───────────── */
@media (max-width: 959.98px) {
    /* Le passage en plein écran n'a pas de sens sur un téléphone tenu en main. */
    .hs-read-kiosk-btn,
    .hs-read-handoff { display: none; }

    .hs-read-scope { min-width: 100%; }
}

@media (max-width: 599.98px) {
    .hs-read-card {
        gap: .6rem;
        padding: .7rem .75rem;
    }

    .hs-read-when { min-width: 4.25rem; }
    .hs-read-hour { font-size: 1.0625rem; }
    .hs-read-step { font-size: .9375rem; }

    /* Les pastilles d'état passent sous le texte plutôt que de l'écraser */
    .hs-read-card { flex-wrap: wrap; }
    .hs-read-tags {
        max-width: none;
        width: 100%;
        justify-content: flex-start;
        padding-left: 4.85rem;
    }
}

/* ═══ ReadingBoard — obligations sanitaires du jour ═══════════════════════════
   Bloc secondaire de l'écran de lecture : il informe, il ne réclame pas d'action.
   D'où le fond « paper » et l'absence de couleur d'alerte — le rouge de cet écran
   est réservé au retard de production. */
.hs-read-haccp {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--hs-line);
    border-radius: 8px;
    background: var(--hs-paper);
}

.hs-read-haccp-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .75rem;
}

.hs-read-haccp-item {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    min-width: 0;
}

/* Fait : on l'estompe sans le masquer — l'ouvrier doit pouvoir vérifier
   que le relevé a bien été pris, pas seulement constater qu'il a disparu. */
.hs-read-haccp-item.is-done .hs-read-haccp-label {
    color: var(--hs-ink-4);
    text-decoration: line-through;
}

.hs-read-haccp-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hs-read-haccp-label {
    color: var(--hs-ink-2);
    font-size: .9375rem;
    line-height: 1.3;
}

.hs-read-haccp-detail {
    color: var(--hs-ink-4);
    font-size: .8125rem;
    line-height: 1.3;
}

@media (max-width: 599.98px) {
    .hs-read-haccp {
        padding: .875rem 1rem;
    }
}

/* ═══ Module Levain ═══════════════════════════════════════════════════════════
   La carte d'un levain se lit de loin, au-dessus d'un pétrin : pastille de
   couleur d'abord, décompte ensuite, détails après. Les couleurs viennent des
   jetons --hs-* ; aucune valeur hexadécimale n'apparaît ici (§15a).
   ─────────────────────────────────────────────────────────────────────────── */

.hs-levain-card {
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-left: 4px solid var(--hs-line-2);
    border-radius: 10px;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

/* La bordure gauche porte l'état : c'est ce qu'on voit avant d'avoir lu. */
.hs-levain-card.is-ok { border-left-color: var(--hs-ok); }
.hs-levain-card.is-soon { border-left-color: var(--hs-warn); }
.hs-levain-card.is-late { border-left-color: var(--hs-err); }
.hs-levain-card.is-critical { border-left-color: var(--hs-err); background: var(--hs-cream-2); }
.hs-levain-card.is-cold { border-left-color: var(--hs-ink-4); }
.hs-levain-card.is-unknown { border-left-color: var(--hs-line-2); }

.hs-levain-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
}

.hs-levain-identity {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    min-width: 0;
}

.hs-levain-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: .3rem;
    flex: none;
    background: var(--hs-line-2);
}

.hs-levain-card.is-ok .hs-levain-dot { background: var(--hs-ok); }
.hs-levain-card.is-soon .hs-levain-dot { background: var(--hs-warn); }
.hs-levain-card.is-late .hs-levain-dot { background: var(--hs-err); }
.hs-levain-card.is-critical .hs-levain-dot { background: var(--hs-err); }
.hs-levain-card.is-cold .hs-levain-dot { background: var(--hs-ink-4); }

.hs-levain-name {
    color: var(--hs-ink);
    font-family: var(--hs-font-sans);
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.hs-levain-strain {
    color: var(--hs-ink-4);
    font-size: .8125rem;
    line-height: 1.3;
}

.hs-levain-health {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}

.hs-levain-health-label {
    font-family: var(--hs-font-sans);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hs-ink-3);
}

.hs-levain-card.is-late .hs-levain-health-label,
.hs-levain-card.is-critical .hs-levain-health-label { color: var(--hs-err); }
.hs-levain-card.is-soon .hs-levain-health-label { color: var(--hs-warn); }

/* Le décompte en chiffres tabulaires : il change toutes les 30 s, la ligne ne
   doit pas se déplacer sous l'œil à chaque battement. */
.hs-levain-countdown {
    font-family: var(--hs-font-mono);
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    color: var(--hs-ink-3);
}

.hs-levain-specs {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
}

.hs-levain-spec {
    background: var(--hs-cream-2);
    border-radius: 3px;
    color: var(--hs-ink-3);
    font-size: .75rem;
    padding: .125rem .4375rem;
}

.hs-levain-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem .75rem;
    margin: 0;
}

.hs-levain-facts dt {
    color: var(--hs-ink-4);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hs-levain-facts dd {
    color: var(--hs-ink-2);
    font-size: .8125rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.hs-levain-discard {
    background: var(--hs-cream-2);
    border-radius: 3px;
    color: var(--hs-ink-3);
    font-size: .8125rem;
    padding: .375rem .5rem;
}

.hs-levain-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
    margin-top: auto;
    padding-top: .25rem;
}

.hs-levain-protocol {
    color: var(--hs-ink-4);
    font-size: .75rem;
    line-height: 1.3;
}

.hs-levain-overdue {
    color: var(--hs-err);
    font-weight: 500;
}

/* ── Élaborations ───────────────────────────────────────────────────────── */

.hs-levain-build {
    border: 1px solid var(--hs-line);
    border-radius: 10px;
}

.hs-levain-chain-meta {
    color: var(--hs-ink-4);
    font-size: .8125rem;
}

.hs-levain-steps {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0;
    border-left: 2px solid var(--hs-line);
}

.hs-levain-steps li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem;
    padding: .375rem 0 .375rem .75rem;
    position: relative;
}

.hs-levain-steps li::before {
    content: "";
    position: absolute;
    left: -5px;
    top: .75rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hs-line-2);
}

.hs-levain-steps li.is-done::before { background: var(--hs-ok); }
.hs-levain-steps li.is-late::before { background: var(--hs-err); }

/* Fait : estompé, jamais masqué — on doit pouvoir vérifier que le geste a eu lieu. */
.hs-levain-steps li.is-done .hs-levain-step-title {
    color: var(--hs-ink-4);
    text-decoration: line-through;
}

.hs-levain-step-time {
    font-family: var(--hs-font-mono);
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    color: var(--hs-ink-3);
    flex: none;
}

.hs-levain-steps li.is-late .hs-levain-step-time { color: var(--hs-err); }

.hs-levain-step-title {
    color: var(--hs-ink-2);
    font-size: .875rem;
}

.hs-levain-step-note {
    color: var(--hs-ink-4);
    font-size: .75rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ── Historique d'emplacement ───────────────────────────────────────────── */

.hs-levain-trail {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hs-levain-trail li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem;
    padding: .375rem 0;
    border-bottom: 1px solid var(--hs-line);
}

.hs-levain-trail li:last-child { border-bottom: none; }

.hs-levain-trail-when {
    font-family: var(--hs-font-mono);
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    color: var(--hs-ink-3);
    flex: none;
}

.hs-levain-trail-where {
    color: var(--hs-ink-2);
    font-size: .875rem;
}

.hs-levain-trail-source {
    color: var(--hs-ink-4);
    font-size: .75rem;
}

/* Les tableaux larges défilent dans leur conteneur, jamais la page (§15h). */
.hs-scroll-x {
    overflow-x: auto;
    max-width: 100%;
}

/* Sous 600 px, la grille de faits repasse sur une colonne : deux colonnes de
   valeurs de 13 px sur un téléphone tenu d'une main, ce sont deux colonnes
   illisibles. */
@media (max-width: 599.98px) {
    .hs-levain-facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .hs-levain-actions .mud-button {
        flex: 1 1 auto;
    }
}

/* ═══ ModuleGuard — écran « module non activé » ═══════════════════════════════
   Un module désactivé n'est ni une erreur ni une page vide : c'est une offre.
   MODULES_PLAN.md §9.5. */
.hs-module-locked {
    max-width: 34rem;
    margin: 4rem auto;
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-radius: 4px;
}

.hs-module-locked-icon {
    font-size: 2.5rem;
    color: var(--hs-ink-4);
    margin-bottom: 1rem;
}

.hs-module-locked-title {
    font-family: var(--hs-font-sans);
    font-weight: 500;
    font-size: 1.75rem;
    letter-spacing: -.015em;
    color: var(--hs-ink);
    margin: 0 0 .75rem;
}

.hs-module-locked-pitch {
    font-family: var(--hs-font-sans);
    font-size: 1.0625rem;
    color: var(--hs-ink-3);
    margin: 0 0 1.5rem;
}

.hs-module-locked-note {
    font-family: var(--hs-font-sans);
    font-size: .875rem;
    color: var(--hs-ink-4);
    margin: 0 0 1.5rem;
}

.hs-module-locked-alert { margin-bottom: 1.5rem; text-align: left; }

.hs-module-locked-cta { margin-top: .5rem; }

@media (max-width: 599.98px) {
    .hs-module-locked { margin: 2rem .75rem; padding: 1.75rem 1.25rem; }
    .hs-module-locked-title { font-size: 1.5rem; }
}

/* ═══ Fiches de ligne (« line cards ») — formulaire de recette ═════════════════
   Un ingrédient, ce n'est pas quatre champs : c'est une quantité ET une consigne
   d'incorporation. Empilés sans séparation, les blocs d'un ingrédient et du
   suivant se ressemblent trait pour trait — l'œil ne sait plus où l'un s'arrête.
   D'où : un numéro, un fond qui alterne, un filet de gauche, et la partie
   « incorporation » posée sur son propre aplat. */
.hs-linecard {
    position: relative;
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-left: 3px solid var(--hs-line-2);
    border-radius: 4px;
    padding: .875rem 1rem 1rem;
    margin-bottom: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

/* Une ligne sur deux change de fond : c'est ce qui rend la frontière lisible
   même quand on parcourt la page en diagonale. */
.hs-linecard--alt { background: var(--hs-cream); }

.hs-linecard:hover {
    border-left-color: var(--hs-accent);
    box-shadow: 0 1px 6px rgb(24 22 15 / .06);
}

.hs-linecard-head {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding-bottom: .625rem;
    margin-bottom: .875rem;
    border-bottom: 1px solid var(--hs-line);
}

.hs-linecard-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    background: var(--hs-ink);
    color: var(--hs-cream);
    font-family: var(--hs-font-mono);
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1;
}

.hs-linecard-title {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--hs-font-sans);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hs-ink-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hs-linecard-head .mud-button-root { flex: 0 0 auto; }

/* Sous-bloc « incorporation » : même ingrédient, autre question. L'aplat évite
   qu'on lise la consigne d'un ingrédient comme celle du suivant. */
.hs-linecard-band {
    margin-top: .875rem;
    padding: .75rem .875rem .25rem;
    background: var(--hs-cream-2);
    border-left: 2px solid var(--hs-accent);
    border-radius: 0 3px 3px 0;
}

.hs-linecard-band-label {
    font-family: var(--hs-font-sans);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
    margin-bottom: .5rem;
}

/* Les champs posés sur l'aplat gardent un fond clair, sinon ils s'y fondent. */
.hs-linecard-band .mud-input-outlined .mud-input-slot,
.hs-linecard-band .mud-input.mud-input-outlined { background: var(--hs-paper); }

/* MudGrid tire ses gouttières en marge négative de 12 px : sous ce seuil, la
   grille déborderait de la fiche et la page défilerait en travers (§15h). */
@media (max-width: 599.98px) {
    .hs-linecard { padding: .75rem .75rem .875rem; }
    .hs-linecard-band { padding: .625rem .75rem .25rem; }
    .hs-linecard-title { letter-spacing: .1em; }
}

/* Filet de gauche des étapes : accent quand l'étape est parallèle à la
   précédente, encre sinon. Remplace deux hexadécimaux inline (§15a). */
.hs-steprail { border-left: 3px solid var(--hs-ink-3); }
.hs-steprail--parallel { border-left-color: var(--hs-warn); }

/* ═══ HsOfferBanner — échéance de l'offre découverte ═══ */

.hs-offer-banner {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .875rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--hs-line-2);
    border-left-width: 4px;
    border-radius: 4px;
    background: var(--hs-paper);
    font-family: var(--hs-font-sans);
}

.hs-offer-banner-icon {
    flex: 0 0 auto;
    margin-top: .1rem;
}

/* min-width: 0 — sans lui, un texte long force le conteneur à déborder
   horizontalement au lieu de se replier (§15h). */
.hs-offer-banner-text {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}

.hs-offer-banner-text strong {
    font-weight: 600;
    color: var(--hs-ink);
    letter-spacing: -.01em;
}

.hs-offer-banner-text span {
    color: var(--hs-ink-3);
    font-size: .875rem;
    line-height: 1.45;
}

/* Trois tons, du plus discret au plus net. Le bandeau doit durcir avec l'échéance :
   un même ton à J-30 et à J-1 apprend à ne plus le lire. */
.hs-offer-banner.is-notice  { border-color: var(--hs-line-2); border-left-color: var(--hs-accent); }
.hs-offer-banner.is-notice  .hs-offer-banner-icon { color: var(--hs-accent); }

.hs-offer-banner.is-urgent  { border-color: var(--hs-line-2); border-left-color: var(--hs-warn); }
.hs-offer-banner.is-urgent  .hs-offer-banner-icon { color: var(--hs-warn); }

.hs-offer-banner.is-expired { border-color: var(--hs-line-2); border-left-color: var(--hs-err); }
.hs-offer-banner.is-expired .hs-offer-banner-icon { color: var(--hs-err); }

@media (max-width: 599.98px) {
    .hs-offer-banner {
        padding: .75rem .875rem;
        margin-bottom: 1rem;
    }

    .hs-offer-banner-text span { font-size: .8125rem; }
}

/* ═══ Modèles de conduite du levain — dialogue de création ═══ */

.hs-levain-profile {
    border: 1px solid var(--hs-line);
    border-left: 3px solid var(--hs-accent);
    border-radius: 4px;
    background: var(--hs-cream-2);
    padding: .875rem 1rem;
    font-family: var(--hs-font-sans);
}

.hs-levain-profile-pitch {
    color: var(--hs-ink-2);
    margin-bottom: .625rem;
}

.hs-levain-profile-block {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    margin-bottom: .5rem;
    /* min-width: 0 — un protocole long doit se replier, pas élargir le dialogue (§15h). */
    min-width: 0;
}

.hs-levain-profile-label {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hs-ink-4);
}

.hs-levain-profile-block span:last-child {
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--hs-ink-3);
}

/* Le droit à la mention n'est pas un détail décoratif : c'est ce que le boulanger
   pourra ou non écrire sur son étiquette. Trois états, trois tons. */
.hs-levain-legal {
    margin-top: .625rem;
    padding: .4rem .625rem;
    border-radius: 3px;
    font-size: .75rem;
    font-weight: 500;
}

.hs-levain-legal--ok    { background: color-mix(in srgb, var(--hs-ok) 12%, transparent);   color: var(--hs-ok); }
.hs-levain-legal--doubt { background: color-mix(in srgb, var(--hs-warn) 14%, transparent); color: var(--hs-warn); }
.hs-levain-legal--no    { background: var(--hs-cream);                                     color: var(--hs-ink-4); }

/* ═══ Sauvegarde des souches ══════════════════════════════════════════════════
   Une souche perdue ne se rattrape pas : l'état d'un lot doit se voir avant
   d'être lu. Pastille d'abord, échéance ensuite, avertissement en clair.
   Couleurs prises aux jetons --hs-* ; aucun hexadécimal ici (§15a).
   ─────────────────────────────────────────────────────────────────────────── */

.hs-conservation-pill {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .125rem .5rem;
    border: 1px solid var(--hs-line-2);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
    color: var(--hs-ink-3);
}

.hs-conservation-pill::before {
    content: "";
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--hs-line-2);
    flex: none;
}

.hs-conservation-pill.is-ok { color: var(--hs-ok); border-color: var(--hs-ok); }
.hs-conservation-pill.is-ok::before { background: var(--hs-ok); }

.hs-conservation-pill.is-soon { color: var(--hs-warn); border-color: var(--hs-warn); }
.hs-conservation-pill.is-soon::before { background: var(--hs-warn); }

.hs-conservation-pill.is-late { color: var(--hs-err); border-color: var(--hs-err); }
.hs-conservation-pill.is-late::before { background: var(--hs-err); }

.hs-conservation-pill.is-critical {
    color: var(--hs-err);
    border-color: var(--hs-err);
    background: var(--hs-cream-2);
}
.hs-conservation-pill.is-critical::before { background: var(--hs-err); }

/* Le lot lui-même : la bordure gauche porte l'état, comme la carte d'un levain. */
.hs-conservation-lot {
    border: 1px solid var(--hs-line);
    border-left: 4px solid var(--hs-line-2);
    border-radius: 10px;
    padding: .875rem 1rem;
    background: var(--hs-paper);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.hs-conservation-lot.is-ok { border-left-color: var(--hs-ok); }
.hs-conservation-lot.is-soon { border-left-color: var(--hs-warn); }
.hs-conservation-lot.is-late { border-left-color: var(--hs-err); }
.hs-conservation-lot.is-critical {
    border-left-color: var(--hs-err);
    background: var(--hs-cream-2);
}
.hs-conservation-lot.is-unknown { border-left-color: var(--hs-line-2); }

.hs-conservation-lot-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.hs-conservation-ref {
    font-family: var(--hs-font-mono);
    font-size: .8125rem;
    color: var(--hs-ink-4);
}

.hs-conservation-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.25rem;
    font-size: .8125rem;
    color: var(--hs-ink-3);
}

/* L'avertissement dû à l'utilisateur : ce que la méthode coûte, dit une fois,
   au moment de choisir puis sur le lot. Jamais réécrit dans le composant. */
.hs-conservation-advisory {
    border-left: 3px solid var(--hs-warn);
    padding: .5rem .75rem;
    background: var(--hs-cream-2);
    border-radius: 0 6px 6px 0;
    font-size: .8125rem;
    line-height: 1.45;
    color: var(--hs-ink-2);
}

.hs-conservation-advisory.is-blocking { border-left-color: var(--hs-err); }

.hs-conservation-protocol {
    font-size: .8125rem;
    line-height: 1.45;
    color: var(--hs-ink-3);
}

/* Une lignée sans sauvegarde valide : c'est le seul accident irréversible du
   module, il ne se murmure pas. */
.hs-conservation-unprotected {
    color: var(--hs-err);
    font-weight: 500;
}

/* ═══ Cadrans du tableau de bord — levain & fermentation ═══════════════════
   Deux illustrations, une seule idée : montrer une POSITION dans un cycle,
   là où un tableau de chiffres oblige à faire la soustraction de tête.
   Aucune couleur en dur — tout passe par les jetons --hs-* (CLAUDE.md §15a). */

.hs-dial,
.hs-ferm {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .875rem 1rem;
    border: 1px solid var(--hs-line);
    border-radius: 10px;
    background: var(--hs-paper);
    /* min-width: 0 est ce qui autorise le bloc à rétrécir dans une grille flex
       au lieu de pousser la page au défilement horizontal (§15h). */
    min-width: 0;
}

.hs-dial.is-compact { padding: .625rem .75rem; gap: .375rem; }

.hs-dial-head,
.hs-ferm-head,
.hs-dial-foot,
.hs-ferm-foot {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.hs-dial-spacer { flex: 1 1 auto; }

.hs-dial-name,
.hs-ferm-label {
    font-family: var(--hs-font-sans);
    font-weight: 500;
    font-size: .9375rem;
    color: var(--hs-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.hs-dial-meta,
.hs-ferm-temp {
    font-family: var(--hs-font-mono);
    font-size: .75rem;
    color: var(--hs-ink-4);
    white-space: nowrap;
}

.hs-ferm-stage {
    font-family: var(--hs-font-sans);
    font-weight: 600;
    font-size: .6875rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hs-accent);
    white-space: nowrap;
}

.hs-dial-chef { color: var(--hs-accent); }

/* ── La pastille de santé ───────────────────────────────────────────────── */

.hs-dial-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hs-line-2);
}

.hs-dial-dot.is-ok { background: var(--hs-ok); }
.hs-dial-dot.is-warn { background: var(--hs-warn); }
.hs-dial-dot.is-late { background: var(--hs-err); }
.hs-dial-dot.is-cold { background: var(--hs-ink-4); }
.hs-dial-dot.is-unknown { background: var(--hs-line-2); }

/* Un levain en souffrance est le seul état qui bouge : il ne se remarque pas
   assez autrement, et c'est celui dont l'oubli coûte une souche. */
.hs-dial-dot.is-suffering {
    /* `color` ne sert qu'à nourrir currentColor dans l'ombre : c'est ce qui permet
       d'animer un halo sans écrire une seule valeur hexadécimale (§15a). */
    color: var(--hs-err);
    background: var(--hs-err);
    position: relative;
}

/* Le halo vit sur un pseudo-élément, et non sur la pastille : animer l'opacité de
   la pastille elle-même la ferait DISPARAÎTRE à chaque battement — exactement le
   contraire de ce qu'on cherche pour le seul état qui coûte une souche. */
.hs-dial-dot.is-suffering::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: hs-dial-pulse 2s ease-out infinite;
}

@keyframes hs-dial-pulse {
    0% { box-shadow: 0 0 0 0 currentColor; opacity: .5; }
    70% { box-shadow: 0 0 0 7px currentColor; opacity: 0; }
    100% { box-shadow: 0 0 0 0 currentColor; opacity: 0; }
}

/* Un utilisateur qui a demandé moins d'animation ne l'a pas demandé à moitié. */
@media (prefers-reduced-motion: reduce) {
    .hs-dial-dot.is-suffering::after { animation: none; }
}

/* ── La piste du cycle d'entretien ──────────────────────────────────────── */

.hs-dial-track,
.hs-ferm-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: var(--hs-cream-2);
    overflow: visible;
}

.hs-dial-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--hs-line-2);
    transition: width .4s ease;
}

.hs-dial-fill.is-ok { background: var(--hs-ok); }
.hs-dial-fill.is-warn { background: var(--hs-warn); }
.hs-dial-fill.is-late,
.hs-dial-fill.is-suffering { background: var(--hs-err); }
.hs-dial-fill.is-cold { background: var(--hs-ink-4); }

/* Le pic attendu : un repère clair, volontairement discret. Il informe, il
   n'alerte pas — un levain qui passe son pic n'est pas un levain perdu. */
.hs-dial-peak {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 16px;
    margin-left: -1px;
    border-radius: 1px;
    background: var(--hs-ink-3);
    opacity: .55;
}

.hs-dial-needle {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--hs-paper);
    border: 3px solid var(--hs-line-2);
    transition: left .4s ease;
}

.hs-dial-needle.is-ok { border-color: var(--hs-ok); }
.hs-dial-needle.is-warn { border-color: var(--hs-warn); }
.hs-dial-needle.is-late,
.hs-dial-needle.is-suffering { border-color: var(--hs-err); }
.hs-dial-needle.is-cold { border-color: var(--hs-ink-4); }

.hs-dial-foot {
    font-size: .75rem;
    color: var(--hs-ink-4);
}

.hs-dial-foot-right {
    margin-left: auto;
    font-family: var(--hs-font-mono);
    white-space: nowrap;
}

/* ── Fermentation : horloge contre temps équivalent ─────────────────────── */

/* Les deux barres se superposent — c'est leur écart qui porte l'information,
   et le seul moyen de le voir est de les mettre sur le même axe. */
.hs-ferm-clock,
.hs-ferm-real {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 999px;
    transition: width .4s ease;
}

.hs-ferm-clock {
    background: var(--hs-line-2);
}

.hs-ferm-real { background: var(--hs-ok); }
.hs-ferm-real.is-fast { background: var(--hs-err); }
.hs-ferm-real.is-slow { background: var(--hs-warn); }

/* La borne des 100 % : « à point » selon la fiche. */
.hs-ferm-goal {
    position: absolute;
    right: 0;
    top: -3px;
    width: 2px;
    height: 16px;
    border-radius: 1px;
    background: var(--hs-ink-3);
    opacity: .4;
}

.hs-ferm-foot {
    font-size: .75rem;
    color: var(--hs-ink-4);
    flex-wrap: wrap;
}

.hs-ferm-progress {
    font-family: var(--hs-font-mono);
    font-weight: 500;
    color: var(--hs-ink-2);
}

.hs-ferm-progress.is-fast { color: var(--hs-err); }
.hs-ferm-progress.is-slow { color: var(--hs-warn); }

.hs-ferm-drift.is-fast { color: var(--hs-err); }
.hs-ferm-drift.is-slow { color: var(--hs-warn); }

.hs-ferm-eta {
    margin-left: auto;
    font-family: var(--hs-font-mono);
    white-space: nowrap;
}

.hs-ferm-nodata {
    font-size: .75rem;
    color: var(--hs-ink-4);
    font-style: italic;
}

/* ── L'accueil : une grille qui tient dans un téléphone ─────────────────── */

.hs-pulse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: .75rem;
}

/* En dessous de 600 px, une seule colonne : deux cadrans côte à côte sur un
   téléphone tenu d'une main rendent le nom du levain illisible (§15h). */
@media (max-width: 599.98px) {
    .hs-pulse-grid { grid-template-columns: 1fr; }
    .hs-ferm-eta,
    .hs-dial-foot-right { margin-left: 0; }
}

.hs-pulse-empty {
    padding: 1.25rem;
    border: 1px dashed var(--hs-line-2);
    border-radius: 10px;
    color: var(--hs-ink-4);
    font-size: .875rem;
    text-align: center;
}
