/* =============================================================================
   HUB ATERET PAZ V3 — le style commun.
   Lot L1-a. Le bandeau d'état vient en premier : c'est lui qui compte (V3-j).
   ============================================================================= */

:root {
  --bleu:       #1B2A41;
  --bleu-clair: #24354f;
  --fond:       #0f1826;
  --texte:      #e8ecf1;
  --gris:       #8b95a5;
  --or:         #C9A227;
  --orange:     #F37021;
  --jaune:      #F2C200;
  --jaune-fonce:#8a6d00;
  --vert:       #2E9E5B;
  --rouge:      #C4453A;
}

/* -----------------------------------------------------------------------------
   `V3-y` — L'ÉCRAN CIBLE EST UN THINKPAD X230 TACTILE, 1366 × 768.

   Le budget de hauteur, et c'est LUI le chiffre :
       768 px  écran
     −  40 px  bandeau d'état
     = 728 px  pour tout le reste.

   Trois règles qui ne se négocient pas :
     ① aucun défilement, nulle part dans la caisse ;
     ② toute cible se touche au doigt — 60 px de haut, minimum ;
     ③ le budget de hauteur ci-dessus, pas une résolution de bureau.

   Les dimensions viennent de la caisse v1, qui tient déjà sur cet appareil —
   `10_cloudflare_admin/agenda.css` l. 603 : colonne de droite à 380 px.
   -------------------------------------------------------------------------- */

:root {
  --bandeau: 40px;
  --utile: calc(100vh - var(--bandeau));  /* 728 px sur le X230 */
  --cible: 60px;                          /* la plus petite cible tactile */
  --panier: 370px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--fond);
  color: var(--texte);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  padding-top: var(--bandeau);
}

/* -----------------------------------------------------------------------------
   LE BANDEAU D'ÉTAT — V3-j
   `position: fixed` et aucun bouton pour le fermer : il ne peut pas être masqué.
   Hauteur FIXE : c'est elle qui fonde le budget de `V3-y`.
   -------------------------------------------------------------------------- */
#bandeau-etat {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  height: var(--bandeau);
  background: var(--jaune);
  color: #1a1400;
  border-bottom: 2px solid var(--jaune-fonce);
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  overflow: hidden;
  white-space: nowrap;
}

#bandeau-etat .mode { font-size: 0.98rem; }
#bandeau-etat .detail { font-weight: 600; font-size: 0.86rem; }
#bandeau-etat .version {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.8rem;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

/* -----------------------------------------------------------------------------
   MISE EN PAGE
   -------------------------------------------------------------------------- */
.page { max-width: 1000px; margin: 0 auto; padding: 28px 20px 60px; }

h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 32px 0 10px; color: var(--or); }
.sous-titre { color: var(--gris); margin: 0 0 24px; }

a { color: var(--or); }

.carte {
  background: var(--bleu);
  border: 1px solid var(--bleu-clair);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.liens { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* `V3-y` ② : une cible se touche au doigt. 60 px, jamais moins. */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--cible);
  background: var(--or);
  color: #1a1400;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  padding: 0 22px;
  cursor: pointer;
  font-size: 1rem;
}
.bouton.discret { background: var(--bleu-clair); color: var(--texte); }
.bouton:disabled { opacity: 0.5; cursor: default; }

/* -----------------------------------------------------------------------------
   TABLEAUX
   -------------------------------------------------------------------------- */
.tableau-cadre { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--bleu-clair); }
th { color: var(--gris); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; }
tr.archive { opacity: 0.45; }

/* `V3-y` ② : on tape dedans au doigt. */
input[type="text"], input[type="number"], input[type="date"] {
  background: var(--fond);
  border: 1px solid var(--bleu-clair);
  color: var(--texte);
  border-radius: 6px;
  min-height: var(--cible);
  padding: 0 12px;
  font-size: 1rem;
  width: 100%;
  font-family: inherit;
}
input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
input:focus { outline: 2px solid var(--or); outline-offset: -1px; }

.etiquette {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bleu-clair);
  color: var(--gris);
}
.etiquette.oui { background: rgba(46,158,91,0.18); color: #7fd3a0; }
.etiquette.non { background: rgba(196,69,58,0.15); color: #e59189; }

/* -----------------------------------------------------------------------------
   MESSAGES
   -------------------------------------------------------------------------- */
#message {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 9998;
  max-width: 480px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  display: none;
}
#message.vu    { display: block; }
#message.ok    { background: var(--vert); color: #fff; }
#message.rate  { background: var(--rouge); color: #fff; }

.vide { color: var(--gris); font-style: italic; padding: 14px 0; }
.note { color: var(--gris); font-size: 0.88rem; }
