/* ==========================================================================
   EVENT EXPRESS — le catalogue (v3/pages/express.php)
   Tout passe par les variables du site : le clair et le sombre suivent seuls.
   ========================================================================== */

.ex-promesses { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ex-promesses li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ex-promesses b { font-family: var(--disp); font-size: 22px; letter-spacing: .01em; color: var(--blue); }
.ex-promesses span { font-size: 14px; color: var(--muted); line-height: 1.45; }

/* Un élément masqué l'est vraiment, même quand sa classe lui donne un display */
.ex-carte[hidden], .ex-groupe[hidden], .ex-barre[hidden], .ex-vide[hidden], .ex-panier-vide[hidden] { display: none !important; }

/* Filtres et recherche */
.ex-outils { display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; padding: 12px 0; margin: 0 0 8px; background: var(--bg); }
.ex-filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-filtre { font: 600 14px/1 var(--font); padding: 10px 14px; border-radius: 999px; cursor: pointer;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.ex-filtre.on { background: var(--blue); border-color: var(--blue); color: #fff; }
:root[data-theme="dark"] .ex-filtre.on { color: #0B0F16; }
.ex-cherche input { font: 15px var(--font); padding: 11px 14px; width: min(320px, 100%); border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.ex-cherche { flex: 0 1 320px; }

/* Les groupes et la grille */
.ex-groupe { margin: 26px 0 0; }
.ex-cat { font-family: var(--disp); font-size: 30px; font-weight: 700; margin: 0 0 14px; color: var(--ink); }
.ex-grille { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ex-carte { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.ex-carte.dedans { outline: 2px solid var(--blue); outline-offset: -2px; }
.ex-vis { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: linear-gradient(160deg, var(--ph-a), var(--ph-b)); display: grid; place-items: center; }
.ex-vis.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-vis svg { width: 86%; height: 86%; }
.ex-corps { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ex-corps h4 { margin: 0; font-size: 18px; line-height: 1.25; color: var(--ink); }
.ex-dim { margin: 0; font-size: 13px; font-weight: 600; color: var(--blue); }
.ex-txt { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ex-pied { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ex-prix { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); opacity: .8; }
.ex-ajout { width: 100%; justify-content: center; }
.ex-ajout.fait { background: var(--lime); border-color: var(--lime); color: #101828; }

.ex-modes { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; align-self: flex-start; }
.ex-modes label { cursor: pointer; }
.ex-modes input { position: absolute; opacity: 0; pointer-events: none; }
.ex-modes span { display: block; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; color: var(--muted); }
.ex-modes input:checked + span { background: var(--ink); color: var(--bg); }
.ex-modes input:focus-visible + span { outline: 2px solid var(--blue); }
.ex-mode-seul { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; }
.ex-vide { margin: 30px 0 0; font-size: 16px; color: var(--muted); }

/* Les dessins : la structure au trait, le visuel en couleur */
.ex-vis .f   { fill: none; stroke: var(--line); stroke-width: 2; }
.ex-vis .s   { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ex-vis rect.s, .ex-vis circle.s, .ex-vis ellipse.s { fill: var(--ink); }
.ex-vis .g   { fill: var(--blue); }
.ex-vis .a   { fill: var(--lime); }
.ex-vis .g2  { fill: var(--blue); opacity: .7; }
.ex-vis .w   { fill: var(--panel); stroke: var(--ink); stroke-width: 2.5; }
.ex-vis .w0  { fill: none; stroke: var(--panel); stroke-width: 6; stroke-linecap: round; }
.ex-vis .w0c { fill: var(--panel); }
.ex-vis .rouge { fill: #C8323C; }
.ex-vis .cord { fill: none; stroke: #C8323C; stroke-width: 4; }
.ex-vis .neon { fill: none; stroke: #FF4FA3; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 4px #FF4FA3); }
.ex-vis .lettre { fill: none; stroke: var(--blue); stroke-width: 6; stroke-linecap: square; }
.ex-vis .trait { fill: none; stroke: var(--muted); stroke-width: 4; stroke-linecap: round; }
.ex-vis .maille { fill: none; stroke: var(--panel); stroke-width: 1.5; opacity: .6; }
.ex-vis .herbe { fill: none; stroke: #5FA35A; stroke-width: 3; stroke-linecap: round; }
.ex-vis .ok { fill: none; stroke: var(--panel); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }

/* La demande */
.ex-demande { display: grid; gap: 22px 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
.ex-demande .sec-head { grid-column: 1 / -1; }
.ex-panier { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; position: sticky; top: 90px; }
.ex-panier .h3 { margin: 0 0 12px; }
.ex-panier-vide { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.ex-lignes { list-style: none; margin: 0; padding: 0; }
.ex-lignes li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line); }
.ex-lignes li:first-child { border-top: 0; }
.ex-lignes b { display: block; font-size: 15px; color: var(--ink); }
.ex-lignes small { font-size: 13px; color: var(--muted); }
.ex-qte { width: 64px; font: 600 15px var(--font); padding: 8px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); text-align: center; }
.ex-retire { font: 600 13px var(--font); background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 6px; }
.ex-form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; position: relative; }

/* La barre fixe en bas */
.ex-barre { position: fixed; z-index: 40; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
.ex-compte { font-weight: 700; white-space: nowrap; }

@media (max-width: 900px) {
  .ex-promesses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-demande { grid-template-columns: minmax(0, 1fr); }
  .ex-panier { position: static; }
}
@media (max-width: 560px) {
  .ex-promesses { grid-template-columns: minmax(0, 1fr); }
  .ex-filtres { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; width: 100%; }
  .ex-filtre { white-space: nowrap; }
  .ex-cherche, .ex-cherche input { width: 100%; flex-basis: 100%; }
  .ex-grille { grid-template-columns: minmax(0, 1fr); }
  .ex-barre { left: 16px; right: 16px; bottom: 88px; transform: none; justify-content: space-between; }
}

/* Les prix, les totaux et le suivi d'une commande */
.ex-prix.chiffre { font-size: 20px; font-weight: 700; color: var(--ink); opacity: 1; font-family: var(--disp); letter-spacing: .01em; }
.ex-totaux { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.ex-totaux [hidden], .ex-services[hidden], .ex-totaux[hidden], .ex-commande[hidden], .ex-a-confirmer[hidden], .ex-suivi[hidden] { display: none !important; }
.ex-totaux div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ex-totaux dt { color: var(--muted); }
.ex-totaux dd { margin: 0; font-weight: 600; color: var(--ink); }
.ex-totaux .tot dt, .ex-totaux .tot dd { color: var(--ink); font-weight: 700; font-size: 17px; }
.ex-totaux .carte dt, .ex-totaux .carte dd { font-size: 13px; color: var(--muted); font-weight: 500; }
.ex-a-confirmer { margin: 12px 0 0; }
.ex-commande { display: grid; gap: 4px; margin: 4px 0 10px; }
.ex-commande .engage { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); margin-top: 6px; }
.ex-commande .engage input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--blue); }
.ex-commande .engage a { color: var(--blue); }
.ex-suivi { grid-column: 1 / -1; background: var(--panel); border: 2px solid var(--blue); border-radius: var(--r); padding: 22px; }
.ex-suivi .h3 { margin: 0 0 10px; }
.ex-suivi .ex-px { font-weight: 600; color: var(--ink); white-space: nowrap; }
.ex-suivi .ex-lignes li { grid-template-columns: minmax(0, 1fr) auto; }
.ex-suivi-total { margin: 12px 0; font-size: 18px; color: var(--ink); }
.ex-etat { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ex-etat p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.ex-etat .attente { color: var(--muted); }
.ex-etat .ok { font-weight: 700; color: var(--blue); }
