/* Module Administration et personnel : couleurs de la charte graphique INS 2026 (vert, jaune, rouge). */
:root {
  --vert: #179b48; --vert-fonce: #0b6b3a; --vert-nuit: #093d20; --vert-clair: #e6f3ea;
  --jaune: #f9df4e; --rouge: #e0201f; --or: #e1b329;
  --fond: #f4f7f5; --carte: #ffffff; --texte: #16211c; --doux: #4a5a52; --trait: #d5dfd9;
  --attention-fond: #fff6d6; --erreur-fond: #fde8e7; --erreur: #a3150f;
  --police: "Gilroy", "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 15px/1.5 var(--police); }
a { color: var(--vert-fonce); }
h1 { font-size: 1.6rem; margin: 0 0 4px; color: var(--vert-nuit); }
h2 { font-size: 1.15rem; margin: 0 0 10px; color: var(--vert-nuit); }
h3 { font-size: 1rem; margin: 0 0 6px; }
.doux { color: var(--doux); }
.mono { font-family: "IBM Plex Mono", Consolas, monospace; }

/* bande du drapeau sur toute la largeur */
.drapeau { height: 6px; background: linear-gradient(90deg, var(--vert) 0 33.33%, var(--jaune) 33.33% 66.66%, var(--rouge) 66.66%); }
.haut { background: var(--vert-nuit); color: #fff; }
.haut .contenu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-block: 10px; }
.marque { font-weight: 800; letter-spacing: .02em; color: #fff; text-decoration: none; }
.marque small { display: block; font-weight: 500; font-size: 11px; color: #bfe0cb; letter-spacing: .06em; text-transform: uppercase; }
.menu { display: flex; flex-wrap: wrap; gap: 4px; margin-right: auto; }
.menu a { color: #d6e8dc; text-decoration: none; padding: 6px 12px; border-radius: 6px; font-weight: 600; }
.menu a:hover, .menu a.actif { background: rgba(255,255,255,.14); color: #fff; }
.utilisateur { font-size: 13px; color: #bfe0cb; display: flex; align-items: center; gap: 10px; }
.utilisateur button { background: transparent; border: 1px solid #5f8f74; color: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer; font: inherit; }

.contenu { width: min(1180px, 100% - 32px); margin-inline: auto; }
main.contenu { padding-block: 24px 48px; display: grid; gap: 18px; }
.entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px; }
.entete .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fil { font-size: 13px; color: var(--doux); }

.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: 10px; padding: 18px; min-width: 0; }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.chiffre { background: var(--carte); border: 1px solid var(--trait); border-radius: 10px; padding: 14px 16px; }
.chiffre strong { display: block; font-size: 1.8rem; color: var(--vert-fonce); line-height: 1.1; }

.message { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--trait); }
.message.succes { background: var(--vert-clair); border-color: #a8d5b7; }
.message.erreur { background: var(--erreur-fond); border-color: #f0b3af; color: var(--erreur); font-weight: 600; }
.message.info { background: var(--attention-fond); border-color: #ecd98d; }

/* formulaires */
label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #b9c7bf; border-radius: 6px; background: #fff; color: var(--texte); min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #9ad3ae; outline-offset: 1px; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; align-items: start; }
.champs .large { grid-column: 1 / -1; }
.aide { font-weight: 400; font-size: 12.5px; color: var(--doux); }
.ligne { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.ligne > label { flex: 1 1 200px; }

.bouton { display: inline-block; background: var(--vert-fonce); color: #fff; border: 0; border-radius: 6px; padding: 9px 16px; font: 700 14px var(--police); cursor: pointer; text-decoration: none; }
.bouton:hover { background: var(--vert-nuit); }
.bouton.second { background: #fff; color: var(--vert-fonce); border: 1px solid var(--vert-fonce); }
.bouton.danger { background: #fff; color: var(--erreur); border: 1px solid var(--erreur); }
.bouton.petit { padding: 5px 10px; font-size: 13px; }

/* tableaux */
.defil { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { background: var(--vert-clair); color: var(--vert-nuit); font-size: 13px; white-space: nowrap; }
tr:hover td { background: #fafcfb; }

.etiquette { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e9eeeb; color: var(--doux); white-space: nowrap; }
.etiquette.vert { background: var(--vert-clair); color: var(--vert-fonce); }
.etiquette.jaune { background: var(--attention-fond); color: #7a5b00; }
.etiquette.rouge { background: var(--erreur-fond); color: var(--erreur); }

/* organigramme */
.arbre, .arbre ul { list-style: none; margin: 0; padding: 0; }
.arbre ul { margin-left: 18px; padding-left: 16px; border-left: 2px solid var(--trait); }
.arbre li { margin: 6px 0; }
.noeud { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 12px; border: 1px solid var(--trait); border-radius: 8px; background: #fff; text-decoration: none; color: var(--texte); }
a.noeud:hover { border-color: var(--vert); background: var(--vert-clair); }
.noeud .type { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--vert-fonce); }
.noeud .code { font-size: 12px; color: var(--doux); }
.noeud .eff { font-size: 12px; background: var(--vert-clair); border-radius: 99px; padding: 1px 8px; color: var(--vert-fonce); font-weight: 700; }

/* fiche agent */
.fiche { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: start; }
@media (max-width: 640px) { .fiche { grid-template-columns: 1fr; } }
.photo { width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--or); object-fit: cover; background: #e9efeb; display: block; }
.photo.vide { display: grid; place-items: center; color: var(--doux); font-size: 13px; text-align: center; }
.identifiant { font-family: "IBM Plex Mono", Consolas, monospace; font-weight: 700; font-size: 1.15rem; background: var(--vert-clair); color: var(--vert-nuit); padding: 4px 10px; border-radius: 6px; display: inline-block; }
.liste-def { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.liste-def dt { color: var(--doux); font-weight: 600; }
.liste-def dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .liste-def { grid-template-columns: 1fr; } .liste-def dd { margin-bottom: 6px; } }

/* connexion, inscription, vérification */
.centre { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.boite { width: min(460px, 100% - 32px); margin: 40px auto; display: grid; gap: 14px; }
.verdict { text-align: center; padding: 18px; border-radius: 10px; border: 2px solid; }
.verdict strong { font-size: 1.4rem; display: block; }
.verdict.valide { background: var(--vert-clair); border-color: var(--vert); color: var(--vert-nuit); }
.verdict.refus { background: var(--erreur-fond); border-color: var(--rouge); color: var(--erreur); }
.verdict.attention { background: var(--attention-fond); border-color: var(--or); color: #5b4300; }
.pied { text-align: center; font-size: 12.5px; color: var(--doux); padding: 20px 16px; }

/* temps réel */
.espace-haut { margin-top: 14px; }
.voyant { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e9eeeb; color: var(--doux); }
.voyant.en-ligne { background: var(--vert-clair); color: var(--vert-fonce); }
.voyant.en-ligne::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--vert); margin-right: 6px; }
.alertes { position: fixed; right: 16px; top: 64px; z-index: 50; display: grid; gap: 8px; width: min(380px, calc(100% - 32px)); }
.alerte { background: var(--vert-nuit); color: #fff; border-left: 6px solid var(--jaune); border-radius: 8px; padding: 12px 36px 12px 14px; box-shadow: 0 6px 22px rgba(0,0,0,.25); position: relative; font-weight: 600; }
.alerte-fermer { position: absolute; right: 8px; top: 6px; background: transparent; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
tr.change td { background: #fff6d6 !important; transition: background 1s; }
fieldset.jours { border: 1px solid var(--trait); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
fieldset.jours legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
label.case { display: flex; align-items: center; gap: 6px; font-weight: 400; }
label.case input { padding: 0; }

/* congés, missions, validations */
.etiquette.bleu { background: #e3eefb; color: #174a8b; }
.pastille { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--rouge); color: #fff; font-size: 12px; font-weight: 800; text-align: center; margin-left: 4px; }
.etapes-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.etapes-liste li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 8px; background: #fff; }
.etapes-liste .rond { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #e9eeeb; color: var(--doux); }
.etapes-liste .acceptee .rond { background: var(--vert); color: #fff; }
.etapes-liste .refusee .rond { background: var(--rouge); color: #fff; }
.etapes-liste .courante { border-color: var(--or); background: var(--attention-fond); }
.soldes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.solde { border: 1px solid var(--trait); border-radius: 10px; padding: 12px 14px; background: #fff; }
.solde strong { display: block; font-size: 1.7rem; color: var(--vert-fonce); line-height: 1.1; }
.solde.bas strong { color: var(--erreur); }
table.calendrier { width: auto; min-width: 100%; }
table.calendrier th, table.calendrier td { padding: 4px 2px; text-align: center; min-width: 26px; font-size: 12px; }
table.calendrier td.nom, table.calendrier th.nom { text-align: left; white-space: nowrap; padding-left: 10px; position: sticky; left: 0; background: #fff; }
table.calendrier .we { background: #f0f3f1; }
table.calendrier .C { background: #bfe3cb; font-weight: 800; }
table.calendrier .M { background: #bcd4f3; font-weight: 800; }
table.calendrier .c, table.calendrier .m { background: #fff6d6; font-weight: 700; color: #7a5b00; }

/* communication et tableaux de bord */
.liste-simple { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.liste-simple li { padding: 6px 0; border-bottom: 1px solid var(--trait); }
.liste-simple li:last-child { border-bottom: 0; }
a.chiffre.lien { text-decoration: none; color: var(--texte); }
a.chiffre.lien:hover { border-color: var(--vert); background: var(--vert-clair); }
.texte-long { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.mois { text-transform: capitalize; padding: 0 8px; align-self: center; }
.onglets { display: flex; flex-wrap: wrap; gap: 6px; }
.onglets a { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--trait); background: #fff; text-decoration: none; font-weight: 700; color: var(--doux); }
.onglets a.actif { background: var(--vert-fonce); color: #fff; border-color: var(--vert-fonce); }
.cloche { color: #d6e8dc; text-decoration: none; padding: 6px 12px; border-radius: 6px; font-weight: 600; }
.cloche:hover, .cloche.actif { background: rgba(255,255,255,.14); color: #fff; }
.en-ligne { display: inline-block; margin-left: 8px; }

/* dossier */
.barre { width: 100%; height: 14px; accent-color: var(--vert); }
fieldset.groupe-dossier { border: 1px solid var(--trait); border-radius: 8px; margin: 0 0 14px; padding: 10px 14px 14px; }
fieldset.groupe-dossier legend { font-weight: 700; color: var(--vert-nuit); padding: 0 6px; }

/* sécurité */
.code-grand { font-size: 1.6rem; letter-spacing: .3em; text-align: center; }
.boite.large-boite { width: min(560px, 100% - 32px); }
.qr { width: 220px; max-width: 100%; margin: 10px 0; background: #fff; padding: 10px; border: 1px solid var(--trait); border-radius: 8px; }
.qr svg { width: 100%; height: auto; display: block; }
ol.pas-a-pas { display: grid; gap: 14px; padding-left: 20px; margin: 0 0 16px; }
ul.codes-secours { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
ul.codes-secours li { background: var(--vert-clair); border-radius: 6px; padding: 8px 10px; font-size: 1.05rem; text-align: center; }

/* piège à robots du formulaire de demande d'inscription : hors écran, jamais vu d'un humain */
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
