/* =====================================================================
   style_atelier.css — the ONLY stylesheet of the app (loaded by pageHead() in lib.php).
   Colours are design tokens below: edit them here for a re-skin, no PHP change needed.
   Class names are shared with the PHP files; the summary-sheet keys (.s-*) mirror
   SUM_STYLES in summary.php (which stays inline for e-mail clients).
   ===================================================================== */
:root {
    color-scheme: dark;

    /* surfaces */
    --bg:#24221F;            /* page */
    --surface:#2D2A26;       /* cards, buttons */
    --field:#1B1917;         /* inputs */
    --inverse:#CCCCCC;       /* big title band (text on it: --bg) */

    /* text */
    --text:#CCCCCC;
    --muted:#9B958D;
    --placeholder:#7C766E;

    /* lines */
    --border:#4B463F;
    --line:#3A3631;

    /* accent (replaces the former green) */
    --accent:#B46FF1;
    --accent-soft:#2F2540;   /* accent-tinted background */
    --accent-line:#5E4380;
    --on-accent:#1A1816;     /* text on accent */

    /* states */
    --err:#FF8A80;
    --errbg:#3B2523;
    --errline:#7A3D39;
    --notice-bg:#3B3320;
    --notice-line:#6E5C2B;
    --notice-text:#E6D79A;

    /* summary "paper" sheet (light grey, never full white) */
    --paper:#CCCCCC;
    --paper-text:#1F1F1F;
    --paper-muted:#505050;
    --paper-line:#8E8E8E;
    --paper-rule:#ADADAD;
    --paper-head:#B79BD9;
    --paper-band:#B8B8B8;
    --paper-tag:#5B2A91;
    --qr-bg:#CCCCCC;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; color:var(--text); background:var(--bg);
       font:16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.wrap { width:100%; max-width:760px; margin:0 auto; padding-bottom:env(safe-area-inset-bottom); }
.wrap.narrow { max-width:480px; }
h1 { margin:0 0 6px; font-size:clamp(24px,5vw,32px); line-height:1.2; }
a { color:var(--accent); }
.vh { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; padding:0; margin:-1px; }
[hidden] { display:none !important; }

/* header */
header { padding:clamp(14px,3vw,24px) clamp(16px,5vw,40px) 14px; border-bottom:1px solid var(--line); }
header p { margin:0; color:var(--muted); font-size:clamp(15px,2.5vw,17px); }
header.top { display:flex; justify-content:space-between; align-items:center; gap:16px; padding-bottom:14px; }
body:not(.admin) header.top { border-bottom:0; }
header.top .ttl { margin-right:auto; flex:none; }
header.top .ttl h1 { white-space:nowrap; font-size:clamp(28px,6vw,40px); }
header.top .refline { margin:2px 0 0; font-size:13px; letter-spacing:1px; font-variant-numeric:tabular-nums; }
header.top .ttl .bikeinfo { margin:2px 0 0; font-size:clamp(16px,3.2vw,20px); line-height:1.25; font-weight:300; overflow-wrap:anywhere; }
header.top h1 { margin:0; }
header.top h1 { margin-right:auto; }
button.power { width:40px; height:40px; min-height:40px; padding:0; background:var(--surface); color:var(--muted); border:1px solid var(--border); border-radius:50%; }
button.power svg { width:20px; height:20px; }
button.power:hover { color:var(--err); border-color:var(--err); }

/* sticky step bar */
.bar { position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:8px; padding:8px clamp(16px,5vw,40px); background:var(--bg); padding-top:calc(8px + env(safe-area-inset-top)); }
.bar .nav { flex:none; width:44px; min-height:44px; height:44px; padding:0; background:none; color:var(--text); border:0; border-radius:0; }
.bar .nav svg { width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.bar .nav.next svg { transform:rotate(180deg); }
.bar .nav.ph { display:block; }
.bartitle { flex:1; display:flex; align-items:center; justify-content:center; gap:10px; min-width:0; font-weight:600; line-height:1; }
.bartitle .n { display:inline-grid; place-items:center; width:26px; height:26px; border-radius:50%; background:var(--accent); color:var(--on-accent); font-size:14px; flex:none; }
.bartitle .tt { font-size:clamp(14px,4.4vw,24px); font-style:normal; font-weight:200; line-height:1.1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* messages */
.status { margin:18px clamp(16px,5vw,40px) 0; padding:12px 14px; border-radius:6px; border:1px solid; }
.status.ok  { background:var(--accent-soft); border-color:var(--accent-line); }
.status.err { background:var(--errbg); border-color:var(--errline); color:var(--err); }
.hint { color:var(--muted); font-size:14px; margin:18px clamp(16px,5vw,40px) 0; }

/* fields */
fieldset.grp { border:0; margin:0; padding:0; min-width:0; }
.field { border:0; margin:0; padding:14px clamp(16px,5vw,40px) 0; min-width:0; }
.field.row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=datetime-local], input[type=time], input[type=date], select, textarea {
    width:100%; padding:8px 12px; min-height:40px; border:1px solid var(--border); border-radius:6px;
    font:inherit; font-size:16px; color:var(--text); background:var(--field); -webkit-appearance:none; appearance:none; }
textarea { min-height:140px; resize:vertical; }
::placeholder { color:var(--placeholder); opacity:1; }
input:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible, .cb:focus-within {
    outline:2px solid var(--accent); outline-offset:2px; }
input[type=checkbox], input[type=radio] { width:22px; height:22px; margin:0; accent-color:var(--accent); flex:none; }
fieldset:disabled input, fieldset:disabled textarea, fieldset:disabled select { background-color:var(--bg); color:var(--muted); -webkit-text-fill-color:currentColor; opacity:1; }
fieldset:disabled .cb, fieldset:disabled .cb span, fieldset:disabled .part .x { color:var(--muted); cursor:default; }
.place { display:flex; gap:12px; flex-wrap:wrap; }
.place legend { padding:0 0 8px; font-weight:500; width:100%; }

/* group titles */
h2.grp-title { margin:34px 0 0; padding:16px clamp(16px,5vw,40px); background:var(--inverse); color:var(--bg); font-size:20px; font-weight:700; letter-spacing:4px; text-align:right; }
h2.grp-title.top { margin-top:22px; }
h2.grp-title + details.cat { margin-top:16px; }
h2.sect { margin:22px clamp(16px,5vw,40px) 0; font-size:22px; }

/* categories */
details.cat { margin:12px clamp(16px,5vw,40px) 0; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
details.cat > summary { list-style:none; display:flex; align-items:center; gap:10px; min-height:48px; padding:10px 14px; cursor:pointer; font-weight:600; }
details.cat > summary::-webkit-details-marker { display:none; }
details.cat > summary::after { content:""; margin-left:auto; width:9px; height:9px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:rotate(45deg); transition:transform .15s; }
details.cat[open] > summary::after { transform:rotate(-135deg); }
details.cat[open] > summary { border-bottom:1px solid var(--line); }
.badge { display:inline-grid; place-items:center; min-width:24px; height:24px; padding:0 7px; border-radius:12px; background:var(--accent); color:var(--on-accent); font-size:13px; font-weight:700; }
.tasks { padding:4px 10px 12px; }
.task { display:grid; align-items:center; column-gap:10px; padding:4px 0; border-bottom:1px solid var(--line); }
.task.one { grid-template-columns:20px minmax(0,1fr); min-height:40px; cursor:pointer; }
.task.two { grid-template-columns:minmax(0,1fr) 38px 38px; column-gap:4px; min-height:40px; }
.task.head { min-height:28px; color:var(--muted); font-size:12px; font-weight:700; letter-spacing:1px; border-bottom:0; }
.task.head span { text-align:center; }
.task .lbl { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 12px; }
.task .lbl small { color:#8A8680; font-size:12px; font-weight:400; }
.task .na { text-align:center; color:var(--border); }
.cb { display:flex; align-items:center; justify-content:center; gap:10px; min-height:40px; cursor:pointer; }
.task input[type=checkbox] { width:20px; height:20px; }
.cb.wide { justify-content:flex-start; padding:0 4px; }
.tasks textarea { margin-top:12px; min-height:90px; }

/* parts */
#parts { padding:0 clamp(16px,5vw,40px); }
.part { display:grid; grid-template-columns:40px minmax(0,1fr) 62px auto; gap:8px; align-items:center; margin-top:10px; }
.part .qty { padding:8px 6px; text-align:center; -moz-appearance:textfield; }
.part .qty::-webkit-inner-spin-button, .part .qty::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
button.x { width:40px; min-height:40px; height:40px; padding:0; background:none; color:var(--muted); border:0; border-radius:0; font-size:16px; }
button.x:hover { color:var(--err); }
.add { width:100%; background:transparent; color:var(--accent); border:2px dashed var(--accent); border-radius:6px; padding:12px; font:inherit; font-weight:600; cursor:pointer; min-height:48px; }

/* buttons */
button, .btn { background:var(--accent); color:var(--on-accent); border:1px solid var(--accent); border-radius:6px; padding:14px 40px; min-height:48px;
               font:inherit; font-weight:600; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
button.danger { background:transparent; color:var(--err); border-color:var(--err); }
button.secondary, .btn.secondary { background:var(--surface); color:var(--text); border-color:var(--border); }
button:disabled { opacity:.6; cursor:default; }
footer.pub { margin-top:28px; border-top:1px solid var(--line); padding:24px clamp(16px,5vw,40px); display:flex; justify-content:center; gap:12px; flex-wrap:wrap; }
.actions { display:flex; gap:12px; flex-wrap:wrap; margin:16px 0; }
.confirm { padding:20px clamp(16px,5vw,40px) 0; }
.confirm .big { font-size:22px; font-weight:700; margin:0 0 4px; color:var(--accent); display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:4px 16px; }
.confirm .big .when { font-size:16px; font-weight:400; color:var(--text); text-align:right; margin-left:auto; }
.confirm .actions { flex-wrap:nowrap; }
.confirm .actions .btn, .confirm .actions button { flex:1 1 0; padding-left:10px; padding-right:10px; text-align:center; white-space:nowrap; }
.ro li { display:flex; justify-content:space-between; gap:12px; }
.ro li .dur { color:var(--muted); font-size:14px; white-space:nowrap; }
.editnote { margin:12px clamp(16px,5vw,40px) 0; }
.confirm .status { margin-left:0; margin-right:0; }
.field.center { display:flex; justify-content:center; }
.actions .danger { margin-left:auto; }

/* read-only page 2 */
.ro { margin:16px clamp(16px,5vw,40px) 0; padding:12px 14px; border:1px solid var(--line); border-radius:8px; }
.ro h3 { margin:0 0 6px; font-size:16px; }
.ro ul { margin:0; padding-left:0; list-style:none; }
.ro .ronote { margin:8px 0 0; color:var(--muted); font-size:14px; overflow-wrap:anywhere; }

/* booking */
.days { margin:12px clamp(16px,5vw,40px) 0; }
details.day { border-bottom:1px solid var(--line); }
details.day > summary { list-style:none; display:flex; align-items:center; justify-content:space-between; min-height:50px; padding:8px 4px; cursor:pointer; font-size:18px; }
details.day > summary::-webkit-details-marker { display:none; }
details.day > summary::after { content:""; width:9px; height:9px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:rotate(45deg); transition:transform .15s; }
details.day[open] > summary::after { transform:rotate(-135deg); }
.chips { display:flex; flex-wrap:wrap; gap:8px; padding:4px 4px 16px; }
.chip { position:relative; cursor:pointer; }
.chip input { position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; }
.chip span { display:inline-flex; align-items:center; justify-content:center; min-width:72px; min-height:40px; padding:0 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface); font-variant-numeric:tabular-nums; }
.chip input:checked + span { background:var(--accent); border-color:var(--accent); color:var(--on-accent); font-weight:600; }
.chip.covered span { opacity:.35; background:var(--bg); }

.chip input:focus-visible + span { outline:2px solid var(--accent); outline-offset:2px; }
.notice { margin:16px clamp(16px,5vw,40px) 0; padding:12px 14px; background:var(--notice-bg); border:1px solid var(--notice-line); color:var(--notice-text); border-radius:6px; font-size:15px; }
.chosen { margin:8px clamp(16px,5vw,40px) 0; font-weight:600; color:var(--accent); min-height:1.4em; }

.field.row3 { display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:12px; }
.alist { list-style:none; margin:10px clamp(16px,5vw,40px) 0; padding:0; }
.alist li { display:flex; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--line); }
form.inl { margin:0; flex:none; }

/* admin area */
nav.adm { display:flex; flex-wrap:wrap; gap:8px; padding:12px clamp(16px,5vw,40px) 0; }
nav.adm a { display:inline-flex; align-items:center; min-height:40px; padding:0 14px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); text-decoration:none; }
nav.adm a.cur { background:var(--accent); border-color:var(--accent); color:var(--on-accent); font-weight:600; }
h2.sect.sub { font-size:18px; margin-top:34px; padding-top:18px; border-top:1px solid var(--line); }
.status.warn { background:var(--notice-bg); border-color:var(--notice-line); color:var(--notice-text); }
.alist.stats li { justify-content:space-between; font-size:17px; }
.muted { color:var(--muted); font-size:13px; }
.alist .off, .agenda .off { opacity:.55; }
button.tgl { min-height:32px; padding:0 12px; font-size:14px; }
label.lab { display:block; font-size:13px; color:var(--muted); }
label.lab input { margin-top:4px; }
.pager { display:flex; align-items:center; justify-content:space-between; gap:12px; text-align:center; }
.pager .btn { min-width:48px; padding:0; }
.agenda { margin:8px clamp(16px,5vw,40px) 0; }
.ag { padding:10px 0; border-bottom:1px solid var(--line); }
.ag h3 { margin:0; display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; font-size:16px; }
.ag h3 small { color:var(--muted); font-weight:400; font-size:14px; }
.ag.today h3 span { color:var(--accent); }
.appt { margin:6px 0 0; padding:8px 10px; background:var(--surface); border:1px solid var(--border); border-radius:6px; overflow-wrap:anywhere; }
.appt em { color:var(--muted); font-style:normal; margin-left:6px; }
.appt small { display:block; color:var(--muted); }

/* QR */
.qrbox { background:#2D2A26; display:flex; gap:16px; align-items:center; margin:20px clamp(16px,5vw,40px) 0; padding:16px; border:1px solid var(--line); border-radius:8px; }
.qr { flex:none; width:150px; height:150px; }
.qr-bg { fill:transparent; }
.qr-fg { fill:#fff; }                                   /* à l'écran : blanc sur transparent */
body.admin .qr-bg { fill:#fff; }                        /* l'admin (QR 2FA pour appli d'authentification) reste noir sur blanc */
body.admin .qr-fg { fill:#000; }
.qr svg { display:block; width:100%; height:100%; }
.qrtxt { font-size:14px; word-break:break-all; }
.qrtxt a { color:var(--muted); }
.qrbox.center .qrtxt a { text-decoration:none; font-weight:700; color:var(--text); }
.qrlink { display:block; flex:none; line-height:0; }
.qrbox.center { flex-direction:column; align-items:center; text-align:center; }

/* summary sheet (same keys as SUM_STYLES in summary.php) */
.sheetwrap { padding:20px clamp(16px,5vw,40px) 0; }
.sheetwrap.pub { padding-top:clamp(16px,4vw,32px); }
.s-sheet { width:100%; border-collapse:collapse; border:1px solid var(--paper-line); background:var(--paper); font-size:14px; line-height:1.4; color:var(--paper-text); }
.s-sec0 { padding:0; }
.s-hp { font-style:italic; font-size:13px; letter-spacing:0; color:#666; margin-left:6px; }
.s-sec { padding:0; border-top:1px solid var(--paper-rule); }
.s-inner { width:100%; border-collapse:collapse; }
.s-brand { width:50%; padding:22px 24px; vertical-align:top; }
.s-logo { font-size:24px; font-weight:700; letter-spacing:6px; margin-bottom:14px; }
.s-who { width:50%; padding:24px 24px 18px; vertical-align:top; }
.s-ref { font-size:12px; color:var(--paper-muted); letter-spacing:1px; }
.s-bike { font-size:17px; font-weight:700; letter-spacing:1px; margin-bottom:6px; }
.s-client { font-size:14px; font-weight:700; margin-bottom:3px; overflow-wrap:anywhere; }
.s-mailto { font-size:14px; font-weight:700; margin-top:12px; overflow-wrap:anywhere; }
.s-icon { width:50%; padding:20px 24px; font-size:15px; font-weight:700; line-height:1.2; vertical-align:top; }
.s-ico { font-size:34px; margin-right:10px; vertical-align:middle; font-weight:400; }
.s-cnote { width:50%; padding:20px 24px 24px; vertical-align:top; overflow-wrap:anywhere; }
.s-hd { background:var(--paper-head); padding:6px 8px; text-align:center; font-size:13px; font-weight:400; }
.s-hq { background:var(--paper-head); width:20%; padding:6px 8px; text-align:center; font-size:13px; font-weight:400; }
.s-band { background:var(--paper-band); padding:18px 24px; font-size:16px; letter-spacing:2px; }
.s-cell { padding:8px; border-bottom:1px solid var(--paper-rule); vertical-align:top; overflow-wrap:anywhere; }
.s-qty { width:20%; padding:8px; border-bottom:1px solid var(--paper-rule); border-left:1px solid var(--paper-rule); text-align:center; vertical-align:top; }
.s-cat { display:inline-block; width:108px; text-indent:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; vertical-align:top; padding-top:2px; color:var(--paper-tag); font-size:11px; font-weight:bold; letter-spacing:1px; text-transform:uppercase; }
.s-hang { padding-left:108px; text-indent:-108px; }
.s-desc { display:block; text-indent:0; color:var(--paper-muted); font-size:12px; margin-top:2px; }
.s-tag { color:var(--paper-tag); font-size:12px; font-weight:700; white-space:nowrap; }
.s-supplied { color:var(--paper-tag); }
.s-biketype { font-size:12px; font-weight:200; letter-spacing:1px; margin-left:5px; text-transform:uppercase; }
.s-empty { padding:10px 8px; color:var(--paper-muted); font-style:italic; }
.s-notes { padding:16px 24px; min-height:120px; vertical-align:top; line-height:1.5; overflow-wrap:anywhere; }
.s-nt { font-weight:700; margin-top:10px; }
.s-nt:first-child { margin-top:0; }
.s-dlabel { width:40%; padding:12px 10px; text-align:right; font-weight:700; border-right:1px solid var(--paper-rule); }
.s-dval { padding:12px 14px; }

@media (max-width:600px) {
    .field.row { grid-template-columns:1fr; }
    .part { grid-template-columns:40px minmax(0,1fr) 62px; }
    .part .cb.wide { grid-column:2 / 4; min-height:32px; }
    .actions .btn, .actions button { width:100%; }
    .confirm .actions { flex-wrap:wrap; }
    .confirm .actions .btn, .confirm .actions button { flex:1 1 100%; white-space:normal; }
    .bartitle { gap:8px; }
    .bar { gap:6px; }
    .qrbox { flex-direction:column; align-items:flex-start; }
    .qrbox.center { align-items:center; }
    .s-brand, .s-who, .s-icon, .s-cnote { padding-left:14px; padding-right:14px; }
    .s-logo { font-size:20px; letter-spacing:4px; }
    .s-band, .s-notes { padding-left:14px; padding-right:14px; }
}

@media print {
    :root { color-scheme:light; --bg:#fff; --text:#000; --muted:#444; --line:#ccc; --border:#999; --surface:#fff; --qr-bg:#fff; --paper:#fff; --paper-line:#777; --paper-rule:#ccc; --paper-band:#eee; --paper-head:#d9c9ee; }
    header.top, .bar, footer, .status, .qrbox .qrtxt a, [data-print], .actions { display:none !important; }
    .sheetwrap, .wrap { padding:0; max-width:none; }
    .qrbox { border:0; background:transparent; }
    .qr-bg { fill:#fff; }                                /* impression : noir sur fond blanc */
    .qr-fg { fill:#000; }
    .s-hd, .s-hq, .s-band { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

/* admin : réparations par type de vélo */
nav.adm.sub { padding-top:8px; }
nav.adm.sub a { min-height:34px; padding:0 12px; font-size:14px; }
.repcat { margin:0; }
.repcat .tog { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin-top:8px; }

/* =====================================================================
   Administration (body.admin) : colonne de navigation à gauche, contenu dense, pleine largeur.
   Sous 900 px la navigation repasse en bandeau horizontal (mobile / tablette).
   ===================================================================== */
body.admin { font-size:14px; }
body.admin .wrap.adm { max-width:1500px; }
body.admin header.top { padding:10px 24px; }
body.admin header.top h1 { font-size:18px; }
body.admin button.power { width:34px; height:34px; min-height:34px; }
body.admin button.power svg { width:17px; height:17px; }

.admshell { display:grid; grid-template-columns:196px minmax(0,1fr); align-items:start; }
.admshell > nav.adm { flex-direction:column; flex-wrap:nowrap; gap:2px; padding:14px 12px 24px; position:sticky; top:0; border-right:1px solid var(--line); }
.admshell > nav.adm a { min-height:34px; padding:0 12px; border-color:transparent; background:transparent; border-radius:6px; }
.admshell > nav.adm a:hover { background:var(--surface); }
.admshell > nav.adm a.cur { background:var(--accent); color:var(--on-accent); }
.admmain { min-width:0; max-width:780px; padding:0 28px 48px; }
.admmain.wide { max-width:none; }

/* le contenu n'a plus besoin des marges latérales « mobile » */
body.admin .admmain :is(.field,.hint,.status,.notice,.alist,.agenda,h2.sect,.chosen,.rep) { margin-left:0; margin-right:0; }
body.admin .admmain :is(.field,.alist,.agenda,h2.sect) { padding-left:0; padding-right:0; }
body.admin h2.sect { font-size:19px; margin-top:18px; }
body.admin h2.sect.sub { font-size:15px; margin-top:24px; padding-top:14px; }
body.admin .hint { margin-top:10px; }
body.admin .status { margin-top:12px; padding:8px 12px; }
body.admin .field { padding-top:8px; }

/* contrôles compacts */
.admin :where(input[type=text], input[type=password], input[type=number], input[type=time], input[type=date], select) { min-height:34px; padding:5px 10px; font-size:14px; }
.admin :where(button, .btn) { min-height:34px; padding:6px 16px; font-size:14px; }
.admin button.x { width:30px; min-height:30px; height:30px; font-size:14px; }
.admin button.tgl { min-height:28px; padding:0 10px; font-size:13px; }
.admin input[type=checkbox] { width:18px; height:18px; }

/* tableau de bord */
.admmain .alist.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-top:12px; }
.admmain .alist.stats li { padding:0; border:0; background:none; }
.admmain .alist.stats li strong { font-size:28px; line-height:1.1; color:var(--accent); }

/* calendrier : cartes de jours en grille */
.admmain .agenda { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:10px; margin-top:10px; }
.admmain .ag { padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.admmain .ag.off { background:transparent; }
.admmain .ag.today { border-color:var(--accent); }
.admmain .appt { background:var(--bg); }
.admmain .pager { max-width:520px; }

/* cartes + deux colonnes (disponibilités) */
.card { border:1px solid var(--border); border-radius:8px; background:var(--surface); padding:12px 14px; margin-top:12px; }
.card > h2.sect.sub { margin-top:0; padding-top:0; border-top:0; }
.cols2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); gap:12px; align-items:start; }
.cols2 .card { margin-top:12px; }
.admmain .card .field { padding-left:0; padding-right:0; }
.admmain .card .alist { margin-left:0; margin-right:0; }
details.manual { margin-top:12px; }
details.manual > summary { cursor:pointer; color:var(--muted); padding:6px 0; }


@media (min-width:901px) {
    .admshell > nav.adm { border-right:0; }
    .admmain { border-left:1px solid var(--line); min-height:calc(100vh - 56px); }
}

/* réparations : catégories repliables */
body.admin .admmain details.repdet { margin:10px 0 0; }
.repdet > summary { min-height:40px; padding:6px 14px; }
.repdet > .repcat { padding:0 12px 4px; }

/* ---- grille hebdomadaire des disponibilités (type Agenda) ---- */
.wkbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin:0 0 10px; }
.wkbar .sp { margin-left:auto; display:flex; flex-wrap:wrap; gap:8px; }
.wkbar label { display:inline-flex; align-items:center; gap:6px; color:var(--muted); }
.wkbar select { width:auto; padding-right:28px; }
.wkinfo { color:var(--muted); min-width:11em; }
.wk { --rh:16px; --tw:50px; user-select:none; -webkit-user-select:none; }
.wk-head, .wk-body { display:grid; grid-template-columns:var(--tw) repeat(7, minmax(0,1fr)); }
.wk-head { position:sticky; top:0; z-index:3; background:var(--surface); border-bottom:1px solid var(--border); }
.wk-head > div { display:flex; align-items:center; justify-content:center; gap:6px; padding:6px 2px; font-weight:600; }
.wk-head .cp { width:24px; min-height:24px; height:24px; padding:0; font-size:13px; background:transparent; color:var(--muted); border:1px solid var(--border); border-radius:5px; }
.wk-head .cp:hover { color:var(--accent); border-color:var(--accent); }
.wk-body { position:relative; cursor:cell; touch-action:pan-y; }
.wk-t { position:relative; }
.wk-t span { position:absolute; right:7px; transform:translateY(-50%); font-size:11px; color:var(--muted); }
.wk-col { position:relative; border-left:1px solid var(--line); }
.wk-c { height:var(--rh); }
.wk-c.h { border-top:1px solid var(--border); }
.wk-c.hh { border-top:1px dotted var(--line); }
.wk-c.hov { background:rgba(255,255,255,.07); }
.wk-c.pv-on { background:var(--accent-line); }
.wk-c.pv-off { background:repeating-linear-gradient(45deg, var(--errbg), var(--errbg) 4px, transparent 4px, transparent 8px); }
.wk-blk { position:absolute; left:2px; right:2px; box-sizing:border-box; background:var(--accent-soft); border:1px solid var(--accent-line); border-left:3px solid var(--accent); border-radius:5px; padding:2px 6px; font-size:12px; color:var(--text); overflow:hidden; pointer-events:none; }
.wk-blk b { font-weight:600; }
.wk.dirty .wkinfo { color:var(--notice-text); }
.wklegend { display:flex; gap:14px; margin-top:8px; color:var(--muted); font-size:13px; }
.wklegend i { display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:6px; vertical-align:-1px; background:var(--accent-soft); border:1px solid var(--accent); }

@media (max-width:900px) {
    .admshell { grid-template-columns:minmax(0,1fr); }
    .admshell > nav.adm { flex-direction:row; flex-wrap:wrap; position:static; border-right:0; border-bottom:1px solid var(--line); padding:10px 16px; }
    .admshell > nav.adm a { border-color:var(--border); background:var(--surface); }
    .admmain, .admmain.wide { max-width:none; padding:0 16px 40px; }
    body.admin header.top { padding:10px 16px; }
    .wk { --tw:40px; }
    .wk-head > div { font-size:12px; padding:6px 0; }
    .wk-head .cp { display:none; }
    .wk-blk { font-size:10px; padding:1px 3px; }
}


/* fiche récapitulative dans l'application (pages Résumé / Rendez-vous) : thème sombre.
   La page publique du QR code (.sheetwrap.pub) garde la fiche claire. */
.sheetwrap:not(.pub) {
    --paper:#2D2A26; --paper-text:#CCCCCC; --paper-muted:#9B958D; --paper-line:#4B463F; --paper-rule:#3A3631;
    --paper-head:#3A2F4D; --paper-band:#34302B; --paper-tag:#C79BF5;
}
@media print {
    .sheetwrap:not(.pub) { --paper:#fff; --paper-text:#1F1F1F; --paper-muted:#505050; --paper-line:#777; --paper-rule:#ccc; --paper-head:#B79BD9; --paper-band:#eee; --paper-tag:#5B2A91; }
}

/* admin : utilisateurs de l'atelier */
.userbox { border-top:1px solid var(--line); padding:4px 0; }
.userbox:first-of-type { border-top:0; }
.userbox > summary { color:var(--text); padding:8px 0; }
.userform { padding:0 0 12px; max-width:720px; }
.userform .acts { display:flex; flex-wrap:wrap; gap:8px; }

/* calendrier mensuel + journée (7 h – 19 h, positions par classes : pas de style en ligne sous la CSP) */
.mgrid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; margin-top:10px; }
.mgrid .mh { text-align:center; font-size:12px; color:var(--muted); padding:2px 0; }
.mcell { display:flex; flex-direction:column; gap:2px; min-height:58px; padding:6px 8px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:inherit; text-decoration:none; }
.mcell:hover { border-color:var(--accent); }
.mcell b { font-weight:600; }
.mcell small { color:var(--muted); font-size:11px; }
.mcell.out { opacity:.45; }
.mcell.off:not(.sel) { background:transparent; }
.mcell.today b { color:var(--accent); }
.mcell.sel { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent) inset; }
.mcell .badge { align-self:flex-start; font-size:11px; padding:1px 6px; border-radius:99px; background:var(--accent-soft); border:1px solid var(--accent); color:var(--text); }
.dayview h2 small { font-weight:400; color:var(--muted); margin-left:8px; }
.tl { position:relative; height:576px; margin:8px 0 12px 46px; border-top:1px solid var(--line); background:repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--line) 47px, var(--line) 48px); }
.tl-lab { position:absolute; left:-46px; width:40px; text-align:right; font-size:11px; color:var(--muted); transform:translateY(-7px); }
.tl-lane { position:absolute; inset:0; }
.tl-open, .tl-appt { position:absolute; left:0; right:0; box-sizing:border-box; }
.tl-open { background:var(--accent-soft); opacity:.35; }
.tl-appt { left:6px; right:6px; padding:2px 8px; border:1px solid var(--accent); border-radius:6px; background:var(--surface); overflow:hidden; font-size:12px; line-height:1.3; white-space:nowrap; text-overflow:ellipsis; }
.sheetrow { margin-top:6px !important; border:1px solid var(--line); border-radius:8px; background:var(--bg); }
.sheetrow > summary { cursor:pointer; padding:8px 12px; }
.sheetrow > summary small { color:var(--muted); margin-left:6px; }
.sdet { display:grid; grid-template-columns:max-content 1fr; gap:4px 16px; margin:0; padding:4px 14px 12px; }
.sdet dt { color:var(--muted); font-size:13px; }
.sdet dd { margin:0; overflow-wrap:anywhere; }
.sdet ul { margin:0; padding-left:18px; }
a.statcard { display:flex; flex-direction:column; gap:2px; padding:14px 16px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:inherit; text-decoration:none; }
a.statcard:hover, a.statcard.on { border-color:var(--accent); }
a.statcard strong { font-size:28px; line-height:1.1; color:var(--accent); }
.sact { display:flex; flex-wrap:wrap; gap:8px; padding:0 14px 12px; }
.sact form { margin:0; }
@media (max-width:640px) { .sdet { grid-template-columns:1fr; } .mcell { min-height:48px; padding:4px; } .mcell .badge { font-size:10px; } }
.tl-t0{top:0px}
.tl-t1{top:12px}
.tl-t2{top:24px}
.tl-t3{top:36px}
.tl-t4{top:48px}
.tl-t5{top:60px}
.tl-t6{top:72px}
.tl-t7{top:84px}
.tl-t8{top:96px}
.tl-t9{top:108px}
.tl-t10{top:120px}
.tl-t11{top:132px}
.tl-t12{top:144px}
.tl-t13{top:156px}
.tl-t14{top:168px}
.tl-t15{top:180px}
.tl-t16{top:192px}
.tl-t17{top:204px}
.tl-t18{top:216px}
.tl-t19{top:228px}
.tl-t20{top:240px}
.tl-t21{top:252px}
.tl-t22{top:264px}
.tl-t23{top:276px}
.tl-t24{top:288px}
.tl-t25{top:300px}
.tl-t26{top:312px}
.tl-t27{top:324px}
.tl-t28{top:336px}
.tl-t29{top:348px}
.tl-t30{top:360px}
.tl-t31{top:372px}
.tl-t32{top:384px}
.tl-t33{top:396px}
.tl-t34{top:408px}
.tl-t35{top:420px}
.tl-t36{top:432px}
.tl-t37{top:444px}
.tl-t38{top:456px}
.tl-t39{top:468px}
.tl-t40{top:480px}
.tl-t41{top:492px}
.tl-t42{top:504px}
.tl-t43{top:516px}
.tl-t44{top:528px}
.tl-t45{top:540px}
.tl-t46{top:552px}
.tl-t47{top:564px}
.tl-t48{top:576px}
.tl-h1{height:12px}
.tl-h2{height:24px}
.tl-h3{height:36px}
.tl-h4{height:48px}
.tl-h5{height:60px}
.tl-h6{height:72px}
.tl-h7{height:84px}
.tl-h8{height:96px}
.tl-h9{height:108px}
.tl-h10{height:120px}
.tl-h11{height:132px}
.tl-h12{height:144px}
.tl-h13{height:156px}
.tl-h14{height:168px}
.tl-h15{height:180px}
.tl-h16{height:192px}
.tl-h17{height:204px}
.tl-h18{height:216px}
.tl-h19{height:228px}
.tl-h20{height:240px}
.tl-h21{height:252px}
.tl-h22{height:264px}
.tl-h23{height:276px}
.tl-h24{height:288px}
.tl-h25{height:300px}
.tl-h26{height:312px}
.tl-h27{height:324px}
.tl-h28{height:336px}
.tl-h29{height:348px}
.tl-h30{height:360px}
.tl-h31{height:372px}
.tl-h32{height:384px}
.tl-h33{height:396px}
.tl-h34{height:408px}
.tl-h35{height:420px}
.tl-h36{height:432px}
.tl-h37{height:444px}
.tl-h38{height:456px}
.tl-h39{height:468px}
.tl-h40{height:480px}
.tl-h41{height:492px}
.tl-h42{height:504px}
.tl-h43{height:516px}
.tl-h44{height:528px}
.tl-h45{height:540px}
.tl-h46{height:552px}
.tl-h47{height:564px}
.tl-h48{height:576px}

/* page Résumé : angles arrondis comme le cadre du QR code (la page publique garde la fiche telle quelle) */
.sheetwrap:not(.pub) .s-sheet { border-collapse:separate; border-spacing:0; border-radius:8px; overflow:hidden; }
.admmain .alist.stats li { display:block; }

/* fiche validée : liens téléphone / e-mail (même aspect que les champs grisés, sans décoration) */
a.flink { display:block; box-sizing:border-box; width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--muted); text-decoration:none; overflow-wrap:anywhere; }
a.flink { -webkit-text-fill-color:currentColor; }
a.flink:hover, a.flink:visited, a.flink:active { color:var(--muted); text-decoration:none; }
.ro .pl { color:var(--text); }
.ro .pl.sup { color:var(--accent); }

/* tactile (téléphone / tablette) : texte grisé ~18 % plus clair ; ordinateur inchangé */
@media (hover:none) and (pointer:coarse) {
    fieldset:disabled input, fieldset:disabled textarea, fieldset:disabled select, a.flink, a.flink { -webkit-text-fill-color:currentColor; }
a.flink:hover, a.flink:visited, a.flink:active { color:#ADA8A1; }
    fieldset:disabled .cb, fieldset:disabled .cb span, fieldset:disabled .part .x, .ro .dur, .ro .ronote { color:#ADA8A1; }
}
@media (max-width:600px) {
    .confirm .big { flex-direction:column; align-items:flex-start; }
    .confirm .big .when { margin-left:0; text-align:left; }
}

header.top .ttl .bikeinfo.ph { visibility:hidden; }
@media print { .qrbox.center .qrtxt a { display:inline !important; } }

/* page 6 : boutons d'avancement autour du QR code (classes .act-validate / .act-start / .act-finish / .act-delay à habiller) */
.qrbox.actbox { display:grid; grid-template-columns:1fr auto 1fr; gap:16px; align-items:stretch; }
.actbox .actmid { display:flex; flex-direction:column; align-items:center; gap:16px; }
.actbox .actcol { display:flex; flex-direction:column; gap:12px; min-width:0; }
.act { flex:1; width:100%; min-height:56px; padding:10px 12px; white-space:normal; font-weight:700; line-height:1.2; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:8px; }
.act-validate { background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
.act[disabled] { opacity:.45; cursor:default; }
.smsline { margin:8px 0 0; }
@media (max-width:600px) {
    .qrbox.actbox { grid-template-columns:1fr; }
    .actbox .actleft .act, .actbox .actright .act { min-height:52px; }
}
@media print { .actcol, .smsline, dialog.modal { display:none !important; } }

/* popups de validation */
dialog.modal { padding:0; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); width:min(480px, 92vw); max-height:90vh; }
dialog.modal::backdrop { background:rgba(20,18,16,.25); -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px); }
.modal-in { padding:20px; display:flex; flex-direction:column; gap:12px; }
.modal-in h3 { margin:0; font-size:20px; }
.modal-in p { margin:0; color:var(--muted); }
.modal-lbl { font-size:14px; color:var(--muted); }
.modal-in textarea { min-height:140px; }
.modal-act { display:flex; gap:12px; justify-content:flex-end; flex-wrap:wrap; }
.s-lnk { color:inherit; text-decoration:none; }

/* pastilles d'état (admin) */
.st { display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; font-weight:700; border:1px solid var(--border); white-space:nowrap; vertical-align:middle; }
.actions .danger.act-cancel { margin-left:auto; }

/* plus d'air autour du QR code */
.qrbox.center { padding:32px clamp(20px,4vw,32px); margin-top:28px; margin-bottom:8px; }
.qrbox.center .qrlink { gap:22px; }
.qrbox.actbox { gap:clamp(20px,3vw,32px); }
.actbox .actmid { gap:22px; }
@media (max-width:600px) { .qrbox.center { padding:28px 20px; } }

/* QR code : plus d'air autour, titre « Statut » */
.qrbox.center { padding:28px; }
.qrbox.actbox { padding:24px 28px 28px; gap:24px; }
.actbox .actmid { padding:8px 20px; }
.actbox .actmid .qrlink, .qrbox.center > .qrlink { padding:6px; }
.actbox-title { grid-column:1 / -1; margin:0; font-size:15px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:var(--muted); }

/* QR un peu plus grand ; les boutons latéraux ont exactement la hauteur du QR code */
.qrbox.center .qr { width:180px; height:180px; }
.actbox .actmid { padding:0 20px; }
.actbox .actmid .qrlink, .qrbox.center > .qrlink { padding:0; line-height:0; }
.actbox .actcol .act { min-height:0; }
@media (max-width:600px) { .actbox .actcol .act { min-height:52px; } }

.actbox .actcol { margin-block:var(--qrq, 0px); }
@media (max-width:600px) { .actbox .actcol { margin-block:0; } }

/* ======================= admin v8 : menu, états, calendriers, réparations ======================= */

/* menu latéral par groupes */
nav.adm details.navgrp { margin-top:12px; }
nav.adm details.navgrp > summary { cursor:pointer; list-style:none; padding:4px 12px; font-size:12px; letter-spacing:1.5px; text-transform:uppercase; color:var(--muted); }
nav.adm details.navgrp > summary::-webkit-details-marker { display:none; }
nav.adm details.navgrp > summary::after { content:" ▾"; }
nav.adm details.navgrp:not([open]) > summary::after { content:" ▸"; }
nav.adm details.navgrp > a { margin-left:6px; }
nav.adm details.navgrp > hr { border:0; border-top:1px solid var(--line); margin:6px 12px; }
nav.adm .navsoon { margin:12px 0 0; padding:4px 12px; font-size:12px; letter-spacing:1.5px; text-transform:uppercase; color:var(--placeholder); }
nav.adm .navsoon small { text-transform:none; letter-spacing:0; }
.admshell > nav.adm details.navgrp { display:flex; flex-direction:column; gap:2px; }
@media (max-width:900px) {
    nav.adm details.navgrp { display:flex; flex-wrap:wrap; gap:8px; width:100%; margin-top:6px; }
    nav.adm details.navgrp > summary { width:100%; }
    nav.adm details.navgrp > hr { display:none; }
    nav.adm details.navgrp > a { margin-left:0; }
}

/* titres de fiches : étiquette d'état alignée à droite */
.sheetrow > summary { display:flex; align-items:center; gap:10px; }
.sheetrow > summary > .sl { flex:1 1 auto; min-width:0; overflow-wrap:anywhere; }
.sheetrow > summary > .sr { flex:none; margin-left:auto; display:inline-flex; align-items:center; gap:10px; }
.sheetrow > summary .amt { font-variant-numeric:tabular-nums; font-weight:600; }
button.sm { min-height:28px; padding:0 12px; font-size:13px; }
.billsum { margin:8px 0 4px; }
.billsum small { color:var(--muted); }

/* couleurs des états */
.st { border-color:transparent; }
.st.st-draft     { background:#000;     color:#d8d4cd; border-color:#4B463F; }
.st.st-valid     { background:#4B2A7A;  color:#fff; }
.st.st-progress  { background:#C9A5F5;  color:#1A1816; }
.st.st-delayed   { background:#F0912B;  color:#1A1816; }
.st.st-done      { background:#1F7A45;  color:#fff; }
.st.st-unpaid    { background:#F0912B;  color:#1A1816; }
.st.st-paid      { background:#A8E6B4;  color:#12301a; }
.st.st-cancelled { background:#C93A3A;  color:#fff; }

/* couleurs des lieux (calendriers) */
.pc0 { --pcc:#B46FF1; } .pc1 { --pcc:#4FA3E0; } .pc2 { --pcc:#E39B3B; } .pc3 { --pcc:#4CB782; }
.pc4 { --pcc:#E5636B; } .pc5 { --pcc:#D9C04A; } .pc6 { --pcc:#3FC1C9; } .pc7 { --pcc:#E07FB6; }
.pcx { --pcc:#9B958D; }
.plegend { display:flex; flex-wrap:wrap; gap:6px 16px; margin:8px 0 0; color:var(--muted); font-size:13px; }
.plegend i, .wklegend i.pc0, .wklegend i.pc1, .wklegend i.pc2, .wklegend i.pc3, .wklegend i.pc4, .wklegend i.pc5, .wklegend i.pc6, .wklegend i.pc7 { display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:6px; vertical-align:-1px; background:var(--pcc); border:0; }
.tl-open[class*="pc"] { background:var(--pcc); opacity:.2; }
.tl-appt { border-color:var(--pcc, var(--accent)); padding:0; }
.wk-blk, .wk-blk[class*="pc"] { border-left-width:1px; }
.wk-blk[class*="pc"] { background:color-mix(in srgb, var(--pcc) 22%, var(--surface)); border-color:var(--pcc); }
button.swatch { width:32px; min-height:32px; height:32px; padding:0; border-radius:6px; background:var(--pcc); border:0; }
.wkbar label select { max-width:14em; }

/* calendrier : barre mois plus compacte, « Aujourd'hui » en premier */
.admmain .pager.cpager { display:inline-flex; max-width:none; width:auto; justify-content:flex-start; gap:8px; }
.cpager span { min-width:9.5em; }
.cpager .btn.today { padding:0 22px; margin-right:8px; }

/* tableau de bord : semaine */
.wpager { max-width:none; justify-content:flex-start; }
.wpager span { min-width:15em; }
.wvwrap { overflow-x:auto; margin-top:10px; }
.wv { min-width:760px; --u:12px; }
.wv-head, .wv-body { display:grid; grid-template-columns:46px repeat(7, minmax(0,1fr)); }
.wv-d { text-align:center; padding:6px 2px; font-size:13px; color:var(--muted); border-left:1px solid var(--line); }
.wv-d b { color:var(--text); font-weight:600; margin-left:3px; }
.wv-d.today b { color:var(--accent); }
.wv-ax { position:relative; height:576px; }
.wv-ax .tl-lab { left:0; width:40px; }
.wv-col { position:relative; height:576px; border-left:1px solid var(--line); border-top:1px solid var(--line);
    background:repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--line) 47px, var(--line) 48px); }
.wv-col.today { background-color:rgba(180,111,241,.05); }
button.wv-appt { position:absolute; left:3px; right:3px; box-sizing:border-box; display:block; min-height:0; padding:0; text-align:left; overflow:hidden;
    background:var(--surface); color:var(--text); border:1px solid var(--pcc, var(--accent)); border-radius:6px; font-size:11px; font-weight:400; line-height:1.25; letter-spacing:0; cursor:pointer; }
button.wv-appt:hover { background:var(--accent-soft); }
.wv-appt span { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--muted); }
.wv-appt b { font-weight:600; }
dialog.apt h4 { margin:6px 0 0; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); }
.aptl { margin:0; padding-left:18px; }
.aptl li { margin:2px 0; }
.modal-in h3 .st { margin-left:8px; font-size:11px; }

/* réparations : une ligne = [active][libellé][types] / [corbeille][descriptif][durée, tarif] */
.admmain form.rep { display:grid; grid-template-columns:28px minmax(0,1fr) auto; grid-template-areas:"act title chips" "del desc meta"; gap:8px 14px; align-items:center;
    margin:0; padding:14px 2px; background:none; border:0; border-bottom:1px solid var(--border); border-radius:0; }
.rep.off { opacity:.6; }
.rep .r-act { grid-area:act; display:flex; justify-content:center; }
.rep .r-act input { width:18px; height:18px; }
.rep .r-title { grid-area:title; width:100%; font-size:16px; }
.rep .r-chips { grid-area:chips; padding:0; margin:0; gap:6px; justify-content:flex-end; }
.rep .r-chips .chip span { min-width:0; min-height:30px; padding:0 11px; font-size:13px; border-radius:6px; }
.rep .r-desc { grid-area:desc; width:100%; min-height:0; resize:vertical; font-size:13px; line-height:1.35; margin:10px 0; }
.rep .r-meta { grid-area:meta; display:flex; align-items:flex-end; gap:14px; flex-wrap:nowrap; }
.rep .r-meta label.lab { width:92px; }
.rep .r-meta label.lab input, .rep .r-meta label.lab select { margin-top:4px; width:100%; }
.rep .r-sides { align-self:center; }
.rep .r-state { grid-column:2 / -1; min-height:1.2em; font-size:12px; color:var(--muted); }
.rep .r-state:empty { display:none; }
.rep .r-state.ok { color:#6fcf97; }
.rep .r-state.err { color:var(--err); }
.rep .r-save { grid-column:2 / -1; justify-self:start; min-height:36px; padding:0 18px; }
.admmain form.rep.repadd { grid-template-areas:"h h h" "title title chips" "desc desc meta" ". . btn"; margin:18px 0 8px; padding:14px; border:1px dashed var(--accent-line); border-radius:8px; }
.repadd h3 { grid-area:h; margin:0; font-size:14px; }
.repadd .r-addbtn { grid-area:btn; margin:0; justify-self:end; }
.repadd .r-addbtn button { min-height:40px; padding:0 28px; }
@media (max-width:900px) {
    .admmain form.rep { grid-template-columns:28px minmax(0,1fr); grid-template-areas:"act title" ". chips" "del desc" ". meta"; }
    .rep .r-chips { justify-content:flex-start; }
    .rep .r-meta { flex-wrap:wrap; }
    .admmain form.rep.repadd { grid-template-columns:minmax(0,1fr); grid-template-areas:"h" "title" "chips" "desc" "meta" "btn"; }
}

/* types de vélo en grille */
.typegrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:8px; margin-top:10px; }
.typecell { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.typecell.off span { opacity:.55; }
.typecell.typeadd { grid-column:span 2; border-style:dashed; }
.typecell.typeadd input { min-width:0; flex:1; min-height:32px; padding:0 8px; font-size:14px; }
.typecell.typeadd button { min-height:32px; padding:0 14px; font-size:14px; }


/* ======================= admin v9 ======================= */

/* fenêtres : cloche de fermeture, actions réparties, confirmation */
.modal-in { position:relative; }
.modal-x { position:absolute; top:10px; right:10px; width:34px; min-height:34px; height:34px; padding:0; background:none; color:var(--muted); border:0; border-radius:50%; display:grid; place-items:center; }
.modal-x svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; }
.modal-x:hover { color:var(--text); background:var(--field); }
.modal-in h3 { padding-right:36px; }
.modal-act.spread { justify-content:space-between; align-items:center; }
.modal-act form { margin:0; }
dialog.uiconfirm { width:min(420px, 92vw); }
dialog.uiconfirm .modal-in p { color:var(--text); white-space:pre-line; }

/* flèches de navigation des calendriers : même dessin que la barre de l'atelier, sans bordure */
.pnav { display:inline-grid; place-items:center; width:40px; height:40px; padding:0; color:var(--text); background:none; border:0; text-decoration:none; border-radius:6px; }
.pnav svg { width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.pnav.next svg { transform:rotate(180deg); }
.pnav:hover { color:var(--accent); }
.pager .pnav { min-width:0; }
.pbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 24px; }
.pbar .pager, .pbar .plegend { margin:8px 0; }
.admmain .pbar .pager { max-width:none; }

/* jour en cours : toute la case en couleur */
.mcell.today, .mcell.today.off:not(.sel) { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.mcell.today b, .mcell.today small { color:var(--on-accent); }
.mcell.today .badge { background:rgba(26,24,22,.22); border-color:transparent; color:var(--on-accent); }
.wv-d.today { background:var(--accent); color:var(--on-accent); border-radius:6px 6px 0 0; }
.wv-d.today b { color:var(--on-accent); }
.wv-col.today { background-color:rgba(180,111,241,.09); }

/* rendez-vous : bandeau (plage horaire + référence) à la couleur du lieu */
.ap-hd { display:block; padding:2px 6px; background:var(--pcc, var(--accent)); color:#1A1816; font-size:11px; line-height:1.25; }
.ap-hd b { font-weight:700; }
.ap-hd small { font-size:inherit; opacity:.8; }
.wv-appt .ap-hd { color:#1A1816; }
.wv-appt .ap-bd { padding:0 6px; }
.wv-appt .ap-bd:first-of-type { padding-top:2px; }
.tl-appt .ap-bd { display:block; padding:2px 8px; font-size:12px; }
.tl-appt { white-space:normal; }

/* ligne d'actions d'une fiche : « Annuler » / « Supprimer la fiche » à droite */
.sact .sact-r { margin-left:auto; }

/* filtre de la page Réparations aligné sur le texte */
.admmain nav.adm.sub { padding-left:0; padding-right:0; }

/* réparations : alignements d'après le modèle */
.admmain form.rep { padding:12px 2px 2px; }
.rep .r-meta { align-items:center; justify-content:flex-end; gap:16px; }
.rep .r-meta label.lab { width:auto; display:flex; align-items:center; gap:8px; white-space:nowrap; }
.rep .r-meta label.lab input, .rep .r-meta label.lab select { margin-top:0; width:80px; }
.rep .r-meta label.lab input[name=price] { width:104px; }
.rep .r-meta label.lab select { width:auto; }
.rep .r-chips { align-self:center; }
.admmain form.rep.repadd { grid-template-areas:"h h h" "title title chips" "desc desc meta"; margin:18px 0 12px; padding:16px 28px 6px; }
.rep .r-plus { width:40px; min-height:40px; height:40px; padding:0; font-size:24px; line-height:1; border-radius:6px; flex:none; }
.rep .r-state { grid-column:2 / -1; }
@media (max-width:900px) {
    .admmain form.rep.repadd { grid-template-areas:"h" "title" "chips" "desc" "meta"; padding:14px 16px 6px; }
    .rep .r-meta { justify-content:flex-start; flex-wrap:wrap; }
}

/* types de vélo : cellules sans bordure */
.typecell, .typecell.typeadd { border:0; }
.wv-appt .ap-hd { white-space:normal; overflow:visible; }


/* ======================= admin v10 ======================= */
header.top .tb { display:flex; align-items:center; gap:10px; }
a.power { display:inline-grid; place-items:center; width:40px; height:40px; padding:0; background:var(--surface); color:var(--muted); border:1px solid var(--border); border-radius:50%; text-decoration:none; }
a.power svg { width:20px; height:20px; }
body.admin a.power svg { width:17px; height:17px; }
a.power:hover { color:var(--text); border-color:var(--accent); }
a.power.on, a.power.on:hover { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }

/* fenêtres */
.modal-act { margin-top:15px; }
.modal-x:focus, .modal-x:focus-visible { outline:0; box-shadow:none; }
.modal-in h3 .lite { font-weight:400; }

/* tableau de bord / cartes : pas de marge au-dessus du premier titre */
.admmain .card > h2.sect.sub:first-child { margin-top:0; padding-top:0; border-top:0; }

/* bouton « Actif » : violet ; « Inactif » : gris (classe .secondary) */
button.tgl { min-width:76px; }

/* export CSV dans la facturation */
.expbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin:0 0 10px; }
.expbar label.lab { display:flex; align-items:center; gap:8px; }
.expbar label.lab input { margin-top:0; width:auto; }
.expbar select { width:auto; }

/* rendez-vous du calendrier : bandeau (heures puis référence), corps espacé */
.ap-hd { padding:4px 8px; }
.ap-hd b, .ap-hd small { display:block; }
.ap-hd small { opacity:.85; }
.wv-appt .ap-bd { padding:0 8px; color:var(--muted); }
.wv-appt .ap-hd + .ap-bd { margin-top:10px; }
.tl-appt .ap-hd { padding:3px 10px; }
.tl-appt .ap-bd { padding:2px 10px; }
.tl-appt .ap-hd + .ap-bd { margin-top:8px; }

/* réparations : bouton « + » rond, bloc d'ajout en pointillé */
.admmain form.rep.repadd { border:2px dashed var(--accent-line); border-radius:8px; margin:12px !important; }
.rep .r-plus { width:40px; min-height:40px; height:40px; padding:0; border-radius:50%; background:var(--surface); border:2px solid var(--accent); color:var(--text); display:inline-grid; place-items:center; flex:none; }
.rep .r-plus svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; }
.rep .r-plus:hover { color:var(--accent); }

/* atelier : opération « roues » = case + liste AV/AR */
.task.one.wheel { grid-template-columns:20px minmax(0,1fr) auto; }
.task .wsel { width:auto; min-height:34px; padding:0 30px 0 10px; font-size:15px; }
.task .wfix { color:var(--muted); font-size:13px; font-weight:700; letter-spacing:1px; }
.alist form.inl { display:inline-flex; align-items:center; gap:8px; margin:0; }
.alist form.inl button.tgl { height:32px; min-height:32px; padding:0 14px; }


/* rendez-vous (tableau de bord ET calendrier) : même présentation — bandeau en haut, corps en dessous */
button.wv-appt, .tl-appt { display:flex; flex-direction:column; justify-content:flex-start; align-items:stretch; padding:0; overflow:hidden; text-align:left; white-space:normal; }
.wv-appt .ap-hd, .tl-appt .ap-hd { flex:none; display:block; padding:4px 8px; background:var(--pcc, var(--accent)); color:#1A1816; font-size:11px; line-height:1.25; white-space:normal; overflow:visible; }
.wv-appt .ap-bd, .tl-appt .ap-bd { flex:none; display:block; padding:0 8px; color:var(--muted); font-size:12px; line-height:1.3; font-weight:400; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wv-appt .ap-hd + .ap-bd, .tl-appt .ap-hd + .ap-bd { margin-top:10px; }

select { background-color:var(--field); background-image:linear-gradient(45deg, transparent 50%, #9B958D 50%), linear-gradient(135deg, #9B958D 50%, transparent 50%); background-position:calc(100% - 19px) 50%, calc(100% - 13px) 50%; background-size:6px 6px, 6px 6px; background-repeat:no-repeat; padding-right:34px; }   /* flèche en CSS pur (les images data: sont bloquées par la CSP) */

/* bloc trop court pour tout afficher : seule la plage horaire reste visible */
.wv-appt.short .ap-hd small, .wv-appt.short .ap-bd, .tl-appt.short .ap-hd small, .tl-appt.short .ap-bd { display:none; }
.wv-appt.short .ap-hd, .tl-appt.short .ap-hd { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ======================= admin v11 ======================= */

/* navigation latérale classique : texte, page courante en blanc pur, rien de plus */
.admshell > nav.adm a, .admshell > nav.adm a:hover { background:transparent; border-color:transparent; color:var(--text); }
.admshell > nav.adm a.cur, .admshell > nav.adm a.cur:hover { background:transparent; border-color:transparent; color:#fff; font-weight:400; }
@media (max-width:900px) {
    .admshell > nav.adm a { background:transparent; border-color:transparent; }
    .admshell > nav.adm a.cur { background:transparent; }
}

/* champs de saisie de l'administration : tous à la même hauteur réduite (celle de la liste AV/AR) */
body.admin input:not([type=checkbox]):not([type=radio]), body.admin select { min-height:34px; height:34px; padding-top:0; padding-bottom:0; font-size:15px; }
body.admin textarea { font-size:15px; }
.expbar input[type=date] { height:34px; min-height:34px; }

/* espacements */
.billsum { margin:18px 0 14px; }
.wkbar { margin:10px 0 20px; }
.plist li { border-bottom:0; }

/* réparations : la zone « durée / tarif / roue » ne doit pas élargir la colonne (le libellé garde sa largeur) */
.rep .r-meta { width:0; min-width:100%; flex-wrap:wrap; row-gap:8px; }
.rep .r-meta { gap:6px 12px; }
.rep .r-meta label.lab { gap:6px; font-size:.92em; }
.rep .r-meta label.lab input[name=dur] { width:62px; }
.rep .r-meta label.lab input[name=price] { width:78px; }

/* admin v12 */
details.sheetrow { margin-top:24px; }
div.sact { padding:10px 14px 12px; }
.wvwrap { padding-bottom:10px; }
.wv-col { border-bottom:1px solid var(--line); }
.wv-head { gap:0; }
.wv-d { border-left:0; margin:0 2px; background:var(--bg); border-radius:6px 6px 0 0; }
.wv-d.today { background:var(--accent); }
.tl-appt .ap-bd { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
form.expbar { margin:14px 0 10px; }
.wkbar { margin:14px 0 20px; }
button.swatch { margin-left:20px; }
.cols2 { align-items:stretch; }
.rep .r-meta { padding-top:16px; flex-wrap:nowrap; gap:8px; justify-content:flex-end; }
.rep .r-meta label.lab { gap:6px; font-size:.9em; }
.rep .r-meta label.lab input[name=dur] { width:58px; }
.rep .r-meta label.lab input[name=price] { width:74px; }
.rep .r-meta label.lab.wsel select { width:84px; }
.rep .r-desc { margin:0 0 10px 0; }
.typecell.typeadd { padding-top:16px; }
.pklist li { border-top:1px solid var(--line); background-color:var(--field); }

/* admin v13 */
.wv-col:last-child { border-right:1px solid var(--line); }
.wv-appt .ap-bd { white-space:normal; }
.ap-hatch { position:absolute; left:0; right:0; pointer-events:none; box-sizing:border-box;
    /* tuile 8×8 px dont la diagonale joint deux coins : rayures toutes identiques (un dégradé répété à période non entière donne des lignes d'intensité inégale) */
    background-image:linear-gradient(135deg, transparent 44%, color-mix(in srgb, var(--pcc, var(--accent)) 40%, transparent) 44%, color-mix(in srgb, var(--pcc, var(--accent)) 40%, transparent) 56%, transparent 56%);
    background-size:8px 8px; }

/* réordonner les opérations */
.admmain form.rep { position:relative; }
.rep .r-grip { position:absolute; left:-14px; top:24px; width:14px; height:26px; display:grid; place-items:center; color:var(--muted); cursor:grab; touch-action:none; user-select:none; }
.rep .r-grip svg { width:14px; height:14px; fill:currentColor; }
.rep .r-grip:hover { color:var(--accent); }
.rep.dragging { opacity:.75; background:var(--accent-soft); outline:1px dashed var(--accent-line); }
.rep.dragging .r-grip { cursor:grabbing; }

/* nouvelle catégorie */
form.catadd { margin:12px 0 14px; padding:12px 14px; border:2px dashed var(--accent-line); border-radius:8px; background:none; }
form.catadd h3 { margin:0 0 10px; font-size:14px; }
.catadd-row { display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; }
.catadd-row input[type=text] { flex:1 1 220px; min-width:0; width:auto; }
.catadd-row select { width:auto; }
.catadd-row .cb { display:inline-flex; align-items:center; gap:8px; color:var(--muted); }
.catadd-row .cb input { width:18px; height:18px; margin:0; }
.catadd-row select { padding-right:32px; }

.cat.repdet > summary .c-grip { display:inline-grid; place-items:center; width:20px; height:24px; margin-right:6px; color:var(--muted); cursor:grab; touch-action:none; user-select:none; vertical-align:middle; }
.cat.repdet > summary .c-grip svg { width:14px; height:14px; fill:currentColor; }
.cat.repdet > summary .c-grip:hover { color:var(--accent); }
.cat.repdet.dragging { opacity:.75; outline:1px dashed var(--accent-line); }

/* renommer une catégorie */
.catname { display:flex; align-items:center; gap:12px; margin:4px 0 12px; }
.catname .lab { display:flex; align-items:center; gap:10px; color:var(--muted); flex:1 1 auto; }
.catname .lab input { flex:1 1 auto; max-width:420px; width:auto; }

/* admin v14 : lignes d'opérations (poignée centrée, interrupteur, fond propre aux opérations) */
.admmain form.rep { grid-template-columns:44px minmax(0,1fr) auto; grid-template-areas:"act title chips" ". desc meta"; gap:8px 14px; align-items:center;
    margin:0; padding:12px 0 12px 28px; background:var(--bg); border:0; border-bottom:1px solid var(--line); border-radius:0;
    box-shadow:-12px 0 0 var(--bg), 12px 0 0 var(--bg); }
.admmain form.rep:last-of-type { border-bottom:0; }
.admmain form.rep.repadd { box-shadow:none; padding:14px; background:none; border:2px dashed var(--accent-line); border-radius:8px; margin:18px 0 8px; grid-template-columns:minmax(0,1fr) auto; }
.rep .r-grip { position:absolute; left:0; top:50%; bottom:auto; transform:translateY(-50%); width:20px; height:32px; display:grid; place-items:center; }
.rep .r-act { justify-content:flex-start; }
.sw { position:relative; display:inline-block; width:40px; height:22px; margin:0; cursor:pointer; flex:none; }
.sw input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.sw-t { display:block; width:100%; height:100%; border-radius:11px; background:#57524C; transition:background .15s; }
.sw-t::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; transition:transform .15s; }
.sw input:checked + .sw-t { background:var(--accent); }
.sw input:checked + .sw-t::after { transform:translateX(18px); }
.sw input:focus-visible + .sw-t { outline:2px solid var(--accent); outline-offset:2px; }
.rep.off { opacity:1; }
.rep.off .r-title, .rep.off .r-desc { opacity:.6; }
@media (max-width:900px) {
    .admmain form.rep { grid-template-columns:44px minmax(0,1fr); grid-template-areas:"act title" ". chips" ". desc" ". meta"; }
}
/* alignement à gauche : poignées et libellés au même bord, interrupteurs sous le titre des catégories */
.admmain form.rep { padding-left:38px; }
.rep .r-grip { width:14px; justify-items:start; }
.rep .r-grip svg { margin-left:-1px; }
.cat.repdet > summary .c-grip { margin-left:-5px; margin-right:11px; }

/* bouton on/off : symbole d'alimentation, violet = actif, gris = inactif */
.pw { position:relative; display:inline-grid; place-items:center; width:30px; height:30px; margin:0 0 0 -3px; border-radius:50%; cursor:pointer; color:#6E6963; flex:none; transition:color .15s, background .15s; }
.pw input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.pw svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.pw:hover { color:#8B857E; }
.pw:has(input:checked) { color:var(--accent); background:var(--accent-soft); }
.pw:has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }

/* bouton on/off compact : plus de marge autour, colonne réduite à sa largeur */
.pw { width:18px; height:18px; margin:0; border-radius:0; }
.pw svg { width:18px; height:18px; }
.pw:has(input:checked) { background:none; }
.admmain form.rep { grid-template-columns:18px minmax(0,1fr) auto; padding-left:24px; }
.cat.repdet > summary .c-grip { width:14px; margin-left:-2px; margin-right:3px; }
@media (max-width:900px) { .admmain form.rep { grid-template-columns:18px minmax(0,1fr); } }
.admmain form.rep { grid-template-columns:12px minmax(0,1fr) auto; }
.rep .r-grip { width:14px; }
@media (max-width:900px) { .admmain form.rep { grid-template-columns:12px minmax(0,1fr); } }

.rep .r-meta label.lab input[name="dur"] { width:70px; }

/* types de vélo : 3 colonnes au maximum (moins si la largeur manque) */
.typegrid { grid-template-columns:repeat(auto-fill, minmax(max(150px, calc((100% - 16px) / 3)), 1fr)); }
.typegrid { grid-template-columns:repeat(auto-fill, minmax(min(200px, 100%), 200px)); max-width:616px; }
.typegrid { grid-template-columns:repeat(auto-fill, 200px); }
@media (max-width:440px) { .typegrid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
a.power { width:34px; height:34px; }
header.top .tb { gap:26px; }
