/* Translead Export : planning des escales en calendrier (15-escales.js).
   15/10/2026 : jetons de app.css uniquement : --acc = bleu en clair, or en sombre (jamais de bleu en sombre).
   Mobile (≤ 720 px) : la grille devient un agenda par jour, jours sans escale masqués. */

/* bascule Planning / Liste et Mois / Semaine */
.esc-bascule { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--panel); }
.esc-bascule button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--mut);
  padding: 6px 14px; cursor: pointer; font: inherit; min-height: 34px; }
.esc-bascule svg { width: 16px; height: 16px; flex: none; }
.esc-bascule button + button { border-left: 1px solid var(--line); }
.esc-bascule button.actif { background: var(--acc); color: var(--acc-ink); font-weight: 700; }
.esc-bascule button:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.esc-bascule.petit button { padding: 4px 12px; min-height: 30px; }

.esc-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.esc-nav .btn { min-width: 40px; }
.esc-titre { font-size: 1.15em; margin-left: 6px; }

/* légende */
.esc-legende { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; font-size: .85em; }
.esc-legende .esc-ev { cursor: default; width: auto; }

/* grille */
.esc-cal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.esc-entete, .esc-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.esc-entete div { background: var(--th); color: var(--th-ink); font-weight: 700; font-size: .8em; text-transform: uppercase;
  letter-spacing: .04em; padding: 6px 8px; }
.esc-jour { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 4px; min-height: 104px;
  display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.esc-jour:nth-child(7n + 1) { border-left: 0; }
.esc-cal.semaine .esc-jour { min-height: 260px; }
.esc-jour.we { background: var(--panel2); }
.esc-jour.hors-mois { background: var(--panel2); }
.esc-jour.hors-mois .esc-num { color: var(--mut); opacity: .6; }
.esc-jour.aujourdhui { box-shadow: inset 0 0 0 2px var(--acc); }
.esc-jour.aujourdhui .esc-num { background: var(--acc); color: var(--acc-ink); }
.esc-num { align-self: flex-start; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; font-size: .85em;
  padding: 1px 7px; border-radius: 999px; cursor: pointer; }
.esc-cal.semaine .esc-num { cursor: default; }
.esc-jour-long { display: none; }

/* évènements */
.esc-ev { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; text-align: left; font: inherit; font-size: .78em;
  line-height: 1.25; padding: 3px 6px; border-radius: 6px; cursor: pointer; border: 1px solid var(--line);
  border-left: 4px solid var(--acc); background: var(--hl); color: var(--ink); flex-wrap: wrap; }
.esc-ev:hover, .esc-ev:focus-visible { border-color: var(--acc); outline: none; }
.esc-ev.choisi { box-shadow: 0 0 0 2px var(--acc); }
.esc-ev.cutoff { background: var(--panel); border-left-style: dashed; border-left-color: var(--warn); }
.esc-ev.depart { background: var(--panel); border-left-color: var(--ok); color: var(--mut); }
.esc-ev.attention { border-left-color: var(--warn); background: var(--warn-bg); }
.esc-ev.critique { border-left-color: var(--bad); background: var(--bad-bg); }
.esc-ev.parti:not(.depart) { opacity: .75; }
.esc-ico { flex: none; }
.esc-nav-nom { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 0; }
.esc-heure, .esc-compte { flex: none; color: var(--mut); white-space: nowrap; }
.esc-compte { flex-basis: 100%; }
.esc-sup { flex-basis: 100%; font-size: .95em; white-space: normal; }
.esc-plus { border: 0; background: none; color: var(--acc); font: inherit; font-size: .78em; cursor: pointer; text-align: left; padding: 2px 6px; }
.esc-plus:hover { text-decoration: underline; }

.esc-detail { margin-top: 12px; }
.esc-detail-tete { align-items: flex-start; margin-bottom: 8px; }

/* écran étroit : agenda en liste par jour */
@media (max-width: 720px) {
  .esc-entete { display: none; }
  .esc-jours { display: block; }
  .esc-jour, .esc-cal.semaine .esc-jour { min-height: 0; border-left: 0; padding: 8px 10px; }
  .esc-jour.vide { display: none; }
  .esc-jour.hors-mois { background: var(--panel); }
  .esc-jour-long { display: inline; }
  .esc-num { font-size: .95em; padding: 2px 10px; }
  .esc-ev { font-size: .9em; padding: 6px 8px; }
  .esc-compte { flex-basis: auto; }
  .esc-nav { flex-direction: column; align-items: stretch; }
  .esc-titre { display: block; width: 100%; margin: 6px 0 0; }
}
@media (max-width: 480px) {
  .tete .actions .esc-bascule { width: 100%; }
  .esc-bascule button { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .esc-ev, .esc-bascule button { transition: none; }
}
@media print {
  .esc-nav, .esc-bascule, .esc-legende { display: none; }
  .esc-jour { min-height: 0; }
}
