/* utjb.css - Charte UTJB (Ref couleurs UTJB.pdf, brandkit du 03.07.2026).
   Mobile-first : le comite consulte sur telephone. Aucun framework. */

:root {
  --vert-fonce: #13353a;   /* couleur principale */
  --bleu: #17a5b5;         /* La Grandiose : liens, actions */
  --vert: #4ca686;         /* L'Essentielle : titres, ok */
  --vert-clair: #7dbc57;   /* La Traversee : confirmations */
  --jaune: #d8dc4b;        /* La Decouverte : alertes douces */
  --fond: #f2f5f4;
  --carte: #ffffff;
  --texte: #13353a;
  --texte-doux: #5a7176;
  --rouge: #c0392b;
  --bord: #dde5e3;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fond);
  color: var(--texte);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: 72px; /* place pour la barre de navigation basse */
}

/* ---------- En-tete ---------- */
.entete {
  background: var(--vert-fonce);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.entete .logo { height: 36px; width: auto; }
.entete-titres { display: flex; flex-direction: column; line-height: 1.2; }
.entete-titres strong { font-size: 15px; }
.entete-titres span { font-size: 12.5px; opacity: .8; }

/* ---------- Contenu ---------- */
.contenu { max-width: 720px; margin: 0 auto; padding: 14px; }
.bonjour { font-size: 18px; font-weight: 600; margin: 4px 2px 10px; }
a { color: var(--bleu); }
h2 { font-size: 16px; color: var(--vert); margin: 0 0 10px; }

.carte {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.vide { color: var(--texte-doux); font-size: 14.5px; margin: 0; }

/* ---------- Compte a rebours ---------- */
.hero {
  background: var(--vert-fonce);
  color: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 14px;
  text-align: center;
}
.hero-j { font-size: 44px; font-weight: 800; letter-spacing: 1px; color: var(--jaune); }
.hero-detail { font-size: 14px; opacity: .95; margin-top: 4px; }
.hero-detail small { opacity: .7; }

/* ---------- Tuiles ---------- */
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tuile {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  color: var(--texte);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tuile strong { font-size: 22px; color: var(--vert); }
.tuile span { font-size: 12.5px; color: var(--texte-doux); }
.tuile.alerte strong { color: var(--rouge); }

/* ---------- Listes de taches ---------- */
.liste-taches { list-style: none; margin: 0; padding: 0; }
.liste-taches li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 8px 2px; border-bottom: 1px solid var(--bord);
}
.liste-taches li:last-child { border-bottom: 0; }
.liste-taches li.retard small { color: var(--rouge); font-weight: 600; }
.liste-taches small { color: var(--texte-doux); white-space: nowrap; }

/* ---------- Navigation basse ---------- */
.navb {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--carte);
  border-top: 1px solid var(--bord);
  display: flex;
  z-index: 10;
  padding-bottom: env(safe-area-inset-bottom);
}
.navb a {
  flex: 1;
  text-align: center;
  padding: 12px 2px 10px;
  font-size: 12.5px;
  text-decoration: none;
  color: var(--texte-doux);
  border-top: 3px solid transparent;
}
.navb a.actif { color: var(--vert-fonce); font-weight: 700; border-top-color: var(--vert); }

/* ---------- Page Plus ---------- */
.plus-liste { display: flex; flex-direction: column; }
.plus-lien {
  padding: 13px 4px; border-bottom: 1px solid var(--bord);
  text-decoration: none; color: var(--texte); font-weight: 600;
}
.plus-lien:last-child { border-bottom: 0; }
.sortie-lien { color: var(--rouge); }

/* ---------- Boutons et formulaires ---------- */
button {
  background: var(--bleu); color: #fff; border: 0; border-radius: 9px;
  padding: 9px 13px; font-size: 14px; font-weight: 600; cursor: pointer;
}
button.sec { background: var(--fond); color: var(--texte); border: 1px solid var(--bord); }
input, select {
  border: 1px solid var(--bord); border-radius: 9px; padding: 9px 10px;
  font-size: 15px; background: #fff; color: var(--texte); width: 100%;
}
.form-grille { display: flex; flex-direction: column; gap: 8px; }
.form-grille button { align-self: flex-start; }

/* ---------- Administration ---------- */
.membre-ligne {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 10px 2px; border-bottom: 1px solid var(--bord); flex-wrap: wrap;
}
.membre-ligne:last-child { border-bottom: 0; }
.membre-ligne.inactif { opacity: .55; }
.membre-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.membre-id small { color: var(--texte-doux); font-size: 12.5px; }
.membre-boutons { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  display: inline-block; background: var(--fond); border: 1px solid var(--bord);
  color: var(--texte-doux); border-radius: 8px; font-size: 11px; padding: 1px 7px;
  margin-left: 5px; vertical-align: middle;
}
.badge-admin { background: var(--vert-fonce); color: #fff; border-color: var(--vert-fonce); }
.badge-off { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.lien-neuf {
  background: #f4f9e9; border: 1px solid var(--vert-clair); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 12px;
}
.lien-neuf code { display: block; word-break: break-all; margin: 6px 0 10px; font-size: 13px; }
.edition-ligne {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 2px; border-bottom: 1px solid var(--bord);
}
.edition-ligne:last-child { border-bottom: 0; }
.edition-ligne input, .edition-ligne select { width: auto; }
.edition-ligne small { color: var(--texte-doux); width: 100%; }

/* ---------- Page d'acces (publique) ---------- */
.page-acces {
  background: var(--vert-fonce); min-height: 100vh; padding-bottom: 0;
  display: flex; align-items: center; justify-content: center;
}
.acces-boite {
  background: var(--carte); border-radius: 14px; padding: 26px 22px;
  max-width: 400px; margin: 20px; text-align: center;
}
.acces-logo { height: 64px; margin-bottom: 8px; }
.acces-boite h1 { font-size: 19px; color: var(--vert-fonce); margin: 6px 0 12px; }
.acces-boite p { font-size: 14.5px; color: var(--texte); }
.acces-note { color: var(--texte-doux); font-size: 13px; }
.alerte { color: var(--rouge); font-weight: 600; }

/* ---------- Chantiers ---------- */
.chantier p { color: var(--texte-doux); }

/* ---------- Un peu d'air sur grand ecran ---------- */
@media (min-width: 720px) {
  .contenu { padding: 20px; }
  .tuiles { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Planning (phase 2) ---------- */
.pl-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pl-filtres select { width: auto; flex: 1 1 130px; font-size: 13.5px; padding: 7px 8px; }
.pl-groupe { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--texte-doux); margin: 14px 0 4px; }
.pl-groupe:first-child { margin-top: 0; }
.pl-ligne {
  display: grid; grid-template-columns: 10px 1fr auto auto; gap: 8px; align-items: baseline;
  padding: 9px 2px; border-bottom: 1px solid var(--bord); cursor: pointer;
}
.pl-ligne:last-child { border-bottom: 0; }
.pl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--texte-doux); align-self: center; }
.pl-titre { font-size: 15px; min-width: 0; }
.pl-rec { color: var(--bleu); font-size: 13px; }
.pl-resp { font-size: 12.5px; color: var(--texte-doux); white-space: nowrap; }
.pl-date { font-size: 13px; color: var(--texte-doux); white-space: nowrap; }
.pl-date.retard { color: var(--rouge); font-weight: 700; }
.statut-fait .pl-titre, .statut-abandonne .pl-titre { text-decoration: line-through; opacity: .55; }
.statut-fait .pl-date, .statut-abandonne .pl-date { opacity: .55; }
.pl-check { font-size: 13.5px; color: var(--texte-doux); display: flex; gap: 6px; align-items: center; }
.pl-check input { width: auto; }
textarea {
  border: 1px solid var(--bord); border-radius: 9px; padding: 9px 10px;
  font-size: 15px; background: #fff; color: var(--texte); width: 100%; font-family: inherit;
}
.pl-statuts { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-tiroir { position: fixed; inset: 0; z-index: 50; }
.pl-tiroir-fond { position: absolute; inset: 0; background: rgba(19, 53, 58, .45); }
.pl-tiroir-corps {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 80vh; overflow-y: auto;
  background: var(--carte); border-radius: 14px 14px 0 0; padding: 16px 14px 22px;
}
.pl-apercu-liste { margin: 8px 0; padding-left: 18px; font-size: 14px; }
.pl-apercu-liste small { color: var(--texte-doux); }
.lien-suite { margin: 8px 0 0; font-size: 13.5px; }
.qui { color: var(--texte-doux); }

/* Couleurs par domaine */
.dom-administration { background: #5a7176; }
.dom-marketing { background: #17a5b5; }
.dom-sponsoring { background: #d8a13b; }
.dom-benevoles { background: #7dbc57; }
.dom-caisse { background: #8b6fc9; }
.dom-balisage { background: #e07b39; }
.dom-ravitaillement { background: #4ca686; }
.dom-patisseries { background: #c96f9a; }
.dom-pc_course { background: #13353a; }
.dom-materiel { background: #6d8ca6; }
.dom-autre { background: #9da9b4; }

@media (min-width: 720px) {
  .pl-tiroir-corps { left: 50%; right: auto; transform: translateX(-50%); width: 560px; border-radius: 14px; bottom: 10vh; }
}

/* ---------- Materiel (phase 3) ---------- */
.mat-barre { display: flex; gap: 8px; margin-bottom: 12px; }
.mat-barre input { flex: 1; }
.mat-barre button { white-space: nowrap; }
.mat-consigne { margin: 0 2px 10px; }
.mat-ligne { grid-template-columns: 10px 1fr auto auto; }
.mat-qte { font-size: 14px; font-weight: 700; color: var(--vert); white-space: nowrap; }
.mat-qte.mat-alerte { color: var(--rouge); }
.mat-qte.mat-ok { color: var(--vert-clair); }
.mat-inv { display: none; gap: 5px; align-items: center; }
.mat-inv input { width: 84px; padding: 6px 8px; font-size: 14px; }
.mat-inv button { padding: 7px 10px; font-size: 13px; }
/* Mode inventaire : le comptage prend sa propre rangee sous le titre,
   la quantite affichee disparait (l'input la porte deja). */
body.inv-actif .mat-ligne { grid-template-columns: 10px 1fr; }
body.inv-actif .mat-qte { display: none; }
body.inv-actif .mat-inv { display: flex; grid-column: 2; }
.mat-mvt { display: flex; gap: 8px; }
.mat-mvt input { width: 90px; }
.mat-mvt select { flex: 1; }

/* Couleurs des categories materiel (completent les dom-* du planning) */
.dom-signaletique { background: #d8a13b; }
.dom-textile { background: #c96f9a; }
.dom-technique { background: #6d8ca6; }
.dom-logistique { background: #5a7176; }

/* ---------- Benevoles (phase 4) ---------- */
.bn-onglet {
  padding: 8px 12px; border-radius: 9px; text-decoration: none;
  color: var(--texte-doux); font-weight: 600; font-size: 14px;
  border: 1px solid var(--bord); background: var(--carte);
}
.bn-onglet.actif { background: var(--vert-fonce); color: #fff; border-color: var(--vert-fonce); }
.chip {
  display: inline-block; border-radius: 9px; font-size: 11.5px; font-weight: 700;
  padding: 2px 8px; background: var(--fond); color: var(--texte-doux); white-space: nowrap;
}
.chip.st-a_contacter { background: #fdf3d7; color: #8a6d1a; }
.chip.st-contacte { background: #e3f2f6; color: #0b98c0; }
.chip.st-confirme { background: #e8f5e0; color: #4a7a2c; }
.chip.st-desiste, .chip.st-absent { background: #fbe4e0; color: var(--rouge); }
.chip.st-present { background: var(--vert-clair); color: #fff; }
.bn-tuiles { grid-template-columns: repeat(3, 1fr); }
.bn-statut { width: auto; font-size: 13px; padding: 6px 8px; }
.bn-ligne .pl-titre { cursor: pointer; }
.bn-creneau { border-top: 1px solid var(--bord); padding: 8px 0; }
.bn-creneau-tete { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; }
.bn-affectes { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.bn-affectes .badge { margin-left: 0; font-size: 12px; }
.bn-affectes .badge a { color: var(--rouge); text-decoration: none; font-weight: 700; }
.bn-mini { padding: 5px 9px; font-size: 12.5px; }
.bn-mini-liens { margin: 4px 0 0; font-size: 12.5px; }
.bn-form-creneau { margin-top: 8px; flex-wrap: wrap; }
.bn-form-creneau input { width: 76px; }
.bn-form-creneau select { flex: 1; min-width: 130px; }
.bn-form-creneau button { padding: 7px 12px; }
.inactif { opacity: .55; }

/* Couleurs des categories issues de l'inventaire Notion (04.09.2026) */
.dom-vaisselle { background: #8b6fc9; }
.dom-benevoles_commissaires { background: #7dbc57; }
.dom-coureurs { background: #17a5b5; }
.dom-merchandising { background: #d8a13b; }
.dom-marelle { background: #5a7176; }
