/* Admin Varah : sobre, aux couleurs de Varah, lisible dès 360 px. Aucun style en ligne dans les pages (CSP). */
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --petrole: #0a536c;
  --turquoise: #78beb4;
  --fond: #f8f7f3;
  --orange: #d9694f;
  --orange-texte: #8a3a27;
  --texte: #1e2f35;
  --doux: #4f6068;
  --trait: #d9dcd6;
  --blanc: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

h1 { font-size: 1.5rem; margin: 0 0 .75rem; color: var(--petrole); }
h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; color: var(--petrole); }
p { margin: 0 0 .9rem; }
a { color: var(--petrole); }
code { font-family: ui-monospace, Consolas, monospace; background: #eceee9; padding: .1rem .35rem; border-radius: .25rem; }
.doux { color: var(--doux); }

:focus-visible { outline: 3px solid var(--petrole); outline-offset: 2px; }

/* Marque */
.marque { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--petrole); text-decoration: none; margin: 0; }
.marque img { display: block; }

/* Barre du haut */
.barre {
  background: var(--blanc);
  border-bottom: 3px solid var(--turquoise);
  padding: .6rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.25rem;
}
.barre nav { flex: 1 1 100%; order: 3; overflow-x: auto; }
.onglets { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.onglet {
  display: inline-block;
  padding: .45rem .8rem;
  border-radius: .5rem;
  color: var(--petrole);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
a.onglet:hover { background: #e8f3f1; }
.onglet.actif { background: var(--petrole); color: var(--blanc); }
.onglet.bientot { color: var(--doux); font-weight: 400; cursor: default; }
.onglet small { font-size: .75rem; }

.compte { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.compte form { margin: 0; }
.nom { color: var(--doux); }

@media (min-width: 900px) {
  .barre nav { flex: 1 1 auto; order: 0; overflow: visible; }
  .compte { margin-left: 0; }
}

/* Contenu */
.page { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.carte {
  max-width: 26rem;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: 1rem;
}
.carte .marque { margin-bottom: 1.25rem; }
@media (max-width: 480px) { .carte { margin: 0; border: 0; border-radius: 0; min-height: 100vh; } }

/* Formulaires */
label { font-weight: 700; display: inline-block; margin-bottom: .25rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  width: 100%;
  font: inherit;
  padding: .55rem .7rem;
  border: 1px solid #8a9aa0;
  border-radius: .5rem;
  background: var(--blanc);
  color: var(--texte);
}
.bouton, button.bouton {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: .6rem 1.1rem;
  border: 0;
  border-radius: .5rem;
  background: var(--petrole);
  color: var(--blanc);
  text-decoration: none;
  cursor: pointer;
}
.bouton:hover { background: #07425a; }
button.lien { font: inherit; background: none; border: 0; padding: .25rem; color: var(--petrole); text-decoration: underline; cursor: pointer; }
.erreur { color: var(--orange-texte); font-weight: 700; }
.qr { max-width: 14rem; margin: 0 0 1rem; background: var(--blanc); }
.qr svg { display: block; width: 100%; height: auto; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; }
.codes li { margin: 0; }

/* Bandeau de rappel */
.bandeau {
  background: #fdf0ec;
  border-left: 6px solid var(--orange);
  color: var(--orange-texte);
  padding: .9rem 1rem;
  border-radius: .5rem;
  margin-bottom: 1.5rem;
}
.bandeau p:last-child { margin-bottom: 0; }

/* Journal */
.filtres { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; margin-bottom: 1rem; }
.filtres p { margin: 0; flex: 1 1 10rem; max-width: 16rem; }
.filtres .actions { flex: 0 0 auto; display: flex; align-items: center; gap: 1rem; }
.tableau-defilant { overflow-x: auto; background: var(--blanc); border: 1px solid var(--trait); border-radius: .75rem; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { background: #eef5f3; color: var(--petrole); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.vide { text-align: center; color: var(--doux); padding: 1.5rem; }
.pagination { display: flex; justify-content: space-between; margin-top: 1rem; }

/* Équipe */
.succes { background: #e8f3f1; border-left: 6px solid var(--turquoise, #78BEB4); color: var(--petrole); padding: .7rem 1rem; border-radius: .5rem; font-weight: 700; }
/* Information neutre (ni réussite, ni erreur) : par exemple l'Annuaire fermé après 30 minutes */
.info { background: var(--blanc); border-left: 6px solid var(--doux); color: var(--texte); padding: .7rem 1rem; border-radius: .5rem; }
.actions-equipe form { display: block; margin: 0; }
.invitation { max-width: 28rem; }

/* Tableau de bord */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.periode { background: var(--blanc); border: 1px solid var(--trait); border-radius: .75rem; padding: .9rem 1rem; margin-bottom: .75rem; }
.periode-actuelle { margin-bottom: 1rem; }
.bloc { background: var(--blanc); border: 1px solid var(--trait); border-radius: 1rem; padding: 1rem 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.bloc h2 { margin-top: 0; padding-bottom: .4rem; border-bottom: 3px solid var(--turquoise); }
.bloc h3 { font-size: 1rem; margin: 1.4rem 0 .5rem; color: var(--texte); }
.chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: .75rem; margin: .75rem 0 .25rem; }
.chiffre { background: var(--fond); border: 1px solid var(--trait); border-radius: .75rem; padding: .7rem .85rem; min-width: 0; }
.chiffre p { margin: 0; }
.chiffre-nom { color: var(--doux); font-size: .88rem; }
.chiffre-valeur { font-size: 1.9rem; font-weight: 700; color: var(--petrole); line-height: 1.2; overflow-wrap: anywhere; }
.chiffre-valeur small { font-size: .8rem; font-weight: 400; }
.chiffre-delta { font-size: .9rem; font-weight: 700; }
.chiffre-delta small { font-weight: 400; }
.delta-haut, .delta-bas, .delta-egal { color: var(--petrole); }
.delta-aucun { color: var(--doux); }
.indispo { color: var(--doux); font-size: 1.1rem; font-weight: 400; }
.taches { list-style: none; margin: 0; padding: 0; }
.taches li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; padding: .5rem 0; border-bottom: 1px solid var(--trait); }
.taches li:last-child { border-bottom: 0; }
.taches li > span:first-child { font-weight: 700; flex: 1 1 14rem; }
.pastille { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.pastille.retard { background: var(--orange); color: #1a1a1a; }
.pastille.ok { background: #e8f3f1; color: var(--petrole); }
.masque { background: var(--fond); border-left: 6px solid var(--turquoise); padding: .6rem .9rem; border-radius: .5rem; color: var(--doux); }
.graphique { position: relative; height: 16rem; width: 100%; }
.graphique-haut { height: 20rem; }
.graphique canvas { max-width: 100%; }
details { margin: .5rem 0 0; }
summary { cursor: pointer; color: var(--petrole); font-weight: 700; padding: .25rem 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody th[scope="row"] { background: transparent; white-space: normal; font-weight: 400; color: var(--texte); }
@media (max-width: 720px) {
  .chiffres { grid-template-columns: 1fr 1fr; }
  .graphique { height: 14rem; }
  .graphique-haut { height: 18rem; }
}
@media (max-width: 420px) { .chiffres { grid-template-columns: 1fr; } .bloc { padding: .8rem .8rem 1rem; } }

/* Annuaire : page d'entrée */
.cadre-annuaire { max-width: 40rem; }
.entree-annuaire { max-width: 32rem; }
.motifs { border: 1px solid var(--trait); border-radius: .75rem; padding: .5rem 1rem .25rem; margin: 0 0 .9rem; background: var(--blanc); }
.motifs legend { font-weight: 700; padding: 0 .25rem; }
.motifs p { display: flex; align-items: center; gap: .5rem; margin: 0 0 .4rem; }
.motifs label { font-weight: 400; margin: 0; }
.motifs input[type="radio"] { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--petrole); }
textarea { resize: vertical; }

/* Annuaire */
.fermeture { margin-top: 1.5rem; }
th a { color: inherit; text-decoration: none; }
th a:hover, th a:focus-visible { text-decoration: underline; }
td small { font-size: .8rem; }

/* Annuaire : fiche d'un compte */
tbody th[scope="row"] { width: 10rem; }

/* Annuaire : actions sur un compte */
.actions-compte { margin-top: 2rem; }
.actions-compte .action { background: var(--blanc); border: 1px solid var(--trait); border-radius: .75rem; padding: .9rem 1rem; margin: 0 0 1rem; max-width: 40rem; }
.actions-compte .action p { margin: 0 0 .75rem; }
.actions-compte .action-danger { border-left: 6px solid var(--orange); }
.bouton-danger { background: var(--orange-texte); }
.bouton-danger:hover { background: #6f2e1f; }
