/* Zone Terrasse CRM — design system. Brand : noir / rouge / blanc.
   Police de marque : Roboto (corps) + Roboto Slab (titres), auto-hébergées.
   Tokens = source de vérité unique ; les écrans (screens-*.css) consomment ces
   variables, donc tout raffinement ici cascade sur l'app entière. */

/* ---------------------------------------------------------------------------
   Fonts (self-hosted, font-src 'self') — variable woff2, latin.
--------------------------------------------------------------------------- */
@font-face {
  font-family: "Roboto"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("/fonts/roboto-var.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Slab"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("/fonts/robotoslab-var.woff2") format("woff2");
}

/* ---------------------------------------------------------------------------
   Tokens
--------------------------------------------------------------------------- */
:root {
  /* Brand */
  --gc-red: #A07453;
  --gc-red-600: #c10500;
  --gc-red-50: #fff1f0;
  --gc-black: #0f1115;
  --gc-white: #fff;

  /* Neutrals (slate-tinted) */
  --gc-ink: #14161b;
  --gc-muted: #667085;
  --gc-faint: #98a2b3;
  --gc-border: #e7e9ee;
  --gc-border-strong: #d6d9e0;
  --gc-bg: #fbfbfc;
  --gc-bg-soft: #f6f7f9;
  --gc-surface: #ffffff;

  /* Semantic */
  --gc-green: #067a4e; --gc-green-bg: #e7f6ee;
  --gc-blue: #1d4ed8;  --gc-blue-bg: #e9eefc;
  --gc-amber: #9a6b00; --gc-amber-bg: #fdf3e0;
  --gc-violet: #5b3fb8; --gc-violet-bg: #efeafb;

  /* Shape & depth — sharp/industrial (coffrage brand: net, solide, pas "cheap"). */
  --gc-radius: 6px;
  --gc-radius-sm: 3px;
  --gc-radius-pill: 3px;
  --gc-shadow-sm: 0 1px 2px rgba(16,18,24,.05), 0 1px 3px rgba(16,18,24,.05);
  --gc-shadow: 0 1px 3px rgba(16,18,24,.06), 0 10px 28px rgba(16,18,24,.07);
  --gc-shadow-lg: 0 20px 60px rgba(16,18,24,.20);
  --gc-ring: 0 0 0 3px rgba(225,6,0,.18);

  /* Type */
  --gc-font: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --gc-font-display: "Roboto Slab", Georgia, "Times New Roman", serif;
}

/* ---------------------------------------------------------------------------
   Base
--------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--gc-bg); }  /* avoid white flash between page navigations */
body {
  font-family: var(--gc-font);
  color: var(--gc-ink);
  background: var(--gc-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
h1, h2, h3, h4 { font-family: var(--gc-font-display); font-weight: 700; letter-spacing: -0.01em; color: var(--gc-ink); }
a { color: var(--gc-red); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(225,6,0,.16); }

.muted { color: var(--gc-muted); }
.accent { color: var(--gc-red); }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.error { color: var(--gc-red); min-height: 1.25rem; }

/* ---------------------------------------------------------------------------
   Buttons (base) — refined in screens-a2 for .gc-btn variants too.
--------------------------------------------------------------------------- */
button {
  font-family: inherit; font-weight: 600;
  background: var(--gc-red); color: var(--gc-white); border: 0;
  padding: 0.6rem 1.15rem; border-radius: var(--gc-radius-sm); font-size: 0.95rem;
  cursor: pointer; transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}
/* Hover only for a real pointer: on a touch screen :hover STICKS after the tap
   (iOS keeps it until the next tap elsewhere) and the tapped button stayed bright
   red under its message — red reads as "error" (iPhone pass, 26 Sept.). */
@media (hover: hover) {
  button:hover { background: var(--gc-red-600); }
}
button:active { transform: translateY(0.5px); }
button:focus-visible { outline: none; box-shadow: var(--gc-ring); }

/* ---------------------------------------------------------------------------
   Auth (legacy fallback) — login.html now ships its own scoped styles.
--------------------------------------------------------------------------- */
.auth-shell, .sign-shell { max-width: 28rem; margin: 2.5rem auto; padding: 1.5rem; }
.auth-shell h1, .sign-shell h1 { color: var(--gc-red); }
.sign-pad {
  display: block;
  width: 100%;
  height: 10rem;
  margin: 0.5rem 0 1rem;
  background: var(--gc-white);
  border: 2px dashed var(--gc-border);
  border-radius: var(--gc-radius-sm);
  touch-action: none;
}
/* The client signs on HIS phone (often an iPhone SE, 320 px). iPhone pass, 26 Sept.:
   16 px or iOS zooms the page on the name field; 44 px targets; the line totals
   must fit on screen — nobody signs what they cannot see. */
.sign-shell .gc-field input, .sign-wrap .gc-field input { font-size: 1rem; min-height: 44px; }
.sign-shell .gc-btn, .sign-wrap .gc-btn { min-height: 44px; }
.sign-shell .sign-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sign-shell .gc-table tbody tr { cursor: default; }
@media (max-width: 480px) {
  .sign-shell { margin: 1rem auto; padding: 1rem 0.75rem; }
  .sign-shell .gc-table th, .sign-shell .gc-table td { padding: 0.45rem 0.3rem; }
  .sign-shell .gc-table { font-size: 0.85rem; }
}
form label { display: block; margin-bottom: 1rem; font-size: 0.9rem; }
/*
 * ⛔ `textarea` ET `select` SONT ICI AVEC `input`, ET ILS N'Y ÉTAIENT PAS.
 *
 * Mesuré le 14 septembre 2026 : cette règle ne visait que `input`. Les SIX
 * zones de texte de l'écran des réglages — jours fériés, gabarits de bons de
 * travail, questionnaires — rendaient donc à la largeur par défaut du
 * navigateur, soit 181 px dans une étiquette de 702. On tapait un gabarit de
 * bon de travail dans une boîte de vingt caractères.
 *
 * Aucune porte ne pouvait le voir : `tsc` était à 0, les 1310 tests verts, et
 * la dette d'interface à 1. Une largeur ne se teste pas, elle se REGARDE.
 * C'est le troisième défaut de ce build attrapé uniquement à l'œil.
 */
form input, form textarea, form select {
  display: block; width: 100%; padding: 0.6rem; margin-top: 0.3rem;
  border: 1px solid var(--gc-border); border-radius: var(--gc-radius-sm); font-size: 1rem; font-family: inherit;
}
form textarea { min-height: 4rem; resize: vertical; }
form input:focus, form textarea:focus, form select:focus { outline: none; border-color: var(--gc-red); box-shadow: var(--gc-ring); }

/* ===========================================================================
   Punch terrain (Wave 2 B1) — big tactile targets, mobile-first, offline-safe.
   =========================================================================== */
.punch-shell { min-height: 100dvh; display: flex; flex-direction: column; background: var(--gc-bg); }
.punch-shell .app-bar { display: flex; align-items: center; justify-content: space-between; }
#punch-view { padding: 1rem; max-width: 32rem; margin: 0 auto; width: 100%; flex: 1; }

.punch-net {
  font-size: 0.72rem; padding: 0.18rem 0.6rem; border-radius: var(--gc-radius-pill);
  background: var(--gc-green); color: var(--gc-white); white-space: nowrap; font-weight: 600;
}
.punch-net.is-offline { background: var(--gc-amber); }

.punch-card {
  border: 1px solid var(--gc-border); border-radius: var(--gc-radius); padding: 1.1rem;
  margin-bottom: 0.85rem; background: var(--gc-surface); box-shadow: var(--gc-shadow-sm);
}
.punch-card h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }

.punch-pin-display { display: flex; gap: 0.6rem; justify-content: center; margin: 1.25rem 0; }
.punch-pin-dot { width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 2px solid var(--gc-ink); background: transparent; }
.punch-pin-dot.filled { background: var(--gc-red); border-color: var(--gc-red); }
.punch-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; max-width: 20rem; margin: 0 auto; }
.punch-key { font-size: 1.6rem; padding: 1.1rem 0; border-radius: var(--gc-radius-sm); background: var(--gc-bg-soft); color: var(--gc-ink); border: 1px solid var(--gc-border); }
.punch-key:hover { background: #eceef2; }
.punch-key.muted-key { background: transparent; border-color: transparent; }

.punch-btn-xl { display: block; width: 100%; padding: 1.1rem; font-size: 1.2rem; font-weight: 700; border-radius: var(--gc-radius); margin-top: 0.85rem; }
.punch-btn-secondary { background: var(--gc-black); }
.punch-btn-secondary:hover { background: #23262d; }
.punch-btn-ghost { background: var(--gc-bg-soft); color: var(--gc-ink); border: 1px solid var(--gc-border-strong); }
.punch-btn-ghost:hover { background: #eceef2; }

.punch-job { display: flex; flex-direction: column; gap: 0.15rem; width: 100%; text-align: left; padding: 0.9rem 1rem; border-radius: var(--gc-radius-sm); background: var(--gc-bg-soft); color: var(--gc-ink); border: 1px solid var(--gc-border); margin-bottom: 0.55rem; }
.punch-job:hover { background: #eceef2; }
.punch-job.selected { border-color: var(--gc-red); background: var(--gc-red-50); }
.punch-job strong { font-size: 1.05rem; }
.punch-job .punch-job-addr { font-size: 0.82rem; color: var(--gc-muted); }

/* M1-02 — L'HEURE DU QUART, EN TÊTE DE LA CARTE.
   C'est la première chose qu'un gars cherche le matin. « À la journée » se dit
   en toutes lettres et en gris : une case vide se lirait comme une donnée
   perdue, et il appellerait le bureau pour rien. */
.punch-job-heure { font-size: 0.9rem; font-weight: 700; color: var(--gc-ink); }
.punch-job-heure-vide { font-weight: 500; color: var(--gc-muted); }

/* M1-09 — L'HORAIRE SE LIT, IL NE SE TAPE PAS.
   `.punch-job:hover` éclaircit la carte au survol : sur la liste des chantiers
   c'est juste, chaque carte est un bouton. Sur l'horaire, rien n'est cliquable
   — et une carte qui réagit au doigt promet une action qui n'existe pas. */
.punch-job.punch-job-lecture { cursor: default; }
.punch-job.punch-job-lecture:hover { background: var(--gc-bg-soft); }

/* ⛔ LE LIEN VERS MAPS DOIT SE VOIR ET SE TOUCHER. Peint avec la classe de
   l'adresse, il était gris, 0,82 rem, collé entre deux lignes de texte : rien
   ne disait qu'on pouvait le toucher, et la cible faisait 16 px de haut sur un
   téléphone tenu d'une main. On lui donne sa couleur, son soulignement et
   44 px — la cible tactile minimale. */
.punch-job-carte {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.85rem; font-weight: 600; color: var(--gc-blue);
  text-decoration: underline; text-underline-offset: 2px;
  align-self: flex-start;
}

/* La note du bureau n'est pas une deuxième ligne d'adresse : c'est la consigne
   du jour. Elle se détache, sinon elle se lit comme du complément de rue. */
.punch-job-note {
  font-size: 0.85rem; color: var(--gc-ink);
  border-left: 2px solid var(--gc-border-strong);
  padding-left: 0.5rem; margin-top: 0.15rem;
}

.punch-timer { font-family: var(--gc-font-display); font-size: 2.6rem; font-weight: 800; text-align: center; margin: 0.5rem 0; font-variant-numeric: tabular-nums; }
/* M5-09 — la fiche technique sur le telephone du poseur.
   ⛔ Gros, lisible au soleil, sans gras inutile : il la lit debout, les mains
   sales, sur un ecran sale. Deux colonnes, la valeur en gras a droite. */
.punch-fiche { border: 1px solid var(--gc-border, #e5e7eb); border-radius: var(--gc-radius-sm); padding: 0.5rem 0.75rem; margin: 0.5rem 0; background: #fff; }
.punch-fiche-ligne { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.3rem 0; font-size: 1rem; line-height: 1.35; }
.punch-fiche-ligne + .punch-fiche-ligne { border-top: 1px solid var(--gc-border, #f1f5f9); }
.punch-fiche-ligne span { color: var(--gc-muted, #6b7280); }
.punch-fiche-ligne strong { text-align: right; }
.punch-lunch-banner { background: var(--gc-red-50); color: var(--gc-red); border: 1px solid #fecaca; border-radius: var(--gc-radius-sm); padding: 0.55rem 0.75rem; font-size: 0.85rem; margin: 0.5rem 0; }

.punch-summary-row { display: flex; justify-content: space-between; padding: 0.45rem 0; border-bottom: 1px solid var(--gc-border); }
.punch-summary-row .label { color: var(--gc-muted); }
.punch-summary-row .value { font-weight: 700; }
.punch-locked-badge { display: inline-block; background: var(--gc-black); color: var(--gc-white); padding: 0.25rem 0.7rem; border-radius: var(--gc-radius-pill); font-size: 0.8rem; }

.punch-queue { margin-top: 0.75rem; padding: 0.6rem 0.75rem; border-radius: var(--gc-radius-sm); background: var(--gc-amber-bg); border: 1px solid #fde68a; font-size: 0.85rem; }
.punch-queue ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }

/* S10 — le point d'entrée « Ouvrir un chantier », détaché de la liste des
   chantiers pour qu'on ne le tape pas en visant un chantier. */
/* La CONFIRMATION d'une action reussie — jamais la couleur d'une erreur. */
.punch-ok { color: #15803d; font-weight: 600; margin: 0.5rem 0 0; }
.punch-ok:empty { display: none; }

.punch-ouvrir { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--gc-border); }
.punch-ouvrir p { margin: 0; }

/* ⛔ Un bouton désactivé DOIT se voir désactivé. `.punch-job` n'avait aucun
   style :disabled, et le poseur qui « ne voyait rien se passer » retapait
   ailleurs — même piège ici pour les boutons pleine largeur. */
.punch-btn-xl:disabled { opacity: 0.45; cursor: default; }
/* M2-10 · Les regimes s'empilent, ils ne se mettent pas en grille : « CCQ
   residentiel » sur trois colonnes etroites devient illisible avec des gants,
   et c'est l'ecran d'un gars debout sur un chantier. */
.punch-regimes { max-width: 24rem; margin: 1rem auto 0; }

/* S12 — « combien » et « unite » cote a cote : sur un telephone tenu d'une
   main, deux champs courts empiles font defiler le bouton hors de l'ecran. */
.punch-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

.punch-field { margin-bottom: 0.85rem; }
.punch-field label { display: block; font-size: 0.85rem; margin-bottom: 0.3rem; color: var(--gc-muted); }
.punch-field input, .punch-field textarea, .punch-field select { width: 100%; padding: 0.7rem; border: 1px solid var(--gc-border); border-radius: var(--gc-radius-sm); font-size: 1rem; font-family: inherit; }
/* A checkbox is not a text field: width:100% made it a 343×13 bar (Chromium) or
   left it alone on its own line (Safari), away from the words it answers
   (iPhone pass, 26 Sept.). Box + text on one line, the whole label tappable. */
.punch-field input[type="checkbox"], .punch-field input[type="radio"] { width: 1.35rem; height: 1.35rem; padding: 0; margin: 0.1rem 0 0; flex: none; }
.punch-field label:has(> input[type="checkbox"]), .punch-field label:has(> input[type="radio"]) { display: flex; gap: 0.6rem; align-items: flex-start; min-height: 44px; padding: 0.35rem 0; }
.punch-field input:focus, .punch-field textarea:focus, .punch-field select:focus { outline: none; border-color: var(--gc-red); box-shadow: var(--gc-ring); }
.punch-field textarea { min-height: 4rem; resize: vertical; }

/* ===========================================================================
   Admin shell — topbar, sidebar nav, content. Mobile-first.
   =========================================================================== */
.app-bar {
  background: var(--gc-black);
  color: var(--gc-white);
  padding: 0.7rem 1.15rem;
  font-size: 0.95rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 2px 10px rgba(0,0,0,.18);
}
.app-bar strong { color: var(--gc-red); }

.gc-shell { min-height: 100dvh; display: flex; flex-direction: column; background: var(--gc-bg); }
.gc-topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
/* The white logo is an <img>: its fill is baked in (#fff), never currentColor —
   an <img> does not inherit CSS color, so currentColor rendered BLACK on the black bar. */
.gc-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--gc-white); }
.gc-brand-logo { height: 32px; width: 32px; flex: none; display: block; }
.app-bar .gc-brand, .app-bar .gc-brand-word { color: var(--gc-white); }
.gc-brand-word { font-family: var(--gc-font-display); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 420px) { .gc-brand-word { display: none; } }
.gc-topbar-right { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.gc-who { font-size: 0.8rem; color: #c7cbd4; max-width: 12rem; min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Phone: the whole topbar must fit — "Déconnexion" was pushed 45 px off screen at 390 px. */
@media (max-width: 480px) { .gc-who { display: none; } .gc-topbar { padding-left: 0.8rem; padding-right: 0.8rem; } }
.gc-logout { background: transparent; border: 1px solid #3a3e47; color: var(--gc-white); padding: 0.35rem 0.8rem; font-size: 0.8rem; border-radius: var(--gc-radius-sm); font-weight: 500; }
.gc-logout:hover { background: rgba(255,255,255,.08); }
.gc-queue-badge { font-size: 0.72rem; padding: 0.18rem 0.6rem; border-radius: var(--gc-radius-pill); background: var(--gc-red); color: var(--gc-white); white-space: nowrap; font-weight: 600; }

.gc-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.6rem 1.15rem; background: var(--gc-blue-bg); border-bottom: 1px solid #cdd9f7; font-size: 0.88rem;
}
.gc-banner button { background: var(--gc-black); padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.gc-banner-warn { background: var(--gc-amber-bg); border-bottom-color: #fadf9a; }

.gc-body { display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--gc-bg); }
.gc-nav {
  display: flex; gap: 0.35rem; padding: 0.6rem 0.75rem; overflow-x: auto;
  background: var(--gc-bg-soft); border-bottom: 1px solid var(--gc-border); -webkit-overflow-scrolling: touch;
}
.gc-nav-link {
  flex: 0 0 auto; padding: 0.5rem 0.9rem; border-radius: var(--gc-radius-pill); font-size: 0.85rem; font-weight: 500;
  color: var(--gc-ink); text-decoration: none; background: var(--gc-surface); border: 1px solid var(--gc-border); white-space: nowrap;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.gc-nav-link:hover { background: #eceef2; text-decoration: none; }
.gc-nav-link.is-active { background: var(--gc-red); color: var(--gc-white); border-color: var(--gc-red); box-shadow: 0 2px 8px rgba(225,6,0,.25); }

/* Content region = clean white sheet (excludes the punch terrain shell). */
.gc-body > main, .gc-body > #view {
  flex: 1; min-width: 0; padding: 1.4rem 1.6rem; max-width: 70rem; width: 100%; margin: 0 auto;
}
#view { flex: 1; }
/* A fieldset defaults to min-width: min-content — a wide table inside it pushed the
   whole page sideways on a phone (Paramètres: 181 px). It now scrolls in place. */
main fieldset, #view fieldset { min-width: 0; max-width: 100%; overflow-x: auto; }
/* A long unbroken token typed by someone (URL, courriel, code) pushed the phone
   page 184 px sideways in Notifications. break-word (not anywhere) leaves table
   column sizing untouched. */
main, #view { overflow-wrap: break-word; }
/* Wide tables scroll inside their own box up to tablet width (Clients: 235 px,
   SMS: 166 px of page scroll at 1024 px once real rows exist). */
@media (max-width: 1100px) {
  /* Wide tables scroll inside their own box instead of dragging the page (SMS: 250 px). */
  main table, #view table { display: block; max-width: 100%; overflow-x: auto; }
}

/* Dashboard cards */
.gc-card { border: 1px solid var(--gc-border); border-radius: var(--gc-radius); padding: 1.1rem 1.35rem; margin-bottom: 1.1rem; background: var(--gc-surface); box-shadow: var(--gc-shadow-sm); }
.gc-card h1, .gc-card h2 { margin: 0 0 0.85rem; }
.gc-card .accent { color: var(--gc-red); }
.gc-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.gc-kpi { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 1.1rem; border: 1px solid var(--gc-border); border-radius: var(--gc-radius-sm); background: linear-gradient(180deg, #fff, var(--gc-bg-soft)); }
.gc-kpi-v { font-family: var(--gc-font-display); font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; }
.gc-kpi-l { font-size: 0.78rem; color: var(--gc-muted); text-transform: uppercase; letter-spacing: .03em; }
.gc-quicks { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gc-quick { padding: 0.55rem 1.05rem; border-radius: var(--gc-radius-sm); background: var(--gc-surface); color: var(--gc-ink); text-decoration: none; border: 1px solid var(--gc-border); font-size: 0.88rem; font-weight: 500; transition: background .12s ease; }
.gc-quick:hover { background: var(--gc-bg-soft); text-decoration: none; }

@media (min-width: 48rem) {
  .gc-body { flex-direction: row; }
  .gc-nav {
    flex-direction: column; overflow-x: visible; overflow-y: auto;
    width: 14.5rem; flex: 0 0 14.5rem; border-bottom: 0; border-right: 1px solid var(--gc-border); padding: 0.85rem 0.7rem;
  }
  .gc-nav-link { flex: 0 0 auto; }
  .gc-kpis { grid-template-columns: repeat(4, 1fr); }
}

/* --- Shared dialog component (gc-dialogs.js) — also used on public pages
   (sign.html) that only load app.css. Duplicated from screens-a2.css on
   purpose: same selectors, same values, so the cascade is a no-op on admin
   screens that load both. --- */
.gc-dialog-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; z-index: 50;
}
.gc-dialog {
  background: var(--gc-surface, #fff); border-radius: var(--gc-radius, 6px); max-width: 34rem; width: 100%;
  padding: 1.4rem 1.6rem; box-shadow: var(--gc-shadow-lg, 0 10px 30px rgba(0,0,0,0.25)); max-height: 90vh; overflow: auto;
}
.gc-dialog h2 { margin-top: 0; font-size: 1.25rem; }
.gc-dialog .gc-field { display: block; margin-bottom: 0.9rem; font-size: 0.85rem; color: var(--gc-muted, #5a6472); font-weight: 500; }
.gc-dialog .gc-field input, .gc-dialog .gc-field textarea, .gc-dialog .gc-field select {
  display: block; width: 100%; margin-top: 0.3rem; padding: 0.6rem 0.7rem; font-size: 0.95rem;
  border: 1px solid var(--gc-border, #d6dbe3); border-radius: var(--gc-radius-sm, 3px); font-family: inherit;
  color: var(--gc-ink, #15191f); background: var(--gc-surface, #fff);
}
.gc-dialog .gc-field input:focus, .gc-dialog .gc-field textarea:focus, .gc-dialog .gc-field select:focus {
  outline: none; border-color: var(--gc-red, #c8102e); box-shadow: var(--gc-ring, 0 0 0 3px rgba(200,16,46,0.15));
}
.gc-dialog .gc-field textarea { min-height: 4rem; resize: vertical; }
.gc-dialog-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }

/* Safari (WebKit) keeps the native "searchfield" look on type=search and IGNORES
   the page's font-size and padding: the picker filter rendered 13 px / 19 px tall
   on iPhone (iPhone pass, 26 Sept.). Dropping the native look lets the styles apply;
   the border/background come back here since the native ones go with it. */
input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius-sm);
  background: var(--gc-surface);
  color: var(--gc-ink);
  font-family: inherit;
}
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

/* Visually hidden, still read by screen readers (labels of search fields). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The call queue's search row. */
.gc-file-cherche { display: flex; gap: 0.5rem; margin: 0 0 1rem; max-width: 34rem; }
.gc-file-cherche input { flex: 1; min-width: 0; }

/* Skip link: off-screen until it receives keyboard focus. */
.gc-skip { position: absolute; left: 0.75rem; top: -3rem; z-index: 100; padding: 0.55rem 1rem; background: var(--gc-white); color: var(--gc-ink); border-radius: var(--gc-radius-sm); font-weight: 600; text-decoration: none; }
.gc-skip:focus { top: 0.6rem; box-shadow: var(--gc-ring); outline: none; }
main:focus { outline: none; }

/* Finger-sized targets on a phone (H3-19): « Déconnexion » was 28 px tall,
   the menu links 38 px — below the 44 px a thumb needs. */
@media (max-width: 760px) {
  .gc-logout, .gc-nav-link { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Géolocalisation (H3-21): its inputs live outside a <form>, so they got the
   browser's bare 21 px field; and at 390 px the rayon row pushed « Enregistrer »
   off screen. Real fields, and on a phone each chantier becomes a card. */
#geo-q, .geo-chantiers input {
  min-height: 44px; padding: 0.55rem 0.6rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--gc-border); border-radius: var(--gc-radius-sm); background: var(--gc-surface);
}
#geo-q { width: 100%; }
.geo-chantiers .gc-btn { min-height: 44px; }
@media (max-width: 600px) {
  main table.geo-chantiers { display: block; overflow: visible; }
  .geo-chantiers thead { display: none; }
  .geo-chantiers tbody, .geo-chantiers tr, .geo-chantiers td { display: block; width: auto; }
  .geo-chantiers tr { border-bottom: 1px solid var(--gc-border); padding: 0.6rem 0; }
  main .geo-chantiers td { border: 0; padding: 0.2rem 0; }
  .geo-chantiers td:empty { display: none; }
}

/* iPhone (passe iPhone, 27 sept.) : sous 16 px, Safari iOS ZOOME au focus d'un champ
   (filtre #ph-q de Photos : 15,2 px). Sur un téléphone, tout champ saisi fait 16 px. */
@media (max-width: 760px) {
  /* !important : des règles d'écran plus précises posent 0,95 rem ; iOS ne pardonne pas. */
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
  /* Le « ? » d'aide de la barre : 32 px, sous les 44 px d'un pouce. */
  /* !important : aide-contextuelle.js pose width/height 2rem en style en ligne. */
  .app-bar .gc-aide { min-width: 44px !important; min-height: 44px !important; }
}
