:root {
  --bg: #f3f5f9; --surface: #ffffff; --surface2: #f7f8fb; --line: #e3e7ef; --txt: #121a2c; --muted: #66708a;
  --gold: #b8902a; --gold-soft: rgba(184, 144, 42, .12); --navy: #0e1a33; --navy2: #16264a;
  --ok: #0f8a4f; --warn: #a86a00; --err: #cf3349; --ok-bg: #e4f6ec; --warn-bg: #fdf1d8; --err-bg: #fde8eb;
  --s1: #2a78d6; --s2: #eb6834; --grid: #e6e9f0; --field: #c9d1df;
  --r: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .06); --side: 250px;
}
:root[data-theme=dark] {
  --bg: #0a1120; --surface: #121c33; --surface2: #17233f; --line: #24324f; --txt: #eef2fa; --muted: #93a0bd;
  --gold: #e0bd55; --gold-soft: rgba(224, 189, 85, .14);
  --ok: #45d295; --warn: #f2bd4b; --err: #ff7a8c; --ok-bg: rgba(69, 210, 149, .13); --warn-bg: rgba(242, 189, 75, .13); --err-bg: rgba(255, 122, 140, .13);
  --s1: #3987e5; --s2: #d95926; --grid: #22304c; --field: #364768;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--txt); font: 13.5px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h2 { margin: 0; font-size: 1.3rem; font-weight: 650; letter-spacing: -.01em; } h3 { margin: 0 0 .8rem; font-size: .98rem; font-weight: 650; }
p { margin: .4rem 0; } a { color: var(--gold); }
.muted { color: var(--muted); } .pos { color: var(--ok); } .neg { color: var(--err); }
.chargement { padding: 3rem; text-align: center; color: var(--muted); }
svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Structure ---------- */
.shell { display: flex; min-height: 100vh; }
aside { width: var(--side); flex: none; background: linear-gradient(180deg, var(--navy), #0a1326); color: #dfe6f5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; transition: width .18s; z-index: 30; }
.brand { display: flex; align-items: center; gap: .75rem; padding: 1.15rem 1.1rem 1rem; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font: 700 1.25rem Georgia, serif; color: #1a1400; background: linear-gradient(135deg, #f3dc8b, #c9a13a); box-shadow: 0 4px 12px rgba(201, 161, 58, .35); flex: none; }
.logo { font-weight: 800; letter-spacing: .2em; color: #e9cd75; font-size: 1rem; line-height: 1.15; white-space: nowrap; overflow: hidden; }
.logo span { display: block; font-weight: 500; letter-spacing: .1em; font-size: .62rem; color: #a9b6d3; text-transform: uppercase; }
aside nav { flex: 1; overflow-y: auto; padding: .4rem .7rem; display: flex; flex-direction: column; gap: .15rem; }
aside nav small { color: #7d8bab; text-transform: uppercase; letter-spacing: .1em; font-size: .66rem; padding: .9rem .6rem .35rem; white-space: nowrap; overflow: hidden; }
aside nav a { display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: 10px; color: #c5cfe5; text-decoration: none; font-weight: 500; white-space: nowrap; overflow: hidden; position: relative; transition: background .12s, color .12s; }
aside nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
aside nav a.on { background: rgba(233, 205, 117, .13); color: #f3dc8b; }
aside nav a.on::before { content: ""; position: absolute; left: -.7rem; top: 18%; bottom: 18%; width: 3px; border-radius: 0 3px 3px 0; background: #e9cd75; }
.side-foot { display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.who { display: flex; align-items: center; gap: .65rem; flex: 1; min-width: 0; } .who > span:last-child { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; } .who small { color: #e9cd75; }
.avatar-txt { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--navy2); border: 1px solid rgba(233, 205, 117, .5); color: #f3dc8b; font-weight: 700; font-size: .82rem; flex: none; }
aside .icon-btn { color: #c5cfe5; border-color: rgba(255, 255, 255, .12); background: transparent; }
body.nav-mini aside { width: 70px; } body.nav-mini .logo, body.nav-mini aside nav small, body.nav-mini .who > span:last-child, body.nav-mini aside nav a span { display: none; }
body.nav-mini aside nav a { justify-content: center; padding: .7rem 0; } body.nav-mini .side-foot { flex-direction: column; } body.nav-mini .brand { justify-content: center; padding-inline: 0; }
.scrim { display: none; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
header { display: flex; align-items: center; gap: .9rem; padding: .7rem 1.4rem; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.page-t { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; } .page-t small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; } .page-t b { font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-r { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--txt); cursor: pointer; flex: none; }
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }
#bell b { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--err); color: #fff; font-size: .68rem; display: grid; place-items: center; } #bell b[data-n="0"] { display: none; }
.pill { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .32rem .8rem; font-size: .8rem; font-weight: 550; background: var(--warn-bg); color: var(--warn); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; } .pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.err { background: var(--err-bg); color: var(--err); }
main { padding: 1.4rem; width: 100%; max-width: 1380px; margin: 0 auto; flex: 1; }
footer { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .7rem 1.4rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }

/* ---------- Cartes et grilles ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1.1rem; }
.grid { display: grid; gap: 1.1rem; margin-bottom: 1.1rem; } .grid > .card { margin: 0; min-width: 0; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); } .wide-l { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
.rooms { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pos.grid { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.kpi { display: flex; gap: .9rem; align-items: flex-start; transition: transform .12s, box-shadow .12s; } .kpi:hover { transform: translateY(-2px); }
.kpi-i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; } .kpi-i svg { width: 21px; height: 21px; }
.kpi-l { color: var(--muted); font-size: .78rem; font-weight: 550; } .kpi-v { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; } .kpi-s { color: var(--muted); font-size: .8rem; }
.titre { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; } .titre h3 { margin: 0; }

/* ---------- Boutons, badges, onglets ---------- */
.btn { font: inherit; font-weight: 550; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--line); background: var(--surface); color: var(--txt); padding: .58rem 1.1rem; border-radius: 6px; cursor: pointer; transition: border-color .12s, background .12s, transform .06s; white-space: nowrap; }
.btn:hover { border-color: var(--gold); } .btn:active { transform: translateY(1px); } .btn.sm { padding: .34rem .75rem; font-size: .84rem; border-radius: 5px; }
.btn.gold { background: linear-gradient(180deg, #ecd27c, #c9a13a); color: #1c1500; border-color: #c09a36; box-shadow: 0 2px 8px rgba(201, 161, 58, .3); } .btn.gold:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; } .btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); } .btn.danger:hover { background: var(--err-bg); border-color: var(--err); }
.acts { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .6rem; border-radius: 5px; font-size: .76rem; font-weight: 600; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.err { background: var(--err-bg); color: var(--err); } .badge.gold { background: var(--gold-soft); color: var(--gold); }
.tabs { display: inline-flex; gap: .2rem; margin-bottom: 1.1rem; padding: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; max-width: 100%; overflow-x: auto; }
.tab { font: inherit; font-weight: 550; background: none; border: 0; color: var(--muted); padding: .45rem 1rem; cursor: pointer; border-radius: 9px; white-space: nowrap; }
.tab:hover { color: var(--txt); } .tab.on { background: var(--navy); color: #f3dc8b; } :root[data-theme=dark] .tab.on { background: var(--gold-soft); }

/* ---------- Tableaux ---------- */
.tbl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .7rem; } .tbl-tools select { width: auto; max-width: 190px; height: 42px; padding: 0 1.8rem 0 1rem; border-radius: 24px; cursor: pointer; }
.gsearch { position: relative; flex: 1 1 260px; max-width: 460px; height: 42px; display: flex; align-items: center; border: 1px solid var(--field); border-radius: 24px; background: var(--surface); transition: box-shadow .15s, border-color .15s; }
:root[data-theme=dark] .gsearch { background: var(--surface2); }
.gsearch:hover, .gsearch:focus-within { border-color: transparent; box-shadow: 0 1px 6px rgba(32, 33, 36, .28); } :root[data-theme=dark] .gsearch:hover, :root[data-theme=dark] .gsearch:focus-within { box-shadow: 0 1px 8px rgba(0, 0, 0, .6); border-color: var(--field); }
.gsearch > svg { position: absolute; left: 15px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.gsearch input { height: 100%; border: 0; background: transparent; box-shadow: none !important; padding: 0 2.6rem 0 2.8rem; border-radius: 24px; font-size: .95rem; }
.gs-x { position: absolute; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; } .gs-x:hover { background: var(--surface2); color: var(--txt); }
.gsearch.ouvert { border-radius: 21px 21px 0 0; border-color: transparent; box-shadow: 0 1px 6px rgba(32, 33, 36, .28); }
.gs-sug { position: absolute; top: 100%; left: -1px; right: -1px; z-index: 12; background: var(--surface); border-radius: 0 0 21px 21px; box-shadow: 0 4px 6px rgba(32, 33, 36, .28); padding: 0 0 .5rem; overflow: hidden; } :root[data-theme=dark] .gs-sug { background: var(--surface2); }
.gs-sug::before { content: ""; display: block; height: 1px; margin: 0 14px .3rem; background: var(--line); }
.gs-sug button { font: inherit; display: flex; align-items: center; gap: .8rem; width: 100%; padding: .42rem 1rem; border: 0; background: none; color: var(--txt); text-align: left; cursor: pointer; } .gs-sug button:hover { background: var(--surface2); } :root[data-theme=dark] .gs-sug button:hover { background: var(--surface); }
.gs-sug svg { width: 15px; height: 15px; color: var(--muted); } .gs-sug span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); } .gs-sug b { color: var(--txt); } .tbl-tools select:has(option:checked:not([value=""])) { border-color: var(--gold); color: var(--gold); font-weight: 600; } .tbl-n { margin-left: auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.tablewrap { overflow-x: auto; margin: 0 -.3rem; } table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding: .55rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
th:hover { color: var(--txt); } th[data-dir=asc]::after { content: " ↑"; } th[data-dir=desc]::after { content: " ↓"; }
td { padding: .62rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; } tbody tr:last-child td { border-bottom: 0; } tbody tr:hover { background: var(--surface2); }
.vide { padding: 1.2rem 0; text-align: center; }
.avatar { display: inline-block; width: 34px; height: 34px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line); object-fit: cover; vertical-align: middle; }

.avatar.lg { width: 64px; height: 64px; flex: none; } .avatar-txt img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.emp-fiche { display: flex; gap: .9rem; align-items: center; padding: .8rem; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); }
.niveau { display: flex; align-items: baseline; gap: .7rem; margin: 1.3rem 0 .8rem; } .niveau:first-of-type { margin-top: 0; } .niveau h3 { margin: 0; font-size: 1.05rem; } .niveau span { color: var(--muted); font-size: .85rem; }

/* ---------- Chambres ---------- */
.room { display: flex; flex-direction: column; gap: .3rem; position: relative; overflow: hidden; --s: var(--muted); transition: transform .12s; } .room:hover { transform: translateY(-2px); }
.room::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--s); }
.room[data-s=Libre] { --s: var(--ok); } .room[data-s="Occupé"] { --s: var(--gold); } .room[data-s=Nettoyage] { --s: var(--warn); } .room[data-s="Hors service"] { --s: var(--err); } .room.off { opacity: .6; }
.room-h { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; } .room .acts { margin-top: auto; padding-top: .6rem; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ok); } .timer.big { font-size: 2rem; text-align: center; padding: .5rem 0; margin: .3rem 0; border-radius: 10px; background: var(--surface2); letter-spacing: .02em; }
.timer.warn { color: var(--warn); } .timer.over { color: var(--err); } .timer.big.over { font-size: 1.15rem; }
.alerte { display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; border-radius: 10px; background: var(--warn-bg); color: var(--warn); margin-bottom: .5rem; text-decoration: none; font-weight: 500; }
.alerte.err { background: var(--err-bg); color: var(--err); }
.alerte.evt { background: linear-gradient(90deg, #ecd27c, #c9a13a); color: #1c1500; font-weight: 700; }
.card.pulse { animation: clignote 1.1s ease-in-out infinite; }
.imp { font: inherit; display: flex; flex-direction: column; gap: .15rem; width: 100%; text-align: left; padding: .7rem .9rem; margin-top: .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface2); color: var(--txt); cursor: pointer; } .imp:hover { border-color: var(--gold); } .imp span { color: var(--muted); font-size: .86rem; }
.imp-btn svg { width: 15px; height: 15px; } @media (max-width: 620px) { .imp-btn span { display: none; } }
@keyframes clignote { 50% { border-color: #c9a13a; box-shadow: 0 0 0 4px #c9a13a; } }
@media (prefers-reduced-motion: reduce) { .card.pulse { animation: none; border-color: #c9a13a; box-shadow: 0 0 0 3px #c9a13a; } }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .55; }

/* ---------- Calendrier ---------- */
.cal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; } .cal-j { text-align: center; color: var(--muted); font-size: .72rem; font-weight: 600; }
.cal-c { font: inherit; font-weight: 550; position: relative; aspect-ratio: 1.3; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--txt); cursor: pointer; transition: border-color .12s; }
.cal-c:hover { border-color: var(--gold); } .cal-c i { position: absolute; top: 2px; right: 5px; font-size: .55rem; font-style: normal; color: var(--muted); }
.cal-c.auj { box-shadow: 0 0 0 2px var(--txt) inset; } .cal-c.pris { background: linear-gradient(180deg, #ecd27c, #c9a13a); color: #1c1500; border-color: #c09a36; } .cal-c.pris i { color: #5c4a10; } .cal-c.devis { border: 1.5px dashed var(--gold); color: var(--gold); }
.legende { font-size: .8rem; margin-top: .7rem; } .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 .25rem 0 .5rem; } .dot.pris { background: #c9a13a; } .dot.devis { border: 1.5px dashed var(--gold); }

/* ---------- Bar ---------- */
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
.prod { font: inherit; display: flex; flex-direction: column; gap: .15rem; text-align: left; padding: .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--txt); cursor: pointer; transition: border-color .12s, transform .08s; }
.prod:hover { border-color: var(--gold); transform: translateY(-2px); } .prod span { color: var(--gold); font-weight: 700; font-size: 1.05rem; } .prod small { color: var(--muted); } .prod.rupture { opacity: .45; cursor: not-allowed; }
.ligne { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.35rem; padding: .9rem 0; } .total b { color: var(--gold); }

/* ---------- Graphiques ---------- */
.chart { position: relative; } .chart svg { width: 100%; height: auto; display: block; } .chart text { fill: var(--muted); font-size: 11px; }
.chart .gridl { stroke: var(--grid); stroke-width: 1; } .chart .col:hover .hit { fill: var(--surface2); } .chart .hit { fill: transparent; }
.legend { display: flex; gap: 1rem; font-size: .82rem; color: var(--muted); margin-bottom: .4rem; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; }
.tip { position: absolute; pointer-events: none; background: var(--navy); color: #fff; padding: .45rem .7rem; border-radius: 8px; font-size: .8rem; line-height: 1.45; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: var(--shadow); display: none; z-index: 5; }
.hbar { display: grid; grid-template-columns: 110px 1fr auto; gap: .7rem; align-items: center; padding: .38rem 0; font-size: .9rem; } .hbar b { font-variant-numeric: tabular-nums; }
.track { height: 10px; border-radius: 5px; background: var(--surface2); overflow: hidden; } .track > i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; }
.meter { margin: .7rem 0; } .meter-h { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: .3rem; } .meter .track > i { background: var(--gold); }

/* ---------- Formulaires et modales ---------- */
label.inline { color: var(--muted); font-size: .88rem; font-weight: 550; }
input, select, textarea { font: inherit; font-size: .92rem; width: 100%; padding: .46rem .7rem; border-radius: 6px; border: 1px solid var(--field); background: var(--surface); color: var(--txt); transition: border-color .12s, box-shadow .12s; color-scheme: light; }
:root[data-theme=dark] input, :root[data-theme=dark] select, :root[data-theme=dark] textarea { color-scheme: dark; background: var(--surface2); }
label.inline > input { width: auto; margin-left: .35rem; } input[type=checkbox] { width: 17px; height: 17px; accent-color: #c9a13a; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.money, .tel, .datef { display: flex; position: relative; border: 1px solid var(--field); border-radius: 6px; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
:root[data-theme=dark] .money, :root[data-theme=dark] .tel, :root[data-theme=dark] .datef { background: var(--surface2); }
.money:focus-within, .tel:focus-within, .datef:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.money input, .money select, .tel > input, .datef > input { border: 0; background: transparent; box-shadow: none !important; min-width: 0; }
.money input { flex: 1; font-weight: 650; font-variant-numeric: tabular-nums; } .money input[readonly] { color: var(--muted); }
.money select { width: auto; flex: none; border-left: 1px solid var(--field); border-radius: 0 5px 5px 0; font-weight: 650; color: var(--gold); cursor: pointer; }
.eq { font-variant-numeric: tabular-nums; }
.datef > input { flex: 1; font-variant-numeric: tabular-nums; } .datef > input::placeholder { color: var(--muted); opacity: .55; letter-spacing: .04em; }
.date-btn { display: grid; place-items: center; padding: 0 .6rem; border: 0; border-left: 1px solid var(--field); background: transparent; color: var(--muted); cursor: pointer; border-radius: 0 5px 5px 0; } .date-btn:hover { color: var(--gold); background: var(--surface2); } .date-btn svg { width: 16px; height: 16px; }
label.inline .datef { display: inline-flex; width: 158px; vertical-align: middle; margin-left: .35rem; } label.inline .datef input { margin: 0; width: 100%; }
.sel-btn { font: inherit; font-size: .92rem; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .46rem .7rem; border-radius: 6px; border: 1px solid var(--field); background: var(--surface); color: var(--txt); cursor: pointer; text-align: left; transition: border-color .12s, box-shadow .12s; }
:root[data-theme=dark] .sel-btn { background: var(--surface2); } .sel-btn:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.sel-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sel-btn .ph { color: var(--muted); opacity: .55; letter-spacing: .02em; } .sel-btn i { font-style: normal; color: var(--muted); font-size: .7rem; }
.selp .dp-h { padding: .7rem .9rem; } .selp .dp-h b { text-align: left; text-transform: none; font-size: 1.02rem; letter-spacing: .01em; }
.sel-l { padding: .35rem; max-height: 250px; overflow-y: auto; } .sel-l button { font: inherit; font-size: .88rem; display: block; width: 100%; text-align: left; padding: .45rem .6rem; border: 0; border-radius: 6px; background: transparent; color: #121a2c; cursor: pointer; }
.sel-l button:hover { background: #eef1f7; } .sel-l button.sel { background: linear-gradient(180deg, #ecd27c, #c9a13a); color: #1c1500; font-weight: 700; }
.dp { position: fixed; z-index: 90; width: 286px; border-radius: 12px; overflow: hidden; background: #fff; color: #121a2c; border: 1px solid var(--line); box-shadow: 0 18px 46px rgba(8, 14, 28, .32); animation: pop .14s; }
.dp-h { display: flex; align-items: center; gap: .15rem; padding: .6rem .5rem; background: linear-gradient(135deg, #1a2b55, #0e1a33); color: #fff; } .dp-h b { flex: 1; text-align: center; text-transform: capitalize; font-size: .95rem; }
.dp-h button { font: inherit; font-size: 1.05rem; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #e9cd75; cursor: pointer; } .dp-h button:hover { background: rgba(255, 255, 255, .14); }
.dp-b { padding: .6rem .7rem .7rem; background: #fff; } .dp-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; } .dp-j span { text-align: center; font-size: .7rem; font-weight: 700; color: #66708a; padding: .2rem 0 .35rem; }
.dp-g button { font: inherit; font-size: .88rem; aspect-ratio: 1; border: 0; border-radius: 6px; background: transparent; color: #121a2c; cursor: pointer; } .dp-g button:hover { background: #eef1f7; }
.dp-g button.auj { box-shadow: 0 0 0 1.5px #1a2b55 inset; font-weight: 700; } .dp-g button.sel { background: linear-gradient(180deg, #ecd27c, #c9a13a); color: #1c1500; font-weight: 700; }
.dp-f { display: flex; justify-content: space-between; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid #e3e7ef; } .dp-f button { font: inherit; font-size: .84rem; font-weight: 600; border: 0; background: none; color: #1a2b55; cursor: pointer; padding: .2rem .4rem; border-radius: 5px; } .dp-f button:hover { background: #eef1f7; }
.tel > input { flex: 1; } .tel-btn { font: inherit; font-weight: 600; display: flex; align-items: center; gap: .4rem; padding: 0 .65rem; border: 0; border-right: 1px solid var(--field); background: transparent; color: var(--txt); cursor: pointer; border-radius: 5px 0 0 5px; white-space: nowrap; }
.tel-btn:hover { background: var(--surface2); } .tel-btn i { font-style: normal; color: var(--muted); font-size: .7rem; }
.flag { width: 22px; height: 16px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); } .flag-e { width: 22px; text-align: center; flex: none; font-size: .95rem; line-height: 1; }
.tel-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 10; width: min(320px, 86vw); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); padding: .5rem; }
.tel-list > div { max-height: 240px; overflow-y: auto; margin-top: .4rem; }
.tel-list button { font: inherit; width: 100%; display: flex; align-items: center; gap: .6rem; padding: .42rem .5rem; border: 0; background: none; color: var(--txt); border-radius: 8px; cursor: pointer; text-align: left; }
.tel-list button:hover { background: var(--surface2); } .tel-list button span:not(.flag-e) { flex: 1; } .tel-list button b { color: var(--muted); font-weight: 600; } .tel-list button[hidden] { display: none; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; } .field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; } .field small { display: block; color: var(--muted); font-size: .76rem; margin-top: .25rem; }
.field label.check { display: flex; gap: .55rem; align-items: center; color: var(--txt); font-size: .93rem; font-weight: 500; margin: 0; }
.ferr { color: var(--err); min-height: 1.2em; margin: .6rem 0 0; font-weight: 500; }
.overlay { position: fixed; inset: 0; background: rgba(8, 14, 28, .55); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 1rem; overflow-y: auto; z-index: 50; animation: fade .15s; }
.modal { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid #c9a13a; border-radius: 16px; width: min(540px, 100%); box-shadow: 0 24px 70px rgba(0, 0, 0, .35); animation: pop .18s; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); } .modal-h h3 { margin: 0; font-size: 1.05rem; }
.modal-b { padding: 1.3rem; } .modal-f { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .7rem; }
.x { background: none; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 8px; width: 32px; height: 32px; } .x:hover { background: var(--surface2); color: var(--txt); }
.preuve { max-width: 100%; border-radius: 10px; } .sql { font: 12px/1.4 Consolas, monospace; margin-top: .7rem; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 1fr); }
.login-art { background: radial-gradient(circle at 20% 15%, #24396b, transparent 55%), linear-gradient(160deg, var(--navy), #070d1c); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font: 600 2.4rem/1.15 Georgia, serif; margin: 0 0 1rem; max-width: 12em; } .login-art h1 em { color: #e9cd75; font-style: normal; } .login-art p { color: #b9c5e0; max-width: 30em; }
.login-art ul { list-style: none; padding: 0; margin: 0; display: flex; gap: .5rem; flex-wrap: wrap; } .login-art li { border: 1px solid rgba(233, 205, 117, .4); color: #e9cd75; border-radius: 999px; padding: .25rem .8rem; font-size: .8rem; }
.login-art p.login-sign { margin-top: 1.6rem; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: #8e9bbb; } .login-sign b { color: #e9cd75; font-weight: 700; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.login-card { width: min(390px, 100%); display: flex; flex-direction: column; gap: .9rem; box-shadow: none; border: 0; background: none; padding: 0; margin: 0; } .login-card h2 { font-size: 1.5rem; } .login-card .btn { margin-top: .3rem; padding: .7rem; }
#toasts { position: fixed; right: 1.2rem; bottom: 1.2rem; display: flex; flex-direction: column; gap: .5rem; z-index: 80; max-width: min(380px, 90vw); }
.toast { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ok); padding: .75rem 1rem; border-radius: 10px; box-shadow: var(--shadow); animation: pop .18s; }
.toast.err { border-left-color: var(--err); } .toast.warn { border-left-color: var(--warn); }
#print { display: none; }

@media (max-width: 900px) {
  aside { position: fixed; left: 0; top: 0; transform: translateX(calc(-100% - 16px)); transition: transform .2s; width: var(--side) !important; }
  body.nav-open aside { transform: none; } body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8, 14, 28, .5); z-index: 25; }
  .wide-l, .pos.grid { grid-template-columns: 1fr; } .login { grid-template-columns: 1fr; } .login-art { display: none; }
  header { padding: .6rem .9rem; } main { padding: .9rem; } #sync { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 620px) { .fields { grid-template-columns: 1fr; } .page-t small { display: none; } #sync { font-size: 0; gap: 0; padding: .5rem; } .hdr-r { flex: none; } .hbar { grid-template-columns: 84px 1fr auto; } }

@media print {
  body { background: #fff; color: #000; font-size: 12px; }
  aside, header, footer, #toasts, .overlay, .btn, .tabs, .acts, .tbl-tools, .scrim { display: none !important; }
  main { padding: 0; max-width: none; } .card { box-shadow: none; border: 1px solid #bbb; background: #fff; break-inside: avoid; }
  .muted, .kpi-l, .kpi-s, th { color: #333; } td, th { border-bottom: 1px solid #ccc; } .badge { color: #000; background: none; border: 1px solid #999; }
  body.print-doc #app { display: none; } body.print-doc #print { display: block; }
  @page { size: A4; margin: 18mm 15mm; }
  .doc { font-size: 13px; width: 100%; max-width: 150mm; margin: 0 auto; text-align: center; }
  .doc-h { display: flex; flex-direction: column; align-items: center; gap: 4px; border-bottom: 3px solid #b8962e; padding-bottom: 12px; margin-bottom: 20px; text-align: center; }
  .doc-logo { font-size: 28px; font-weight: 800; letter-spacing: .2em; color: #1b2a4a; } .doc h1 { font-size: 20px; margin: 0 0 8px; } .doc h2 { font-size: 14px; margin: 18px 0 6px; }
  .doc table { margin: 12px auto; width: 100%; } .doc td, .doc th { text-align: left; }
  .doc.large { max-width: none; } .doc.large table { font-size: 11px; } .doc.large td, .doc.large th { padding: 5px 6px; border-bottom: 1px solid #ccc; vertical-align: top; }
  .doc.large thead { display: table-header-group; } .doc.large thead th { border-bottom: 2px solid #1b2a4a; color: #1b2a4a; text-transform: none; letter-spacing: 0; font-size: 11px; white-space: normal; }
  .doc.large tr { break-inside: avoid; } .doc.large .solde { text-align: right; margin-top: 6px; } .doc td, .doc th { padding: 6px 8px; color: #000; } .doc .r { text-align: right; } .doc .tot td { font-weight: 700; border-top: 2px solid #000; }
  .doc .solde { margin-top: 14px; font-size: 14px; } .signatures { display: flex; justify-content: space-between; margin-top: 60px; }
}

/* ---------- Finitions modernes ---------- */
body { background: radial-gradient(1100px 460px at 88% -12%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 62%), var(--bg); background-attachment: fixed; }
::selection { background: color-mix(in srgb, var(--gold) 35%, transparent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
.card { border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .05); }
:root[data-theme=dark] .card { box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .22); }
main.entre > * { animation: monte .26s cubic-bezier(.2, .7, .2, 1) both; }
main.entre > *:nth-child(2) { animation-delay: .04s; } main.entre > *:nth-child(3) { animation-delay: .08s; } main.entre > *:nth-child(n+4) { animation-delay: .12s; }
@keyframes monte { from { opacity: 0; transform: translateY(10px); } }

.hero { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding: 1.3rem 1.5rem; margin-bottom: 1.1rem; border-radius: 14px; color: #fff; background: radial-gradient(600px 220px at 100% 0, rgba(233, 205, 117, .22), transparent 65%), linear-gradient(135deg, #16264a, #0b1630); box-shadow: 0 10px 30px rgba(11, 22, 48, .25); }
.hero h2 { font-size: 1.45rem; color: #fff; } .hero p { margin: .25rem 0 0; color: #b9c5e0; } .hero p::first-letter { text-transform: uppercase; }
.hero-liens { display: flex; gap: .5rem; flex-wrap: wrap; }
.hero-liens a { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .8rem; border-radius: 8px; color: #fff; text-decoration: none; font-weight: 550; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); transition: background .12s, transform .12s, border-color .12s; }
.hero-liens a:hover { background: rgba(233, 205, 117, .18); border-color: #e9cd75; transform: translateY(-1px); } .hero-liens svg { width: 16px; height: 16px; color: #e9cd75; } .hero-liens svg:last-child { width: 13px; opacity: .7; }

.kpi { position: relative; overflow: hidden; } .kpi::after { content: ""; position: absolute; right: -34px; top: -34px; width: 110px; height: 110px; border-radius: 50%; background: var(--gold-soft); opacity: .55; pointer-events: none; transition: transform .25s; } .kpi:hover::after { transform: scale(1.25); }
.kpi-i { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 22%, transparent), var(--gold-soft)); }
td { font-variant-numeric: tabular-nums; } td.num, th.num { text-align: right; white-space: nowrap; } tbody tr { transition: background .1s; }
.tbl td .acts { flex-wrap: nowrap; justify-content: flex-end; }
.kebab { padding-inline: .55rem; font-weight: 700; letter-spacing: .05em; line-height: 1; }
.menu-pop { position: fixed; z-index: 95; min-width: 190px; padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 38px rgba(8, 14, 28, .28); animation: pop .12s; }
.menu-pop button { font: inherit; display: block; width: 100%; text-align: left; padding: .5rem .7rem; border: 0; border-radius: 6px; background: none; color: var(--txt); cursor: pointer; } .menu-pop button:hover { background: var(--surface2); }
.menu-pop .danger { color: var(--err); } .menu-pop .danger:hover { background: var(--err-bg); }
.vide { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.8rem 0 1.4rem; color: var(--muted); text-align: center; } .vide svg { width: 34px; height: 34px; opacity: .45; }
.toast { display: flex; align-items: flex-start; gap: .6rem; } .toast svg { margin-top: 1px; color: var(--ok); } .toast.err svg { color: var(--err); } .toast.warn svg { color: var(--warn); }
.modal { border-top: 0; overflow: hidden; } .modal-h { background: linear-gradient(135deg, #16264a, #0e1a33); border-bottom: 0; } .modal-h h3 { color: #fff; } .modal-h .x { color: #c5cfe5; } .modal-h .x:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 22; display: flex; padding: .25rem .25rem calc(.25rem + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .35rem 0; font: inherit; font-size: .66rem; font-weight: 600; color: var(--muted); text-decoration: none; border: 0; background: none; border-radius: 8px; cursor: pointer; }
  .tabbar a.on { color: var(--gold); } .tabbar svg { width: 20px; height: 20px; }
  main { padding-bottom: 5.2rem; } footer { display: none; } #toasts { bottom: 4.8rem; }
  .overlay { align-items: flex-end; padding: 0; } .modal { width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; animation: feuille .24s cubic-bezier(.2, .7, .2, 1); }
  .hero { padding: 1.1rem; } .hero h2 { font-size: 1.2rem; }
}
@keyframes feuille { from { transform: translateY(60px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { main.entre > *, .modal, .menu-pop, .toast, .overlay { animation: none !important; } }
@media print { .tabbar, .menu-pop, .hero-liens, .kebab { display: none !important; } body { background: #fff; } }
/* ---------- Téléphones et tablettes (Android, iOS) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, label, select, .sel-btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.shell, .login { min-height: 100vh; min-height: 100dvh; } aside { height: 100vh; height: 100dvh; }
header { -webkit-backdrop-filter: blur(10px); } .overlay { -webkit-backdrop-filter: blur(4px); }
img, svg { max-width: 100%; }
@media (hover: none) { .kpi:hover, .room:hover, .prod:hover, .hero-liens a:hover { transform: none; } }

@media (max-width: 900px) {
  header { padding-top: max(.6rem, env(safe-area-inset-top)); padding-left: max(.9rem, env(safe-area-inset-left)); padding-right: max(.9rem, env(safe-area-inset-right)); }
  aside { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  main { padding-left: max(.9rem, env(safe-area-inset-left)); padding-right: max(.9rem, env(safe-area-inset-right)); padding-bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
  .tabbar { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); -webkit-backdrop-filter: blur(12px); }
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .login-art { display: flex; gap: 1.2rem; padding: calc(1.4rem + env(safe-area-inset-top)) 1.3rem 1.4rem; } .login-art h1 { font-size: 1.5rem; margin: 0; } .login-art > span { display: none; }
  .login-side { align-items: flex-start; padding: 1.6rem 1.3rem calc(1.6rem + env(safe-area-inset-bottom)); }
  .modal { max-height: 92vh; max-height: 92dvh; }
}

@media (max-width: 640px) {
  /* 16px minimum : en dessous, iOS zoome sur le champ dès qu'on le touche. */
  input, select, textarea, .sel-btn, .gsearch input, .money input, .money select, .tel > input, .datef > input { font-size: 16px; }
  .btn { min-height: 42px; } .btn.sm { min-height: 36px; padding: .4rem .8rem; } .icon-btn { width: 40px; height: 40px; }
  .card { padding: .95rem 1rem; } h2 { font-size: 1.15rem; }
  .titre > .btn.gold { flex: 1 1 100%; }
  .tabs { display: flex; width: 100%; } .tab { flex: 1 0 auto; text-align: center; }
  label.inline { display: flex; align-items: center; gap: .5rem; flex: 1 1 100%; } label.inline .datef { flex: 1; width: auto; margin: 0; } label.inline > input { flex: 1; margin: 0; }
  .titre > span { display: flex; flex-wrap: wrap; gap: .5rem; width: 100%; }

  .kpis { grid-template-columns: 1fr 1fr; gap: .7rem; } .kpi { flex-direction: column; gap: .5rem; padding: .85rem; } .kpi::after { display: none; }
  .kpi-i { width: 36px; height: 36px; } .kpi-v { font-size: 1.15rem; word-break: break-word; } .kpi-l { font-size: .74rem; }
  .hero-liens { display: none; }
  .two, .wide-l, .rooms { grid-template-columns: 1fr; }
  .chart { overflow-x: auto; -webkit-overflow-scrolling: touch; } .chart svg { min-width: 520px; }
  .cal { gap: .22rem; } .cal-c { aspect-ratio: 1; border-radius: 8px; }
  .prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Tableaux : chaque ligne devient une fiche « libellé : valeur ». */
  .tbl .tablewrap { overflow: visible; margin: 0; }
  .tbl table, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; } .tbl thead { display: none; }
  .tbl tr { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .8rem; margin-bottom: .6rem; background: var(--surface2); } .tbl tbody tr:hover { background: var(--surface2); }
  .tbl td, .tbl td.num { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .3rem 0; border: 0; text-align: right; white-space: normal; overflow-wrap: anywhere; }
  .tbl td::before { content: attr(data-l); flex: none; max-width: 45%; color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
  .tbl td[data-l=""]::before { display: none; } .tbl td[data-l=""] { justify-content: flex-end; } .tbl td:empty { display: none; }
  .tbl td .acts { flex-wrap: wrap; justify-content: flex-end; }
  .tbl-tools { flex-wrap: wrap; } .gsearch { flex: 1 1 100%; max-width: none; } .tbl-tools select { flex: 1 1 40%; max-width: none; } .tbl-n { width: 100%; text-align: right; margin: 0; }
  .gs-sug button { padding: .6rem 1rem; }

  .modal-b { padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); } .modal-f { position: sticky; bottom: calc(-1rem - env(safe-area-inset-bottom)); margin: .8rem -1rem calc(-1rem - env(safe-area-inset-bottom)); padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); } .modal-f .btn { flex: 1; }
  .dp { width: min(300px, calc(100vw - 16px)); } .dp-g button { min-height: 36px; } .sel-l button { padding: .65rem .7rem; font-size: 1rem; } .tel-list button { padding: .6rem .5rem; }
  .menu-pop button { padding: .7rem .8rem; } .imp { padding: .85rem .9rem; }
  #toasts { left: .8rem; right: .8rem; max-width: none; bottom: calc(4.8rem + env(safe-area-inset-bottom)); }
  .emp-fiche { flex-wrap: wrap; }
}

@media (max-width: 360px) { .kpis { grid-template-columns: 1fr; } .tabbar a span, .tabbar button span { font-size: .6rem; } }
/* Téléphone tenu à l'horizontale : on gagne de la hauteur. */
@media (orientation: landscape) and (max-height: 480px) { .tabbar span { display: none; } .tabbar a, .tabbar button { padding: .25rem 0; } main { padding-bottom: 3.6rem; } .modal { max-height: 100vh; max-height: 100dvh; border-radius: 0; } .login-art { display: none; } }
/* ---------- Écran de connexion : mise en page fluide ---------- */
.login-side { background: var(--bg); padding: clamp(1.2rem, 4vw, 3rem); }
.login-card { display: block; width: min(420px, 100%); margin: 0; padding: clamp(1.4rem, 4.5vw, 2.4rem); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(16, 24, 40, .10); }
:root[data-theme=dark] .login-card { box-shadow: 0 18px 48px rgba(0, 0, 0, .4); }
.login-card h2 { margin: 0; font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem); line-height: 1.2; letter-spacing: -.01em; text-align: left; }
.login-intro { margin: .45rem 0 1.5rem; color: var(--muted); line-height: 1.5; font-size: .95rem; }
.login-card .field { margin-bottom: 1.05rem; } .login-card .field label { font-size: .84rem; margin-bottom: .35rem; }
.login-card input { padding: .72rem .85rem; font-size: 1rem; }
.pw { position: relative; } .pw input { padding-right: 5.6rem; }
.pw button { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); padding: .35rem .55rem; border: 0; border-radius: 6px; background: none; color: var(--gold); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; } .pw button:hover { background: var(--gold-soft); }
.login-card .ferr { min-height: 0; margin: 0 0 1rem; padding: .6rem .8rem; border-radius: 8px; background: var(--err-bg); font-size: .9rem; } .login-card .ferr:empty { display: none; }
.login-card .btn { width: 100%; margin: .3rem 0 0; padding: .8rem; font-size: 1rem; min-height: 46px; } .login-card .btn:disabled { opacity: .65; cursor: progress; }
.login-lien { margin: 1rem 0 0; text-align: center; font-size: .88rem; } .login-lien:empty { display: none; }
.login-lien button { border: 0; background: none; color: var(--gold); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: .3rem; }
/* Champs remplis automatiquement par le navigateur : on garde les couleurs de l'application au lieu du fond bleu. */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 100px var(--surface) inset; -webkit-text-fill-color: var(--txt); caret-color: var(--txt); transition: background-color 9999s; }
:root[data-theme=dark] input:-webkit-autofill, :root[data-theme=dark] input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 100px var(--surface2) inset; }
@media (max-width: 900px) {
  .login-side { align-items: flex-start; justify-content: center; padding: 0 1rem calc(2rem + env(safe-area-inset-bottom)); }
  .login-card { width: min(460px, 100%); margin-top: -1.1rem; }
  .login-art { padding-bottom: 2.4rem; }
}