/* Portail REV Chauffage — thème sombre par défaut, clair et accent personnalisable */
:root {
  --bg: #161a17;
  --bg-2: #1f2421;
  --card: #232a25;
  --card-2: #2b332d;
  --border: #36403a;
  --text: #e8ece9;
  --muted: #9aa69e;
  --accent: #8CC48A;
  --accent-text: #10170f;
  --danger: #ef4444;
  --warn: #f59e0b;
  --ok: #10b981;
  --info: #3b82f6;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --topbar-h: 58px;
  --tabbar-h: 64px;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f3f5f3;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #f0f3f0;
  --border: #dbe1dc;
  --text: #1f2421;
  --muted: #5f6b63;
  --accent: #4E8F4C;
  --accent-text: #ffffff;
  --shadow: 0 4px 18px rgba(31, 36, 33, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
code, pre { font-family: Consolas, "Cascadia Mono", monospace; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.hidden, [hidden] { display: none !important; }
.danger { color: var(--danger) !important; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }

/* ── Mise en page ───────────────────────────── */
.main { max-width: 1200px; margin: 0 auto; padding: 1rem 1rem 6rem; }
body.has-user .main { padding-top: calc(var(--topbar-h) + 1rem); }
.main.narrow { max-width: 720px; }
.main.wide { max-width: 1500px; }
.page-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row-end { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.only-mobile { display: none !important; }
@media (max-width: 900px) {
  .only-mobile { display: flex !important; }
  .only-desktop { display: none !important; }
  body.has-user .main { padding-bottom: calc(var(--tabbar-h) + 5rem + env(safe-area-inset-bottom)); }
}

/* ── Barre du haut ───────────────────────────── */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: .75rem; padding: 0 1rem;
  padding-top: env(safe-area-inset-top);
  background: var(--bg-2); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; }
.brand-logo.boxed { background: #fff; padding: 4px 9px; border-radius: 9px; }
html:not([data-theme="light"]) .logo-for-light, html[data-theme="light"] .logo-for-dark { display: none !important; }
.logo-big .brand-logo { height: 64px; }
.topnav { display: flex; gap: .15rem; margin-left: .5rem; overflow-x: auto; }
.topnav a { color: var(--muted); padding: .45rem .7rem; border-radius: 8px; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.topnav a:hover { color: var(--text); background: var(--card-2); text-decoration: none; }
.topnav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--card-2); text-decoration: none; }
.badge-dot { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Paramètres */
.settings-wrap { position: relative; }
.settings-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 300px; max-height: calc(100vh - 90px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem; z-index: 60;
}
.settings-user { display: flex; flex-direction: column; padding: .5rem .6rem .7rem; border-bottom: 1px solid var(--border); }
.settings-section { padding: .55rem .2rem; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: .1rem; }
.settings-section:last-child { border-bottom: 0; }
.settings-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 .4rem .3rem; font-weight: 700; }
.settings-link { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .5rem .55rem; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.settings-link:hover { background: var(--card-2); text-decoration: none; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: 0 .3rem; }
.theme-option { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .45rem; border-radius: 10px; border: 2px solid var(--border); background: var(--card-2); color: var(--text); cursor: pointer; font-size: .8rem; }
.theme-option.active { border-color: var(--accent); }
.theme-preview { width: 100%; height: 26px; border-radius: 6px; }
.theme-preview-dark { background: linear-gradient(135deg, #161a17 50%, #8CC48A 50%); }
.theme-preview-light { background: linear-gradient(135deg, #ffffff 50%, #4E8F4C 50%); border: 1px solid #ccc; }
.theme-preview-custom { background: conic-gradient(#ef4444, #f59e0b, #10b981, #3b82f6, #a855f7, #ef4444); }
.accent-options { display: flex; flex-wrap: wrap; gap: .45rem; padding: .6rem .4rem 0; }
.accent-dot { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.accent-dot.active { border-color: var(--text); }

/* Tiroir mobile */
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: 280px; max-width: 85vw; z-index: 70; background: var(--bg-2); border-right: 1px solid var(--border); transform: translateX(-102%); transition: transform .2s ease; padding: calc(1rem + env(safe-area-inset-top)) .75rem 1rem; overflow-y: auto; }
.drawer.open { transform: none; }
.drawer-head { display: flex; gap: .75rem; align-items: center; padding: 0 .4rem 1rem; border-bottom: 1px solid var(--border); margin-bottom: .5rem; }
.drawer-head .brand-logo { height: 30px; }
.drawer-nav a { display: flex; align-items: center; gap: .7rem; padding: .7rem .6rem; border-radius: 10px; color: var(--text); font-weight: 600; }
.drawer-nav a:hover { background: var(--card-2); text-decoration: none; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .5); }

/* Barre d'onglets mobile */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--bg-2); border-top: 1px solid var(--border);
  justify-content: space-around; align-items: center;
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: .7rem; font-weight: 600; padding: .3rem 0; }
.tabbar a:hover { text-decoration: none; }
.tabbar a.active { color: var(--accent); }
.tabbar .tab-main { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-text); justify-content: center; margin-top: -26px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }

/* Bouton d'aide flottant */
.help-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 45; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card); color: var(--accent); font-size: 1.35rem; font-weight: 800;
  box-shadow: var(--shadow); cursor: pointer;
}
@media (max-width: 900px) { .help-fab { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); width: 40px; height: 40px; font-size: 1.15rem; } }
.help-item { border-bottom: 1px solid var(--border); padding: .55rem 0; }
.help-item summary { cursor: pointer; font-weight: 600; }
.help-item div { padding: .4rem 0 .2rem; color: var(--muted); }
.help-item div strong, .help-item div em { color: var(--text); }
.ai-box { border: 1px dashed var(--border); border-radius: 10px; padding: .7rem .8rem; }
.ai-box p { margin: .4rem 0 0; }
.help-item div p { margin: .3rem 0 .5rem; }
.help-item div ol, .help-item div ul { margin: .3rem 0 .5rem; padding-left: 1.3rem; }
.help-item div li { margin: .25rem 0; }
.help-item div code { background: var(--surface-2, rgba(127,127,127,.12)); color: var(--text); padding: .05rem .3rem;
  border-radius: 4px; font-size: .88em; overflow-wrap: anywhere; user-select: all; }

/* ── Cartes et composants ───────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.card + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.stat { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
a.stat:hover { border-color: var(--accent); text-decoration: none; }
.stat .num { font-size: 1.7rem; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.secondary { background: transparent; }
.btn.danger { background: transparent; color: var(--danger) !important; border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #1b1300; }
.btn.info { background: var(--info); border-color: var(--info); color: #fff; }
.btn-sm { padding: .38rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: .9rem 1.3rem; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; }

.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; background: var(--card-2); color: var(--muted); border: 1px solid var(--border); }
.pill.status { color: #fff; border: 0; }
.pill.accent { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); border-color: transparent; }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); border-color: transparent; }
.pill.danger { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); border-color: transparent; }

.alert { padding: .75rem 1rem; border-radius: 10px; border: 1px solid var(--border); background: var(--card-2); margin-bottom: 1rem; }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--text); }
.alert.error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--text); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--text); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--topbar-h) + 12px); z-index: 90; background: var(--card); border: 1px solid var(--accent); padding: .6rem 1rem; border-radius: 10px; box-shadow: var(--shadow); }

/* Formulaires */
label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: .5rem; color: var(--text); font-weight: 500; cursor: pointer; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: .62rem .75rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 1rem;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); }
.form-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }
.field-hint { font-weight: 400; font-size: .78rem; color: var(--muted); }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem 1rem; margin: 0 0 1rem; }
legend { padding: 0 .4rem; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }
.filters label { min-width: 140px; flex: 1 1 140px; }
.filters .btn { flex: 0 0 auto; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .6rem .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; background: var(--card-2); }
.table tr:hover td { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
.table tr.clickable { cursor: pointer; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Listes cartes (mobile-friendly) */
.list { display: flex; flex-direction: column; gap: .6rem; }
.list-item { display: flex; gap: .8rem; align-items: center; padding: .8rem .9rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
a.list-item:hover { border-color: var(--accent); text-decoration: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .meta { color: var(--muted); font-size: .82rem; }
.list-item .side { text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.status-bar { width: 5px; align-self: stretch; border-radius: 3px; flex: 0 0 5px; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }

/* Modales */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 2rem); overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; display: flex; gap: .5rem; align-items: center; }
.modal-body { padding: 1rem; }
.modal-foot { display: flex; gap: .5rem; justify-content: flex-end; padding: .8rem 1rem; border-top: 1px solid var(--border); flex-wrap: wrap; }

.pwa-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 80; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .8rem 1rem; border-radius: 14px; background: var(--card); border: 1px solid var(--accent); box-shadow: var(--shadow); }
.pwa-banner span { display: flex; gap: .5rem; align-items: center; font-weight: 600; }
.pwa-banner div { display: flex; gap: .4rem; }
@media (max-width: 900px) { .pwa-banner { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); } }

/* ── Interventions ───────────────────────────── */
.timer-card { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 1.2rem; text-align: center; }
.timer { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer-state { font-weight: 700; }
.timer-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; width: 100%; }
.timer-actions .btn { flex: 1 1 140px; }
.timer-undo { margin-top: .2rem; }
.timer-undo .btn-link { background: none; border: 0; padding: .35rem .5rem; cursor: pointer; color: var(--muted); font: inherit; font-size: .85rem; display: inline; line-height: 1.5; text-decoration: underline dotted; }
.timer-undo .btn-link svg { vertical-align: -2px; margin-right: .2rem; }
.timer-undo .btn-link:hover { color: var(--danger); }
.running-banner { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-radius: var(--radius); background: color-mix(in srgb, var(--warn) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); margin-bottom: 1rem; color: var(--text); }
.running-banner:hover { text-decoration: none; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--warn); animation: pulse 1.4s infinite; flex: 0 0 12px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .6); } 70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
.pause-row { display: grid; grid-template-columns: 1fr 1fr 90px 40px; gap: .5rem; align-items: end; margin-bottom: .5rem; }
@media (max-width: 520px) { .pause-row { grid-template-columns: 1fr 1fr 70px 36px; } }
.durations { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.durations div { display: flex; flex-direction: column; }
.durations strong { font-size: 1.25rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
.kv dt { color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; }
.status-steps { display: flex; gap: .3rem; flex-wrap: wrap; }
.status-steps span { padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--card-2); color: var(--muted); border: 1px solid var(--border); }
.status-steps span.done { color: #fff; border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card-2); color: var(--text); font-size: .88rem; cursor: pointer; user-select: none; }
.chip input { display: none; }
.chip:has(input:checked) { background: color-mix(in srgb, var(--accent) 20%, transparent); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.history { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.history li { padding: .35rem 0; border-bottom: 1px dashed var(--border); color: var(--muted); }
.history li strong { color: var(--text); }

/* Blocs à copier (Vertuoza) */
.copy-block { position: relative; border: 1px solid var(--border); background: var(--bg); border-radius: 10px; padding: .55rem .7rem; margin-bottom: .55rem; }
.copy-block .copy-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.copy-block pre { margin: .3rem 0 0; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .92rem; }
.copy-btn { border: 1px solid var(--border); background: var(--card-2); color: var(--text); border-radius: 8px; padding: .2rem .55rem; font-size: .78rem; font-weight: 700; cursor: pointer; display: inline-flex; gap: .3rem; align-items: center; }
.copy-btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ── Photos ───────────────────────────── */
.photo-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 520px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; } }
.photo-tile { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--card-2); display: block; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.photo-tile:hover img { transform: scale(1.04); }
.photo-tile .badges { position: absolute; top: 4px; right: 4px; display: flex; gap: 3px; }
.photo-tile .badge { background: rgba(0, 0, 0, .6); color: #fff; border-radius: 6px; padding: 1px 5px; font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; }
.photo-tile .badge.estimated { background: rgba(180, 83, 9, .85); }
.photo-tile .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: .72rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-tile.uploading { display: flex; align-items: center; justify-content: center; }
.photo-tile.uploading .progress { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.photo-tile.uploading .progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.photo-tile.uploading.error { outline: 2px solid var(--danger); }
.day-group { margin-bottom: 1.25rem; }
.day-group h3 { display: flex; align-items: baseline; gap: .5rem; font-size: .95rem; margin-bottom: .5rem; position: sticky; top: var(--topbar-h); background: var(--bg); padding: .4rem 0; z-index: 5; }
.photo-drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.2rem; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.photo-drop.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.photo-actions > .btn { min-width: 0; white-space: normal; text-align: center; padding-left: .6rem; padding-right: .6rem; }
.photo-viewer { background: #000; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; min-height: 300px; position: relative; overflow: hidden; }
.photo-viewer img { max-height: 78vh; width: auto; object-fit: contain; }
.photo-viewer .nav-prev, .photo-viewer .nav-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, .5); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.photo-viewer .nav-prev { left: 10px; }
.photo-viewer .nav-next { right: 10px; }
.map-box { height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-box.small { height: 220px; }
.leaflet-popup-content img { width: 160px; border-radius: 6px; display: block; margin-bottom: 4px; }
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.view-toggle a { padding: .45rem .8rem; color: var(--muted); font-weight: 600; font-size: .88rem; display: inline-flex; gap: .3rem; align-items: center; }
.view-toggle a.active { background: var(--accent); color: var(--accent-text); }
.view-toggle a:hover { text-decoration: none; }

/* ── Agenda ───────────────────────────── */
.agenda-toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.agenda-toolbar .label { font-weight: 700; min-width: 180px; text-align: center; }
.agenda-day { margin-bottom: 1rem; }
.agenda-day h3 { font-size: .9rem; text-transform: capitalize; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.agenda-day.today h3 { color: var(--accent); }
.agenda-event { display: flex; gap: .75rem; padding: .6rem .75rem; border-radius: 10px; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent); margin-bottom: .4rem; cursor: default; }
.agenda-event.editable { cursor: pointer; }
.agenda-event .time { flex: 0 0 92px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .88rem; }
.agenda-event .subject { font-weight: 600; }
.agenda-event .loc { color: var(--muted); font-size: .82rem; }

/* ── Auth ───────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 1.8rem 1.6rem; box-shadow: var(--shadow); }
.auth-card .brand-logo { height: 72px; display: block; margin: 0 auto 1rem; }
.auth-card h1 { text-align: center; font-size: 1.25rem; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 1.2rem; }
.auth-card:has(.validation-body) { max-width: 600px; }
.validation-body { margin-bottom: 1.2rem; line-height: 1.5; }
.validation-body p { margin: 0 0 .7rem; }
.validation-body blockquote { margin: 0 0 .9rem; padding: .6rem .9rem; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 6px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 1rem; font-size: .88rem; }
.temp-pwd { font-family: Consolas, monospace; font-size: 1.2rem; font-weight: 700; background: var(--bg); border: 1px dashed var(--accent); padding: .4rem .7rem; border-radius: 8px; user-select: all; }

/* ── Admin ───────────────────────────── */
.admin-nav { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-nav a { padding: .4rem .75rem; border-radius: 8px; border: 1px solid var(--border); color: var(--muted); font-size: .85rem; font-weight: 600; }
.admin-nav a.active, .admin-nav a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.meter { height: 8px; background: var(--card-2); border-radius: 4px; overflow: hidden; margin-top: .3rem; }
.meter i { display: block; height: 100%; background: var(--accent); }
.meter.hot i { background: var(--danger); }
.log-view { background: #0c0f0d; color: #cfe3d0; padding: .8rem; border-radius: 10px; font-size: .78rem; line-height: 1.45; max-height: 70vh; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--ok); }
.dot.off { background: var(--danger); }
.qr-box { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; width: 220px; }
.qr-box svg { width: 100%; height: auto; display: block; }
.steps-list { counter-reset: s; list-style: none; padding: 0; }
.steps-list li { counter-increment: s; position: relative; padding: .4rem 0 .4rem 2.4rem; }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: .35rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .85rem; }

/* Pagination */
.pager { display: flex; justify-content: center; gap: .5rem; margin: 1rem 0; }

/* Utilitaires */
.mt-sm { margin-top: .5rem; }
.mb-sm { margin-bottom: .5rem; }
.stack-xs { display: flex; flex-direction: column; gap: .2rem; }
.btn-reset { appearance: none; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.list-item.btn-reset { padding: .8rem .9rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.alert.info { border-color: color-mix(in srgb, var(--info) 50%, transparent); background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--text); }
.modal.modal-lg { max-width: 760px; }
.tabs { display: flex; gap: .25rem; padding: .25rem; border-radius: 10px; background: var(--card-2); border: 1px solid var(--border); width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a { padding: .35rem .8rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.filters .tabs { flex: 0 0 100%; }
.filters .row { flex: 1 1 100%; }
.nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; margin-left: .25rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 800; vertical-align: middle; }
.offline-badge { padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.offline-badge.off { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.offline-badge.sync { background: color-mix(in srgb, var(--info) 22%, transparent); color: var(--info); }
.copy-code { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-family: ui-monospace, Consolas, monospace; background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; padding: .35rem .6rem; word-break: break-all; cursor: pointer; }
.totp-setup { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; margin: 1rem 0; }
.qr-inline { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.qr-box.small-qr, img.small-qr { width: 140px; }
img.small-qr { background: #fff; padding: 8px; border-radius: 10px; display: block; }

/* Dictée & mise au propre */
.textarea-tools { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .3rem; }
.tool-btn { border: 1px solid var(--border); background: var(--card-2); color: var(--text); border-radius: 999px; padding: .22rem .65rem; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.tool-btn:hover { border-color: var(--accent); }
.tool-btn:disabled { opacity: .6; cursor: wait; }
.tool-btn.rec { background: var(--danger); border-color: var(--danger); color: #fff; animation: rec-pulse 1.2s infinite; }
@keyframes rec-pulse { 50% { opacity: .65; } }

/* Tâches */
.group-title { font-size: .9rem; margin: 0 0 .4rem; color: var(--muted); }
.group-title.danger { color: var(--danger); }
.task-item { align-items: flex-start; }
.task-item.done .title { text-decoration: line-through; color: var(--muted); }
.task-item .task-body { color: var(--text); }
.task-item .task-body:hover { text-decoration: none; }
.task-check-form { margin: 0; flex: 0 0 auto; }
.task-check { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--muted); background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; margin-top: .1rem; }
.task-check:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.task-check.checked { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.prio-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--danger); margin-right: .4rem; vertical-align: middle; }

/* Contrôles */
.control-row { display: grid; grid-template-columns: 1fr minmax(0, 260px); gap: .5rem 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.control-row:last-child { border-bottom: 0; }
.control-row.alert-row { background: color-mix(in srgb, var(--danger) 9%, transparent); margin: 0 -.6rem; padding: .6rem; border-radius: 8px; }
.control-label { font-weight: 600; }
.control-input textarea, .control-input select { width: 100%; }
.seg { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg-opt { flex: 1; margin: 0; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: block; text-align: center; padding: .55rem .4rem; font-weight: 700; font-size: .88rem; color: var(--muted); background: var(--card-2); }
.seg-opt + .seg-opt span { border-left: 1px solid var(--border); }
.seg-ok input:checked + span { background: var(--ok); color: #fff; }
.seg-nok input:checked + span { background: var(--danger); color: #fff; }
.seg-na input:checked + span { background: var(--muted); color: #fff; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.big-check { font-size: 1rem; }
.big-check input { width: 1.4rem; height: 1.4rem; }
.num-input { width: 100%; font-variant-numeric: tabular-nums; text-align: right; }
.alert-row .num-input { border-color: var(--danger); }
.control-line { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .35rem 0; }
@media (max-width: 560px) {
  .control-row { grid-template-columns: 1fr; }
}

/* Éditeur de modèles de contrôle */
.ctrl-items { display: flex; flex-direction: column; gap: .5rem; }
.ctrl-item { border: 1px solid var(--border); border-radius: 10px; padding: .6rem; background: var(--card-2); display: flex; flex-direction: column; gap: .4rem; }
.ctrl-item-main, .ctrl-item-extra { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.ctrl-item-main .ctrl-section { flex: 0 1 9rem; }
.ctrl-item-main .ctrl-label { flex: 1 1 14rem; }
.ctrl-item-main select { flex: 0 1 11rem; }
.ctrl-item-extra input { flex: 1 1 7rem; font-size: .85rem; }
.ctrl-item-extra .ctrl-help { flex: 3 1 14rem; }
.ctrl-tools { display: flex; gap: .15rem; margin-left: auto; }
.icon-btn.danger { color: var(--danger); }
.order-btns .btn { padding: .1rem .45rem; line-height: 1; }

/* Signature */
.sig-wrap { position: relative; border: 2px dashed var(--border); border-radius: var(--radius); background: #fff; touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 240px; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #9aa69e; pointer-events: none; font-size: .95rem; }
.sig-clear { position: absolute; right: .5rem; bottom: .5rem; }
.sig-wrap .sig-clear { background: #f0f3f0; border-color: #dbe1dc; color: #1f2421; }
.signature-preview { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .5rem; display: inline-block; }
.signature-preview img { display: block; max-width: 280px; max-height: 120px; }

/* Avis, agenda, aperçus */
.review-box { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: .75rem; }
.stars { color: var(--border); letter-spacing: .1em; font-size: 1.05rem; }
.stars .on { color: #f5b301; }
.review-card .stars { margin-bottom: .3rem; }
.agenda-event .ev-main { flex: 1; min-width: 0; }
.agenda-event .ev-itv { flex: 0 0 auto; align-self: center; }
.leaflet-popup-content a.map-pop-link { color: #2f6b2d; text-decoration: none; }
.leaflet-popup-content a.map-pop-link:hover { text-decoration: underline; }
.combo { position: relative; width: 100%; }
label > .combo, label .row > .combo { margin-top: .3rem; }
.combo-native { display: none !important; }
.combo .combo-input { padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; text-overflow: ellipsis; }
.combo-list { position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: .25rem; min-width: 220px; }
.combo-opt { padding: .5rem .65rem; border-radius: 7px; cursor: pointer; font-size: .95rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-opt.empty { color: var(--muted); font-style: italic; }
.combo-opt.selected { font-weight: 700; color: var(--accent); }
.combo-opt.active, .combo-opt:hover { background: var(--card-2); }
.combo-none { padding: .5rem .65rem; color: var(--muted); font-size: .85rem; }
.combo-opt.new { color: var(--accent); font-weight: 600; border-top: 1px solid var(--border); border-radius: 0; margin-top: .15rem; white-space: normal; }
.map-locate-btn { width: 34px; height: 34px; border: 2px solid rgba(0, 0, 0, .2); border-radius: 4px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.map-locate-btn span { width: 12px; height: 12px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.map-locate-btn:hover { background: #f4f4f4; }
.svc-row { border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; background: var(--card-2); display: flex; flex-direction: column; gap: .5rem; }
.svc-main { display: flex; gap: .6rem 1rem; flex-wrap: wrap; align-items: flex-end; }
.svc-main label:first-child { flex: 1 1 240px; }
.svc-tools { display: flex; gap: .4rem; justify-content: flex-end; align-items: center; }
.svc-tools [data-svc-up] svg, .svc-tools [data-svc-down] svg { transform: rotate(90deg); }
.member-hours { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.member-row { border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem; background: var(--card-2); }
.member-row .member-times { margin-top: .5rem; }
.agenda-views { display: flex; gap: .25rem; padding: .25rem; border-radius: 10px; background: var(--card-2); border: 1px solid var(--border); width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: .75rem; }
.ag-view { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: .88rem; padding: .4rem .8rem; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.ag-view.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.agenda-filters { display: flex; gap: .5rem 1rem; align-items: center; flex-wrap: wrap; margin: -.4rem 0 1rem; }
.agenda-filters select { width: auto; min-width: 180px; padding: .4rem .6rem; font-size: .9rem; }
.ag-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--muted); vertical-align: -1px; margin-right: .25rem; }
.ag-dot.ev { background: var(--accent); }
.ag-person { white-space: nowrap; }
a.agenda-event.itv { color: var(--text); text-decoration: none; background: var(--card-2); cursor: pointer; align-items: flex-start; }
a.agenda-event.itv .pill { align-self: center; background: transparent; }
.ag-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.ag-dow { font-size: .75rem; font-weight: 700; color: var(--muted); text-align: center; padding: .2rem 0; text-transform: capitalize; }
.ag-cell { display: flex; flex-direction: column; gap: 2px; align-items: stretch; min-height: 92px; padding: .3rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.ag-cell.other { opacity: .45; }
.ag-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ag-num { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: .8rem; }
.ag-add, .ag-add-day { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); background: var(--card-2); color: var(--accent); font-weight: 800; font-size: .95rem; line-height: 1; cursor: pointer; text-transform: none; }
.ag-add:hover, .ag-add-day:hover, .ag-add:focus-visible, .ag-add-day:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; }
.agenda-day h3 { display: flex; align-items: center; gap: .4rem; }
.ag-add-day { margin-left: auto; }
@media (hover: hover) { .ag-cell .ag-add { opacity: 0; } .ag-cell:hover .ag-add, .ag-cell .ag-add:focus-visible { opacity: 1; } }
.ag-chip { display: block; font-size: .68rem; line-height: 1.25; padding: 1px 4px; border-radius: 4px; border-left: 3px solid var(--accent); background: var(--card-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-chip.itv { border-left-color: var(--muted); }
.ag-more { font-size: .68rem; color: var(--muted); font-weight: 700; }
.ag-team-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.ag-team { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .82rem; }
.ag-team th, .ag-team td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: .35rem; vertical-align: top; text-align: left; }
.ag-team thead th { background: var(--card-2); font-size: .75rem; text-transform: capitalize; }
.ag-team thead th.today { color: var(--accent); }
.ag-team tbody th { background: var(--card-2); white-space: nowrap; }
.ag-team-itv { display: block; padding: .2rem .35rem; margin-bottom: 3px; border-radius: 6px; border-left: 3px solid var(--accent); background: var(--card-2); color: var(--text); text-decoration: none; font-size: .74rem; line-height: 1.3; }
.ag-team-total { font-weight: 800; font-size: .74rem; color: var(--muted); }
.ag-team-sum { font-weight: 800; white-space: nowrap; }
@media (max-width: 640px) { .ag-cell { min-height: 64px; } .ag-chip { font-size: .6rem; } }
.mail-preview { background: #fff; color: #1f2421; overflow-x: auto; }

/* Impression */
@media print {
  .topbar, .tabbar, .help-fab, .drawer, .pwa-banner, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  body.has-user .main { padding: 0; }
  .card { border: 0; padding: 0; }
}

/* Choix d'heure (pas de 5 minutes) */
.time-pick { display: inline-flex; align-items: center; gap: .3rem; }
.time-pick select { width: auto; min-width: 4.4em; padding-right: 1.6rem; }
.time-pick b { font-weight: 700; }
label > .time-pick { margin-top: .3rem; }

/* Appareil photo intégré */
html.cam-open { overflow: hidden; }
.cam-overlay { position: fixed; inset: 0; z-index: 1000; background: #000; color: #fff; display: flex; flex-direction: column; }
.cam-overlay[hidden] { display: none; }
.cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.on { animation: camFlash .35s ease-out; }
@keyframes camFlash { from { opacity: .85; } to { opacity: 0; } }
.cam-msg { position: absolute; left: 1rem; right: 1rem; top: 40%; transform: translateY(-50%); background: rgba(0, 0, 0, .75); border-radius: 12px; padding: 1rem 1.2rem; text-align: center; line-height: 1.5; }
.cam-top, .cam-bar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: max(.8rem, env(safe-area-inset-top)) 1rem .8rem; }
.cam-top { background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.cam-bar { margin-top: auto; padding: 1.2rem 1rem max(1.4rem, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.cam-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: 1.35rem; cursor: pointer; }
.cam-count { font-weight: 700; text-shadow: 0 1px 3px #000; }
.cam-shutter { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; cursor: pointer; }
.cam-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .1s; }
.cam-shutter:active span { transform: scale(.88); }
.cam-native, .cam-done { width: 96px; border: 0; background: rgba(255, 255, 255, .18); color: #fff; border-radius: 12px; padding: .55rem .4rem; font: inherit; font-size: .8rem; line-height: 1.25; cursor: pointer; }
.cam-done { font-size: .95rem; font-weight: 700; background: var(--accent, #8CC48A); color: #1F2421; }
.cam-native[hidden] { visibility: hidden; display: block; }

/* Administration : articles du site */
.article-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.article-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.article-thumb.lg { width: 160px; height: 120px; }
.article-image-edit { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }

/* Suggestion de restaurant (bas du tableau de bord) */
.lunch-tip { font-size: .85rem; color: var(--muted, #666); border-top: 1px dashed var(--border); padding-top: .6rem; }
.lunch-tip summary { cursor: pointer; list-style: none; }
.lunch-tip summary::-webkit-details-marker { display: none; }
.lunch-body { display: grid; gap: .45rem; padding: .6rem 0 .2rem; color: var(--text, inherit); }
.lunch-menu { white-space: pre-line; background: var(--bg-soft, rgba(0,0,0,.03)); border-radius: 8px; padding: .5rem .7rem; }
.lunch-actions { display: flex; gap: .4rem; flex-wrap: wrap; }


/* Bouton « œil » des champs mot de passe (pwd-eye.js) */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { width: 100%; padding-right: 2.75rem; }
.pwd-eye { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: .4rem; margin: 0; cursor: pointer; color: inherit; opacity: .6; line-height: 0; min-height: 0; box-shadow: none; }
.pwd-eye:hover, .pwd-eye:focus-visible { opacity: 1; }

/* Vidéos (interventions, articles) */
.video-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.video-tile { margin: 0; }
.video-tile video { display: block; width: 100%; max-height: 420px; border-radius: 10px; background: #000; }
.video-tile figcaption { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .35rem; }
.video-progress { height: 6px; border-radius: 6px; background: var(--border, rgba(127,127,127,.25)); overflow: hidden; margin-bottom: .4rem; }
.video-progress span { display: block; width: 0; height: 100%; background: var(--accent, #8CC48A); transition: width .2s; }
label.disabled { pointer-events: none; opacity: .5; }
