/* Portail de l'ouvrier en direction B « Ligne des heures » (maquette portail_b, 06/11/2026) : même univers que le bureau.
   En-tête bleu nuit, police Overpass, orange pour ce qui avance et ce qui est à traiter, rouge seulement pour un manque.
   La semaine se lit comme une ligne du lundi au vendredi. Les règles validées avec le client restent : un seul écran à
   confirmer, « Valider » encadré pour ce qui est à traiter, gros boutons. */
@font-face { font-family: "Overpass"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/polices/overpass-latin.woff2") format("woff2");
  unicode-range: U+0000-00B6, U+00B8-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Overpass"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/polices/overpass-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root { --nuit: #14233a; --nuit-2: #1d3150; --nuit-3: #3b5277; --nuit-doux: #a9b6ca;
        --fond: #f6f7f9; --ligne: #dfe3e9; --texte: #121a26; --doux: #535e6c; --surf2: #eef0f3; }
@media (prefers-color-scheme: dark) {
  :root { --nuit: #0b1424; --nuit-2: #13223a; --nuit-3: #34496b; --fond: #0f1726; --surf: #16213a; --surf2: #1c2943; --ligne: #26354f;
          --texte: #eef1f6; --doux: #a9b6ca; }
}
html, body { font-family: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
::selection { background: var(--orange); color: #14233a; }

/* en-tête bleu nuit, du bord au bord */
.entete { background: var(--nuit); color: #fff; margin: 0 -14px; padding: calc(14px + env(safe-area-inset-top)) 18px 14px; gap: 10px; }
.entete .logo-hc { width: 28px; height: 28px; flex: none; }
.entete .marque { font-size: 17px; color: #fff; }
.entete .marque small { color: var(--nuit-doux); font-weight: 600; }
.avatar { background: transparent; color: #fff; border: 2px solid var(--orange); }

/* la ligne de la semaine, sous l'en-tête */
.sx-ligne { position: relative; list-style: none; margin: 0 -14px 14px; padding: 6px 18px 14px; background: var(--nuit); color: #fff;
            display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); }
.sx-ligne::before { content: ""; position: absolute; top: 24px; height: 6px; border-radius: 3px; left: calc(18px + (100% - 36px) / var(--n, 5) / 2);
                    right: calc(18px + (100% - 36px) / var(--n, 5) / 2); background: linear-gradient(90deg, var(--orange) 0 var(--fait, 0%), var(--nuit-3) var(--fait, 0%)); }
.sx-ligne li { position: relative; text-align: center; }
.sx-ligne i { display: block; width: 24px; height: 24px; margin: 9px auto 0; border-radius: 50%; background: var(--nuit); border: 4px solid var(--nuit-3); }
.sx-ligne li.ok i { background: var(--orange); border-color: var(--orange); }
.sx-ligne li.prop i { border-color: var(--orange); border-style: dashed; }
.sx-ligne li.ici i { width: 30px; height: 30px; margin-top: 6px; background: #fff; border: 4px solid var(--orange); box-shadow: 0 0 0 4px rgba(238, 138, 67, .3); }
.sx-ligne li.manque i { border-color: #ff8a80; }
.sx-ligne b { display: block; font-size: 13px; font-weight: 800; margin-top: 6px; }
.sx-ligne small { display: block; font-size: 11.5px; color: #b9c4d6; font-variant-numeric: tabular-nums; }

/* moins de boîtes arrondies : des filets */
.sx-liste { border-radius: 0; border: 0; border-top: 2px solid var(--texte); background: transparent; padding: 0 2px; }
.sx-chiffres { gap: 0; border-top: 2px solid var(--texte); }
.sx-chiffres div { border: 0; border-radius: 0; background: transparent; text-align: left; padding: 8px 8px 0; }
.sx-chiffres div + div { border-left: 1px solid var(--ligne); }
.compteurs div { border-radius: 8px; }
.message { border-radius: 10px; }
.btn { border-radius: 10px; }
.sx-vignette { border-radius: 8px; }
.nav a.on { color: var(--texte); }
.nav a.on svg { color: var(--orange); }
.sx-titre, .sx-confirmer h2 { font-weight: 800; letter-spacing: -.01em; }

/* planning : chaque jour porte le trait de son chantier (sa ligne), sans carte pastel ni barre à gauche */
.pw-c { border-radius: 0; background: var(--surf); border: 0; border-top: 6px solid var(--c, #8794a8); padding: 10px 10px 9px; }
.pw-c.absence { background: var(--surf2); border: 0; border-top: 6px dashed var(--ligne); }
.pw-c.vide { background: transparent; border: 0; border-top: 6px dotted var(--ligne); }
.pw-j.auj { border-bottom-color: var(--orange); }

/* --- pages d'accès (connexion, inscription, double authentification) : une seule page pour les 4 profils.
   Bandeau bleu nuit en haut (logo, entreprise), comme dans l'appli une fois connecté ; sur grand écran, fond clair
   avec le chantier dessiné au trait à gauche et le formulaire à droite (choix de Rémi le 07/11/2026, version C). --- */
.connexion { padding-top: 0; }
.acces-bande { background: var(--nuit); color: #fff; margin: 0 -14px 26px; padding: calc(26px + env(safe-area-inset-top)) 22px 22px; }
.acces-bande .marque-hc { color: #fff; margin: 0; }
.acces-bande .marque-hc svg { width: 46px; height: 46px; }
.acces-bande .marque-hc-nom b { color: #fff; font-size: 31px; }
.acces-bande .marque-hc-nom small { color: var(--nuit-doux); }
.acces-bande .marque-client { color: #fff; border-top-color: var(--nuit-3); margin: 16px 0 0; font-weight: 700; }
.connexion h1 { font-weight: 800; }
.connexion input { border-radius: 8px; }
.acces-chantier { display: none; }

@media (min-width: 900px) {
  body:has(.connexion) { background: var(--fond); }
  .page.connexion { max-width: none; min-height: 100vh; padding: 0 0 48px; display: grid; align-content: start;
                    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px) clamp(32px, 7vw, 120px);
                    column-gap: clamp(40px, 6vw, 110px); grid-auto-rows: min-content; }
  .page.connexion > * { grid-column: 2; margin-left: 0; margin-right: 0; }
  .page.connexion > .acces-bande { grid-column: 1 / -1; grid-row: 1; margin: 0 0 clamp(40px, 9vh, 90px);
                                    display: flex; align-items: center; gap: 2rem; padding: 16px clamp(32px, 5vw, 72px); }
  .acces-bande .marque-hc svg { width: 40px; height: 40px; }
  .acces-bande .marque-hc-nom b { font-size: 28px; }
  .acces-bande .marque-client { margin: 0 0 0 auto; border: 0; padding: 0; }
  /* le chantier au trait, bleu nuit sur fond clair ; la ligne des heures en orange jusqu'à la paie */
  .page.connexion > .acces-chantier { display: block; grid-column: 1; grid-row: 2 / span 30; justify-self: end; align-self: start;
                    width: 100%; max-width: 620px; height: auto; margin-top: -10px; }
  .acces-chantier .trait { fill: none; stroke: var(--nuit-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .acces-chantier .pointille { stroke-dasharray: 5 7; stroke: var(--nuit-doux); }
  .acces-chantier .cable { stroke: var(--nuit-doux); }
  .acces-chantier .orange-plein { fill: var(--orange); }
  .acces-chantier .ligne { stroke: var(--orange); stroke-width: 7; stroke-linecap: round; }
  .acces-chantier .stations circle { fill: var(--fond); stroke: var(--orange); stroke-width: 5; }
  .acces-chantier .stations circle.fin { fill: var(--orange); }
  .acces-chantier .etiquettes text { fill: var(--texte); font: 700 15px "Overpass", sans-serif; text-anchor: middle; }
}

/* les pages d'accès restent claires même quand le téléphone ou l'ordinateur est en mode sombre : le bandeau bleu nuit
   doit se détacher du fond (sinon tout devient bleu) ; une fois connecté, chacun retrouve son thème */
@media (prefers-color-scheme: dark) {
  html:has(.page.connexion) { color-scheme: light;
    --fond: #f6f7f9; --surf: #fff; --surf2: #eef0f3; --ligne: #dfe3e9; --texte: #121a26; --doux: #535e6c;
    --nuit: #14233a; --nuit-2: #1d3150; --nuit-3: #3b5277;
    --prim: #141414; --prim-f: #a64e15; --prim-cl: #fdf0e4; --vert: #3a7a4e; --vert-f: #3a7a4e; --vert-cl: #e7f0e9;
    --ambre-cl: #fdf0e4; --ambre-f: #a64e15; --rouge: #b3261e; --rouge-cl: #fbeceb; --bleu: #55606e; --bleu-cl: #eef0f2;
    --nuit-cl: #efeee9; --nuit-f: #4a4843; }
}

/* --- notes de frais (specs/001-notes-de-frais) : liste à filets, vignette du ticket, saisie en un écran --- */
.fr-aide { color: var(--doux); font-size: 13px; margin: 2px 2px 12px; }
.fr-liste { border-top: 2px solid var(--texte); }
.fr-note { display: flex; align-items: flex-start; gap: 11px; padding: 12px 2px; border-bottom: 1px solid var(--ligne); }
.fr-vg { width: 46px; height: 46px; flex: none; border-radius: 6px; overflow: hidden; background: var(--surf2); display: grid; place-items: center; color: var(--doux); }
.fr-vg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fr-txt { flex: 1; min-width: 0; }
.fr-txt b { display: block; font-size: 15px; } .fr-txt small { display: block; color: var(--doux); font-size: 12.5px; margin: 1px 0 4px; }
.fr-txt form { margin-top: 4px; }
.fr-m { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px; }
.fr-form fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.types label:has(input:checked) { border-color: var(--orange); background: rgba(238, 138, 67, .1); color: var(--orange-f, #b4561a); }
.types label:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.fr-montant { display: flex; align-items: center; gap: 8px; }
.fr-montant input { flex: 1; font-size: 26px; font-weight: 800; text-align: right; padding: 10px 12px; }
.fr-montant span { font-size: 22px; font-weight: 800; }
.fr-form input[type=date], .fr-form select { width: 100%; }
.fr-photo { display: block; border: 2px dashed var(--orange); border-radius: 10px; padding: 18px 12px; text-align: center; font-weight: 800; color: #b4561a; background: var(--surf, #fff); cursor: pointer; }
.fr-photo input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fr-photo:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.fr-apercu { display: block; max-width: 100%; max-height: 220px; margin: 10px auto 0; border-radius: 8px; }

/* astreinte SAV de la semaine (specs/002-astreinte-sav) : encadré orange, c'est à retenir */
.pw-astreinte { border: 2px solid var(--orange); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; background: rgba(238, 138, 67, .08); }
.pw-astreinte b { color: #b4561a; margin-right: 4px; }
.fr-apercu[hidden] { display: none; }
.fr-vg { border: 1px solid var(--ligne); }

/* visionneuse d'image (ticket de frais) : plein écran sombre, image entière, gros bouton Fermer */
.visionneuse { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.visionneuse::backdrop { background: rgba(10, 18, 30, .88); }
.visionneuse[open] { display: grid; place-items: center; }
.visionneuse img { max-width: 94vw; max-height: 84vh; object-fit: contain; border-radius: 6px; background: #fff; }
.visionneuse-fermer { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 10px; background: #fff; color: #121a26; font: 800 16px "Overpass", sans-serif; cursor: pointer; }

.fr-lecture { margin: 8px 2px 12px; padding: 8px 10px; border-radius: 8px; background: var(--surf2); color: var(--texte); font-size: 13.5px; font-weight: 600; }
/* orange foncé des textes un peu assombri en thème clair : 5:1 sur fond orange pâle (WCAG AA ; check-up du 08/11/2026) */
@media not (prefers-color-scheme: dark) { :root { --prim-f: #a64e15; --ambre-f: #a64e15; } }

/* deux entrées pour le ticket : appareil photo (bouton principal) et fichier existant */
.fr-photos { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-bottom: 14px; }
.fr-photo-doc { border-style: solid; border-color: var(--ligne); color: var(--texte); font-weight: 700; }
