@font-face { font-family: "Atkinson"; src: url(/fonts/atkinson-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(/fonts/atkinson-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --encre: #16212C; --encre-2: #4A5763; --fond: #EEF1F0; --surface: #FFFFFF; --trait: #D3DAD8; --trait-2: #E4E8E7;
  --bleu: #1B4F9C; --bleu-fonce: #133B76; --bleu-pale: #E3EBF6;
  --ok: #17703F; --ok-pale: #E2F1E7; --warn: #8F5200; --warn-pale: #FBEFD9; --ko: #B3261E; --ko-pale: #FBE6E4;
  --neutre: #56616B; --neutre-pale: #E8ECEE;
  --r-s: 6px; --r-m: 10px; --r-l: 18px;
  --ombre: 0 1px 2px rgba(22, 33, 44, .07), 0 6px 16px -4px rgba(22, 33, 44, .10);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #B9C3C0 transparent; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 1rem/1.5 "Atkinson", system-ui, sans-serif; caret-color: var(--bleu); min-height: 100dvh; }
::selection { background: var(--bleu-pale); color: var(--bleu-fonce); }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; border-radius: 4px; }
img { display: block; max-width: 100%; }
a { color: var(--bleu); text-underline-offset: .2em; }
h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin-top: 2.25rem; margin-bottom: .75rem; }
p { margin: 0; }
.num, time, .date { font-variant-numeric: tabular-nums; }
.evitement { position: absolute; left: -999px; }
.evitement:focus { left: 1rem; top: .5rem; z-index: 10; background: var(--surface); padding: .5rem 1rem; }

/* Barre */
.barre { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1.5rem; padding: .7rem max(1rem, env(safe-area-inset-left)); background: var(--encre); color: #fff; }
.marque { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.marque svg { width: 28px; height: 28px; color: #8FB4EA; }
#nav { display: flex; gap: .25rem; }
#nav a { display: flex; align-items: center; gap: .5rem; color: #C9D3DC; text-decoration: none; padding: .45rem .8rem; border-radius: var(--r-s); font-weight: 700; font-size: .95rem; }
#nav a svg { width: 18px; height: 18px; }
#nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
#nav a[aria-current="page"] { color: #fff; background: rgba(143, 180, 234, .18); }
#nav .compteur { background: #F0B44C; color: var(--encre); border-radius: 99px; padding: 0 .45rem; font-size: .8rem; line-height: 1.35rem; }
#sortir { margin-left: auto; color: #C9D3DC; }
#sortir:hover { color: #fff; background: rgba(255, 255, 255, .08); }

main { max-width: 1120px; margin: 0 auto; padding: 1.75rem 1rem 6rem; outline: none; }
.chargement { color: var(--encre-2); }
.entete { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.resume { color: var(--encre-2); margin-top: .4rem; max-width: 62ch; }
.resume strong { color: var(--encre); }
.retour { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: 1rem; font-weight: 700; text-decoration: none; }
.retour svg { width: 18px; height: 18px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .55rem 1rem; border: 1px solid var(--trait); border-radius: var(--r-s); background: var(--surface); color: var(--encre); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: #AEB9B6; background: #F7F9F8; }
.btn.principal { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.btn.principal:hover { background: var(--bleu-fonce); }
.btn.danger { color: var(--ko); }
.btn.danger.plein { background: var(--ko); border-color: var(--ko); color: #fff; }
.btn.discret { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .55; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* États */
.pastille { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .6rem; border-radius: 99px; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.pastille::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.ok { color: var(--ok); background: var(--ok-pale); }
.warn { color: var(--warn); background: var(--warn-pale); }
.ko { color: var(--ko); background: var(--ko-pale); }
.neutre { color: var(--neutre); background: var(--neutre-pale); }

/* Listes de documents */
.liste { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-m); overflow: hidden; }
.liste li + li { border-top: 1px solid var(--trait-2); }
.ligne { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: .9rem; padding: .7rem 1rem; color: inherit; text-decoration: none; }
.ligne:hover { background: #F6F8F8; }
.ligne strong { display: block; }
.ligne .sous { color: var(--encre-2); font-size: .9rem; }
.ligne .droite { display: grid; justify-items: end; gap: .2rem; text-align: right; }
.ligne .droite .date { color: var(--encre-2); font-size: .85rem; }
.vignette { width: 48px; height: 48px; border-radius: var(--r-s); object-fit: cover; background: var(--neutre-pale); }
.vignette.vide { display: grid; place-items: center; color: var(--neutre); }
.vignette.vide svg { width: 22px; height: 22px; }
.initiales { display: grid; place-items: center; background: var(--bleu-pale); color: var(--bleu-fonce); font-weight: 700; }
.mois { margin: 1.25rem 0 .5rem; font-size: .95rem; color: var(--encre-2); font-weight: 700; }
.vide-msg { padding: 1.25rem 1rem; color: var(--encre-2); background: var(--surface); border: 1px dashed var(--trait); border-radius: var(--r-m); }

/* Équipe */
.recherche { position: relative; flex: 1 1 260px; max-width: 360px; }
.recherche svg { position: absolute; left: .75rem; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--encre-2); }
.recherche input { padding-left: 2.4rem; }
.equipe { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.tuile { display: grid; grid-template-columns: 64px 1fr; gap: .9rem; align-items: center; padding: .8rem; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-m); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .2s var(--ease); }
.tuile:hover { border-color: #AEB9B6; box-shadow: var(--ombre); }
.tuile img, .tuile .initiales { width: 64px; height: 64px; border-radius: var(--r-s); object-fit: cover; }
.tuile strong { display: block; font-size: 1.05rem; }
.tuile .sous { color: var(--encre-2); font-size: .9rem; margin-bottom: .35rem; }

/* Fiche technicien : le badge */
.fiche { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 2rem; align-items: start; }
.badge { position: sticky; top: 5rem; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--ombre); overflow: hidden; border: 1px solid var(--trait); }
.badge-bande { position: relative; height: 3.25rem; display: flex; align-items: end; justify-content: center; padding-bottom: .5rem; font-weight: 700; font-size: .95rem; color: #fff; background: var(--neutre); }
.badge-bande::before { content: ""; position: absolute; top: .65rem; left: 50%; translate: -50% 0; width: 3.5rem; height: .55rem; border-radius: 99px; background: var(--fond); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.et-valide .badge-bande { background: var(--ok); }
.et-bientot .badge-bande { background: #B86A00; }
.et-expire .badge-bande { background: var(--ko); }
.badge-corps { padding: 1.5rem 1.5rem 1.25rem; display: grid; justify-items: center; text-align: center; gap: .2rem; }
.badge-photo { width: 132px; height: 132px; border-radius: 14px; object-fit: cover; margin-bottom: .75rem; font-size: 2.4rem; }
.badge-nom { font-size: 1.6rem; letter-spacing: .01em; }
.badge-prenom { font-size: 1.15rem; color: var(--encre-2); }
.badge-societe { margin-top: .6rem; font-size: .85rem; color: var(--encre-2); display: flex; align-items: center; gap: .35rem; }
.badge-societe svg { width: 16px; height: 16px; color: var(--bleu); }
.habil { list-style: none; padding: 1rem 1.25rem 1.25rem; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; border-top: 1px dashed var(--trait); }
.habil li { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 99px; background: var(--bleu-pale); color: var(--bleu-fonce); font-size: .85rem; font-weight: 700; }
.habil li svg { width: 14px; height: 14px; }
.habil li.warn { background: var(--warn-pale); color: var(--warn); }
.contacts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--trait-2); }
.contacts a { display: grid; justify-items: center; gap: .2rem; padding: .7rem .25rem; font-size: .8rem; font-weight: 700; text-decoration: none; color: var(--bleu); }
.contacts a + a { border-left: 1px solid var(--trait-2); }
.contacts a:hover { background: var(--bleu-pale); }
.contacts svg { width: 20px; height: 20px; }
.contacts a[aria-disabled="true"] { color: #A4AEB4; pointer-events: none; }
.bloc-admin { margin-top: 1rem; display: grid; gap: .5rem; }
details.historique { margin-top: 1.5rem; }
details.historique summary { cursor: pointer; font-weight: 700; color: var(--encre-2); padding: .4rem 0; }
details.historique .liste { margin-top: .5rem; opacity: .85; }

/* Document */
.doc-tete { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: .4rem 0 1.5rem; }
.infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin: 0 0 1.5rem; background: var(--trait-2); border: 1px solid var(--trait); border-radius: var(--r-m); overflow: hidden; }
.infos div { background: var(--surface); padding: .8rem 1rem; }
.infos dt { font-size: .85rem; color: var(--encre-2); }
.infos dd { margin: .15rem 0 0; font-weight: 700; font-size: 1.05rem; }
.scans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.scans figure { margin: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-m); padding: .6rem; }
.scans img { width: 100%; max-height: 420px; object-fit: contain; border-radius: var(--r-s); background: var(--neutre-pale); }
.scans figcaption { padding: .5rem .25rem 0; font-size: .9rem; color: var(--encre-2); }
.note { margin-bottom: 1.25rem; padding: .7rem 1rem; border-radius: var(--r-s); background: var(--neutre-pale); color: var(--encre-2); }
.confirmer { margin-top: 1rem; padding: 1rem; border-radius: var(--r-m); background: var(--ko-pale); color: var(--ko); display: grid; gap: .75rem; }
.confirmer p { font-weight: 700; }

/* Formulaires */
form.formulaire { max-width: 640px; display: grid; gap: 1.1rem; }
label, .etiquette { display: block; font-weight: 700; margin-bottom: .35rem; }
.aide-champ { font-weight: 400; color: var(--encre-2); font-size: .9rem; }
input, select { width: 100%; min-height: 46px; padding: .55rem .75rem; border: 1px solid #B9C3C0; border-radius: var(--r-s); background: var(--surface); color: var(--encre); font: inherit; }
input:hover, select:hover { border-color: #8C9894; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--bleu); outline-offset: 0; border-color: var(--bleu); }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fichiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.champ-fichier { border: 1px solid var(--trait); border-radius: var(--r-m); background: var(--surface); padding: .75rem; display: grid; gap: .6rem; align-content: start; }
.champ-fichier .apercu { height: 120px; border-radius: var(--r-s); background: var(--neutre-pale); display: grid; place-items: center; color: var(--encre-2); font-size: .9rem; overflow: hidden; text-align: center; padding: .25rem; }
.champ-fichier .apercu img { width: 100%; height: 100%; object-fit: cover; }
.champ-fichier .btn { min-height: 40px; }
.champ-fichier input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.erreur { color: var(--ko); font-weight: 700; min-height: 1.5em; }

/* Connexion */
.connexion { max-width: 400px; margin: 8vh auto 0; display: grid; gap: 1.5rem; }
.connexion .marque-grande { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--bleu-fonce); }
.connexion .marque-grande svg { width: 34px; height: 34px; color: var(--bleu); }
.connexion form { display: grid; gap: .6rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-l); box-shadow: var(--ombre); }
.connexion .aide { color: var(--encre-2); font-size: .95rem; }

.toast { position: fixed; left: 50%; bottom: 5.5rem; translate: -50% 0; z-index: 20; background: var(--encre); color: #fff; padding: .7rem 1.1rem; border-radius: var(--r-s); font-weight: 700; box-shadow: var(--ombre); animation: monte .35s var(--ease); }
@keyframes monte { from { opacity: 0; translate: -50% .75rem; } }

@media (max-width: 760px) {
  .barre { gap: .75rem; }
  #nav { position: fixed; left: 0; right: 0; bottom: 0; justify-content: space-around; padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom)); background: var(--encre); }
  #nav a { flex-direction: column; gap: .1rem; font-size: .8rem; padding: .35rem 1rem; }
  #nav a svg { width: 22px; height: 22px; }
  h1 { font-size: 1.5rem; }
  .fiche { grid-template-columns: 1fr; gap: 1.5rem; }
  .badge { position: static; }
  .deux { grid-template-columns: 1fr; }
  .ligne { grid-template-columns: 44px 1fr; }
  .ligne .droite { grid-column: 2; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; gap: .6rem; }
  .vignette { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.entete h2 { margin: 0; }
.champ-fichier label.btn { margin: 0; }
.formulaire { margin-top: 1.5rem; }
.espace { margin-top: 2.5rem; }
h3.mois { margin: 1.25rem 0 .5rem; font-size: .95rem; }
[hidden] { display: none !important; }
main:focus, main:focus-visible { outline: none; }
.sous { display: block; }
.scans { align-items: start; }

/* Charte Locan Telecom : noir du logo, rouge « telecom » en accent */
:root { --bleu: #1D1D1B; --bleu-fonce: #000; --bleu-pale: #EDEFEE; --rouge-marque: #C4161C; }
.barre { background: #fff; color: var(--encre); border-bottom: 1px solid var(--trait); }
.marque img { height: 40px; width: auto; }
#nav a { color: var(--encre-2); }
#nav a:hover { color: var(--encre); background: var(--fond); }
#nav a[aria-current="page"] { color: var(--encre); background: var(--fond); box-shadow: inset 0 -2px 0 var(--rouge-marque); }
#nav .compteur { background: var(--rouge-marque); color: #fff; }
#sortir { color: var(--encre-2); }
#sortir:hover { color: var(--encre); background: var(--fond); }
.logo-connexion { width: 220px; height: auto; }
.badge-logo { height: 30px; width: auto; margin-top: .7rem; }
@media (max-width: 760px) { #nav { background: #fff; border-top: 1px solid var(--trait); } .marque img { height: 34px; } }
