/* PLAN-05 — Mon planning : les lignes du jour, le calendrier (jour, semaine, mois), le filtre des couches.
   Trois couches, trois teintes par les jetons (H29) : général = accent, équipe = secondaire, perso = le rose
   du « 🩷 » (--brand-rose : chez OSÉ·CLAT primary et secondary sont deux bleus nuit indiscernables — recette du
   20/10) — jamais une valeur en dur. */
.layer-general  { --pl-layer: var(--brand-accent); }
.layer-team     { --pl-layer: var(--brand-secondary); }
.layer-personal { --pl-layer: var(--brand-rose); }

.pl-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--pl-layer, var(--brand-muted)); flex: 0 0 auto; }

/* Une ligne : la pastille de couche, l'heure, le titre et sa méta, le badge — et, pour une entrée perso ou une
   relance, la coche en place (PLAN-09). */
.pl-row { display: flex; align-items: center; gap: .4rem; border-top: 1px solid var(--brand-line); }
.pl-row:first-of-type { border-top: 0; }
.pl-link { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: .6rem; padding: .55rem .4rem; color: inherit; text-decoration: none; }
.pl-link:hover { background: var(--brand-surface-soft); }
.pl-check { flex: 0 0 auto; padding-right: .3rem; }
.pl-check .btn { min-width: 2.2rem; }
.pl-row[draggable="true"] { cursor: grab; }
.pl-row.is-dragging { opacity: .5; }
.is-drop-target { outline: 2px dashed var(--brand-accent); outline-offset: -2px; }
.pl-time { flex: 0 0 3.2rem; font-size: .8rem; font-weight: 700; color: var(--brand-secondary); }
.pl-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pl-title { font-weight: 700; font-size: .88rem; color: var(--brand-secondary); overflow-wrap: anywhere; }
.pl-meta { font-size: .72rem; color: var(--brand-muted); }
.pl-row.is-done .pl-title, .pl-row.is-cancelled .pl-title { color: var(--brand-muted); font-weight: 600; }
.pl-row.is-cancelled .pl-title { text-decoration: line-through; }

/* La barre du calendrier : les vues à gauche, la navigation à droite ; sur téléphone, l'une sous l'autre. */
.pl-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.pl-views, .pl-nav { display: flex; gap: .35rem; }

/* Le filtre des couches : des cases cochables, chacune avec sa pastille. */
.pl-layers { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-bottom: 1rem; }
.pl-layer { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 700; color: var(--brand-secondary); cursor: pointer; }

/* La grille du mois : sept colonnes, une case par jour, les points des couches et le nombre. */
.pl-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; }
.pl-grid-head { font-size: .72rem; font-weight: 700; color: var(--brand-muted); text-align: center; padding: .2rem 0; }

/* AJUST-99, quatrième passe du 21/10 (décision Axel) : une seule grille, sur tous les écrans — le numéro du jour et un point
   par événement (quatre au plus) de la couleur de sa couche, aujourd'hui en rond plein — et, au toucher d'un jour, la feuille
   du bas (sheet_modal) qui liste ses événements : l'heure, le badge de la couche, l'emoji et le titre entier. */
.pl-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .1rem; padding: .4rem .2rem .3rem; border: 1px solid var(--brand-line); border-radius: calc(var(--brand-radius-card) / 2); background: var(--brand-surface); }
.pl-mini { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-height: 3rem; padding: .25rem 0; color: inherit; text-decoration: none; }
.pl-mini.is-out { opacity: .4; }
.pl-mini-day { display: flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; font-size: .9rem; font-weight: 700; color: var(--brand-secondary); }
.pl-mini.is-today .pl-mini-day { background: var(--brand-secondary); color: var(--brand-on-dark); }
.pl-mini-dots { display: flex; justify-content: center; gap: .15rem; min-height: .5rem; }
.pl-mini-dots .pl-dot { width: .4rem; height: .4rem; }
.pl-sheet-list { display: flex; flex-direction: column; }
.pl-sheet-item { display: flex; align-items: center; gap: .5rem; padding: .5rem 0; border-top: 1px solid var(--brand-line-soft); color: inherit; text-decoration: none; }
.pl-sheet-item:first-child { border-top: 0; }
.pl-sheet-time { flex: 0 0 3rem; font-size: .8rem; font-weight: 700; color: var(--brand-muted); }
.pl-sheet-badge { flex: 0 0 auto; font-size: .66rem; font-weight: 700; padding: .05rem .45rem; border-radius: var(--brand-radius-pill); background: var(--pl-layer, var(--brand-muted)); color: var(--brand-on-dark); }
.pl-sheet-item.layer-general .pl-sheet-badge { color: var(--brand-secondary); }
.pl-sheet-title { flex: 1 1 auto; min-width: 0; font-size: .9rem; font-weight: 600; color: var(--brand-secondary); overflow-wrap: anywhere; }

@media (min-width: 768px) {
    .pl-mini { min-height: 3.8rem; }
    .pl-mini-day { width: 2.1rem; height: 2.1rem; font-size: 1rem; }
    .pl-mini-dots .pl-dot { width: .5rem; height: .5rem; }
}

/* PLAN-06 — la fiche d'un événement : l'image de couverture, les faits (quand, où, places), la couche en liseré. */
.pl-cover { display: block; width: 100%; max-height: 14rem; object-fit: cover; border-radius: var(--brand-radius); }
.pl-fact { display: flex; gap: .6rem; padding: .3rem 0; font-size: .88rem; border-top: 1px solid var(--brand-line); }
.pl-fact:first-of-type { border-top: 0; }
.pl-fact-k { flex: 0 0 6.2rem; font-weight: 700; color: var(--brand-secondary); }
.pl-desc { white-space: pre-line; overflow-wrap: anywhere; }
.card.layer-general, .card.layer-team, .card.layer-personal { border-left: 4px solid var(--pl-layer); }

/* AJUST-99 (#2791) : choisir plusieurs personnes — une recherche, une liste de cases qui défile, les cochées comptées. */
.pl-people-list { max-height: 14rem; overflow-y: auto; border: 1px solid var(--brand-line); border-radius: var(--brand-radius); padding: .15rem .6rem; background: var(--brand-surface); }
.pl-person { display: flex; align-items: center; gap: .55rem; padding: .35rem 0; margin: 0; border-top: 1px solid var(--brand-line-soft); font-size: .9rem; cursor: pointer; }
.pl-person:first-child { border-top: 0; }
.pl-person.is-hidden { display: none; }
.pl-person .form-check-input { margin: 0; flex: 0 0 auto; }
/* AJUST-166 (RM-582) : une personne pas encore activée — proposée, son nom grisé. */
.pl-person.is-pending > span { opacity: .6; }

/* Le formulaire : un lieu grisé « bientôt » (la salle Klareco tant que la visio n'est pas livrée). */
.picker .opt.is-disabled { opacity: .5; cursor: not-allowed; }
