/* ══════════════════════════════════════════════════
   app.css — Feuille de style principale
   Commerce Theutois / ACTE ASBL
   ══════════════════════════════════════════════════ */

/* ── Palette dark (défaut) ─────────────────────── */
:root {
  --lime:       #C1FF72;
  --lime-fg:    #0f0f0f;
  --icon-color: #C1FF72;

  --bg:         #0f0f0f;
  --bg-alt:     #131313;
  --bg-card:    #1c1c1c;
  --bg-nav:     #111111;
  --bg-deep:    #0a0a0a;
  --bg-input:   #1c1c1c;

  --border:     #2a2a2a;
  --border-sub: #1e1e1e;
  --border-hi:  #444444;

  --fg:         #ffffff;
  --fg-2:       #d4d4d4;
  --fg-3:       #a3a3a3;
  --fg-4:       #737373;
  --fg-5:       #404040;

  color-scheme: dark;
}

/* ── Palette light ─────────────────────────────── */
[data-theme="light"] {
  --bg:         #F9F7F3;
  --bg-alt:     #EDEAE3;
  --bg-card:    #FFFFFF;
  --bg-nav:     #FFFFFF;
  --bg-deep:    #111827;
  --bg-input:   #FFFFFF;

  --border:     #DDD9D0;
  --border-sub: #E8E4DC;
  --border-hi:  #A09890;

  --fg:         #1C1916;
  --fg-2:       #302C28;
  --fg-3:       #5A544E;
  --fg-4:       #7C766E;
  --fg-5:       #A09890;
  --icon-color: #2d7a00;

  color-scheme: light;
}

/* Cartes light */
[data-theme="light"] .card-dark {
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 3px 10px rgba(0,0,0,.06);
  border-color: #E4E0D8;
}
[data-theme="light"] .card-dark:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  border-color: #C8C2B8;
}

/* Nav light */
[data-theme="light"] nav,
[data-theme="light"] header {
  box-shadow: 0 1px 0 #DDD9D0, 0 2px 8px rgba(0,0,0,.04);
}

/* Inputs light */
[data-theme="light"] .input-dark {
  border-color: #C8C2B8;
  background: #FFFFFF;
}
[data-theme="light"] .input-dark:focus {
  border-color: #2d7a00;
  box-shadow: 0 0 0 3px rgba(45,122,0,.1);
}

/* Section alt en light */
[data-theme="light"] .section-alt {
  box-shadow: inset 0 1px 0 #DDD9D0, inset 0 -1px 0 #DDD9D0;
}

/* ── Reset & Base ──────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.1;  letter-spacing: -.02em; }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
p  { line-height: 1.7; }

/* ── Sections ──────────────────────────────────── */
.section-dark { background: var(--bg); }
.section-alt  { background: var(--bg-alt); }

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .95rem; letter-spacing: -.01em;
  padding: .75rem 1.6rem; border-radius: 999px;
  transition: all .15s; text-decoration: none; cursor: pointer;
  white-space: nowrap; border: none;
}
.btn-lime  { background: var(--lime); color: var(--lime-fg); }
.btn-lime:hover  { background: #d4ff8a; }
.btn-ghost { border: 1.5px solid var(--border-hi); color: var(--fg-2); background: transparent; }
.btn-ghost:hover { border-color: var(--fg-2); color: var(--fg); }
.btn-white { background: #fff; color: #0f0f0f; }
.btn-white:hover { background: #e5e5e5; }

/* ── Labels ────────────────────────────────────── */
.label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--lime);
}
.label::before { content: ''; display: block; width: 20px; height: 1.5px; background: var(--lime); }
[data-theme="light"] .label { color: var(--icon-color); }
[data-theme="light"] .label::before { background: var(--icon-color); }

/* ── Pills ─────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .28rem .75rem; border-radius: 999px;
}
.pill-lime    { background: var(--lime); color: var(--lime-fg); }
.pill-muted   { background: var(--border); color: var(--fg-2); }
.pill-outline { border: 1px solid var(--border-hi); color: var(--fg-3); }

/* ── Cards ─────────────────────────────────────── */
.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.card-dark:hover { border-color: var(--border-hi); transform: translateY(-2px); }

/* ── Inputs ────────────────────────────────────── */
.input-dark {
  background: var(--bg-input); border: 1px solid var(--border); color: var(--fg);
  border-radius: 10px; padding: .75rem 1rem; font-size: 1rem;
  transition: border-color .15s; outline: none; width: 100%;
}
.input-dark::placeholder { color: var(--fg-4); }
.input-dark:focus { border-color: var(--lime); }

/* ── Leaflet theming ───────────────────────────── */
.leaflet-container { background: var(--bg-card) !important; }
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--fg) !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-hi) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.4) !important;
}
.leaflet-popup-tip { background: var(--bg-card) !important; }
.leaflet-popup-close-button { color: var(--fg-3) !important; }

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Lucide inline icons ───────────────────────── */
.lucide { width: 1em; height: 1em; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ── Alpine.js — masque avant initialisation ───── */
[x-cloak] { display: none !important; }

/* ── Nav dropdown ──────────────────────────────── */
.nav-dd { position: relative; }
.nav-dd-panel {
  display: none;
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 260px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: .75rem; box-shadow: 0 8px 32px rgba(0,0,0,.25); z-index: 100;
  opacity: 0; transition: opacity .12s ease, transform .12s ease;
  transform: translateX(-50%) translateY(-4px);
}
/* Pont invisible pour ne pas perdre le hover en traversant le gap bouton↔panel */
.nav-dd-panel::before {
  content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px;
}
.nav-dd:hover .nav-dd-panel,
.nav-dd:focus-within .nav-dd-panel {
  display: block; opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ── Cookie banner ─────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
#cookie-banner .cb-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
#cookie-banner .cb-text {
  flex: 1;
  min-width: 200px;
  font-size: .875rem;
  color: var(--fg-3);
  line-height: 1.6;
  margin: 0;
}
#cookie-banner .cb-text a {
  color: var(--icon-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}
#cookie-banner .cb-actions {
  display: flex;
  gap: .625rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
#cookie-banner .cb-btn {
  display: inline-flex; align-items: center;
  font-weight: 700; font-size: .85rem;
  padding: .6rem 1.25rem; border-radius: 999px;
  border: none; cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
#cookie-banner .cb-accept {
  background: var(--lime); color: var(--lime-fg);
}
#cookie-banner .cb-accept:hover { background: #d4ff8a; }
#cookie-banner .cb-decline {
  background: transparent;
  color: var(--fg-3);
  border: 1.5px solid var(--border-hi) !important;
}
#cookie-banner .cb-decline:hover { color: var(--fg); border-color: var(--fg-3) !important; }

/* ── Hero overlays (page accueil) ──────────────── */
[data-theme="dark"]  .hero-overlay { background: linear-gradient(100deg, rgba(10,10,10,.96) 30%, rgba(10,10,10,.55) 65%, rgba(10,10,10,.15) 100%); }
[data-theme="light"] .hero-overlay { background: linear-gradient(100deg, rgba(248,249,250,.95) 0%, rgba(248,249,250,.88) 32%, rgba(248,249,250,.45) 58%, rgba(248,249,250,.05) 80%, transparent 100%); }
[data-theme="light"] .hero-text h1 { text-shadow: 0 1px 8px rgba(248,249,250,.8), 0 2px 20px rgba(248,249,250,.6); }
[data-theme="light"] .hero-text p  { text-shadow: 0 1px 4px rgba(248,249,250,.9); }

/* ── Responsive grids ──────────────────────────── */
@media (max-width: 768px) {
  .idees-grid    { grid-template-columns: 1fr !important; }
  .parcours-grid { grid-template-columns: 1fr !important; }
}
