/* ============================================================
   0. Thèmes & Variables
   ============================================================ */

:root {
  /* Thème clair par défaut */
  --bg: #f6f7f9;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #2f855a;
  --text: #0f172a;
  --header-bg: rgba(255,255,255,0.85);
  --footer-bg: rgba(255,255,255,0.9);
  --shadow: 0 6px 20px rgba(15,23,42,0.08);
  --radius: 12px;
  --maxw: 1100px;
  --header-h: 68px;
  --footer-h: 64px;
}

/* 🌙 Thème sombre — appliqué dès le chargement si data-theme="dark" */
[data-theme="dark"],
body.dark-mode {
  --bg: #0b1120;
  --card: #1e293b;
  --muted: #94a3b8;
  --accent: #38a169;
  --text: #f8fafc;
  --header-bg: rgba(15,23,42,0.95);
  --footer-bg: rgba(15,23,42,0.95);
  --shadow: 0 6px 20px rgba(0,0,0,0.6);
}

/* Corrige le fond blanc auto-rempli en thème sombre */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--card) inset !important;
    -webkit-text-fill-color: var(--text) !important;
    transition: background-color 5000s ease-in-out 0s;
}

[data-theme="dark"] table {
  background: var(--card);
  color: var(--text);
}

[data-theme="dark"] table td,
[data-theme="dark"] table th {
  border-color: #334155;
}

[data-theme="dark"] table tr:nth-child(even) {
  background: rgba(255,255,255,0.05);
}

/* ============================================================
   1. Reset & Structure de base
   ============================================================ */

* {
  box-sizing: border-box;
}

/* On garde min-height pour laisser le scroll naturel,
   et on bloque seulement le débordement horizontal */
html,
body {
  height: auto;
  overflow-x: hidden;
  
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
  transition: background 0.4s ease, color 0.4s ease;
}

/* ============================================================
   2. Header & Navigation
   ============================================================ */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  z-index: 40;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

header.hidden {
  transform: translateY(-110%);
  box-shadow: none;
}

.header-inner {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo img,
.logo-img {
  height: 42px;     /* même hauteur que l'ancien carré */
  width: auto;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

#siteHeader nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  align-items: center;
}

#siteHeader nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.25s ease;
}

#siteHeader nav a:hover {
  color: var(--accent);
  background: rgba(47, 133, 90, 0.1);
}

/* ============================================================
   3. Layout Principal
   ============================================================ */

main {
  display: flex;
  justify-content: center;
  padding: 48px 20px 80px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
}

.hero {
  background: var(--card);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: center;
  transition: background 0.4s ease;
}

.hero h1 {
  margin: 0;
  font-size: 28px;
}

.hero p {
  color: var(--muted);
  margin-top: 8px;
}

/* ============================================================
   4. Bouton utilisateur (connexion)
   ============================================================ */

/* ===============================
   AUTH ICON — LEMARCHELOCAL
=============================== */

.lml-auth-icon {
  width: 38px;
  height: 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* 🎯 couleur actuelle du site */
  color: var(--accent); /* ou la variable déjà utilisée */

  text-decoration: none;
  border-radius: 50%;
  background: transparent;

  transition:
    background .2s ease,
    transform .15s ease,
    opacity .15s ease;
}

.lml-auth-icon svg {
  display: block;
}

/* Hover subtil (même logique que CMS) */
.lml-auth-icon:hover {
  background: rgba(0,0,0,.08);
  transform: translateY(-1px);
  opacity: .95;
}

/* Dark mode */
body.dark-mode .lml-auth-icon:hover {
  background: rgba(255,255,255,.12);
}

/* ============================================================
   5. Comparatif / Tableaux
   ============================================================ */

.comparison-table {
  margin-top: 40px;
}

.table-wrapper {
  overflow-x: auto;
}

.service-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.service-table th,
.service-table td {
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.service-table th {
  background: var(--accent);
  color: white;
  font-size: 18px;
}

.service-table td:first-child {
  text-align: left;
  font-weight: 600;
  background: var(--card);
}

.service-table tr:last-child td {
  border-bottom: none;
}

.small-btn {
  background: var(--accent);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  display: inline-block;
}

[data-theme="dark"] .service-table {
  background: #1f2937;
}

[data-theme="dark"] .service-table td,
[data-theme="dark"] .service-table th {
  border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   6. Formulaires & Inputs
   ============================================================ */

form input,
form select,
form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e6e9ee;
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

[data-theme="dark"] form input,
[data-theme="dark"] form select,
[data-theme="dark"] form textarea,
body.dark-mode form input,
body.dark-mode form select,
body.dark-mode form textarea {
  border: 1px solid #334155;
  background: #111827;
  color: var(--text);
}

/* ============================================================
   7. Cards, Grid & Typo meta
   ============================================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.card {
  background: var(--card);
  padding: 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.card h3 {
  margin: 0 0 8px 0;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   8. Boutons & CTA
   ============================================================ */

.search {
  display: flex;
  gap: 8px;
}

.search input {
  flex: 1;
}

.btn,
.search button {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(47, 133, 90, 0.2);
  transition: all 0.25s ease;
}

.btn:hover,
.search button:hover {
  background: #38a169;
  box-shadow: 0 6px 16px rgba(47, 133, 90, 0.35);
  transform: translateY(-2px);
}

a.btn {
  text-decoration: none;
}

.search-card {
  text-align: center;
}

.search-card .search {
  justify-content: center;
}

.search-card input {
  text-align: center;
}

.adh-btn {
  margin-top: 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 7px 14px;          /* 🔥 compact CMS */
  border-radius: 999px;       /* 🔥 pill */

  background: var(--accent);
  color: #fff;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;

  text-decoration: none;
  cursor: pointer;

  box-shadow:
    0 4px 10px rgba(0,0,0,0.20),
    inset 0 0 0 1px rgba(255,255,255,0.18);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.adh-btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;

  box-shadow:
    0 6px 14px rgba(0,0,0,0.28),
    inset 0 0 0 1px rgba(255,255,255,0.25);
}

/* Bouton thème (switch dark/light) */
.btn-theme {
  margin-left: 5px;
  font-size: 17px;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-theme:hover {
  transform: scale(1.15);
  opacity: 0.85;
}

/* Version desktop / mobile du bouton thème */
.btn-theme.desktop-only {
  display: inline-flex;
}

.btn-theme.mobile-only {
  display: none;
}

/* MODALE — Boutons Annuler / Danger */

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 🔘 Bouton Annuler (neutre) */
.modal-actions .btn.cancel {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: none;
}

/* Hover Annuler */
.modal-actions .btn.cancel:hover {
  background: rgba(0,0,0,0.04);
  transform: none;
}

/* 🌙 Dark mode */
[data-theme="dark"] .modal-actions .btn.cancel {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.2);
}

[data-theme="dark"] .modal-actions .btn.cancel:hover {
  background: rgba(255,255,255,0.06);
}

/* 🚨 Bouton Supprimer */
.modal-actions .btn.danger {
  background: #ef4444;
  color: #fff;
}

.modal-actions .btn.danger:hover {
  background: #dc2626;
}

/* ============================================================
   9. Footer
   ============================================================ */

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--footer-bg);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  z-index: 40;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

footer.hidden {
  transform: translateY(110%);
  box-shadow: none;
}

.footer-inner {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.small {
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   10. Menu mobile (nav)
   ============================================================ */

   #main-nav a {
  display: inline-block;
}

#main-nav a.active {
  color: var(--accent);
  background: rgba(47, 133, 90, 0.12);
  font-weight: 700;
}

#main-nav a.active:hover {
  background: rgba(47, 133, 90, 0.18);
}

/* 🔒 Cache le bouton menu sur desktop */
#mobile-menu-toggle {
  display: none;
}

@media (max-width: 800px) {

   #mobile-menu-toggle { display: inline-flex; }
   
  /* Cache le menu par défaut */
  #main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    right: 20px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 14px;
    flex-direction: column;
    gap: 14px;
    z-index: 50;
    min-width: 200px;
  }

  /* Quand ouvert */
  #main-nav.open {
    display: flex;
  }

  /* Bouton menu visible */
  .btn-menu {
    display: inline-block;
  }

  /* Bouton thème */
  .btn-theme.desktop-only {
    display: none;
  }

  .btn-theme.mobile-only {
    display: inline-flex;
    margin-top: 10px;
  }
}

/* ============================================================
   🍔 Bouton menu animé (sandwich → croix)
   ============================================================ */

.menu-toggle {
  width: 42px;
  height: 42px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* Ligne centrale */
.menu-toggle .icon,
.menu-toggle .icon::before,
.menu-toggle .icon::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.25s ease;
  transform: translateX(-50%);
}

/* Position des 3 barres */
.menu-toggle .icon {
  top: 50%;
  transform: translate(-50%, -50%);
}

.menu-toggle .icon::before {
  top: -7px;
}

.menu-toggle .icon::after {
  top: 7px;
}

/* 🔥 État ouvert → croix */
.menu-toggle.is-open .icon {
  background: transparent;
}

.menu-toggle.is-open .icon::before {
  transform: translateX(-50%) rotate(45deg);
  top: 0;
}

.menu-toggle.is-open .icon::after {
  transform: translateX(-50%) rotate(-45deg);
  top: 0;
}

/* ============================================================
   11. Barre de recherche globale sous le header
   ============================================================ */

.global-search-bar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--card);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  z-index: 35; /* Header = 40 */
  transition: top 0.3s ease;
}

.global-search-bar.compact {
  top: 0;
}

.search-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}

.search-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
}

[data-theme="dark"] .search-form input {
  background: #111827;
  border: 1px solid #374151;
}

.search-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.search-form button:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

.search-btn {
  padding: 0 16px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  color: white !important;
}

.search-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.search-icon {
  width: 28px;
  height: 28px;
  fill: white;
  color: white !important;
  pointer-events: none;
}

/* Décale le contenu si la barre globale est présente */
body.has-global-search main {
  margin-top: 50px;
}

/* ============================================================
   12. Backpack (sac à dos)
   ============================================================ */

/* Bouton flottant backpack */
.backpack-btn {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.3s ease;
}

.backpack-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.backpack-btn .backpack-icon {
  width: 36px;          /* 🔥 plus grand, très lisible */
  height: 36px;
  stroke: white;
  stroke-width: 1.8;   /* 🔥 on affine légèrement */
  fill: none;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

[data-theme="dark"] .backpack-btn .backpack-icon {
  stroke: white;
}

/* Panneau latéral backpack */
.backpack-panel {
  position: fixed;
  right: -300px;
  top: 0;
  width: 280px;
  height: 100vh;
  background: var(--card);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
  border-radius: 16px 0 0 16px;
  z-index: 65;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  transition: right 0.3s ease;
}

.backpack-panel.open {
  right: 0;
}

.close-panel {
  align-self: flex-end;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.2s;
}

.close-panel:hover {
  transform: scale(1.2);
}

.panel-item {
  display: block;
  padding: 12px;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: background 0.2s;
}

.panel-item:hover {
  background: rgba(47, 133, 90, 0.1);
}

[data-theme="dark"] .panel-item {
  border: 1px solid #334155;
}

.backpack-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 55;
  display: none;
  
}

.backpack-overlay.show {
  display: block;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.panel-header h3 {
  margin: 0;
  font-size: 18px;
}

/* Style visuel de l'icône backpack (dans certains cas) */
.backpack-icon {
  width: 28px;
  height: 28px;
  fill: white;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.backpack-btn:hover .backpack-icon {
  transform: scale(1.15);
  opacity: 0.95;
}

/* ============================================================
   13. Paramètres (settings panel)
   ============================================================ */

/* Bouton flottant paramètres */
.settings-btn {
  position: fixed;
  right: 22px;
  bottom: 148px; /* placé au-dessus du backpack */
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.3s ease;
}

.settings-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.settings-btn .settings-icon {
  width: 28px;
  height: 28px;
  stroke: white;
  stroke-width: 2;
  fill: none;
  pointer-events: none;
  transition: stroke 0.2s ease;
}

[data-theme="dark"] .settings-btn {
  background: var(--accent);
  color: white;
}

.close-settings {
  align-self: flex-end;
  font-size: 20px;
  background: none;
  border: none;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.2s;
}

.close-settings:hover {
  transform: scale(1.2);
}

.logout-btn {
  margin-top: auto;
}

/* Panneau Paramètres */
.settings-panel {
  position: fixed;
  right: -300px;
  top: 0;
  width: 280px;

  height: 100dvh;                 /* 🔥 clé mobile */
  max-height: 100dvh;

  background: var(--card);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
  border-radius: 16px 0 0 16px;
  z-index: 2000;

  padding: 20px;
  padding-bottom: 110px;          /* 🔥 espace pour atteindre le bas */

  display: flex;
  flex-direction: column;
  gap: 14px;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;

  transition: right 0.3s ease;
}

.settings-panel.open {
  right: 0;
}

.settings-header {
  position: sticky;
  top: 0;
  background: var(--card);
  padding-bottom: 8px;
  padding-top: 4px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-header h3 {
  margin: 0;
  font-size: 18px;
}

/* Items du panneau */
.settings-item {
  display: block;
  padding: 12px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: background 0.2s;
}

.settings-item:hover {
  background: rgba(47, 133, 90, 0.1);
}

/* Overlay settings */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 55;

}

.settings-overlay.show {
  display: block;
}

/* ============================================================
   14. Pricing Card — Version Premium
   ============================================================ */

.apple-compare {
  margin-top: 60px;
}

.ac-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
}

.ac-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

/* Ligne */
.ac-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  align-items: center;
}

.ac-row:nth-child(even) {
  background: rgba(0,0,0,0.04);
}

/* Versions sombres */
[data-theme="dark"] .ac-row:nth-child(even) {
  background: rgba(255,255,255,0.04);
}

.ac-header {
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.ac-header .ac-col {
  font-size: 17px;
}

.ac-col {
  text-align: center;
  font-size: 15px;
}

.ac-label {
  text-align: left;
  font-weight: 600;
}

/* Icônes type Apple */
.ac-check {
  font-size: 22px;
  color: var(--accent);
  font-weight: 700;
}

.ac-dash {
  font-size: 22px;
  opacity: 0.4;
}

/* Boutons dans la dernière ligne */
.ac-footer {
  background: rgba(0,0,0,0.06);
  font-weight: 700;
}

.ac-btn {
  background: var(--accent);
  color: white;
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 14px;
  text-decoration: none;
}

.ac-btn:hover {
  background: #38a169;
}

/* ============================================================
   📱 VERSION MOBILE — Cards comparatives
   ============================================================ */

@media (max-width: 750px) {

  /* Réduire la taille générale */
  .ac-table {
    border-radius: 14px;
    overflow: hidden;
  }

  .ac-row {
    padding: 10px 12px;
    grid-template-columns: 1.2fr 0.9fr 0.9fr 0.9fr; /* ratio Apple compact */
    gap: 4px;
  }

  /* Réduction typographique */
  .ac-col {
    font-size: 13px;
  }

  .ac-label {
    font-size: 14px;
  }

  .ac-title {
    font-size: 22px;
  }

  /* Icônes Apple légèrement plus petites */
  .ac-check,
  .ac-dash {
    font-size: 18px;
  }

  /* Ligne header compressée */
  .ac-header {
    padding: 10px 8px;
  }

  .ac-header .ac-col {
    font-size: 13px;
  }

  /* Boutons adaptés */
  .ac-btn {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 8px;
  }

  /* Empêche toute apparition de scroll horizontal */
  .ac-table,
  .ac-row,
  .ac-col {
    overflow: hidden;
  }

  /* Texte sur plusieurs lignes seulement dans la première colonne */
  .ac-label {
    white-space: normal;
  }

  /* Les autres colonnes restent fines */
  .ac-row .ac-col:not(.ac-label) {
    white-space: nowrap;
  }

  /* Effet Apple "striped" plus subtil */
  .ac-row:nth-child(even) {
    background: rgba(0,0,0,0.03);
  }

  [data-theme="dark"] .ac-row:nth-child(even) {
    background: rgba(255,255,255,0.04);
  }
}

/* ============================================================
   15. Responsive
   ============================================================ */

/* Grid en une seule colonne sur petit écran */
@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr !important;
  }
}

/* Correction responsive page Adhérents & général */
@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .hero .search-card {
    width: 100%;
    margin-top: 24px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
  }

  .container {
    padding: 0 12px;
  }
}

/* Responsive barre de recherche globale */
@media (max-width: 600px) {
  .global-search-bar {
    padding: 10px;
  }

  .search-form {
    gap: 6px;
  }

  .search-form input {
    font-size: 15px;
    padding: 10px 12px;
  }

  .search-form button {
    padding: 0 12px;
    font-size: 17px;
  }
}


@media (max-width: 768px) {

  body {
    min-height: auto !important;
    height: auto !important;
    overflow-y: auto !important;
    padding-top: var(--header-h);
    padding-bottom: calc(var(--footer-h) + 40px);
  }

}

/* 🔥 FIX MENU MOBILE DEFINITIF */
@media (max-width: 800px) {

  #main-nav {
    display: none !important;
  }

  #main-nav.open {
    display: flex !important;
  }

}