/* Styles du module « Matériel et terrains » (materiel). PROPRIÉTAIRE : l'équipe du module.
   Classes préfixées « ma- » ; couleurs : uniquement les jetons de public/app.css (thèmes clair et sombre). */
.ma-n { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ma-c { text-align: center !important; width: 1%; }
.pastille.ma-envoyee { background: var(--teinte); color: var(--encre); border-color: transparent; }
.pastille.ma-commandee { background: color-mix(in srgb, var(--club) 22%, var(--surface)); color: var(--encre); border-color: transparent; }
.ma-outils { margin-bottom: 0; align-items: center; }
.ma-outils > p { margin: 0; flex: 1; min-width: 220px; }
.ma-sel { width: auto; min-width: 150px; max-width: 260px; }
.ma-zone { display: flex; flex-direction: column; gap: 16px; }
.ma-zone > h2 { margin: 6px 0 -6px; }
/* deux vues de l'onglet « Commandes » : liste ou récapitulatif (boutons à bascule) */
.ma-vues { display: inline-flex; gap: 6px; margin-bottom: 14px; }
.ma-vues button[aria-pressed=true] { background: var(--teinte); border-color: var(--club); color: var(--encre); box-shadow: 0 0 0 1px var(--club) inset; }

/* notes : règle des photos, consigne du club, pas de paiement */
.ma-regle, .ma-note, .ma-instruction { display: flex; gap: 10px; align-items: flex-start; margin: 0; max-width: none; }
.ma-regle { padding: 12px 14px; border-radius: var(--rayon-petit); background: var(--alerte-fond); color: var(--alerte); font-size: .9rem; }
.ma-regle strong { display: block; }
.ma-regle .icone, .ma-note .icone, .ma-instruction .icone { margin-top: 2px; }
.ma-instruction { padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--teinte); font-size: .92rem; white-space: pre-line; }

/* commander : pour qui, catalogue, panier */
.ma-entete-commande { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.ma-pour { display: flex; gap: 10px; flex-wrap: wrap; }
.ma-choix-pour { background: var(--surface); color: var(--encre); border: 1px solid var(--trait-fort); gap: 10px; min-height: 52px; padding: 8px 14px; max-width: 320px; justify-content: flex-start; }
.ma-choix-pour:hover { background: var(--surface-2); filter: none; }
.ma-choix-pour[aria-checked=true] { border-color: var(--club); box-shadow: 0 0 0 2px var(--club) inset; background: var(--teinte); }
.ma-choix-nom { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.25; }
.ma-choix-nom small { font-weight: 500; font-size: .8rem; }
.ma-autre { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ma-autre select { width: auto; min-width: 200px; }
.ma-commander { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 20px; align-items: start; }
.ma-commander > .vide, .ma-commander > .ma-bloquee { grid-column: 1 / -1; }
.ma-catalogue { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ma-titre-cat { margin: 0 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); }
.ma-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ma-article { display: flex; flex-direction: column; gap: 10px; padding: 14px; min-width: 0; }
.ma-image { width: 100%; height: 140px; object-fit: contain; border-radius: var(--rayon-petit); background: var(--surface-2); }
.ma-sans-image { display: grid; place-items: center; color: var(--trait-fort); }
.ma-article-texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ma-article-texte h3 { margin: 0; font-size: 1rem; }
.ma-article-texte p { margin: 0; }
.ma-prix { font-weight: 650; font-variant-numeric: tabular-nums; font-size: .92rem; }
.ma-descr { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ma-choix { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.ma-ajout { display: flex; gap: 8px; align-items: center; }
.ma-qte { width: 76px; flex: none; }
.ma-ajout button { flex: 1; min-height: 44px; }
.ma-msg { margin: 0; color: var(--danger); font-size: .88rem; }
.ma-msg:empty { display: none; }
.ma-panier-zone { position: sticky; top: 80px; min-width: 0; }
.ma-panier-corps { display: flex; flex-direction: column; gap: 12px; padding: 8px 16px 18px; }
.ma-vide { padding: 4px 20px 18px; margin: 0; }
.ma-recap { box-shadow: none; }
.ma-recap td, .ma-recap th { padding: 9px 12px; }
.ma-recap td:first-child { min-width: 0 !important; white-space: normal; }
.ma-recap td:first-child strong { white-space: normal; overflow-wrap: anywhere; }
/* panier : tableau étroit, rien ne déborde (le total reste toujours visible) */
.ma-etroit table { table-layout: fixed; width: 100%; min-width: 0; }
.ma-etroit th, .ma-etroit td { padding: 9px 8px; min-width: 0 !important; }
.ma-etroit th:nth-child(2) { width: 46px; }
.ma-etroit th:nth-child(3) { width: 104px; }
.ma-etroit th:nth-child(4) { width: 44px; }
.ma-avec-livre th:nth-child(4) { width: 72px; }
.ma-etroit .ma-c { width: auto; }
.ma-art { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ma-art small { white-space: normal; }
.ma-etroit .actions-cellule { padding-left: 0; padding-right: 4px; }
.ma-supplement { font-size: .8rem; margin-top: -4px; }
.ma-recap tfoot td { border-bottom: 0; padding-top: 6px; padding-bottom: 6px; color: var(--doux); }
.ma-recap tfoot tr:first-child td { border-top: 1px solid var(--trait); }
.ma-recap tfoot tr.ma-total td { color: var(--encre); font-weight: 650; background: var(--surface-2); }
.ma-recap input[type=checkbox] { margin: 0; }
.ma-commande { display: flex; flex-direction: column; gap: 12px; padding: 6px 16px 16px; }
.ma-commande p { margin: 0; }
.ma-meta { gap: 8px 12px; }
.ma-transitions { margin-bottom: 12px; }
dialog .ma-recap { margin-bottom: 12px; }
.ma-zone .chiffre strong { white-space: nowrap; }
.ma-remarque { margin: 0; padding: 10px 12px; border-radius: var(--rayon-petit); background: var(--surface-2); font-size: .92rem; }
.ma-bloquee { display: flex; flex-direction: column; gap: 12px; }

/* gestion */
.ma-articles { color: var(--doux); font-size: .88rem; min-width: 220px; }
.ma-commandes .pastille + .pastille { margin-left: 6px; }
.ma-correction { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ma-ligne-corr { display: grid; grid-template-columns: minmax(0, 1fr) 110px 76px 34px; gap: 8px; align-items: center; }
.ma-ligne-corr:last-child { grid-template-columns: 1fr; }
.ma-vignette { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; display: grid; place-items: center; color: var(--trait-fort); }
.ma-edition-image { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--trait); }
.ma-edition-image h3 { margin: 0; }
.ma-edition-image .ma-vignette { width: 72px; height: 72px; }
.ma-tailles { grid-template-columns: 1fr !important; }
.ma-gamme { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.ma-gamme > span { min-width: 64px; }
.ma-gamme label { flex-direction: row; align-items: center; gap: 6px; }
.ma-trois label { white-space: normal !important; }
.ma-bas { margin-left: 8px; }
.ma-journal { box-shadow: none; }
.ma-details, .ma-reponse { white-space: normal !important; overflow-wrap: anywhere; }
.ma-reponse { color: var(--ok); font-weight: 600; }
.ma-demandes .ligne-fin { flex-wrap: nowrap; }
dialog:has(.ma-tailles), dialog:has(.ma-recap) { max-width: 680px; }

@media (max-width: 1180px) {
  .ma-commander { grid-template-columns: minmax(0, 1fr); }
  .ma-panier-zone { position: static; }
}
@media (max-width: 860px) {
  .ma-grille { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .ma-article { padding: 10px; }
  .ma-ajout { flex-direction: column; align-items: stretch; }
  .ma-ajout .ma-qte { width: 100%; }
  .ma-image { height: 96px; }
  .ma-choix-pour { max-width: none; flex: 1 1 100%; }
  .ma-autre select { flex: 1; min-width: 0; }
  .ma-sel { flex: 1; min-width: 0; max-width: none; }
  .ma-outils > .ligne { width: 100%; }
  .ma-outils > .ma-sel, .ma-outils > button { flex: 1 1 100%; }
  .ma-zone .chiffres { grid-template-columns: minmax(0, 1fr); }
  .ma-zone .chiffre strong { font-size: 1.35rem; }
  .ma-recap td, .ma-recap th { padding: 8px 8px; }
  .ma-etroit th:nth-child(2) { width: 38px; }
  .ma-etroit th:nth-child(3) { width: 94px; }
  .ma-avec-livre th:nth-child(4) { width: 54px; }
  .ma-etroit th, .ma-etroit td { padding: 8px 6px; }
  .ma-etroit td:first-child, .ma-etroit th:first-child { padding-left: 10px; }
  .ma-art strong { font-size: .92rem; overflow-wrap: break-word; hyphens: auto; }
  .ma-panier-corps, .ma-commande { padding-left: 10px; padding-right: 10px; }
  .ma-trois { grid-template-columns: 1fr; }
  .ma-ligne-corr { grid-template-columns: minmax(0, 1fr) 84px 64px 34px; }
  .ma-demandes .ligne-fin { padding-left: 48px; }
}
