/* WPC RH ONE — interface (phase 1, lot 2). S'appuie sur aurora.css. */
html, body { margin: 0; min-height: 100%; }
body { background: var(--au-fond); }
.chargement { padding: 40px; color: var(--au-texte-3); }
[hidden] { display: none !important; }

/* ── Connexion ── */
.cx { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); }
.cx-horizon { position: relative; overflow: hidden; background: var(--au-abysse); color: #EEF2FB; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(24px, 4vw, 56px); }
.cx-aurore { position: absolute; inset: -10% -25%; filter: blur(30px); mix-blend-mode: screen; pointer-events: none;
  background: radial-gradient(38% 16% at 34% 64%, rgba(245,163,11,.85), transparent 72%), radial-gradient(26% 12% at 58% 63%, rgba(255,213,138,.75), transparent 74%),
              radial-gradient(60% 26% at 50% 70%, rgba(245,120,11,.30), transparent 72%), radial-gradient(40% 22% at 78% 48%, rgba(94,226,196,.16), transparent 70%);
  animation: cx-derive 26s ease-in-out infinite alternate; }
.cx-ligne { position: absolute; left: 0; right: 0; top: 66%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,213,138,.9) 25%, #FFF3D6 50%, rgba(255,213,138,.9) 75%, transparent); box-shadow: 0 0 18px 2px rgba(245,163,11,.55); }
.cx-reflet { position: absolute; left: 0; right: 0; top: 66%; bottom: 0; background: linear-gradient(180deg, rgba(245,163,11,.16), transparent 45%); }
@keyframes cx-derive { from { transform: translate3d(-4%,0,0); } to { transform: translate3d(5%,-3%,0) scale(1.08); } }
.cx-marque { position: relative; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.cx-sceau { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(145deg, var(--au-miel), var(--au-ambre)); color: var(--au-nuit); font-weight: 700; font-size: 13px; }
.cx-marque small { display: block; font-weight: 400; color: #AEB8D3; font-size: 12px; }
.cx-temps { position: relative; }
.cx-heure { font-size: clamp(64px, 10vw, 148px); font-weight: 300; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin: 0; }
.cx-heure span { color: var(--au-miel); }
.cx-date { margin: 14px 0 0; color: #AEB8D3; font-size: clamp(15px, 1.4vw, 19px); }
.cx-pied { position: relative; font-size: 13px; color: #AEB8D3; max-width: 46ch; line-height: 1.55; margin: 0; }
.cx-acces { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 4vw, 56px); background: var(--au-surface); }
.cx-carte { width: 100%; max-width: 400px; display: grid; gap: 16px; }
.cx-puce { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(245,163,11,.14); border: 1px solid rgba(245,163,11,.35); font-size: 12.5px; }
.cx-reconnu { min-height: 22px; }
.cx-choix { display: grid; gap: 8px; }
.cx-choix button { text-align: left; justify-content: flex-start; }
.cx-qr { background: #fff; padding: 12px; border-radius: 14px; width: 196px; height: 196px; display: grid; place-items: center; }
.cx-secret { font-variant-numeric: tabular-nums; letter-spacing: .08em; padding: 10px 12px; border-radius: 8px; border: 1px dashed var(--au-trait); word-break: break-all; margin: 0; }
.cx-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; padding: 0; margin: 0; }
.cx-codes li { padding: 9px; border: 1px solid var(--au-trait); border-radius: 8px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.au-saisie.code { text-align: center; letter-spacing: .45em; font-size: 22px; }
@media (max-width: 880px) { .cx { grid-template-columns: 1fr; } .cx-horizon { min-height: 230px; } .cx-heure { font-size: 60px; } .cx-pied { display: none; } .cx-ligne, .cx-reflet { top: auto; bottom: 22px; } .cx-reflet { height: 22px; } }
@media (prefers-reduced-motion: reduce) { .cx-aurore { animation: none; } }

/* ── Coquille de l'application ── */
.sh { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sh-nav { background: var(--au-nuit); color: #DDE3F3; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.sh-nav .cx-marque { margin: 0 6px 22px; color: #fff; }
.sh-lien { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: #C9D2E8; text-decoration: none; font-size: 14px; border: 0; background: none; cursor: pointer; font-family: inherit; text-align: left; }
.sh-lien:hover { background: rgba(255,255,255,.06); color: #fff; }
.sh-lien[aria-current="page"] { background: rgba(245,163,11,.16); color: #fff; box-shadow: inset 3px 0 0 var(--au-ambre); }
.sh-bas { margin-top: auto; font-size: 12px; color: #8C98B8; padding: 0 8px; }
.sh-main { min-width: 0; }
.sh-haut { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(16px, 3vw, 32px); background: var(--au-verre); backdrop-filter: var(--au-flou); -webkit-backdrop-filter: var(--au-flou); border-bottom: 1px solid var(--au-trait); }
.sh-entreprise { font-weight: 600; }
.sh-moi { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sh-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--au-ambre); color: var(--au-nuit); font-weight: 700; font-size: 12px; }
.sh-contenu { padding: clamp(16px, 3vw, 32px); display: grid; gap: 20px; max-width: 1400px; }
.sh-menu { display: none; }
@media (max-width: 960px) {
  .sh { grid-template-columns: 1fr; }
  .sh-nav { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .sh-nav.ouvert { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .sh-menu { display: inline-flex; }
}

/* ── Éléments communs ── */
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grille-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.plein { grid-column: 1 / -1; }
.au-tableau tbody tr.clic { cursor: pointer; }
.au-tableau tbody tr.clic:hover { background: var(--au-surface-2); }
.au-tableau input.au-saisie { min-height: 36px; width: 84px; text-align: right; padding: 0 8px; font-variant-numeric: tabular-nums; }
.au-tableau tfoot td { font-weight: 700; border-top: 2px solid var(--au-trait); }
.vide { padding: 28px; text-align: center; color: var(--au-texte-3); }
.statut { text-transform: none; }
.masque { color: var(--au-texte-3); letter-spacing: .1em; }

/* ── Tiroir et fenêtre ── */
.voile { position: fixed; inset: 0; background: rgba(7,13,36,.45); z-index: 40; display: flex; justify-content: flex-end; }
.tiroir { width: min(640px, 100%); height: 100%; overflow-y: auto; background: var(--au-surface); padding: 24px; display: grid; gap: 18px; align-content: start; box-shadow: var(--au-ombre-2); }
.voile.centre { justify-content: center; align-items: center; padding: 16px; }
.fenetre { width: min(760px, 100%); max-height: 92vh; overflow-y: auto; background: var(--au-surface); border-radius: var(--au-r-l); padding: 24px; display: grid; gap: 16px; box-shadow: var(--au-ombre-2); }
.fenetre-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ── Bulletin ── */
.bulletin { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bulletin h4 { margin: 0 0 6px; font-size: 13px; color: var(--au-texte-3); font-weight: 500; }
.ligne-b { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--au-trait); font-size: 13.5px; }
.ligne-b { gap: 12px; }
.ligne-b span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ligne-b.total { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--au-trait); }
.net-a-payer { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-radius: var(--au-r-m); background: var(--au-nuit); color: #fff; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .bulletin { grid-template-columns: 1fr; } }

/* ── Notifications ── */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--au-nuit); color: #fff; font-size: 13.5px; box-shadow: var(--au-ombre-2); max-width: 380px; }
.toast.erreur { background: #8E2A20; }
@media print {
  .sh-nav, .sh-haut, .actions, #toasts { display: none !important; } .sh { display: block; }
  body:has(.voile) .sh { display: none !important; }
  .voile { position: static; background: none; display: block; padding: 0; }
  .fenetre, .tiroir { box-shadow: none; max-height: none; width: 100%; }
}

/* ── Heures supplémentaires (phase 2) ── */
.hs-btn { min-height: 36px; padding: 0 12px; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hs-btn.hs-rempli { border-color: var(--au-ambre); background: rgba(245,163,11,.10); }
.fenetre .au-tableau input.au-saisie { width: 76px; }

/* ── Pointage (phase 4, lot 1) ── */
.pt-carte { display: grid; gap: 18px; position: relative; overflow: hidden; }
.pt-carte::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 60%; height: 140%; background: radial-gradient(closest-side, rgba(245,163,11,.14), transparent); pointer-events: none; }
.pt-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: relative; }
.pt-heure { font-size: clamp(30px, 5vw, 44px); font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.pt-corps { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 20px; align-items: stretch; position: relative; }
.pt-bouton { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 132px; padding: 20px 22px; border: 0; border-radius: var(--au-r-l); cursor: pointer; font-family: inherit; text-align: left;
  color: var(--au-nuit); background: linear-gradient(145deg, var(--au-miel), var(--au-ambre)); box-shadow: 0 14px 34px -14px rgba(245,163,11,.75), inset 0 1px 0 rgba(255,255,255,.45); transition: transform .15s var(--au-courbe), box-shadow .15s; }
.pt-bouton:hover { transform: translateY(-2px); }
.pt-bouton:active { transform: translateY(1px) scale(.99); }
.pt-bouton:focus-visible { outline: 3px solid var(--au-cible); outline-offset: 3px; }
.pt-bouton[disabled] { opacity: .6; cursor: progress; transform: none; }
.pt-bouton.depart { color: #fff; background: linear-gradient(145deg, #1E2A4A, var(--au-nuit)); box-shadow: 0 14px 34px -16px rgba(12,18,38,.8), inset 0 0 0 1px rgba(245,163,11,.45); }
.pt-bouton-lib { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.pt-bouton-sous { font-size: 12.5px; opacity: .78; }
.pt-jour { display: grid; gap: 10px; align-content: start; }
.pt-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pt-liste li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--au-trait); border-radius: var(--au-r-s); background: var(--au-surface-2); flex-wrap: wrap; }
.pt-type { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: rgba(245,163,11,.16); }
.pt-type.sortie { background: rgba(94,226,196,.18); }
.pt-etat { min-height: 20px; font-size: 13.5px; color: var(--au-texte-2); position: relative; }
.pt-etat.erreur { color: var(--au-corail); font-weight: 500; }
.pt-chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pt-chiffre { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--au-r-s); border: 1px solid var(--au-trait); }
.pt-chiffre strong { font-size: 20px; font-weight: 600; }
.pt-pin { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 220px)); gap: 12px; align-items: end; }
.pt-pin .au-aide, .pt-pin .au-message { grid-column: 1 / -1; }
.pt-mini { min-height: 32px !important; padding: 0 10px !important; font-size: 12px !important; }
.pt-repos td { color: var(--au-texte-3); }
.pt-code { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.pt-code strong.au-chiffres { font-size: 26px; letter-spacing: .12em; padding: 0 6px; }
.moi-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 720px) { .pt-corps { grid-template-columns: 1fr; } .pt-bouton { min-height: 112px; } }

/* ── Planning (phase 4, lot 2) ── */
.pl-barre { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pl-barre .au-saisie { width: auto; min-width: 150px; }
.pl-titre { font-size: 16px; margin: 0 6px; }
.pl-grille th.pl-auj { color: var(--au-ambre); }
.pl-grille td { vertical-align: top; }
.pl-nom { font-weight: 600; white-space: nowrap; }
.pl-cellule { min-width: 152px; border-radius: var(--au-r-s); }
.pl-cellule .pl-choix { min-height: 34px; font-size: 12.5px; padding: 0 8px; }
.pl-info { font-size: 11.5px; color: var(--au-texte-3); margin-top: 4px; white-space: nowrap; }
.pl-cellule.travail { box-shadow: inset 3px 0 0 var(--au-lagon); }
.pl-cellule.nuit { box-shadow: inset 3px 0 0 #5B6BD6; background: rgba(91,107,214,.08); }
.pl-cellule.repos { background: var(--au-surface-2); }
.pl-cellule.repos .pl-info { font-style: italic; }
.pl-cellule.modifie { box-shadow: inset 0 0 0 2px var(--au-ambre); }
.pl-coches { display: flex; flex-wrap: wrap; gap: 8px; max-height: 240px; overflow-y: auto; }
.pl-ma-semaine { display: grid; grid-template-columns: repeat(7, minmax(96px, 1fr)); gap: 8px; overflow-x: auto; }
.pl-jour { display: grid; gap: 3px; padding: 10px; border-radius: var(--au-r-s); border: 1px solid var(--au-trait); font-size: 12.5px; }
.pl-jour strong { font-size: 13px; }
.pl-jour.repos { background: var(--au-surface-2); color: var(--au-texte-3); }
.pl-jour.planifie { border-color: var(--au-ambre); }
.pl-j { color: var(--au-texte-3); text-transform: capitalize; }
@media (max-width: 720px) { .pl-ma-semaine { grid-template-columns: repeat(7, 104px); } }
.pl-grille td.montant { white-space: nowrap; }
