/*
 * Ecran Mes montages (#/suivi/montages) : le bandeau Bientot et le tableau en trois
 * colonnes du monteur. Les cartes (.s-mt-*) et les confirmations viennent de
 * suivi.css (montage-ui.js) ; ici, seulement la mise en page de l'ecran.
 *
 * Telephone d'abord : les trois colonnes cote a cote dans une bande qui defile a
 * l'horizontale, aimantee colonne par colonne, sous trois onglets colles en haut de
 * l'ecran. C'est le seul defilement horizontal voulu : la page, elle, n'en a pas a
 * 375 px. A partir de 901 px, les colonnes tiennent a l'ecran : une grille de trois,
 * chacune avec son titre, et plus d'onglets (plus etroites, sur tablette, les titres
 * des cartes se coupaient au milieu des mots).
 */

/* ---------- bandeau Bientot ---------- */

.s-mts-bientot {
  border: 1px dashed var(--bord-haut); border-radius: 8px;
  padding: 8px 12px 10px; margin: 0 0 14px;
}
.s-mts .s-mts-bientot h2 { margin: 0 0 4px; font-size: 13px; }
.s-mts-bientot-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
/* Une ligne : la phrase (lien vers la fiche) et, a cote, le bouton s'il y en a un. */
.s-mts-bientot-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; }
.s-mts-bientot-texte {
  flex: 1 1 130px; min-width: 0; display: flex; align-items: center; padding: 2px 0;
  color: var(--texte); font-size: 14px; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere;
}
.s-mts-bientot-texte:hover strong { color: var(--accent); text-decoration: underline; }
.s-mts-bientot-texte:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.s-mts-bientot-ligne > .s-actions { flex: 0 0 auto; }
.s-mts-bientot-ligne > .s-actions > button { padding: 7px 12px; font-size: 13.5px; }
/* L'erreur et la saisie (date, lien) prennent toute la ligne, sous le texte. */
.s-mts-bientot-ligne > .s-erreur, .s-mts-bientot-ligne > .s-confirmation { flex: 1 1 100%; }

/* ---------- onglets (telephone) ---------- */

.s-mts-onglets {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  margin: 0 0 10px; padding: 6px 0; background: var(--fond);
}
.s-mts-onglet {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px;
  min-height: 44px; min-width: 0; padding: 6px 4px;
  background: var(--carte); border-color: var(--bord); color: var(--doux); font-size: 14px;
}
.s-mts-onglet[aria-selected="true"] {
  color: var(--accent); border-color: var(--accent); background: var(--accent-voile); font-weight: 600;
}
.s-mts-onglet .s-nombre { margin-left: 4px; }
/* Un de ses montages en retard dans la colonne : le nombre passe au rouge. */
.s-nombre.s-mts-urgent { background: var(--alerte); color: var(--sur-accent); font-weight: 700; }

/* ---------- colonnes ---------- */

/* La bande : chaque colonne fait toute la largeur, le doigt passe de l'une a l'autre. */
.s-mts-colonnes {
  position: relative;
  display: flex; align-items: flex-start; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.s-mts-colonnes::-webkit-scrollbar { display: none; }
.s-mts-col { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; display: grid; gap: 10px; }
/* Sur telephone, l'onglet nomme la colonne. */
.s-mts .s-mts-titre { display: none; margin: 0; }
.s-mts-col .s-vide { margin: 0; }
.s-mts-col > .sous { margin: 0; }

/* En attente du client : lecture seule, les cartes s'effacent un peu. */
.s-mts-col-attente .s-mt-carte { background: transparent; }

/* Personne dessus : le pot commun du montage, en pointilles comme dans Mes taches. */
.s-mts-personne { display: grid; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--bord-haut); }
.s-mts .s-mts-personne h3 { margin: 0; font-size: 14px; }
.s-mts-personne .sous { margin: 0; }
.s-mts-personne .s-mt-carte { border-style: dashed; }

/* ---------- ecran large : trois colonnes a l'ecran ---------- */

@media (min-width: 901px) {
  .s-mts-onglets { display: none; }
  .s-mts-colonnes {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
    overflow: visible; scroll-snap-type: none;
  }
  .s-mts-col {
    align-content: start; padding: 12px;
    background: var(--carte); border: 1px solid var(--bord); border-radius: 10px;
  }
  .s-mts .s-mts-titre { display: block; margin: 0 0 2px; font-size: 13px; }
}

/* ---------- au doigt : cibles de 44 px ---------- */

@media (max-width: 700px), (pointer: coarse) {
  .s-mts-bientot-texte { min-height: 44px; }
}
