/* gallery_mobile.css — généré par npm run build:gallery-css — ne pas éditer à la main */

/* Client CSS - Styles communs à toutes les interfaces */
/* Extrait de client_merged.css - sans les media queries mobile */

/* ========== BRANDING CSS VARIABLES ========== */
/* Valeurs par défaut — surchargées au runtime par JS si le prestataire a un branding personnalisé */
:root {
  --color-primary: #374151;
  --color-primary-dark: #1f2937;
  --color-secondary: #6b7280;
  --color-header: #374151;
  --color-header-text: #6b7280;

  /* Design tokens — premium minimal (Apple-like), sans toucher au branding ci‑dessus */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --surface-0: #ffffff;
  --surface-1: #f8f9fa;
  --surface-2: #f1f3f5;
  --border: 1px solid rgba(0, 0, 0, 0.08);
  --border-strong: 1px solid rgba(0, 0, 0, 0.12);
  --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.08);
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-on-dark: #ffffff;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ========== BASE STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface-1);
  min-height: 100vh;
  padding: 0;
  margin: 0;
  color: var(--text);
  /* Grain très léger — premium, pas visible si perf faible */
  background-image: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,255,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.02) 0%, transparent 1px);
  background-size: 100% 400px, 4px 4px;
  background-position: 0 0, 0 0;
}

.container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  background: var(--surface-0);
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  min-height: 100vh;
}

/* ========== PADDING GALLERIE — alignement header, recherche, filtres, photos ========== */
:root {
  --gallery-padding-x: 24px;
}
@media (min-width: 769px) {
  :root {
    --gallery-padding-x: calc(12% + 20px);
  }
}

/* ========== HEADER — fond primary, texte secondary ========== */
.header {
  background: var(--color-header);
  color: var(--color-header-text);
  padding: 16px 24px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-1);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
@media (min-width: 769px) {
  .header {
    padding-left: var(--gallery-padding-x, 24px);
    padding-right: var(--gallery-padding-x, 24px);
  }
}

/* Boutons header — hover lift léger, cohérent radius/hauteur */
#view-promotions-btn,
#cart-header-btn,
.header button:not(.lang-btn) {
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
#view-promotions-btn:hover,
#cart-header-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
#view-promotions-btn:focus-visible,
#cart-header-btn:focus-visible {
  outline: 2px solid var(--color-header-text, var(--text));
  outline-offset: 2px;
}

/* Barre de recherche — pill + bordure fine + focus ring */
.header .header-search-box #photo-search,
.header .search-box #photo-search {
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: var(--border);
  background: var(--surface-0);
  color: var(--text);
  font-size: 0.95rem;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  outline: none;
}
.header .header-search-box #photo-search:focus,
.header .search-box #photo-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.15);
}
.header .header-search-box #photo-search:focus-visible,
.header .search-box #photo-search:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.header .header-search-box #suggestions-box {
  z-index: 2000; /* au-dessus du header sticky */
}

/* Champ de recherche de code panier */
.cart-code-search-box {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.cart-code-search-box #cart-code-search {
  width: 126px;
  padding: 10px 14px;
  border: var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-0);
  color: var(--color-primary);
  outline: none;
  text-align: left;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  font-family: inherit;
  font-size: 0.95rem;
}
.cart-code-search-box #cart-code-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.15);
}
.cart-code-search-box #cart-code-search:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.logo {
  height: 50px;
  filter: brightness(1.1);
  object-fit: contain;
}

.header h1 {
  font-size: 2.5em;
  font-weight: bold;
  margin: 0;
  letter-spacing: 2px;
  text-align: center;
}

#language-selector {
  display: none;
}

.lang-btn {
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.2) !important;
}

.lang-btn.active {
  background: rgba(255,255,255,0.25) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.lang-btn:focus-visible {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}

/* Bouton Aide (?) — ouvre le tutoriel en modal */
#tutorial-help-btn:hover {
  background: rgba(255,255,255,0.25);
}
#tutorial-help-btn:focus-visible {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}

#cart-header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#cart-count-header {
  display: inline-block !important;
  min-width: 20px;
  text-align: center;
}

/* ========== LAYOUT PRINCIPAL ========== */
.content {
  padding: 30px;
}

/* 2 colonnes : promos (gauche) + contenu (centre) — tutoriel uniquement via ? en modal */
.main-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 30px;
  margin-bottom: 40px;
  margin-top: 8px;
  width: 100%;
  align-items: start;
  transition: grid-template-columns 0.3s ease;
}

.main-layout.left-collapsed,
.main-layout.both-collapsed {
  grid-template-columns: 60px 1fr;
}

/* Panneau droit tutoriel supprimé — accès uniquement via ? en modal */

/* Colonne latérale gauche uniquement */
.left-column {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e8e8e8;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  transition: all 0.3s ease;
  align-self: start;
  z-index: 100;
  height: fit-content;
}

/* ==== ÉTAT COLLAPSÉ GAUCHE ==== */
.left-column.collapsed {
  width: 60px;
  min-width: 60px;
  padding: 8px 4px;
  overflow: visible;
  max-height: none;
}

.left-column .collapsed-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #e74c3c;
  transform: rotate(180deg);
}

/* On cache tout le contenu de la section promo en mode réduit,
   sauf le bouton et le label "Voir promotions" */
.left-column.collapsed .promotions-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
}

.left-column.collapsed .promotions-section h2,
.left-column.collapsed .promotions-list,
.left-column.collapsed #promotions-list,
.left-column.collapsed .promotion-card,
.left-column.collapsed .promotions-section > div:first-child {
  display: none !important;
}

.left-column.collapsed .promotions-section .toggle-column-btn {
  display: none !important; /* Cache le bouton - */
}

.left-column.collapsed .promotions-section .toggle-column-btn {
  display: block;
  font-size: 1.4em;
  margin-bottom: 10px;
}

.left-column.collapsed .collapsed-label {
  display: block !important;
}

/* Label par défaut caché, visible seulement en mode collapsed */
.collapsed-label {
  display: none;
  font-weight: 600;
  font-size: 0.9em;
  text-align: center;
  cursor: pointer;
}

.center-column {
  flex: 1;
  min-width: 0;
}

.toggle-column-btn {
  font-size: 1.8em !important;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toggle-column-btn:hover {
  opacity: 1;
}

/* ========== PROMOTIONS ========== */
.promotions-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.promotions-section > div:first-child {
  flex: 0 0 auto;
  margin-bottom: 15px;
}

.promotions-section h2 {
  color: var(--color-primary);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1.2em;
  margin: 0;
  padding: 0 40px; /* padding-top et padding-bottom à 0, padding-left et padding-right à 40px */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: normal;
  text-align: center;
  line-height: 1.3;
  word-wrap: break-word;
  flex: 1;
}

.promotions-list,
#promotions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

/* Promos — cartes premium : border + shadow léger, hover lift */
.promotion-card {
  background: var(--surface-0);
  border-radius: var(--r-md);
  padding: 0;
  box-shadow: var(--shadow-1);
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  border: var(--border);
  overflow: hidden;
}

.promotion-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.promo-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(55, 65, 81, 0.9);
  color: var(--text-on-dark);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  z-index: 2;
}

.promo-badge.volume {
  background: rgba(55, 65, 81, 0.9);
}

.promo-content {
  padding: 15px;
  padding-top: 40px; /* Espace pour le badge en position absolute */
}

.promotion-card h3 {
  color: var(--color-primary);
  font-size: 1em;
  margin: 0 0 10px 0;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  letter-spacing: -0.3px;
}

/* Prix dynamiques (renderPromotions) — colonne gauche */
.promo-price-main {
  font-size: 1.8em;
  font-weight: 700;
  color: #e74c3c;
  line-height: 1;
  text-align: center;
}
.promo-price-strike {
  font-size: 1em;
  color: #999;
  text-decoration: line-through;
  margin-bottom: 4px;
  text-align: center;
}
.promo-rules-toggle {
  margin-top: 8px;
  background: #374151;
  color: #fff;
  font-size: 0.8em;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
}

.product-description {
  font-size: 0.85em;
  color: #666;
  margin-top: 6px;
  text-align: center;
  line-height: 1.4;
  min-height: 2.8em;
  max-height: 3.6em; /* 2 lignes avec line-height 1.4 */
  width: 100%;
  padding: 0 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-container {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: var(--surface-2);
  padding: 10px 12px;
  border-radius: var(--r-sm);
}

.old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.new-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.volume-label {
  font-size: 0.9em;
  color: #e67e22;
  font-weight: bold;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.promotion-rules-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 15px;
  background: #fcfcfc;
  border-radius: 6px;
  border: 1px solid #eee;
  padding: 8px 0;
}

.promotion-rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  transition: background 0.2s;
}

.promotion-rule-item:hover {
  background: #fff9f0;
}

.qty-badge {
  color: #333;
  font-weight: 600;
  font-size: 1em;
}

.rule-price {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--color-primary);
}

.economy-tag {
  color: #10b981;
  font-weight: 600;
  font-size: 0.85em;
}

.no-promo-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  background: white;
  border-radius: 12px;
  border: 2px dashed #eee;
}

/* ========== TUTORIEL ========== */
.tutorial-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tutorial-section > div:first-child {
  flex: 0 0 auto;
  margin-bottom: 15px;
}

.tutorial-section h2 {
  color: var(--color-primary);
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: normal;
  text-align: center;
  font-size: 1.2em;
  margin: 0;
  padding: 0 40px; /* padding-top et padding-bottom à 0, padding-left et padding-right à 40px */
  line-height: 1.3;
  word-wrap: break-word;
  flex: 1;
}

.tutorial-content {
  color: #333;
  line-height: 1.6;
  flex: 1;
  overflow-y: auto;
}

.tutorial-step {
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
}

.tutorial-step-number {
  display: inline-block;
  width: 30px;
  height: 30px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  font-weight: bold;
  margin-right: 10px;
}

.tutorial-step-title {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.tutorial-step-text {
  color: #666;
  font-size: 0.95em;
}

/* ========== RECHERCHE ========== */
.search-section {
  margin-top: 30px;
}

.search-box {
  position: relative;
  margin-bottom: 30px;
}

#photo-search {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-0);
  color: var(--text);
}

#suggestions-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-0);
  border: var(--border);
  border-radius: var(--r-md);
  margin-top: 6px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 2000;
  display: none;
  color: var(--text);
  box-shadow: var(--shadow-2);
  text-align: left;
}

.suggestion-item {
  padding: 12px 15px;
  cursor: pointer;
  font-size: 1.1em;
  transition: background 0.2s;
  color: #111827; /* éviter héritage blanc */
  text-align: left;
}

.suggestion-item:hover {
  background: var(--surface-2);
}
.suggestion-item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

/* ========== PHOTOS ========== */
#photos-results {
  display: none;
}

/* Desktop : wrapper galerie avec padding pour ~4 photos + zone vide sur les côtés */
/* dropdown et bouton Mes photos alignés avec les bords des photos */
@media (min-width: 769px) {
  .gallery-content-area {
    padding-left: calc(12% + 20px);
    padding-right: calc(12% + 20px);
    box-sizing: border-box;
  }
  #photos-results {
    padding-left: 0;
    padding-right: 0;
  }
  #filter-bar {
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
  justify-content: center;
  justify-items: stretch;
  align-items: start;
}

/* Masonry : grille type Pinterest, positions absolues (3:2 / 2:3) */
.photos-grid.photos-grid-masonry {
  position: relative;
  display: block !important;
  width: 100%;
  padding: 20px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.photos-grid.photos-grid-loading {
  min-height: 120px;
}

.photo-card.photo-card-masonry {
  position: absolute !important;
  left: 0;
  top: 0;
  box-sizing: border-box;
  aspect-ratio: unset;
  width: 0;
  max-width: none;
  padding: 0;
}

.photo-card.photo-card-masonry .photo-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-md);
}

/* Photo cards — premium grid : radius, bordure fine, shadow/hover uniquement au hover (perf) */
.photo-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--r-lg) !important;
  border: var(--border) !important;
  background: var(--surface-0) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: none !important;
  aspect-ratio: 3/2;
  width: 100%;
  max-width: 406px;
}

.photo-card.photo-vertical {
  aspect-ratio: 2/3;
  width: 271px;
  height: auto;
  margin: 0 auto;
}

.photo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  z-index: 10;
}

/* Overlay gradient au hover uniquement (perf) */
.photo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.15) 0%, transparent 40%);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
  border-radius: inherit;
}
.photo-card:hover::after {
  opacity: 1;
}

.photo-card .photo-thumbnail {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  background: var(--surface-2);
  display: block;
  border-radius: inherit;
  transition: filter 0.25s var(--ease);
}

.photo-card:hover .photo-thumbnail {
  filter: brightness(1.03);
}

/* IMPORTANT : Cacher les infos sous les photos */
.photo-info {
  display: none !important;
}

/* Photo Add Button — pill/circle premium, hover discret */
.photo-add-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-0) !important;
  color: var(--color-primary) !important;
  border-radius: var(--r-pill);
  width: 36px;
  height: 36px;
  font-size: 20px;
  font-weight: 600;
  border: var(--border);
  top: 10px;
  right: 10px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  z-index: 10;
  line-height: 1;
  padding: 0;
  margin: 0;
}

.photo-add-btn:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-2);
}
.photo-add-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.photo-card.in-cart .photo-add-btn {
  display: none;
}

/* Photo In Cart Badge — cohérent avec le + */
.photo-in-cart-badge {
  position: absolute !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #10b981 !important;
  color: white;
  border-radius: var(--r-pill);
  font-weight: 600;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  z-index: 10;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  width: 36px;
  height: 36px;
  font-size: 18px;
}

.photo-in-cart-badge:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-2);
}
.photo-in-cart-badge:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
}

.photo-blocked-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(55, 65, 81, 0.9);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 10;
  cursor: help;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.photo-card.has-blocked-digital {
  border: 2px solid #f59e0b;
}

/* État selected — border + halo soft */
.photo-card.in-cart {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.25);
}

.photo-card.in-cart .photo-thumbnail {
  filter: brightness(0.9);
}

.photo-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.photo-details {
  font-size: 0.9em;
  color: #666;
}

/* ========== PACK ========== */

@keyframes pack-gradient-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Pill blanc/neutre, bordure gradient animée (technique mask subtract Magic UI) */
/* Override .btn (width:100%; background:primary) — priorité explicite pour garder blanc + largeur réduite */
#pack-btn,
button.pack-btn {
  width: fit-content !important;
  max-width: none !important;
  min-width: 0;
  background: #fff !important;
  color: inherit;
  align-self: center !important;
}

.pack-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  border: none;
  background: #fff;
  box-shadow: inset 0 -8px 10px rgba(156, 64, 255, 0.08);
  cursor: pointer;
  margin-bottom: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: fit-content;
  align-self: center;
  transition: box-shadow 0.4s ease-out, transform 0.2s ease;
}

.pack-btn:hover {
  box-shadow: inset 0 -5px 10px rgba(156, 64, 255, 0.20);
  transform: translateY(-1px);
}

/* Bordure gradient animée via masque soustraction (pas de pseudo-élément, même technique que Magic UI) */
.pack-btn-border {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, #ffaa40, #9c40ff, #ffaa40);
  background-size: 300% 100%;
  animation: pack-gradient-shift 8s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: subtract;
  pointer-events: none;
}

/* Texte gradient animé */
.pack-btn-label {
  background: linear-gradient(90deg, #ffaa40, #9c40ff, #ffaa40);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pack-gradient-shift 8s linear infinite;
}

/* Flèche chevron */
.pack-btn-arrow {
  stroke: #9c40ff;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.pack-btn:hover .pack-btn-arrow {
  transform: translateX(3px);
}

.pack-popup-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}

.pack-popup-box {
  background: #f7f7f9;
  padding: 40px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  text-align: left;
}

.pack-popup-box h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.6em;
  color: var(--color-primary);
  text-align: center;
}

.pack-popup-box p {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 25px;
  text-align: center;
}

.pack-popup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid #e0e0e0;
}

.pack-popup-row:first-of-type {
  border-top: none;
}

.pack-popup-label {
  font-size: 1em;
  color: #333;
}

.pack-popup-price {
  font-weight: 700;
  margin-right: 12px;
  color: var(--color-primary);
}

.pack-popup-add-btn {
  padding: 8px 16px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
}

.pack-popup-add-btn:hover {
  background: var(--color-primary-dark);
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination button {
  padding: 10px 20px;
  border: none;
  background: var(--color-primary);
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: var(--color-primary-dark);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9998; /* En dessous du cart-modal */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  overflow: auto;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 80px 20px;
}

.lightbox-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Par défaut pour photos horizontales (ratio 3:2) */
  max-width: min(90vw, calc((100vh - 140px) * 1.5));
  max-height: calc(100vh - 140px);
}

/* Photos verticales dans la lightbox : inverser les dimensions */
.lightbox-image-container.lightbox-vertical {
  max-width: min(90vw, calc((100vh - 140px) * 2 / 3));
  max-height: calc(100vh - 140px);
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border: none !important;
  box-shadow: none !important;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  transition: all 0.3s;
}

.lightbox-close:hover {
  background: rgba(0,0,0,0.8);
  color: #ccc;
  transform: scale(1.05);
}
.lightbox-close:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 60px;
  font-weight: bold;
  cursor: pointer;
  padding: 20px;
  user-select: none;
  z-index: 10001;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  color: #ccc;
}
.lightbox-nav:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}
.lightbox-add-btn:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.lightbox-cta-row {
  position: fixed;
  top: 20px;
  right: 100px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  z-index: 10001;
}

.lightbox-tarifs-btn {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.lightbox-tarifs-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
}

.lightbox-tarifs-btn:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1.1em;
  background: transparent !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 10001;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chemin local sous la caption (event/cavalier_cheval/fichier.jpg) */
.lightbox-local-path {
  display: none;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.9);
  font-size: 0.7em;
  font-family: monospace;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  padding: 2px 12px;
  z-index: 10001;
  max-width: 95%;
  word-break: break-all;
  text-align: center;
}

.lightbox-local-path.visible {
  display: block;
}

/* Remonter la caption quand le chemin local est affiché */
.lightbox:has(#lightbox-local-path.visible) .lightbox-caption {
  bottom: 38px;
}

.lightbox-add-btn {
  position: static;
  padding: 10px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
  white-space: nowrap;
}

.lightbox-add-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.lightbox-add-btn.in-cart {
  background: #ef4444;
}

.lightbox-add-btn.in-cart:hover {
  background: #dc2626;
}

/* ========== CART MODAL — overlay + dialog (desktop premium checkout) ========== */
.cart-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.38);
  overflow: auto;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.2s var(--ease);
}
@supports not (backdrop-filter: blur(8px)) {
  .cart-modal { background: rgba(0, 0, 0, 0.5); }
}
.cart-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-modal-dialog {
  background: var(--surface-0);
  border-radius: 20px;
  max-width: 1404px !important;
  width: 1404px !important;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14);
  position: relative;
  z-index: 10000;
  border: var(--border);
}

/* Modal pack : au-dessus du modal panier ; largeur max bornée à la viewport */
#pack-modal {
  z-index: 10001 !important; /* Au-dessus du modal panier (9999) */
}

#pack-modal .cart-modal-dialog {
  max-width: min(480px, calc(100vw - 20px)) !important;
  width: min(480px, calc(100vw - 20px)) !important;
  box-sizing: border-box !important;
}

.cart {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 90vh;
  background: var(--surface-1);
  border-radius: inherit;
  font-size: 0.9rem;
}

/* Cart header — compact + close premium */
.cart-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--text-on-dark);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: var(--border);
}
.cart-header h2 {
  color: var(--text-on-dark);
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cart-header button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  opacity: 0.9;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: var(--r-pill);
  color: var(--text-on-dark);
  cursor: pointer;
}
.cart-header button:hover {
  opacity: 1;
  background: rgba(255,255,255,0.2);
}
.cart-header button:focus-visible {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}

#cart-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 20px 24px;
  background: var(--surface-1);
}

/* Layout panier : content + sticky summary (desktop) */
.cart-two-columns {
  display: grid;
  grid-template-columns: 850px 432px;
  gap: 28px;
  padding: 20px 24px;
  min-height: 0;
  align-items: start;
}
.cart-left-column {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(90vh - 200px);
  min-height: 200px;
  width: 100%;
  max-width: 850px;
  box-sizing: border-box;
}
#cart-items {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.cart-right-column {
  position: sticky;
  top: 0;
  align-self: start;
}

/* Summary — sticky, typo Total renforcée */
.cart-summary {
  background: var(--surface-0);
  border: var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-1);
}
.cart-summary h3 {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  border-bottom: var(--border);
  padding-bottom: 10px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95em;
}
.summary-line:not(:last-child) {
  border-bottom: 1px solid var(--surface-2);
}
.summary-total {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

/* ========== Cart items — ligne photo + formats (border, padding, hover) ========== */
.cart-photo-row {
  --cart-photo-w: 400px;
  --cart-photo-h: 600px;
  --cart-formats-h: var(--cart-photo-h);
  --cart-formats-max-w: 389px;
  display: grid;
  grid-template-columns: minmax(0, var(--cart-photo-w)) var(--cart-formats-max-w);
  justify-content: start;
  gap: 16px;
  padding: 14px 16px;
  border: var(--border);
  border-radius: var(--r-md);
  background: var(--surface-0);
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  margin-bottom: 12px;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cart-photo-row:hover {
  border-color: rgba(0,0,0,0.12);
  box-shadow: var(--shadow-1);
}
.cart-photo-row:last-child {
  margin-bottom: 0;
}

/* Ajustements selon orientation de la photo dans le panier */
.cart-photo-row[data-photo-orientation="horizontal"] {
  --cart-photo-w: 400px; /* Augmenté pour colonne plus large */
  --cart-photo-h: 267px; /* Ratio 3:2 (400 * 2/3) */
  --cart-formats-h: var(--cart-photo-h);
  --cart-formats-max-w: 389px; /* Réduit de 7% (418px * 0.93) */
}
.cart-photo-row[data-photo-orientation="vertical"] {
  --cart-photo-w: 400px; /* Augmenté pour colonne plus large */
  --cart-photo-h: 600px; /* Ratio 2:3 (400 * 3/2) */
  --cart-formats-h: 600px; /* Même hauteur que la photo */
  --cart-formats-max-w: 389px; /* Réduit de 7% (418px * 0.93) */
}
.cart-photo-row[data-photo-orientation="square"] {
  --cart-photo-w: 400px;
  --cart-photo-h: 400px;
  --cart-formats-h: var(--cart-photo-h);
  --cart-formats-max-w: 389px;
}

.cart-photo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content; /* S'adapter à la taille réelle de la photo */
  max-width: var(--cart-photo-w); /* Limiter à la largeur maximale */
  margin: 0;
  padding: 0;
  margin-right: 0;
  padding-right: 0;
}

.cart-photo-large {
  width: auto; /* Taille naturelle de l'image */
  max-width: var(--cart-photo-w); /* Limiter à la largeur maximale */
  max-height: var(--cart-photo-h);
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  object-fit: contain;
  border: 2px solid #e1e4e8;
  background: #f5f5f5;
  display: block;
  margin: 0 auto;
}

.cart-photo-large:hover {
  transform: scale(1.05);
}

.cart-photo-info {
  margin-top: 8px;
  font-size: 0.9em;
  color: #666;
  line-height: 1.5;
  text-align: center;
  width: 100%;
}

/* Zone formats — rows denses, pas de gros fond gris */
.cart-formats-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: var(--cart-formats-max-w);
  max-width: var(--cart-formats-max-w);
  max-height: none;
  overflow-y: visible;
  padding-right: 4px;
  margin: 0;
  padding-left: 0;
  box-sizing: border-box;
}
.cart-format-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px 8px 12px;
  background: var(--surface-0);
  border-radius: var(--r-sm);
  border: var(--border);
  margin-bottom: 4px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
}
.cart-format-item:hover {
  border-color: rgba(0,0,0,0.12);
}
.cart-format-name-wrapper {
  flex: 1;
}
.cart-format-name {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.9em;
}
/* Titres section Formats papier / numériques — séparation visuelle */
.cart-format-section-title {
  background: transparent;
  color: var(--color-primary);
  padding: 8px 0 6px 0;
  margin-bottom: 4px;
  margin-top: 10px;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--surface-2);
}
.cart-format-section-title:first-child {
  margin-top: 0;
}
.cart-format-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 0;
  margin-right: 0;
}

.cart-format-message {
  font-size: 0.85em;
  color: var(--color-secondary);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  font-weight: 500;
  border-top: 1px solid #e1e4e8;
}

.cart-price {
  font-weight: 600;
  color: var(--color-primary);
  min-width: 80px;
  text-align: right;
}

.cart-next-price {
  color: var(--color-primary);
  font-size: 0.85em;
  margin-top: 6px;
}

.cart-qty-controls {
  display: flex;
  align-items: center; /* Centre les boutons verticalement */
  gap: 8px; /* Gap entre les boutons */
  padding-right: 0;
}

.cart-btn-qty {
  width: 28px;
  height: 28px;
  border-radius: 50%; /* Bouton en cercle */
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  font-weight: bold;
  color: var(--color-primary);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
}

.cart-btn-qty:hover {
  background: var(--color-primary);
  color: white;
  transform: scale(1.05);
}

.cart-btn-qty:active {
  transform: scale(0.95);
}
.cart-btn-qty:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.cart-qty-value {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
  font-size: 1em;
  color: var(--color-primary);
}

/* Bouton "Ajouter pour X€" — pill/chip, hover lift */
.cart-btn-add-format {
  padding: 6px 14px;
  background: var(--surface-0);
  color: var(--color-primary);
  border: var(--border-strong);
  border-radius: var(--r-pill);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
  font-size: 0.85em;
}
.cart-btn-add-format:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.cart-btn-add-format:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.cart-btn-remove-format {
  padding: 6px 12px !important; /* Padding vertical remis */
  background: #ef4444 !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 0.85em !important;
}

.cart-btn-remove {
  margin-top: 10px;
  font-size: 0.9em;
  color: #ef4444;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 10px;
  transition: transform 0.2s;
}

.cart-btn-remove:hover {
  color: #c0392b;
  transform: scale(1.2);
}

.cart-photo-thumbnail {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  flex-shrink: 0;
}

.cart-total {
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 20px;
  text-align: right;
  color: var(--color-primary);
}

/* ========== Buttons — CTA hierarchy (panier uniquement) ========== */
#cart-modal #validate-cart-btn {
  padding: 12px 20px;
  background: var(--color-primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--r-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
#cart-modal #validate-cart-btn:hover {
  background: var(--color-primary-dark) !important;
  box-shadow: var(--shadow-1);
}
#cart-modal #validate-cart-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
#cart-modal #save-cart-btn {
  padding: 12px 20px;
  background: var(--surface-0) !important;
  color: var(--color-primary) !important;
  border: var(--border-strong) !important;
  border-radius: var(--r-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 1em;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
#cart-modal #save-cart-btn:hover {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 1px var(--color-primary);
}
#cart-modal #save-cart-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
#cart-modal #cancel-order-btn {
  padding: 10px 18px;
  background: transparent !important;
  color: #b91c1c !important;
  border: 1px solid rgba(185, 28, 28, 0.5) !important;
  border-radius: var(--r-md);
  font-weight: 500;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
#cart-modal #cancel-order-btn:hover {
  background: rgba(185, 28, 28, 0.06) !important;
  border-color: #b91c1c !important;
}
#cart-modal #cancel-order-btn:focus-visible {
  outline: 2px solid #b91c1c;
  outline-offset: 2px;
}

/* ========== CUSTOM MODALS ========== */
.custom-modal-overlay {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}

.custom-modal-overlay.active {
  display: flex;
}

.custom-modal {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.custom-modal-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.custom-modal-icon.success {
  color: #10b981;
}

.custom-modal-icon.error {
  color: #ef4444;
}

.custom-modal-icon.warning {
  color: #f59e0b;
}

.custom-modal-icon.info {
  color: #4b5563;
}

.custom-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.custom-modal-message {
  font-size: 16px;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.5;
}

.custom-modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.custom-modal-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.custom-modal-btn-primary {
  background: var(--color-primary);
  color: white;
}

.custom-modal-btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.custom-modal-btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.custom-modal-btn-secondary:hover {
  background: #d1d5db;
}

.custom-modal-btn-danger {
  background: #ef4444;
  color: white;
}

.custom-modal-btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ========== FORMULAIRE ========== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
}

.btn {
  width: 100%;
  padding: 10px 20px;
  background: var(--color-primary);
  color: var(--text-on-dark);
  border: none;
  border-radius: var(--r-sm);
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover {
  background: var(--color-primary-dark);
}
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========== MESSAGES ========== */
.message {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: none;
}

.message.success {
  background: #d4f4dd;
  color: #065f46;
  border: 1px solid #10b981;
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.message.info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #4b5563;
}

/* ========== RESPONSIVE DESKTOP ========== */
@media (max-width: 1600px) {
  .main-layout {
    grid-template-columns: minmax(260px, 280px) minmax(0, 1fr);
  }
}

@media (max-width: 1400px) {
  .main-layout {
    grid-template-columns: minmax(240px, 260px) minmax(0, 1fr);
  }
}

@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .left-column {
    position: relative;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 1024px) {
  .cart-two-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .cart-right-column {
    position: relative;
    top: 0;
  }
  
  .cart-left-column {
    max-height: none;
  }
  
  .cart-photo-row {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENTS GRID — Page sélection des compétitions
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Event list / albums — section + container (IDs inchangés) ────────────────── */
#events-grid-section {
  padding: 40px 24px 56px;
  width: 100%;
  box-sizing: border-box;
}

.events-grid-header {
  text-align: center;
  margin-bottom: 36px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.events-grid-header h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.events-grid-subtitle {
  color: var(--text-muted);
  font-size: 0.95em;
}

.events-grid-container {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem;
  box-sizing: border-box;
}

.events-grid-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 1em;
}

/* ─── ChromaGrid — cartes cover premium (image full bleed + overlay gradient bas) ─── */
.chroma-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 300px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: var(--border);
  background: var(--surface-2);
  cursor: pointer;
  --mouse-x: 50%;
  --mouse-y: 50%;
  --spotlight-color: rgba(255,255,255,0.18);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: none;
}

.chroma-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

/* Overlay gradient bas — titre lisible même si cover claire */
.chroma-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

.chroma-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  z-index: 2;
  border-radius: inherit;
}

.chroma-card:hover::before {
  opacity: 1;
}

.chroma-img-wrapper {
  position: relative;
  z-index: 0;
  padding: 0;
  box-sizing: border-box;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.chroma-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chroma-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(0,0,0,0.12);
  background: var(--surface-2);
  letter-spacing: 0.05em;
  user-select: none;
}

.chroma-badge-coming-soon {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  z-index: 2;
}

.chroma-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 14px 16px 16px;
  color: var(--text-on-dark);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.chroma-name {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-on-dark);
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
}

.chroma-date {
  font-family: inherit;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.85);
}

/* Anciens overlays supprimés — désaturation gérée via filter: grayscale() par carte en JS */

/* Anciens styles event-card (conservés pour compatibilité) */
.event-card {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTER BAR — Filtres en mode galerie
   ═══════════════════════════════════════════════════════════════════════════ */

/* Une ligne : [filtres] … [Mes photos] — Acheter mon pack déplacé sur la ligne recherche */
#filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 8px;
  margin-bottom: 2px;
  margin-top: 4px;
}

/* Côté gauche : flex: 1 */
#filter-bar .filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

/* Côté droit : Mes photos */
#filter-bar .filter-right {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}
.filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.filter-chip.filter-chip-all {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-chip.filter-chip-all.active {
  background: var(--color-primary);
  color: #fff;
}

.filter-chip.filter-chip-dropdown {
  min-width: 160px;
  max-width: 240px;
  justify-content: space-between;
  border-radius: 10px;
  padding: 6px 12px;
}

.filter-chip.filter-chip-dropdown.active {
  background: #fff;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Même style que .filter-chip pour uniformité du bandeau */
.filter-selected-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.filter-selected-btn:hover:not(.active) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-selected-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Icône profil header — même couleur que € et ? (secondary) */
#header-profile-btn {
  color: var(--color-header-text);
}
#header-profile-btn:hover {
  background: rgba(255,255,255,0.28) !important;
}

/* Mobile: chroma cards responsives */
@media (max-width: 680px) {
  .chroma-card {
    width: calc(50vw - 20px);
    min-width: 140px;
    max-width: 300px;
  }
  .events-grid-container {
    gap: 0.5rem;
    padding: 0.25rem;
  }
  #events-grid-section {
    padding: 24px 12px 36px;
  }
  .events-grid-header h2 {
    font-size: 1.3rem;
  }

  #filter-bar {
    flex-wrap: wrap;
    padding: 6px 0 10px;
  }
}

/* ========== Accessibilité — reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Client Online CSS — source partagée ; livraison galerie via gallery_desktop.css / gallery_mobile.css (npm run build:gallery-css) */
/* Couches sources : client_base.css + ce fichier ; mobile : client_online_mobile.css (inclus au build gallery_*.css) */

/* Fond beige comme landing Prisma (#F7F7F4) */
body.view-events-grid .content,
body.view-gallery .content {
  background: #F7F7F4;
  min-height: calc(100vh - 56px);
}

/* Largeur piste recherche (identique /galeries et slug/galerie) — centrage page via grille 1fr | piste | 1fr */
body.view-events-grid,
body.view-gallery {
  --gallery-search-track: min(520px, calc(100vw - 220px));
  --gallery-search-max-width: var(--gallery-search-track);
}

/* Galerie : rapprocher filtres de la barre de recherche */
body.view-gallery .content {
  padding-top: 8px;
}
body.view-gallery .main-layout {
  margin-top: 0;
}
body.view-gallery #filter-bar {
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 6px;
}

/* Classes utilitaires desktop/mobile */
.desktop-only {
  display: block;
}
.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: block !important;
  }
}

/* Desktop: Layout header — 2 colonnes (logo gauche, boutons droite) + padding aligné avec photos */
@media (min-width: 769px) {
  body.view-events-grid .header,
  body.view-gallery .header {
    padding-left: var(--gallery-padding-x, 24px) !important;
    padding-right: var(--gallery-padding-x, 24px) !important;
  }
  .header .header-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    gap: 0 !important;
    justify-content: space-between !important;
  }
  
  .header .header-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
  }

  .header .header-center {
    display: none !important;
  }
  
  .header .header-right {
    justify-self: end !important;
  }

  /* E-mail connecté (sans libellé), avant le bouton profil */
  .header-auth-user-info {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 10px;
    max-width: min(420px, 42vw);
    text-align: left;
    line-height: 1.25;
  }
  .header-auth-user-info .header-auth-email {
    font-size: 0.8rem;
    font-weight: 600;
    color: #111827;
    min-width: 0;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Barre de recherche visible sur events-grid ET galerie (recherche cross-events dans les DB) */
  body.view-events-grid .search-bar-below,
  body.view-gallery .search-bar-below {
    display: flex !important;
  }

  /* Barre de recherche + Acheter mon pack alignés — desktop (recherche centrée entre album et pack) */
  .search-bar-below {
    background: #ffffff;
    padding: 10px var(--gallery-padding-x, 30px);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 56px; /* hauteur du header desktop */
    z-index: 999;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  }

  .search-bar-below__middle {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .search-bar-below .search-box-below {
    width: 100%;
    max-width: var(--gallery-search-max-width, min(520px, calc(100vw - 220px)));
    position: relative;
    margin-bottom: 0;
  }

  .search-bar-below .pack-btn-in-search {
    flex-shrink: 0;
  }

  /* Bouton retour + titre album (dans la barre de recherche) */
  .search-bar-below #current-album-header {
    flex-shrink: 1;
    min-width: 0;
    max-width: min(46vw, 520px);
    align-items: center;
    gap: 8px;
  }

  .search-box-below {
    width: 100%;
    max-width: var(--gallery-search-max-width, min(520px, calc(100vw - 220px)));
    position: relative;
    margin-bottom: 0;
  }

  .search-box-below input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    font-size: 0.95em;
    background: #f9fafb;
    color: #111827;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
  }

  .search-box-below input::placeholder {
    color: #9ca3af;
  }

  .search-box-below input:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107,114,128,0.12);
    background: #fff;
  }

  /* Suggestions dropdown dans la barre de recherche sous le header */
  .search-box-below #suggestions-box {
    z-index: 1100 !important;
    background: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    margin-top: 4px !important;
  }
  
  /* Colonne Nos offres masquée : accès via bouton € dans le header */
  .main-layout .left-column {
    display: none !important;
  }
  .main-layout {
    grid-template-columns: 1fr !important;
  }
  
  .header .header-right {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
  }

  /*
   * Galerie prestataire : 1fr | piste fixe | 1fr → la barre est centrée sur la page (pas décalée par le pack).
   */
  #galerie-view .search-bar-below {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--gallery-search-track, min(520px, calc(100vw - 220px)))) minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 16px !important;
    row-gap: 8px !important;
    background: #ffffff !important;
    padding: 10px var(--gallery-padding-x, 30px) !important;
    position: sticky !important;
    top: 56px !important;
    z-index: 999 !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
  }
  #galerie-view .search-bar-below #header-auth-user-info-mobile {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }
  #galerie-view .search-bar-below #current-album-header {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    min-width: 0 !important;
    max-width: min(46vw, 520px) !important;
  }
  #galerie-view .search-bar-below__middle {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    align-self: center !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    display: block !important;
  }
  #galerie-view .search-bar-below .pack-btn-in-search {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
  }
  #galerie-view .search-bar-below .search-box-below {
    width: 100% !important;
    max-width: none !important;
    position: relative !important;
    margin-bottom: 0 !important;
  }
  #galerie-view .header .header-auth-user-info {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px 10px !important;
    max-width: min(420px, 42vw) !important;
    text-align: left !important;
    line-height: 1.25 !important;
  }
}

/* Desktop: mobile-menu-btn caché, ne pas perturber la grille */
@media (min-width: 769px) {
  .header #mobile-menu-btn {
    display: none !important;
  }
}

/* Désactiver les comportements web (zoom, selection, etc.) */
@media (max-width: 768px) {
  * {
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  
  /* Autoriser la sélection uniquement pour les inputs */
  input, textarea {
    -webkit-user-select: text !important;
    user-select: text !important;
  }
  
  /* Autoriser les clics sur les suggestions */
  .suggestion-item,
  #suggestions-box,
  #suggestions-box * {
    -webkit-user-select: none !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
    user-select: none !important;
  }
}

/* Mobile - Header réorganisé : Logo, Panier, Langue sur la même ligne */
@media (max-width: 768px) {
  /* Header mobile - isolé du desktop avec spécificité maximale */
  /* ÉCRASER toutes les règles de client_base.css pour le header mobile */
  /* Utiliser des sélecteurs très spécifiques pour écraser les règles desktop */
  /* FORCER position: fixed avec spécificité MAXIMALE pour écraser client_base.css */
  /* Cibler aussi l'attribut data-mobile-header pour une spécificité encore plus élevée */
  html body .header[data-mobile-header],
  body .header[data-mobile-header],
  html .header[data-mobile-header],
  .header[data-mobile-header],
  html body .header,
  body .header,
  html .header,
  .header,
  div.header,
  body div.header,
  html body div.header {
    /* Écraser position: sticky du desktop - FORCER fixed */
    /* IMPORTANT: position: fixed est relatif au viewport, PAS au container parent */
    position: fixed !important;
    /* NE PAS mettre !important sur top pour laisser la priorité aux styles inline JS */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px !important;
  transition: transform 0.3s ease-in-out !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
    /* NE PAS mettre transform: none ici - laisser le JS contrôler le transform */
    /* Écraser les règles de client_base.css */
    text-align: left !important;
  }
  
  /* S'assurer que le container parent n'a pas de transform qui casse le position: fixed */
  /* MAIS ne pas forcer transform: none sur le container car ça affecte tous les enfants */
  .container {
    /* transform: none est retiré pour ne pas affecter les enfants */
    perspective: none !important;
    filter: none !important;
    will-change: auto !important;
  }
  
  /* Ajouter un padding au body pour compenser le header fixed + barre de recherche */
  body {
    padding-top: 108px !important; /* Header (~56px) + barre recherche (~52px) */
  }
  
  /* Header caché quand on scroll vers le bas - utiliser top négatif */
  /* Utiliser une valeur très négative pour être sûr que le header disparaît */
  body .header.header-hidden,
  html body .header.header-hidden,
  html .header.header-hidden,
  .header.header-hidden {
    /* NE PAS mettre transform ici non plus - laisser le JS contrôler */
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px !important;
    /* Le JS va mettre transform: translateY(-56px) pour cacher le header */
    /* Ne pas utiliser visibility: hidden car ça peut causer des problèmes */
  }
  
  /* Header content layout mobile */
  .header .header-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
  }
  
  /* Menu burger à gauche */
  #mobile-menu-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
    z-index: 1001 !important;
    position: relative !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }
  
  /* Cacher le header-center (search déplacée sous le header) */
  .header-center {
    display: none !important;
  }

  /* Cacher le header-right sur mobile */
  .header-right {
    display: none !important;
  }

  /* Barre de recherche + pack — mobile (fixed, juste sous le header) */
  .search-bar-below {
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 998 !important;
    background: #ffffff !important;
    padding: 8px 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    box-sizing: border-box !important;
  }

  .search-bar-below__middle {
    width: 100% !important;
    display: block !important;
  }

  .header-auth-user-mobile {
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.35;
    padding: 0 4px 6px;
    color: #6b7280;
  }
  .header-auth-user-mobile .header-auth-email {
    display: inline;
    font-weight: 600;
    color: #111827;
    word-break: break-all;
  }

  .search-box-below {
    width: 100% !important;
    position: relative !important;
    margin-bottom: 0 !important;
  }

  .search-box-below input {
    width: 100% !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    border: 1.5px solid #e5e7eb !important;
    font-size: 0.95em !important;
    background: #f9fafb !important;
    color: #111827 !important;
    outline: none !important;
    box-sizing: border-box !important;
  }

  .search-box-below input::placeholder {
    color: #9ca3af !important;
  }

  .search-box-below input:focus {
    border-color: #6b7280 !important;
    background: #fff !important;
  }

  /* Suggestions dropdown mobile */
  .search-box-below #suggestions-box {
    z-index: 1100 !important;
    background: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14) !important;
    margin-top: 4px !important;
  }
  
  /* Afficher le bouton "Voir nos offres" sur mobile */
  #view-promotions-btn.mobile-only {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    order: 2;
    font-size: 0.85em !important;
    padding: 6px 12px !important;
    white-space: nowrap !important;
    margin-left: 8px !important; /* Espacement supplémentaire après le logo */
  }
  
  /* Code panier */
  .header .cart-code-search-box {
    display: flex !important;
    width: auto !important;
    flex-shrink: 0 !important;
    order: 3;
    margin-left: 4px !important; /* Espacement supplémentaire après "Nos offres" */
  }
  
  .header .cart-code-search-box #cart-code-search {
    width: 90px !important;
    font-size: 0.85em !important;
    padding: 8px 10px !important;
    max-width: 90px !important;
  }
  
  /* Cacher le panier du header sur mobile - remplacé par la bottom bar */
  .header #cart-header-btn {
    display: none !important;
  }
  
  /* Cacher les boutons langue desktop sur mobile */
  .header .lang-btn {
    display: none !important;
  }
  
  /* Le conteneur langue doit rester visible pour le dropdown mobile */
  .header > div > div:last-child {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0;
    width: auto !important;
    order: 4;
    margin-left: 8px !important; /* Espacement uniforme après le code panier */
  }
  
  /* Cacher le div interne avec les boutons */
  .header > div > div:last-child > div {
    display: none !important;
  }
  
  /* Bottom bar sticky pour le panier - remplace le bouton flottant */
  #mobile-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    padding: 12px 16px;
    display: none; /* Caché par défaut, affiché par JS quand cart > 0 */
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
    color: white;
    font-weight: 600;
    gap: 12px;
    transition: opacity 0.2s ease; /* Enlever transition transform pour éviter bounce */
    transform: none !important; /* Forcer pas de transform */
  }
  
  #mobile-cart-bar.active {
    display: flex !important;
  }
  
  #mobile-cart-bar .cart-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
  }
  
  #mobile-cart-bar .cart-icon {
    font-size: 1.3em;
  }
  
  #mobile-cart-bar .cart-text {
    font-size: 0.95em;
  }
  
  #mobile-cart-bar .view-cart-btn {
    background: white;
    color: #374151;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s;
  }
  
  #mobile-cart-bar .view-cart-btn:active {
    transform: scale(0.95);
  }
  
  /* Style pour le select natif mobile (sera créé par JS) - VISIBLE */
  .header #mobile-lang-select {
    padding: 6px 10px !important;
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.8em !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 20px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 4px center !important;
    background-size: 8px !important;
    height: auto !important;
    line-height: 1.2 !important;
    display: inline-flex !important; /* VISIBLE au lieu de block */
    flex-shrink: 0 !important;
    order: 4 !important;
  }
  
  .header #mobile-lang-select option {
    background: #374151 !important;
    color: white !important;
  }
  
  /* Menu burger mobile (overlay) */
  #mobile-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 2000 !important;
    display: none !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }
  
  #mobile-menu.active {
    display: flex !important;
  }
  
  .mobile-menu-content {
    width: 280px !important;
    max-width: 85vw !important;
    height: 100% !important;
    background: var(--color-header) !important;
    color: var(--color-header-text) !important;
    padding: 0 !important;
    overflow-y: auto !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
  }
  
  .mobile-menu-logo {
    display: flex !important;
    align-items: center !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
  }
  
  .mobile-menu-logo:hover {
    background: rgba(0, 0, 0, 0.04) !important;
  }
  
  .mobile-menu-logo img {
    height: 40px !important;
    filter: brightness(1.1) !important;
  }
  
  .mobile-menu-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background: none !important;
    border: none !important;
    color: var(--color-header-text) !important;
    font-size: 32px !important;
    cursor: pointer !important;
    padding: 5px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: background 0.2s !important;
  }
  
  .mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.06) !important;
  }
  
  .mobile-menu-items {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin-top: 20px !important;
  }
  
  .mobile-menu-item {
    padding: 15px 20px !important;
    color: var(--color-header-text) !important;
    background: none !important;
    border: none !important;
    text-align: left !important;
    font-size: 1em !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  
  .mobile-menu-item:hover {
    background: rgba(0, 0, 0, 0.06) !important;
  }
  
  .mobile-menu-item:active {
    background: rgba(0, 0, 0, 0.1) !important;
  }
  
  .mobile-menu-item input,
  .mobile-menu-item select {
    width: 100% !important;
    padding: 10px !important;
    border: none !important;
    border-radius: 6px !important;
    background: white !important;
    color: #374151 !important;
    outline: none !important;
    font-size: 0.9em !important;
  }
  
  .mobile-menu-item label {
    color: var(--color-header-text) !important;
    font-size: 0.9em !important;
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
  }
  /* Suggestions de recherche visibles sur mobile */
  .search-box {
    position: relative !important;
  }
  
  /* S'assurer que le conteneur de recherche a position relative */
  .search-section .search-box {
    position: relative !important;
  }
  
  #suggestions-box {
    position: absolute !important;
    z-index: 2000 !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    margin-top: 5px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    text-align: left !important;
  }
  
  /* Forcer l'affichage quand il y a du contenu */
  #suggestions-box:not(:empty) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* S'assurer que les items de suggestion sont cliquables sur mobile */
  .suggestion-item {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    text-align: left !important;
  }
  
  /* S'assurer que le conteneur parent n'a pas overflow hidden */
  .search-section,
  .center-column {
    overflow: visible !important;
  }
  
  /* Code panier dans le header - visible et compact */
  .header .cart-code-search-box {
    display: flex !important;
    width: auto !important;
    justify-content: flex-start !important;
    flex-shrink: 0 !important;
  }
  
  .header .cart-code-search-box #cart-code-search {
    width: 90px !important;
    max-width: 90px !important;
    font-size: 0.85em !important;
    padding: 8px 10px !important;
  }
}

/* Mobile - Cacher complètement les colonnes gauche/droite */
@media (max-width: 768px) {
  .left-column,
  .main-layout {
    display: block !important;
  }
  
  .center-column {
    width: 100% !important;
    padding: 0 !important;
  }

  body {
    padding-top: 0 !important;
  }

  .content {
    margin-top: 70px !important;
  }
  
  .content {
    padding: 10px !important;
  }
  
  .center-column h2 {
    font-size: 1.4em !important;
    margin-bottom: 15px !important;
    text-align: center !important;
  }
  
  .search-section {
    margin-bottom: 15px !important;
  }
  
  .search-section > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
  }
  
  .mobile-search-shell {
    display: flex !important;
    flex-direction: row !important; /* Row pour avoir événement + recherche côte à côte */
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  #pack-btn {
    width: fit-content !important;
    margin-top: 5px !important;
  }

  .mobile-search-shell .search-box {
    width: 100% !important;
    max-width: none !important;
  }
  
  #event-filter-container-mobile {
    display: block !important;
    width: 100% !important;
  }
  
  #event-filter-container-mobile select {
    width: 100% !important;
  }

  /* === HIÉRARCHIE CTA === */
  /* CTA principal : Rechercher */
  #search-btn {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 1em !important;
    padding: 14px 40px !important;
    box-shadow: 0 4px 15px rgba(55, 65, 81, 0.4) !important;
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  #search-btn:active {
    transform: scale(0.98);
  }
  #search-btn:focus-visible {
    outline: 2px solid #374151;
    outline-offset: 2px;
  }

  /* CTA secondaire : Pack */
  #pack-btn {
    order: 2 !important;
    display: inline-flex !important;
    justify-content: center !important;
    width: fit-content !important;
    max-width: 100% !important;
    margin: 0 auto 15px !important;
  }
  
  /* === CART MODAL MOBILE === */
  /* Dialog optimisé pour mobile */
  body.modal-open .cart-modal-dialog {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    margin: 10px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  .cart-modal.active .cart {
    max-height: calc(100vh - 80px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  #cart-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 !important;
    min-height: 0 !important;
    max-height: calc(100vh - 220px) !important;
    padding: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Colonnes empilées sur mobile */
  .cart-two-columns {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .cart-left-column {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  
  .cart-right-column {
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    order: 1 !important; /* Mettre le récapitulatif en bas */
    box-sizing: border-box !important;
  }
  
  .cart-summary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px !important;
  }
  
  #cart-items {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Layout des lignes du panier sur mobile - colonnes empilées */
  .cart-photo-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  
  /* Container photo : suivre la largeur du parent */
  .cart-photo-container {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  /* Image : suivre la largeur du parent */
  .cart-photo-large {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: var(--cart-photo-h) !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
  }
  
  /* Ajustements hauteur selon orientation - photos plus grosses pour remplir le container */
  .cart-photo-row[data-photo-orientation="vertical"] {
    --cart-photo-h: 400px !important; /* Augmenté pour remplir le container */
    --cart-formats-h: auto !important;
  }
  
  .cart-photo-row[data-photo-orientation="horizontal"] {
    --cart-photo-h: 250px !important; /* Augmenté pour remplir le container */
    --cart-formats-h: auto !important;
  }
  
  .cart-photo-row[data-photo-orientation="square"] {
    --cart-photo-h: 100% !important; /* Prendre toute la largeur disponible */
    --cart-formats-h: auto !important;
  }
  
  .cart-photo-row:not([data-photo-orientation]) {
    --cart-photo-h: 300px !important; /* Augmenté pour remplir le container */
  }
  
  /* Container formats : suivre la largeur du parent */
  .cart-formats-container {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 6px !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  .cart-format-item {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    box-sizing: border-box !important;
    font-size: 0.9em !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .pack-btn,
  .cart-btn-remove,
  .cart-btn-remove-format {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* === GRILLE PHOTOS 1 COLONNE === */
  .photos-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px !important;
  }
  
  /* === CARTES PHOTO === */
  .photo-card {
    position: relative !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease !important;
    /* Pas d'aspect-ratio fixe, on laisse l'image définir la hauteur */
  }
  
  /* Garder le bouton + sur mobile */
  .photo-card .photo-add-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
    background: rgba(55, 65, 81, 0.9) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 1.5em !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 2 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    transition: transform 0.2s !important;
  }
  
  .photo-card .photo-add-btn:active {
    transform: scale(0.9) !important;
  }
  
  /* Cacher le bouton + quand la photo est dans le panier */
  .photo-card.in-cart .photo-add-btn {
    display: none !important;
  }
  
  /* État sélectionné avec bordure */
  .photo-card.in-cart {
    border: 3px solid #374151 !important;
    box-shadow: 0 4px 15px rgba(55, 65, 81, 0.4) !important;
  }
  
  /* Checkmark sélection - visible quand dans le panier */
  .photo-card .photo-in-cart-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
    background: #374151 !important;
    color: white !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3em !important;
    font-weight: bold !important;
    z-index: 3 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    border: 3px solid white !important;
    cursor: pointer !important;
  }
  
  /* Image photo responsive */
  .photo-card .photo-thumbnail {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Padding pour bottom bar */
  body.has-cart-bar .content {
    padding-bottom: 80px !important;
  }
  
  /* === LIGHTBOX MOBILE RESPONSIVE === */
  .lightbox {
    z-index: 11000 !important;
  }

  .lightbox.active {
    display: flex !important;
    padding: 50px 10px 90px 10px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .lightbox-image-container {
    max-width: 95vw !important;
    max-height: calc(100vh - 140px) !important;
  }
  
  .lightbox-content {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
  }
  
  /* Bouton fermer lightbox */
  .lightbox-close {
    top: 10px !important;
    right: 10px !important;
    font-size: 32px !important;
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Boutons tarifs + panier dans la lightbox — barre en bas */
  .lightbox-cta-row {
    position: fixed !important;
    top: auto !important;
    bottom: 20px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    max-width: calc(100% - 40px) !important;
    width: calc(100% - 40px) !important;
    gap: 10px !important;
    z-index: 10002 !important;
  }

  .lightbox-add-btn {
    position: static !important;
    transform: none !important;
    flex: 1 1 140px !important;
    min-width: 0 !important;
    max-width: 280px !important;
    width: auto !important;
    padding: 14px 20px !important;
    font-size: 1em !important;
  }

  .lightbox-tarifs-btn {
    flex: 1 1 120px !important;
    min-width: 0 !important;
    max-width: 200px !important;
    padding: 14px 16px !important;
    font-size: 0.95em !important;
  }

  body.has-cart-bar .lightbox-cta-row {
    bottom: 80px !important;
  }
  
  /* Navigation lightbox (flèches) */
  .lightbox-nav {
    font-size: 32px !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
  }
  
  .lightbox-nav.prev {
    left: 10px !important;
  }
  
  .lightbox-nav.next {
    right: 10px !important;
  }
  
  /* Caption lightbox */
  .lightbox-caption {
    bottom: 90px !important;
    font-size: 0.9em !important;
    padding: 8px 12px !important;
    max-width: 85% !important;
  }
  
  /* Quand la bottom bar est active, remonter la caption */
  body.has-cart-bar .lightbox-caption {
    bottom: 150px !important;
  }
  
  /* === CART MODAL ET PACK MODAL MOBILE === */
  html, body { 
    overflow-x: hidden !important;
  }
  
  /* NOTE: Les règles du panier mobile sont dans client_online_mobile.css */
  /* Modal pack : même largeur utile que le panier (évite 480px qui dépasse l’écran) */
  body.modal-open #pack-modal .cart-modal-dialog {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    box-sizing: border-box !important;
  }
}

/* Desktop : cacher la section de recherche du contenu (on garde uniquement celle du header) */
/* IMPORTANT: Ces règles ne s'appliquent QUE sur desktop (min-width: 769px) */
/* Elles annulent les règles mobile pour protéger le desktop */
@media (min-width: 769px) {
  .search-section {
    display: none !important;
  }
  
  /* S'assurer que le header reste sticky (pas fixed) sur desktop - écraser les règles mobile */
  /* IMPORTANT: Ces règles ne doivent JAMAIS s'appliquer sur mobile (max-width: 768px) */
  html body .header,
  body .header {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    /* NE PAS forcer transform: none car ça peut causer des conflits */
    transition: none !important;
    /* Annuler toutes les règles mobile */
    margin: 0 !important;
    padding: 20px 30px !important;
  }
  
  /* Pas de padding-top sur desktop */
  body {
    padding-top: 0 !important;
  }
  
  /* S'assurer que header-hidden n'a aucun effet sur desktop */
  body .header.header-hidden,
  html body .header.header-hidden {
    position: sticky !important;
    top: 0 !important;
    /* NE PAS forcer transform: none car ça peut causer des conflits */
  }
  
  /* Cacher la bottom bar mobile sur desktop */
  #mobile-cart-bar {
    display: none !important;
  }
  
  /* Cacher le select de langue mobile sur desktop */
  #mobile-lang-select {
    display: none !important;
  }
  
  /* Afficher les boutons langue desktop */
  .header .lang-btn {
    display: inline-block !important;
  }
  
  /* Afficher la recherche dans le header sur desktop */
  .header .header-search {
    display: flex !important;
  }
  
  /* Afficher le bouton panier dans le header sur desktop */
  .header #cart-header-btn {
    display: inline-flex !important;
  }
  
  /* Cacher le bouton "Voir nos offres" sur desktop */
  #view-promotions-btn.mobile-only {
    display: none !important;
  }
  
  /* === CART MODAL DESKTOP === */
  /* Règles desktop pour le panier - NE S'APPLIQUENT QUE SUR DESKTOP */
  body.modal-open .cart-modal-dialog {
    width: min(1430px, calc(100% - 16px)) !important; /* Desktop : élargit de 10% */
    max-width: calc(100% - 16px) !important;
    max-height: calc(100% - 32px) !important;
    margin: 16px !important;
  }
  
  .cart-modal.active .cart {
    max-height: calc(100% - 32px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  #cart-content {
    overflow-y: visible !important; /* Desktop : pas de scroll */
    -webkit-overflow-scrolling: auto !important;
  }
  
  .cart-photo-row {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 6px !important;
  }
  
  .cart-photo-container {
    width: fit-content !important;
    max-width: var(--cart-photo-w) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .cart-photo-large {
    width: auto !important;
    max-width: var(--cart-photo-w) !important;
    max-height: var(--cart-photo-h) !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }
  
  .cart-photo-row[data-photo-orientation="vertical"] {
    --cart-photo-w: 400px !important;
    --cart-photo-h: 600px !important;
    --cart-formats-h: 600px !important;
    --cart-formats-max-w: 389px !important;
  }
  
  .cart-photo-row[data-photo-orientation="horizontal"] {
    --cart-photo-w: 400px !important;
    --cart-photo-h: 267px !important;
    --cart-formats-h: 267px !important;
    --cart-formats-max-w: 389px !important;
  }
  
  .cart-photo-row[data-photo-orientation="square"] {
    --cart-photo-w: 400px !important;
    --cart-photo-h: 400px !important;
    --cart-formats-h: 400px !important;
    --cart-formats-max-w: 389px !important;
  }
  
  .cart-formats-container {
    gap: 6px !important;
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
  
  .cart-format-item {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .pack-btn,
  .cart-btn-remove,
  .cart-btn-remove-format {
    max-width: var(--cart-photo-w) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .cart-photo-row[data-photo-orientation="vertical"] .pack-btn,
  .cart-photo-row[data-photo-orientation="vertical"] .cart-btn-remove,
  .cart-photo-row[data-photo-orientation="vertical"] .cart-btn-remove-format {
    max-width: 400px !important;
  }
  
  .cart-photo-row[data-photo-orientation="horizontal"] .pack-btn,
  .cart-photo-row[data-photo-orientation="horizontal"] .cart-btn-remove,
  .cart-photo-row[data-photo-orientation="horizontal"] .cart-btn-remove-format {
    max-width: 400px !important;
  }
  
  .cart-photo-row[data-photo-orientation="square"] .pack-btn,
  .cart-photo-row[data-photo-orientation="square"] .cart-btn-remove,
  .cart-photo-row[data-photo-orientation="square"] .cart-btn-remove-format {
    max-width: 400px !important;
  }
}

/* ─── Footer Figma (galerie web) ─── */
.galerie-footer {
  background: #ffffff;
  border-top: 1px solid rgba(7, 29, 42, 0.08);
  margin-top: 48px;
}
.galerie-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 1024px) {
  .galerie-footer__inner { padding: 0 32px; }
}
.galerie-footer__top {
  padding: 64px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) {
  .galerie-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .galerie-footer__top { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.galerie-footer__brand p {
  font-size: 0.875rem;
  color: #61707A;
  line-height: 1.65;
  margin-top: 20px;
  max-width: 280px;
}
.galerie-footer__logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.galerie-footer__col h4 {
  font-size: 0.8125rem;
  color: #071D2A;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 20px;
}
.galerie-footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.galerie-footer__col ul li a {
  font-size: 0.875rem;
  color: #61707A;
  text-decoration: none;
  transition: color 0.15s;
}
.galerie-footer__col ul li a:hover {
  color: #31B79A;
}
.galerie-footer__bottom {
  padding: 32px 0;
  border-top: 1px solid rgba(7, 29, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
@media (min-width: 640px) {
  .galerie-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}
.galerie-footer__copyright {
  font-size: 0.8125rem;
  color: #61707A;
}
.galerie-footer__legal {
  display: flex;
  gap: 24px;
}
.galerie-footer__legal a {
  font-size: 0.8125rem;
  color: #61707A;
  text-decoration: none;
  transition: color 0.15s;
}
.galerie-footer__legal a:hover {
  color: #31B79A;
}
.galerie-footer__powered {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #61707A;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.galerie-footer__powered:hover {
  opacity: 1;
}
.galerie-footer__powered-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* ========== TYPOGRAPHIE GALERIE — alignement Figma (Inter, sans gras) ========== */
body.view-gallery,
body.view-events-grid {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
body.view-gallery .events-grid-header h2,
body.view-events-grid .events-grid-header h2 {
  font-weight: 500 !important;
}
body.view-gallery .chroma-name,
body.view-events-grid .chroma-name {
  font-weight: 500 !important;
}
body.view-gallery .chroma-placeholder,
body.view-events-grid .chroma-placeholder {
  font-weight: 500 !important;
}
body.view-gallery .chroma-badge-coming-soon,
body.view-events-grid .chroma-badge-coming-soon {
  font-weight: 500 !important;
}
body.view-gallery .pack-btn,
body.view-gallery #pack-btn .pack-btn-label,
body.view-events-grid .pack-btn,
body.view-events-grid #pack-btn .pack-btn-label {
  font-weight: 500 !important;
}
body.view-gallery .filter-selected-btn,
body.view-events-grid .filter-selected-btn,
body.view-gallery .filter-chip,
body.view-events-grid .filter-chip {
  font-weight: 500 !important;
}
body.view-gallery #header-gallery-name,
body.view-events-grid #header-gallery-name,
body.view-gallery #current-album-name,
body.view-events-grid #current-album-name {
  font-weight: 500 !important;
}
/* Titre album (barre retour + recherche) : jusqu’à 2 lignes si trop long */
body.view-gallery #current-album-name,
body.view-events-grid #current-album-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
  line-height: 1.25;
  min-width: 0;
}
/* Nom prestataire à côté du logo (sans !important sur display : respecte display:none inline) */
body.view-events-grid #header-gallery-name {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
  line-height: 1.25;
  max-width: min(50vw, 420px);
  display: -webkit-box;
}

@media (max-width: 768px) {
  body.view-gallery .search-bar-below #current-album-header,
  body.view-events-grid .search-bar-below #current-album-header {
    max-width: 100%;
  }
}

body.view-gallery #cart-header-btn,
body.view-events-grid #cart-header-btn {
  font-weight: 500 !important;
}
body.view-gallery #promotions-euro-btn,
body.view-gallery #tutorial-help-btn,
body.view-events-grid #promotions-euro-btn,
body.view-events-grid #tutorial-help-btn {
  font-weight: 500 !important;
}
body.view-gallery .galerie-footer__col h4,
body.view-events-grid .galerie-footer__col h4 {
  font-weight: 500 !important;
}
/* Mobile : barre panier, bouton recherche, sélecteur langue */
body.view-gallery #mobile-cart-bar,
body.view-events-grid #mobile-cart-bar {
  font-weight: 500 !important;
}
body.view-gallery #mobile-cart-bar .view-cart-btn,
body.view-events-grid #mobile-cart-bar .view-cart-btn {
  font-weight: 500 !important;
}
body.view-gallery #mobile-lang-select,
body.view-events-grid #mobile-lang-select {
  font-weight: 500 !important;
}
body.view-gallery .mobile-menu-item label,
body.view-events-grid .mobile-menu-item label {
  font-weight: 500 !important;
}
body.view-gallery #search-btn,
body.view-events-grid #search-btn {
  font-weight: 500 !important;
}

/* Bandeau cart_promo_rule (grille) — style type référentiel : icône + titre + sous-titre */
.promotions-cart-promo-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #063d32;
  background: linear-gradient(135deg, rgba(49, 183, 154, 0.2) 0%, rgba(49, 183, 154, 0.08) 100%);
  border: 1px solid rgba(31, 163, 135, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.promotions-cart-promo-banner__layout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.promotions-cart-promo-banner__icon {
  flex-shrink: 0;
  font-size: 1.35rem;
  line-height: 1.15;
  margin-top: 1px;
  filter: drop-shadow(0 1px 1px rgba(6, 61, 50, 0.12));
}
.promotions-cart-promo-banner__text {
  min-width: 0;
  flex: 1;
}
.promotions-cart-promo-banner__title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  color: #063d32;
  letter-spacing: -0.01em;
}
.promotions-cart-promo-banner__sub {
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  color: #3d7568;
}
#promotions-modal.promotions-tarifs-modal .promotions-cart-promo-banner {
  margin-bottom: 16px;
}
.promotions-section .promotions-cart-promo-banner {
  margin-top: 6px;
}
.promotions-tarifs-hint {
  padding: 24px 20px;
  margin: 0 auto;
  max-width: 36rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #61707a;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* ─── Modal Nos Tarifs (Prisma / Figma) — données produits inchangées ─── */
#promotions-modal.promotions-tarifs-modal .promotions-tarifs-modal__inner {
  background: #F7F7F4;
  border-radius: var(--r-lg, 16px);
  overflow: hidden;
  border: 1px solid rgba(7, 29, 42, 0.08);
  box-shadow: 0 24px 48px rgba(7, 29, 42, 0.12);
}
#promotions-modal.promotions-tarifs-modal .promotions-tarifs-modal__header {
  position: relative;
  background: #fff;
  color: #071D2A;
  border-bottom: 1px solid rgba(7, 29, 42, 0.08);
  padding: 18px 22px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#promotions-modal.promotions-tarifs-modal .promotions-tarifs-modal__head-text {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0 48px;
}
#promotions-modal.promotions-tarifs-modal .promotions-tarifs-modal__header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #071D2A;
  text-align: center;
}
#promotions-modal.promotions-tarifs-modal .promotions-tarifs-modal__subtitle {
  margin: 6px auto 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: #61707A;
  line-height: 1.45;
  max-width: 36rem;
  text-align: center;
}
#promotions-modal.promotions-tarifs-modal .promotions-tarifs-modal__close {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  background: rgba(7, 29, 42, 0.06);
  border: none;
  color: #071D2A;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#promotions-modal.promotions-tarifs-modal .promotions-tarifs-modal__close:hover {
  background: rgba(7, 29, 42, 0.1);
}
#promotions-modal.promotions-tarifs-modal .promotions-tarifs-modal__body {
  padding: 24px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  background: #F7F7F4;
}
#promotions-modal.promotions-tarifs-modal #promotions-modal-list.promotions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  flex-direction: unset;
  overflow: visible;
}
/* Un seul bloc « hint » : la grille le plaçait dans la 1re colonne (~260px) — centrer dans le corps du modal */
#promotions-modal.promotions-tarifs-modal #promotions-modal-list.promotions-list:has(> .promotions-tarifs-hint:only-child) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(280px, calc(100vh - 260px));
  gap: 0;
}
#promotions-modal.promotions-tarifs-modal #promotions-modal-list.promotions-list:has(> .promotions-tarifs-hint:only-child) .promotions-tarifs-hint {
  width: 100%;
  max-width: 34rem;
  box-sizing: border-box;
  text-align: center;
}
#promotions-modal.promotions-tarifs-modal #promotions-modal-list.promotions-list.promotions-list--kiosk {
  display: block;
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  #promotions-modal.promotions-tarifs-modal .tarifs-kiosk-layout {
    grid-template-columns: 1fr;
  }
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-col--paper {
  background: #fff;
  border: 1px solid rgba(7, 29, 42, 0.08);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(7, 29, 42, 0.04);
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-col--digital {
  background: linear-gradient(180deg, rgba(49, 183, 154, 0.14) 0%, rgba(49, 183, 154, 0.06) 100%);
  border: 1px solid rgba(49, 183, 154, 0.22);
  border-radius: 16px;
  padding: 20px;
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-col-head {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-col-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(49, 183, 154, 0.12);
  color: #31b79a;
  display: flex;
  align-items: center;
  justify-content: center;
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-col-icon svg {
  display: block;
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-col-title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  color: #071d2a;
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-col-sub {
  font-size: 0.8125rem;
  color: #61707a;
  margin: 4px 0 0;
  line-height: 1.4;
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 520px) {
  #promotions-modal.promotions-tarifs-modal .tarifs-kiosk-grid {
    grid-template-columns: 1fr;
  }
}
#promotions-modal.promotions-tarifs-modal .tarifs-kiosk-section + .tarifs-kiosk-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(7, 29, 42, 0.08);
}
#promotions-modal.promotions-tarifs-modal .promotion-card {
  background: #fff;
  border: 1px solid rgba(7, 29, 42, 0.08);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(7, 29, 42, 0.04);
  min-height: 0;
}
#promotions-modal.promotions-tarifs-modal .promotion-card h3 {
  color: #071D2A;
  font-weight: 500;
}
#promotions-modal.promotions-tarifs-modal .promo-price-main {
  color: #071d2a;
  font-weight: 600;
  font-size: 1.125rem;
}
#promotions-modal.promotions-tarifs-modal .product-description {
  color: #61707A;
}
#promotions-modal.promotions-tarifs-modal .promo-rules-toggle {
  background: #071D2A;
  color: #fff;
  font-weight: 500;
}
#promotions-modal.promotions-tarifs-modal .promotion-rules-grid {
  background: #F7F7F4;
  border-color: rgba(7, 29, 42, 0.08);
}
#promotions-modal.promotions-tarifs-modal .rule-price {
  color: #31B79A;
  font-weight: 500;
}
#promotions-modal.promotions-tarifs-modal .qty-badge {
  font-weight: 500;
}

/* Overlay chargement pack — toutes les photos (API paginée / base) */
.pack-data-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.58);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.pack-data-loading-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.pack-data-loading-active {
  overflow: hidden;
}
.pack-data-loading-inner {
  max-width: 360px;
  padding: 28px 24px 26px;
  border-radius: var(--r-lg, 16px);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  text-align: center;
}
.pack-data-loading-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border: 3px solid rgba(55, 65, 81, 0.2);
  border-top-color: var(--color-primary, #374151);
  border-radius: 50%;
  animation: pack-data-loading-spin 0.75s linear infinite;
}
@keyframes pack-data-loading-spin {
  to {
    transform: rotate(360deg);
  }
}
.pack-data-loading-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text, #1a1a1a);
  font-weight: 500;
}
.pack-data-loading-hint {
  display: block;
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-muted, #6b7280);
  line-height: 1.45;
}


/* Corrections mobile pour interface online */
/* IMPORTANT: Ce fichier ne s'applique QUE sur mobile (max-width: 768px) */
/* Les règles desktop sont protégées avec @media (min-width: 769px) */

/* Désactiver les comportements web (zoom, selection, etc.) */
@media (max-width: 768px) {
  * {
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Autoriser la sélection uniquement pour les inputs */
  input, textarea {
    -webkit-user-select: text !important;
  }
  
  /* Autoriser les clics sur les suggestions */
  .suggestion-item,
  #suggestions-box,
  #suggestions-box * {
    -webkit-user-select: none !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
  }
}

/* Mobile - Header réorganisé : Logo, Panier, Langue sur la même ligne */
@media (max-width: 768px) {
  /* Header mobile - isolé du desktop avec spécificité maximale */
  /* ÉCRASER toutes les règles de client_base.css pour le header mobile */
  /* Utiliser des sélecteurs très spécifiques pour écraser les règles desktop */
  /* FORCER position: fixed avec spécificité MAXIMALE pour écraser client_base.css */
  /* Cibler aussi l'attribut data-mobile-header pour une spécificité encore plus élevée */
  html body .header[data-mobile-header],
  body .header[data-mobile-header],
  html .header[data-mobile-header],
  .header[data-mobile-header],
  html body .header,
  body .header,
  html .header,
  .header,
  div.header,
  body div.header,
  html body div.header {
    /* Écraser position: sticky du desktop - FORCER fixed */
    /* IMPORTANT: position: fixed est relatif au viewport, PAS au container parent */
    position: fixed !important;
    /* NE PAS mettre !important sur top pour laisser la priorité aux styles inline JS */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px !important;
    transition: transform 0.3s ease-in-out !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
    /* NE PAS mettre transform: none ici - laisser le JS contrôler le transform */
    /* Écraser les règles de client_base.css */
    text-align: left !important;
  }
  
  /* S'assurer que le container parent n'a pas de transform qui casse le position: fixed */
  /* MAIS ne pas forcer transform: none sur le container car ça affecte tous les enfants */
  .container {
    /* transform: none est retiré pour ne pas affecter les enfants */
    perspective: none !important;
    filter: none !important;
    will-change: auto !important;
  }
  
  /* Padding body = hauteur header + barre recherche mobile */
  body {
    padding-top: 60px !important;
  }
  /* Barre de recherche sous le header (mobile uniquement) - sticky pour rester visible au scroll */
  .mobile-search-bar {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px 12px !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    background: #fff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
  }
  .mobile-search-bar .search-box {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
  .mobile-search-bar .search-box input {
    width: 100% !important;
    padding: 10px 14px !important;
    font-size: 1rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #f9fafb !important;
  }
  
  /* Header caché quand on scroll vers le bas - utiliser top négatif */
  /* Utiliser une valeur très négative pour être sûr que le header disparaît */
  body .header.header-hidden,
  html body .header.header-hidden,
  html .header.header-hidden,
  .header.header-hidden {
    /* NE PAS mettre transform ici non plus - laisser le JS contrôler */
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    /* Le JS va mettre transform: translateY(-70px) pour cacher le header */
    /* Ne pas utiliser visibility: hidden car ça peut causer des problèmes */
  }
  
  .header > div {
    flex-direction: row !important;
    gap: 12px !important; /* Espacement uniforme entre tous les éléments */
    align-items: center !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
  }
  
  /* Logo à gauche */
  .header .logo-container {
    flex-shrink: 0 !important;
    width: auto !important;
    order: 1;
    margin-right: auto !important;
  }
  
  .header .logo {
    height: 40px !important;
    display: block;
  }
  
  /* Colonne gauche : burger + nom album (logo caché sur mobile) */
  .header .header-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
    min-width: 0 !important;
    order: 1 !important;
  }
  
  /* Cacher la colonne centrale sur mobile (recherche déplacée dans mobile-search-bar) */
  .header .header-center {
    display: none !important;
  }
  
  /* Cacher la recherche dans le header sur mobile — évite le flash avant le déplacement vers mobile-search-bar */
  .header .header-search-box,
  .header .header-center .search-box {
    display: none !important;
  }
  
  /* Bouton "Voir nos offres" visible uniquement dans le burger */
  #view-promotions-btn.mobile-only {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    order: 2;
    font-size: 0.85em !important;
    padding: 6px 12px !important;
    white-space: nowrap !important;
    margin-left: 8px !important; /* Espacement supplémentaire après le logo */
  }
  
  /* Code panier */
  .header .cart-code-search-box {
    display: flex !important;
    width: auto !important;
    flex-shrink: 0 !important;
    order: 3;
    margin-left: 4px !important; /* Espacement supplémentaire après "Nos offres" */
  }
  
  .header .cart-code-search-box #cart-code-search {
    width: 90px !important;
    font-size: 0.85em !important;
    padding: 8px 10px !important;
    max-width: 90px !important;
  }
  
  /* Cacher le panier du header sur mobile - remplacé par la bottom bar */
  .header #cart-header-btn {
    display: none !important;
  }
  
  /* Bouton profil déplacé dans le menu burger */
  .header #header-profile-btn {
    display: none !important;
  }
  
  /* Langue déjà dans le burger — masquer le sélecteur du header */
  .header #mobile-lang-select {
    display: none !important;
  }
  
  /* Cacher les boutons langue desktop sur mobile */
  .header .lang-btn {
    display: none !important;
  }
  
  /* Le conteneur langue doit rester visible pour le dropdown mobile */
  .header > div > div:last-child {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0;
    width: auto !important;
    order: 4;
    margin-left: 8px !important; /* Espacement uniforme après le code panier */
  }
  
  /* Cacher le div interne avec les boutons */
  .header > div > div:last-child > div {
    display: none !important;
  }
  
  /* Bottom bar sticky pour le panier - remplace le bouton flottant */
  #mobile-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    padding: 12px 16px;
    display: none; /* Caché par défaut, affiché par JS quand cart > 0 */
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
    color: white;
    font-weight: 600;
    gap: 12px;
    transition: opacity 0.2s ease; /* Enlever transition transform pour éviter bounce */
    transform: none !important; /* Forcer pas de transform */
  }
  
  #mobile-cart-bar.active {
    display: flex !important;
  }
  
  #mobile-cart-bar .cart-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
  }
  
  #mobile-cart-bar .cart-icon {
    font-size: 1.3em;
  }
  
  #mobile-cart-bar .cart-text {
    font-size: 0.95em;
  }
  
  #mobile-cart-bar .view-cart-btn {
    background: white;
    color: #374151;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s;
  }
  
  #mobile-cart-bar .view-cart-btn:active {
    transform: scale(0.95);
  }
  
  /* Style pour le select natif mobile (sera créé par JS) - VISIBLE */
  .header #mobile-lang-select {
    padding: 6px 10px !important;
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.8em !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 20px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 4px center !important;
    background-size: 8px !important;
    height: auto !important;
    line-height: 1.2 !important;
    display: inline-flex !important; /* VISIBLE au lieu de block */
    flex-shrink: 0 !important;
    order: 4 !important;
  }
  
  .header #mobile-lang-select option {
    background: #374151 !important;
    color: white !important;
  }

  /* « ? » et « Nos offres » uniquement dans le burger : les retirer de l’UI principale */
  #tutorial-help-btn,
  .header .desktop-only#tutorial-help-btn {
    display: none !important;
  }
  /* Colonne « + Nos offres » masquée sur mobile */
  #left-column,
  .left-column,
  .main-layout #left-column,
  .main-layout .left-column {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }
  .main-layout.left-collapsed,
  .main-layout.both-collapsed,
  .main-layout {
    grid-template-columns: 1fr !important;
  }
  
  /* Recherche dans le header : pleine largeur (à la place de l’ancien dropdown événements) */
  .header .header-center,
  .header .header-search {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 8px !important;
  }
  .header .header-center .search-box,
  .header .header-search .search-box,
  .header .header-search-box {
    width: 100% !important;
    max-width: none !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  .header .header-center .search-box input,
  .header .header-search-box input {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Suggestions de recherche visibles sur mobile */
  .search-box {
    position: relative !important;
  }
  
  /* S'assurer que le conteneur de recherche a position relative */
  .search-section .search-box {
    position: relative !important;
  }
  
  #suggestions-box {
    position: absolute !important;
    z-index: 2000 !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    margin-top: 5px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    text-align: left !important;
  }
  
  /* Forcer l'affichage quand il y a du contenu */
  #suggestions-box:not(:empty) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* S'assurer que les items de suggestion sont cliquables sur mobile */
  .suggestion-item {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
    text-align: left !important;
  }
  
  /* S'assurer que le conteneur parent n'a pas overflow hidden */
  .search-section,
  .center-column {
    overflow: visible !important;
  }
  
  /* Code panier dans le header - visible et compact */
  .header .cart-code-search-box {
    display: flex !important;
    width: auto !important;
    justify-content: flex-start !important;
    flex-shrink: 0 !important;
  }
  
  .header .cart-code-search-box #cart-code-search {
    width: 90px !important;
    max-width: 90px !important;
    font-size: 0.85em !important;
    padding: 8px 10px !important;
  }
}

/* Mobile - Safe areas (encoches, barre d'accueil) */
@media (max-width: 768px) {
  body {
    padding-left: env(safe-area-inset-left, 0) !important;
    padding-right: env(safe-area-inset-right, 0) !important;
    overflow-x: hidden !important;
  }
  .container,
  #galerie-view {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  .header {
    padding-left: max(10px, env(safe-area-inset-left)) !important;
    padding-right: max(10px, env(safe-area-inset-right)) !important;
  }
  /* Galerie : header aligné avec filtres/photos (même padding) */
  body.view-events-grid .header,
  body.view-gallery .header {
    padding-left: max(var(--gallery-padding-x, 24px), env(safe-area-inset-left)) !important;
    padding-right: max(var(--gallery-padding-x, 24px), env(safe-area-inset-right)) !important;
  }
  #mobile-cart-bar {
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
}

/* Mobile - Cacher complètement les colonnes gauche/droite */
@media (max-width: 768px) {
  .left-column,
  .main-layout {
    display: block !important;
  }
  
  .center-column {
    width: 100% !important;
    padding: 0 !important;
    min-width: 0 !important;
  }
  
  .content {
    padding: 12px !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
  }
  
  /* Vue galerie : réduire le padding-top pour rapprocher filter-bar de la barre de recherche */
  body.view-gallery .content {
    padding-top: 6px !important;
  }
  
  .center-column h2 {
    font-size: 1.4em !important;
    margin-bottom: 15px !important;
    text-align: center !important;
  }
  
  .search-section {
    margin-bottom: 15px !important;
  }
  
  .search-section > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
  }
  
  /* Cacher la filter-bar sur la page de sélection d'events (évite override par display:flex) */
  body.view-events-grid #filter-bar {
    display: none !important;
  }
  
  /* Barre de recherche visible sur events-grid ET galerie (recherche cross-events) */
  body.view-events-grid #search-bar-below,
  body.view-gallery #search-bar-below {
    display: flex !important;
  }
  
  /* === FILTER BAR MOBILE — ligne 1 : tous + Mes photos ; ligne 2 : Acheter mon pack === */
  #filter-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px 12px !important;
    padding: 4px 0 10px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  #filter-bar .filter-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    order: 1 !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
  }
  #filter-bar .filter-chip {
    font-size: 0.9rem !important;
    padding: 10px 14px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }
  #filter-bar .filter-chip.filter-chip-dropdown {
    min-width: 0 !important;
    max-width: 180px !important;
  }
  #filter-bar .filter-right {
    order: 2 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
  }
  #filter-bar .filter-selected-btn {
    font-size: 0.9rem !important;
    padding: 10px 14px !important;
    min-height: 44px !important;
  }

  /* === HIÉRARCHIE CTA === */
  /* CTA principal : Rechercher */
  #search-btn {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 1em !important;
    padding: 14px 40px !important;
    box-shadow: 0 4px 15px rgba(55, 65, 81, 0.4) !important;
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  #search-btn:active {
    transform: scale(0.98);
  }
  
  /* CTA secondaire : Pack (dans search-bar-below) */
  .search-bar-below {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .search-bar-below .pack-btn-in-search {
    flex: 1 1 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
  }
  
  /* === GRILLE PHOTOS 1 COLONNE === */
  .photos-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px !important;
  }
  
  /* === CARTES PHOTO === */
  .photo-card {
    position: relative !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease !important;
    /* Pas d'aspect-ratio fixe, on laisse l'image définir la hauteur */
  }
  
  /* Garder le bouton + sur mobile */
  .photo-card .photo-add-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
    background: rgba(55, 65, 81, 0.9) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 1.5em !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 2 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    transition: transform 0.2s !important;
  }
  
  .photo-card .photo-add-btn:active {
    transform: scale(0.9) !important;
  }
  
  /* Cacher le bouton + quand la photo est dans le panier */
  .photo-card.in-cart .photo-add-btn {
    display: none !important;
  }
  
  /* État sélectionné avec bordure */
  .photo-card.in-cart {
    border: 3px solid #374151 !important;
    box-shadow: 0 4px 15px rgba(55, 65, 81, 0.4) !important;
  }
  
  /* Checkmark sélection - visible quand dans le panier */
  .photo-card .photo-in-cart-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
    background: #374151 !important;
    color: white !important;
    border-radius: 50% !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3em !important;
    font-weight: bold !important;
    z-index: 3 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    border: 3px solid white !important;
    cursor: pointer !important;
  }
  
  /* Image photo responsive */
  .photo-card .photo-thumbnail {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Padding pour bottom bar + safe area */
  body.has-cart-bar .content {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
  }
  
  /* === LIGHTBOX MOBILE RESPONSIVE === */
  .lightbox.active {
    padding: 50px 10px 90px 10px !important;
  }
  
  .lightbox-image-container {
    max-width: 95vw !important;
    max-height: calc(100vh - 140px) !important;
  }
  
  .lightbox-content {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
  }
  
  /* Bouton fermer lightbox */
  .lightbox-close {
    top: 10px !important;
    right: 10px !important;
    font-size: 32px !important;
    width: 40px !important;
    height: 40px !important;
  }
  
  .lightbox-cta-row {
    position: fixed !important;
    top: auto !important;
    bottom: 20px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    max-width: calc(100% - 40px) !important;
    width: calc(100% - 40px) !important;
    gap: 10px !important;
    z-index: 10002 !important;
  }

  .lightbox-add-btn {
    position: static !important;
    transform: none !important;
    flex: 1 1 140px !important;
    min-width: 0 !important;
    max-width: 280px !important;
    width: auto !important;
    padding: 14px 20px !important;
    font-size: 1em !important;
  }

  .lightbox-tarifs-btn {
    flex: 1 1 120px !important;
    min-width: 0 !important;
    max-width: 200px !important;
    padding: 14px 16px !important;
    font-size: 0.95em !important;
  }

  body.has-cart-bar .lightbox-cta-row {
    bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
  }
  
  /* Navigation lightbox (flèches) */
  .lightbox-nav {
    font-size: 32px !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
  }
  
  .lightbox-nav.prev {
    left: 10px !important;
  }
  
  .lightbox-nav.next {
    right: 10px !important;
  }
  
  /* Caption lightbox */
  .lightbox-caption {
    bottom: 90px !important;
    font-size: 0.9em !important;
    padding: 8px 12px !important;
    max-width: 85% !important;
  }
  
  /* Quand la bottom bar est active, remonter la caption */
  body.has-cart-bar .lightbox-caption {
    bottom: 150px !important;
  }
  
  /* === CART MODAL ET PACK MODAL MOBILE === */
  html, body { 
    overflow-x: hidden !important;
  }
  
  /* Modals fermés par défaut */
  .cart-modal {
    display: none !important;
  }
  
  /* Overlay plein écran avec centrage grid */
  body.modal-open .cart-modal.active {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    z-index: 9999 !important;
    display: grid !important;
    place-items: center !important;
    background: rgba(0, 0, 0, 0.65) !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* Header sous le modal */
  body.modal-open .header {
    z-index: 0 !important;
  }
  
  /* Dialog centré dans le grid - optimisé pour mobile - FORCER avec spécificité maximale */
  html body.modal-open .cart-modal-dialog,
  body.modal-open .cart-modal-dialog {
    width: calc(100vw - 20px) !important; /* Prendre presque toute la largeur avec marges */
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    margin: 10px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    z-index: 10000 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: white !important;
  }
  
  /* Dialog des promotions plus large */
  body.modal-open #promotions-modal .cart-modal-dialog {
    width: min(90%, calc(100% - 32px), 1200px) !important;
  }
  
  /* Scroll interne du contenu modal - MOBILE UNIQUEMENT - FORCER avec spécificité maximale */
  html body .cart-modal.active .cart,
  body .cart-modal.active .cart {
    max-height: calc(100vh - 80px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  html body #cart-content,
  body #cart-content {
    overflow-y: auto !important; /* Activer le scroll sur mobile */
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 !important;
    min-height: 0 !important;
    max-height: calc(100vh - 250px) !important; /* Limiter la hauteur pour permettre le scroll */
    position: relative !important;
    width: 100% !important; /* Prendre toute la largeur de .cart */
    min-width: 0 !important; /* Permettre le rétrécissement */
    max-width: 100% !important;
    padding: 12px !important; /* Réduire padding sur mobile pour petits écrans */
    box-sizing: border-box !important;
  }
  
  /* Dialog optimisé pour mobile - FORCER avec spécificité maximale */
  html body.modal-open .cart-modal-dialog,
  body.modal-open .cart-modal-dialog {
    width: calc(100vw - 20px) !important; /* Prendre presque toute la largeur */
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    margin: 10px !important;
  }
  
  /* Colonnes du panier empilées verticalement sur mobile - même largeur pour toutes */
  html body .cart-two-columns,
  body .cart-two-columns {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important; /* Réduire gap */
    padding: 0 !important; /* Pas de padding sur cart-two-columns */
    width: 100% !important; /* Prendre toute la largeur de cart-content */
    min-width: 0 !important; /* Permettre le rétrécissement */
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* cart-left-column doit suivre la largeur de .cart (qui suit .cart-modal-dialog) */
  html body .cart-left-column,
  body .cart-left-column {
    width: 100% !important; /* Prendre toute la largeur disponible de cart-two-columns */
    min-width: 0 !important; /* Permettre le rétrécissement */
    max-width: 100% !important; /* Pas de limite fixe, suivre le parent */
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  
  html body .cart-right-column,
  body .cart-right-column {
    position: relative !important;
    top: 0 !important;
    width: 100% !important; /* Même largeur que colonne gauche */
    max-width: 100% !important;
    order: -1 !important; /* Mettre le récapitulatif en premier */
    box-sizing: border-box !important;
  }
  
  /* S'assurer que le récapitulatif a la même largeur et padding */
  html body .cart-summary,
  body .cart-summary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px !important; /* Réduire padding sur mobile pour petits écrans */
  }
  
  /* S'assurer que cart-items a le même padding que le récapitulatif */
  html body #cart-items,
  body #cart-items {
    width: 100% !important;
    min-width: 0 !important; /* Permettre le rétrécissement */
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Layout des lignes du panier sur mobile - colonnes empilées - FORCER avec spécificité maximale */
  /* Padding symétrique pour centrer les containers - réduit sur très petits écrans */
  html body .cart-photo-row,
  body .cart-photo-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important; /* Réduire gap */
    width: 100% !important; /* Prendre toute la largeur de cart-left-column */
    min-width: 0 !important; /* Permettre le rétrécissement */
    max-width: 100% !important; /* Suivre la largeur du parent */
    padding-top: 6px !important; /* Réduire padding vertical */
    padding-bottom: 6px !important;
    padding-left: 12px !important; /* Padding horizontal réduit pour petits écrans */
    padding-right: 12px !important; /* Padding horizontal réduit pour petits écrans */
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Empêcher le débordement horizontal */
  }
  
  /* Container photo : s'adapter à la largeur du parent (cart-photo-row) avec padding */
  html body .cart-photo-container,
  body .cart-photo-container {
    width: 100% !important; /* Prendre toute la largeur disponible (moins le padding de cart-photo-row) */
    min-width: 0 !important; /* Pas de min-width pour permettre le rétrécissement */
    max-width: 100% !important; /* Suivre la largeur du parent */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 !important; /* Pas de margin, le padding est géré par cart-photo-row */
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Empêcher le débordement */
  }
  
  /* Image : taille naturelle sans bandes - FORCER l'affichage */
  html body .cart-photo-large,
  body .cart-photo-large {
    width: 100% !important; /* Prendre toute la largeur du container */
    min-width: 0 !important; /* Pas de min-width pour permettre le rétrécissement */
    max-width: 100% !important; /* Suivre la largeur du parent */
    max-height: var(--cart-photo-h) !important; /* Limiter la hauteur max */
    height: auto !important;
    object-fit: contain !important;
    display: block !important; /* Éviter les espaces inline */
    visibility: visible !important; /* Forcer la visibilité */
    opacity: 1 !important; /* Forcer l'opacité */
    box-sizing: border-box !important; /* Inclure border dans la largeur */
  }
  
  /* Uniformiser la largeur des containers photo et formats pour mobile - suivre la largeur du parent */
  /* Les containers suivent maintenant la largeur de cart-left-column qui se rétrécit */
  html body .cart-photo-row[data-photo-orientation="vertical"],
  body .cart-photo-row[data-photo-orientation="vertical"] {
    --cart-photo-h: 250px !important; /* Réduit pour mobile */
    --cart-formats-h: auto !important; /* Hauteur automatique */
  }
  
  html body .cart-photo-row[data-photo-orientation="horizontal"],
  body .cart-photo-row[data-photo-orientation="horizontal"] {
    --cart-photo-h: 120px !important; /* Réduit pour mobile */
    --cart-formats-h: auto !important; /* Hauteur automatique */
  }
  
  html body .cart-photo-row[data-photo-orientation="square"],
  body .cart-photo-row[data-photo-orientation="square"] {
    --cart-photo-h: 100% !important; /* Carré adaptatif - suivre la largeur */
    --cart-formats-h: auto !important; /* Hauteur automatique */
  }
  
  /* Si l'orientation n'est pas encore détectée, utiliser des valeurs par défaut */
  html body .cart-photo-row:not([data-photo-orientation]),
  body .cart-photo-row:not([data-photo-orientation]) {
    --cart-photo-h: 180px !important; /* Réduit */
  }
  
  /* Afficher tout le contenu des formats - largeur adaptée - suivre la largeur du parent */
  html body .cart-formats-container,
  body .cart-formats-container {
    width: 100% !important; /* Prendre toute la largeur disponible (moins le padding de cart-photo-row) */
    min-width: 0 !important; /* Pas de min-width pour permettre le rétrécissement */
    max-width: 100% !important; /* Suivre la largeur du parent */
    gap: 6px !important; /* Réduire gap */
    overflow-y: visible !important; /* Pas de scroll interne */
    overflow-x: hidden !important; /* Empêcher le débordement horizontal */
    max-height: none !important; /* Pas de limite de hauteur */
    height: auto !important; /* Hauteur automatique pour tout afficher */
    margin: 0 !important; /* Pas de margin, le padding est géré par cart-photo-row */
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  html body .cart-format-item,
  body .cart-format-item {
    padding-top: 4px !important; /* Réduire padding vertical */
    padding-bottom: 4px !important;
    padding-left: 6px !important; /* Réduire padding horizontal */
    padding-right: 6px !important;
    box-sizing: border-box !important;
    font-size: 0.9em !important; /* Réduire taille texte */
    width: 100% !important; /* Prendre toute la largeur du parent */
    min-width: 0 !important; /* Permettre le rétrécissement */
    max-width: 100% !important; /* Suivre la largeur du parent */
    overflow-x: hidden !important; /* Empêcher le débordement */
  }
  
  /* Limiter la largeur des boutons à la largeur du parent (panier uniquement, pas #pack-btn) */
  html body .cart-btn-remove,
  body .cart-btn-remove,
  html body .cart-btn-remove-format,
  body .cart-btn-remove-format,
  html body .cart-photo-row .pack-btn,
  body .cart-photo-row .pack-btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Bouton principal pack : taille réduite au contenu */
  html body #pack-btn {
    width: fit-content !important;
    max-width: none !important;
  }
  
  /* Header du panier centré */
  .cart-header {
    justify-content: center !important;
    position: relative !important;
  }
  
  .cart-header h2 {
    text-align: center !important;
    flex: 1 !important;
  }
  
  /* Croix de fermeture */
  .cart-header button {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 36px !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10001 !important;
    cursor: pointer !important;
  }
  
  /* Bloquer le scroll du body quand modal ouvert */
  body.modal-open {
    overflow: hidden !important;
  }
  
  html.modal-open {
    overflow: hidden !important;
  }
  
  /* Scroll interne des promotions */
  #promotions-modal .cart {
    max-height: calc(100% - 32px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  #promotions-modal-list {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  /* Modal pack : aligné sur le panier (presque pleine largeur, marges latérales) */
  body.modal-open #pack-modal .cart-modal-dialog,
  #pack-modal.active .cart-modal-dialog {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }
}

/* Desktop : cacher la section de recherche du contenu (on garde uniquement celle du header) */
/* IMPORTANT: Ces règles ne s'appliquent QUE sur desktop (min-width: 769px) */
/* Elles annulent les règles mobile pour protéger le desktop */
@media (min-width: 769px) {
  .search-section {
    display: none !important;
  }
  
  /* S'assurer que le header reste sticky (pas fixed) sur desktop - écraser les règles mobile */
  /* IMPORTANT: Ces règles ne doivent JAMAIS s'appliquer sur mobile (max-width: 768px) */
  html body .header,
  body .header {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    /* NE PAS forcer transform: none car ça peut causer des conflits */
    transition: none !important;
    /* Annuler toutes les règles mobile */
    margin: 0 !important;
    padding: 20px 30px !important;
  }
  
  /* Pas de padding-top sur desktop */
  body {
    padding-top: 0 !important;
  }
  
  /* S'assurer que header-hidden n'a aucun effet sur desktop */
  body .header.header-hidden,
  html body .header.header-hidden {
    position: sticky !important;
    top: 0 !important;
    /* NE PAS forcer transform: none car ça peut causer des conflits */
  }
  
  /* Cacher la barre de recherche mobile sur desktop */
  .mobile-search-bar {
    display: none !important;
  }
  
  /* Cacher la bottom bar mobile sur desktop */
  #mobile-cart-bar {
    display: none !important;
  }
  
  /* Cacher le select de langue mobile sur desktop */
  #mobile-lang-select {
    display: none !important;
  }
  
  /* Afficher les boutons langue desktop */
  .header .lang-btn {
    display: inline-block !important;
  }
  
  /* Afficher la recherche dans le header sur desktop */
  .header .header-search {
    display: flex !important;
  }
  
  /* Afficher le bouton panier dans le header sur desktop */
  .header #cart-header-btn {
    display: inline-flex !important;
  }
  
  /* Cacher le bouton "Voir nos offres" sur desktop */
  #view-promotions-btn.mobile-only {
    display: none !important;
  }
}
