/* ED CONSULT en ligne — nouveau style (maquette validée le 2026-11-12, couleur bordeaux du cabinet).
   Chargé après app.css : on change les couleurs et l'habillage, jamais l'organisation des écrans. */
:root {
  --ground: #f5f2f3;
  --surface: #ffffff;
  --line: #ebe4e6;
  --line-soft: #f3eef0;
  --field-edge: #e2d9dc;
  --ink: #1c1517;
  --ink-soft: #4c4246;
  --ink-faint: #6f6468;
  --accent: #8c1b2b;
  --accent-dark: #6a1220;
  --accent-2: #c23a52;
  --accent-soft: #f7e9ec;
  --accent-line: #ecd3d9;
  --side: #160a0e; --side-2: #231218; --side-3: #31181f; --side-fg: #efe4e7; --side-mute: #a08c93;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --display: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --r-card: 18px; --r-ctl: 12px;
}
body { letter-spacing: -.003em; }

/* ---------- boutons et champs ---------- */
button { border-radius: var(--r-ctl); }
button.primary { background: var(--grad); border-color: transparent; box-shadow: 0 8px 18px -10px var(--accent); }
button.primary:hover { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); border-color: transparent; }
input, select, textarea { border-radius: var(--r-ctl); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- menu de gauche sombre ---------- */
.side { background: var(--side); border-right: 0; color: var(--side-fg); padding: 20px 12px 14px; gap: 18px; }
.web-brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 0; color: var(--side-fg); font-weight: 700; letter-spacing: .02em; font-size: 15px; }
.web-brand .mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 14px; font-weight: 700; flex: none; }
.web-brand small { display: block; font-weight: 500; font-size: 11.5px; color: var(--side-mute); letter-spacing: .04em; }
.side-group { color: var(--side-mute); font-size: 10.5px; letter-spacing: .12em; }
.side-nav button { color: var(--side-fg); background: transparent; border-color: transparent; opacity: .86; font-weight: 500; }
.side-nav button svg.ico { color: inherit; }
.side-nav button:hover { background: var(--side-2); color: var(--side-fg); opacity: 1; }
.side-nav button[aria-selected="true"] { background: var(--grad); color: #fff; opacity: 1; font-weight: 700; box-shadow: 0 8px 18px -10px var(--accent-2); }
.side-nav .count { color: var(--side-mute); opacity: 1; }
.side-nav button[aria-selected="true"] .count { color: #fff; }
.side-nav .badge { background: var(--side-3); color: var(--side-fg); }
.side-nav .badge.alert { background: #e5484d; color: #fff; }
.side-nav button[aria-selected="true"] .badge { background: #fff; color: var(--accent); }
.side-user { border-top: 0; padding: 10px; border-radius: 14px; background: var(--side-2); }
.user-chip .who b { color: var(--side-fg); }
.user-chip .who span { color: var(--side-mute); }
.side-actions button { color: var(--side-mute); background: transparent; border-color: transparent; }
.side-actions button:hover { background: var(--side-3); color: var(--side-fg); }
.av { background: var(--grad); color: #fff; }
/* initiales des clients : pastille douce, comme dans la maquette */
.av.sq { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- titres et cartes ---------- */
.page-title { font-family: var(--sans); font-weight: 700; font-size: 30px; letter-spacing: -.025em; }
.page-sub, .home-hint { color: var(--ink-faint); }
.home-table-wrap, .card, .card-table, .mod-stat { border-radius: var(--r-card); border-color: var(--line); }
.mod-stat { padding: 14px 18px; }
.mod-stat b { font-size: 26px; letter-spacing: -.02em; }
.home-table th, .suivi-table th { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.home-table tbody tr:hover, .suivi-table tbody tr:hover td { background: #fbf6f7; }
.home-table th.sorted { color: var(--accent); }
.subtabs { background: var(--line-soft); border-radius: 12px; padding: 3px; }
.subtabs button { border-radius: 9px; }
.subtabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ---------- connexion : panneau sombre à gauche, formulaire à droite ---------- */
.auth-view { padding: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.web-auth-brand { background: radial-gradient(120% 90% at 0% 0%, var(--side-3), var(--side) 60%); color: var(--side-fg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; min-height: 100vh; }
.web-auth-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 48px solid rgba(194, 58, 82, .3); }
.web-auth-brand h2 { font-size: 34px; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 14px; max-width: 13ch; font-weight: 700; text-wrap: balance; }
.web-auth-brand p { color: var(--side-mute); max-width: 40ch; line-height: 1.6; margin: 0; }
.web-auth-brand ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; font-size: 13.5px; }
.web-auth-brand li::before { content: "✓"; color: var(--accent-2); font-weight: 700; margin-right: 10px; }
.web-auth-brand .ver { font-size: 12px; color: var(--side-mute); position: relative; }
.auth-card { margin: auto; border: 0; box-shadow: none; background: transparent; width: min(400px, 100%); padding: 32px 24px; }
.auth-logo { display: none; }
/* en ligne, le dossier des données est celui du serveur : rien à choisir sur l'écran de connexion */
.auth-foot { display: none !important; }
.auth-form h2 { font-family: var(--sans); font-weight: 700; font-size: 26px; letter-spacing: -.02em; text-align: left; }
.auth-form button.primary { min-height: 46px; }

/* ---------- code Google Authenticator ---------- */
.w2fa-voile { position: fixed; inset: 0; z-index: 1000; background: rgba(22, 10, 14, .55); display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.w2fa { background: var(--surface); border-radius: 22px; width: min(420px, 100%); padding: 30px 30px 22px; display: grid; gap: 14px; box-shadow: 0 30px 70px -20px rgba(22, 10, 14, .6); }
.w2fa h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.w2fa-sub { margin: -6px 0 0; color: var(--ink-faint); line-height: 1.5; }
.w2fa-etapes { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.w2fa-qr { width: 196px; height: 196px; margin: 2px auto; padding: 12px; border: 1px solid var(--line); border-radius: 16px; display: grid; place-items: center; color: var(--ink-faint); font-size: 13px; text-align: center; }
.w2fa-qr svg { width: 100%; height: 100%; display: block; }
.w2fa-cle summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.w2fa-cle p { margin: 8px 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.w2fa-cle code { display: block; padding: 10px 12px; border-radius: 10px; background: var(--line-soft); font-size: 15px; letter-spacing: .08em; word-break: break-all; user-select: all; }
.w2fa-cases { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.w2fa-cases input { height: 56px; text-align: center; font-size: 24px; font-weight: 700; padding: 0; font-variant-numeric: tabular-nums; }
.w2fa button { min-height: 46px; }
.w2fa-note { margin: 0; font-size: 12px; color: var(--ink-faint); text-align: center; line-height: 1.5; }
.w2fa-large { width: min(560px, 100%); }
.sec-titre { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 6px; }
.sec-ligne { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.sec-ligne > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sec-ligne span { font-size: 12.5px; color: var(--ink-faint); }
#secCorps { display: grid; gap: 8px; }
.od-relier { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }
.od-relier:hover { color: #fff; }
.od-fil { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-faint); }
.od-fil button { min-height: 28px; padding: 0 8px; }
.od-liste { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.od-dossier { justify-content: flex-start; border-color: transparent; min-height: 36px; font-weight: 500; }
.od-dossier:hover { background: var(--accent-soft); }
.od-bandeau { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 1100; padding: 12px 18px; border-radius: 14px; background: var(--side); color: var(--side-fg); font-weight: 600; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .5); cursor: pointer; max-width: calc(100% - 32px); }
.od-bandeau.ok { background: #157a3c; color: #fff; }
.od-bandeau a { font-weight: 700; }
.od-fermer { min-height: 26px; padding: 0 8px; margin-left: 10px; background: transparent; border-color: transparent; color: inherit; }
/* en ligne, les données sont sur le serveur : pas de « dossier des données » à ouvrir */
#btnFolder { display: none !important; }

/* ---------- petit écran (le téléphone aura ses propres écrans plus tard) ---------- */
@media (max-width: 760px) {
  .auth-view { grid-template-columns: 1fr; }
  .web-auth-brand { min-height: 0; padding: 24px 22px; }
  .web-auth-brand h2 { font-size: 22px; margin-bottom: 0; }
  .web-auth-brand p, .web-auth-brand ul, .web-auth-brand .ver { display: none; }
}
