/* =============================================================================
   PLANNING — LE STYLE. Lot `AGENDA-1`, 27/08/2026.

   Repris du Planning de la V1 (`agenda.css` § `.wp-*`) pour la structure — la
   grille de semaine, les blocs de disponibilité, les cartes d'exception — et
   reposé sur la palette du v3, qui vit dans `hub.css`.

   ⚠️  L'EN-TÊTE, LES BOUTONS ET LE TIROIR SONT CEUX DE `agenda.css`, ET C'EST
       VOULU : les deux écrans sont les deux moitiés d'un même geste, et deux
       façons d'écrire une barre seraient un défaut de finition (`V3-ae` ④).
       Cette feuille ne les redéfinit pas — elle les recopie strictement là où
       l'écran Agenda n'est pas chargé.

   ⚠️  BUDGET `V3-y` : 728 px. En-tête 56 · modes 44 · outils 52 · le reste à la
       grille, qui défile **dans son cadre**. La page ne défile pas.
   ============================================================================= */

:root {
  --ap-entete: 56px;
}

/* ⛔ MÊME LIGNE QUE DANS `agenda.css`, ET MÊME MOTIF — voir son commentaire.
      `hidden` ne vaut `display: none` que dans la feuille du navigateur ;
      `.fiche-tiroir` porte `display: flex` et le battrait. Le tiroir resterait
      étalé sur tout l'écran en étant « caché », et le Planning ne répondrait
      plus à un seul clic. */
[hidden] { display: none !important; }

body.horaires { overflow: hidden; }

.plan-page {
  height: var(--utile);
  display: grid;
  grid-template-rows: var(--ap-entete) 44px auto minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

/* --- L'EN-TÊTE (même dessin que l'écran Agenda) ---------------------------- */
.ap-entete {
  display: flex; align-items: center; gap: 16px;
  background: var(--bleu); border-radius: 12px; padding: 0 12px;
}
.ap-modules { display: flex; gap: 6px; }
.module-bouton {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  border: 1px solid #35507a; border-radius: 10px;
  background: transparent; color: var(--texte);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.module-bouton.actif { background: var(--or); border-color: var(--or); color: #1a1400; }
.module-bouton:not(.actif):hover { background: var(--bleu-clair); }
.ap-titre { margin: 0; font-size: 20px; font-weight: 700; }
.ap-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.bouton {
  height: 40px; padding: 0 16px;
  border: 1px solid #35507a; border-radius: 10px;
  background: var(--bleu-clair); color: var(--texte);
  font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
}
.bouton:hover { border-color: var(--or); }
.bouton.or { background: var(--or); border-color: var(--or); color: #1a1400; }
.bouton.discret { background: transparent; }
.bouton.danger { border-color: var(--rouge); color: #ffb4ad; }
.bouton.danger:hover { background: var(--rouge); color: #fff; }

.icone-bouton {
  width: 38px; height: 38px;
  border: 1px solid #35507a; border-radius: 10px;
  background: var(--bleu-clair); color: var(--texte);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.icone-bouton:hover { border-color: var(--or); }

.carte-sur-titre {
  margin: 0; font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gris);
}

/* --- LES DEUX MODES -------------------------------------------------------- */
.plan-modes { display: flex; gap: 6px; }
.mode-bouton {
  height: 44px; padding: 0 22px;
  border: 1px solid #35507a; border-radius: 10px;
  background: var(--bleu); color: var(--texte);
  font: inherit; font-weight: 600; cursor: pointer;
}
.mode-bouton.actif { background: var(--bleu-clair); border-color: var(--or); color: var(--or); }

/* --- LE BANDEAU « DEHORS » — il informe, il n'empêche rien ---------------- */
.dehors {
  background: rgba(242, 194, 0, .1);
  border: 1px solid var(--jaune-fonce);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  max-height: 108px;
  overflow-y: auto;
}
.dehors strong { color: var(--jaune); }
.dehors span { color: var(--gris); }
.dehors ul { margin: 6px 0 0; padding-left: 18px; color: var(--gris); }
.dehors li { margin: 2px 0; }
/* La ligne du passé informe, elle n'alarme pas : elle n'est ni jaune, ni grasse. */
.dehors-passe { margin: 4px 0 0; color: var(--gris); font-size: 12px; font-style: italic; }

/* --- LE CORPS -------------------------------------------------------------- */
.plan-corps { min-height: 0; }
.plan-vue { height: 100%; display: grid; grid-template-rows: 52px minmax(0, 1fr); gap: 8px; }

.plan-outils {
  background: var(--bleu); border-radius: 12px; padding: 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.plan-periode { font-weight: 700; font-size: 15px; }
.plan-coiffeur { margin-left: auto; color: var(--gris); font-size: 13px; }

.plan-grille-cadre {
  background: var(--bleu); border-radius: 12px; padding: 8px;
  min-height: 0; overflow-y: auto;
}

/* --- LA GRILLE DE SEMAINE -------------------------------------------------- */
/* ⚠️  `height: 100%` ET NON `min-height` : sur une seule rangée, `min-height`
       laisse la rangée se contenter de son contenu, et les sept colonnes
       flottaient en haut d'un cadre vide. La semaine du salon occupe la place
       qu'on lui donne. */
.plan-grille {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr;
  gap: 6px;
  height: 100%;
}

.plan-colonne {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  min-height: 180px;
  padding: 10px 6px;
  border: 1px solid #2b3d5c; border-radius: 10px;
  background: var(--fond); color: var(--texte);
  font: inherit; text-align: center; cursor: pointer;
}
.plan-colonne:hover { border-color: var(--or); }
.plan-colonne.aujourdhui { border-color: var(--or); background: rgba(201, 162, 39, .07); }

.plan-jour-nom { font-size: 12px; text-transform: capitalize; color: var(--gris); }
.plan-jour-date { font-size: 15px; font-weight: 700; }
.plan-fete { font-size: 11px; color: var(--or); }

.plan-blocs { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }

.plan-bloc {
  padding: 6px 4px;
  border-radius: 8px;
  background: rgba(46, 158, 91, .18);
  border-left: 3px solid var(--vert);
  font-size: 12px; font-weight: 600; line-height: 1.25;
}
.plan-bloc.exception { background: rgba(243, 112, 33, .16); border-left-color: var(--orange); }

.plan-vide { margin: 6px 0 0; font-size: 12px; color: var(--gris); font-style: italic; }
.plan-vide.bloque { color: #ffb4ad; }
.plan-marque {
  margin-top: auto; font-size: 10px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--orange);
}

/* --- LES EXCEPTIONS -------------------------------------------------------- */
.exceptions-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  align-content: start;
}

.exception-carte {
  border: 1px solid #2b3d5c; border-radius: 10px;
  background: var(--fond); padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.exception-carte.passee { opacity: .58; }

.exception-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.exception-tete h3 { margin: 0; font-size: 15px; text-transform: capitalize; }
.exception-marque {
  font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--gris);
}
.exception-plages { display: flex; flex-wrap: wrap; gap: 6px; }
.exception-plages .plan-bloc { min-width: 62px; text-align: center; }
.exception-motif { margin: 0; font-size: 12px; color: var(--gris); font-style: italic; }
.exception-gestes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.exception-gestes .bouton { height: 38px; font-size: 13px; }

/* --- LE TIROIR D'UN JOUR --------------------------------------------------- */
.voile {
  position: fixed; inset: var(--bandeau) 0 0 0;
  background: rgba(6, 11, 20, .6); z-index: 60;
}

.fiche-tiroir {
  position: fixed; top: var(--bandeau); right: 0; bottom: 0;
  width: 400px; z-index: 61;
  background: var(--bleu); border-left: 1px solid #2b3d5c;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.fiche-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fiche-tete h2 { margin: 2px 0 0; font-size: 19px; text-transform: capitalize; }

.panneau-note { margin: 0; font-size: 12px; color: var(--gris); font-style: italic; }

.panneau-plages { display: flex; flex-direction: column; gap: 8px; }
.ligne-plage { display: flex; align-items: center; gap: 8px; }
.ligne-plage input {
  width: 92px; height: 44px;
  border: 1px solid #35507a; border-radius: 8px;
  background: var(--fond); color: var(--texte);
  font: inherit; text-align: center;
}
.ligne-plage .a { color: var(--gris); }

.panneau-gestes { display: flex; flex-direction: column; gap: 8px; }
.panneau-gestes .bouton { height: var(--cible); justify-content: center; }

.panneau-pause {
  margin-top: auto;
  border-top: 1px solid #2b3d5c;
  padding-top: 12px;
  display: flex; flex-direction: column; gap: 8px;
}

.vide { margin: 0; padding: 10px; color: var(--gris); font-style: italic; font-size: 13px; }
