/* ============================================================
   PulsX — style.css
   Structure : reset → tokens → base → layout → nav →
               buttons → cards → footer → pages
   ============================================================ */

/* ── 1. Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
[hidden] { display: none !important; }

/* ── 2. Design tokens ─────────────────────────────────────── */
:root {
  /* Core palette */
  --clr-bg:            #0a0a0a;
  --clr-bg-surface:    #111118;
  --clr-bg-elevated:   #1a1a2e;
  --clr-border:        rgba(124, 58, 237, 0.2);

  /* Purple accent scale */
  --clr-accent-dim:    #4c1d95;
  --clr-accent:        #7c3aed;
  --clr-accent-mid:    #a855f7;
  --clr-accent-bright: #d8b4fe;

  /* Glow helpers */
  --glow-sm:  0 0 8px  rgba(168, 85, 247, 0.45);
  --glow-md:  0 0 20px rgba(168, 85, 247, 0.55);
  --glow-lg:  0 0 40px rgba(168, 85, 247, 0.6),
              0 0 80px rgba(124, 58, 237, 0.3);

  /* Text */
  --clr-text-primary:   #f1f0ff;
  --clr-text-secondary: #9ca3af;
  --clr-text-muted:     #4b5563;

  /* Typography */
  --font-base:  'Segoe UI', system-ui, -apple-system, sans-serif;
  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-lg:    1.125rem;
  --fs-xl:    1.375rem;
  --fs-2xl:   1.75rem;
  --fs-3xl:   2.5rem;
  --fs-hero:  clamp(4.5rem, 14vw, 9.5rem);

  /* Spacing (8-pt grid) */
  --sp-1:  0.5rem;
  --sp-2:  1rem;
  --sp-3:  1.5rem;
  --sp-4:  2rem;
  --sp-6:  3rem;
  --sp-8:  4rem;
  --sp-12: 6rem;
  --sp-16: 8rem;

  /* Layout */
  --max-w:      1160px;
  --nav-h:      68px;
  --radius-sm:  4px;
  --radius-md:  10px;
  --radius-lg:  18px;
  --radius-pill:9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 300ms;
  --dur-slow: 600ms;
}

/* ── 3. Base elements ─────────────────────────────────────── */
body {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--clr-text-primary);
  background-color: var(--clr-bg);
  min-height: 100vh;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--clr-text-primary);
}

h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }

p { color: var(--clr-text-secondary); }

::selection {
  background: var(--clr-accent);
  color: #fff;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--clr-accent-mid);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── 4. Layout utilities ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

.section {
  padding-block: var(--sp-16);
}

.section--sm {
  padding-block: var(--sp-8);
}

.section__header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.section__header p {
  max-width: 52ch;
  margin-inline: auto;
  margin-top: var(--sp-2);
  font-size: var(--fs-lg);
}

.section__tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--clr-accent-mid);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--clr-border);
  padding: 0.3em 0.9em;
  border-radius: var(--radius-pill);
  margin-bottom: var(--sp-2);
}

.grid-2 { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ── 5. Navigation ────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--sp-4);
  max-width: var(--max-w);
  margin-inline: auto;
}

/* Full-width backdrop behind nav */
.nav-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 99;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
}

.nav__brand {
  font-size: var(--fs-xl);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--clr-text-primary);
  transition: color var(--dur-fast);
}

.nav__brand span {
  color: var(--clr-accent-mid);
  text-shadow: var(--glow-sm);
}

.nav__brand:hover { color: var(--clr-accent-bright); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav__link {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-text-secondary);
  padding: 0.4em 0.75em;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--clr-accent-mid);
  border-radius: var(--radius-pill);
  box-shadow: var(--glow-sm);
  transition: left var(--dur-base) var(--ease-out),
              right var(--dur-base) var(--ease-out);
}

.nav__link:hover { color: var(--clr-text-primary); }
.nav__link:hover::after { left: 0.75em; right: 0.75em; }

.nav__link--active {
  color: var(--clr-accent-bright) !important;
}
.nav__link--active::after {
  left: 0.75em !important;
  right: 0.75em !important;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-1);
  z-index: 101;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text-primary);
  border-radius: var(--radius-pill);
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-base),
              width var(--dur-base) var(--ease-out);
  transform-origin: center;
}

.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Body offset for nav */
body { padding-top: var(--nav-h); }

/* ── 6. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fs-base);
  font-weight: 600;
  padding: 0.75em 1.75em;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast),
              box-shadow var(--dur-base),
              background var(--dur-fast),
              color var(--dur-fast),
              border-color var(--dur-fast);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--clr-accent);
  color: #fff;
  border-color: var(--clr-accent);
  box-shadow: var(--glow-sm);
}
.btn--primary:hover {
  background: var(--clr-accent-mid);
  border-color: var(--clr-accent-mid);
  box-shadow: var(--glow-md);
}

.btn--outline {
  background: transparent;
  color: var(--clr-accent-bright);
  border-color: var(--clr-accent);
}
.btn--outline:hover {
  background: rgba(124, 58, 237, 0.12);
  box-shadow: var(--glow-sm);
}

.btn--sm {
  font-size: var(--fs-sm);
  padding: 0.5em 1.25em;
}

/* ── 7. Cards ─────────────────────────────────────────────── */
.card {
  background: var(--clr-bg-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  transition: border-color var(--dur-base),
              box-shadow var(--dur-base),
              transform var(--dur-base) var(--ease-out);
}

.card:hover {
  border-color: var(--clr-accent);
  box-shadow: var(--glow-sm), 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(-4px);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-3);
  color: var(--clr-accent-mid);
}

.card__icon svg { width: 24px; height: 24px; }

.card h4 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-1);
  color: var(--clr-text-primary);
}

.card ul {
  margin-top: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.card ul li {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
}

.card ul li::before {
  content: '▸';
  color: var(--clr-accent-mid);
  flex-shrink: 0;
  margin-top: 0.1em;
}

/* ── 8. Tag / Badge ───────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 0.2em 0.7em;
  border-radius: var(--radius-pill);
  background: rgba(124, 58, 237, 0.15);
  color: var(--clr-accent-bright);
  border: 1px solid var(--clr-border);
}

.badge--green {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.25);
}

/* ── 9. Divider ───────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-accent), transparent);
  border: none;
  margin-block: var(--sp-8);
  opacity: 0.4;
}

/* ── 10. CTA Banner ───────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--clr-bg-elevated) 0%, rgba(124,58,237,0.08) 100%);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
}

.cta-banner h2 { margin-bottom: var(--sp-2); }
.cta-banner p  { margin-bottom: var(--sp-4); }

/* ── 11. Footer ───────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--clr-border);
  padding-block: var(--sp-8);
  margin-top: var(--sp-16);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  text-align: center;
  align-items: center;
}

.footer__brand {
  font-size: var(--fs-xl);
  font-weight: 900;
  color: var(--clr-text-primary);
  letter-spacing: -0.02em;
}

.footer__brand span {
  color: var(--clr-accent-mid);
  text-shadow: var(--glow-sm);
}

.footer__tagline {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

.footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.footer__nav a {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  transition: color var(--dur-fast);
}

.footer__nav a:hover { color: var(--clr-accent-bright); }

.footer__copy {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}

/* ── 12. Page hero (inner pages) ──────────────────────────── */
.page-hero {
  padding-block: var(--sp-12) var(--sp-8);
  text-align: center;
}

.page-hero h1 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-2);
}

.page-hero p {
  font-size: var(--fs-lg);
  max-width: 52ch;
  margin-inline: auto;
}

/* ── 13. Form elements ────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.form-group label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--clr-bg-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 0.75em 1em;
  color: var(--clr-text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--clr-text-muted);
}

.form-group select option {
  background: var(--clr-bg-surface);
  color: var(--clr-text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: var(--glow-sm);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.field-error {
  font-size: var(--fs-xs);
  color: #f87171;
  min-height: 1.2em;
}

/* ── 14. Stat items ───────────────────────────────────────── */
.stat {
  text-align: center;
  padding: var(--sp-3);
}

.stat__number {
  font-size: var(--fs-3xl);
  font-weight: 900;
  color: var(--clr-accent-mid);
  text-shadow: var(--glow-sm);
  line-height: 1;
  margin-bottom: 0.2em;
}

.stat__label {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── 15. Scroll-animation base ────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

[data-animate-delay="1"] { transition-delay: 100ms; }
[data-animate-delay="2"] { transition-delay: 200ms; }
[data-animate-delay="3"] { transition-delay: 300ms; }
[data-animate-delay="4"] { transition-delay: 400ms; }
[data-animate-delay="5"] { transition-delay: 500ms; }
[data-animate-delay="6"] { transition-delay: 600ms; }

/* ── 15b. Hero (index.html) ───────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Radial glow background */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse at center,
    rgba(124, 58, 237, 0.12) 0%,
    rgba(76, 29, 149, 0.06) 50%,
    transparent 75%);
  pointer-events: none;
}

.hero__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

.hero__badge { margin-bottom: var(--sp-1); }

.hero__tagline {
  font-size: var(--fs-xl);
  color: var(--clr-text-secondary);
  max-width: 48ch;
}

.hero__tagline strong { color: var(--clr-accent-bright); }

.hero__sub {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
  margin-top: var(--sp-2);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stats-grid .stat:not(:last-child) {
  border-right: 1px solid var(--clr-border);
}

/* About teaser */
.about-teaser__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
}

.about-teaser__content h2 { margin-top: var(--sp-2); margin-bottom: var(--sp-3); }

.skills-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.skill-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  background: var(--clr-bg-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 0.75em 1em;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

.skill-item:hover { border-color: var(--clr-accent); color: var(--clr-text-primary); }
.skill-item svg { color: var(--clr-accent-mid); flex-shrink: 0; }

/* ── 16. Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sp-16: 5rem; --sp-12: 4rem; }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--clr-bg-surface);
    border-bottom: 1px solid var(--clr-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-2);
    gap: 0.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur-base) var(--ease-out),
                padding var(--dur-base);
  }

  .nav__links.nav__links--open {
    max-height: 360px;
    padding: var(--sp-2);
  }

  .nav__link { padding: 0.75em 1em; font-size: var(--fs-base); }
  .nav__link::after { display: none; }

  .nav__hamburger { display: flex; }

  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid .stat:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--clr-border);
  }

  .about-teaser__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  h2 { font-size: var(--fs-2xl); }
}

@media (max-width: 480px) {
  .container { padding-inline: var(--sp-3); }
  .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Cookie RGPD — Bandeau + Panneau préférences
   ============================================================ */

/* ── Bandeau bas ──────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  padding: var(--sp-3) var(--sp-4);
  background: var(--clr-bg-elevated);
  border-top: 1px solid var(--clr-border);
  box-shadow: 0 -4px 32px rgba(124, 58, 237, 0.15);
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  min-width: 240px;
}

.cookie-banner__title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--clr-text-primary);
  margin-bottom: 0.25rem;
}

.cookie-banner__desc {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  line-height: 1.5;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Boutons cookies ──────────────────────────────────────── */
.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--dur-fast), color var(--dur-fast),
              box-shadow var(--dur-fast), opacity var(--dur-fast);
  white-space: nowrap;
}

.cookie-btn--primary {
  background: var(--clr-accent);
  color: #fff;
}

.cookie-btn--primary:hover {
  background: var(--clr-accent-mid);
  box-shadow: var(--glow-sm);
}

.cookie-btn--outline {
  background: transparent;
  color: var(--clr-accent-bright);
  border: 1px solid var(--clr-accent);
}

.cookie-btn--outline:hover {
  background: rgba(124, 58, 237, 0.12);
  box-shadow: var(--glow-sm);
}

.cookie-btn--ghost {
  background: transparent;
  color: var(--clr-text-secondary);
  border: 1px solid var(--clr-border);
}

.cookie-btn--ghost:hover {
  color: var(--clr-text-primary);
  border-color: rgba(124, 58, 237, 0.4);
}

.cookie-btn:focus-visible {
  outline: 2px solid var(--clr-accent-mid);
  outline-offset: 3px;
}

/* ── Overlay ──────────────────────────────────────────────── */
.cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── Panneau préférences ──────────────────────────────────── */
.cookie-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1300;
  width: min(560px, calc(100vw - 2 * var(--sp-3)));
  max-height: calc(100dvh - 2 * var(--sp-4));
  overflow-y: auto;
  background: var(--clr-bg-elevated);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glow-md), 0 24px 64px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.cookie-panel:focus-visible {
  outline: none;
}

.cookie-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--clr-border);
  flex-shrink: 0;
}

.cookie-panel__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--clr-text-primary);
  margin: 0;
}

.cookie-panel__close {
  background: transparent;
  border: none;
  color: var(--clr-text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color var(--dur-fast);
}

.cookie-panel__close:hover { color: var(--clr-text-primary); }

.cookie-panel__close:focus-visible {
  outline: 2px solid var(--clr-accent-mid);
  outline-offset: 2px;
}

.cookie-panel__body {
  padding: var(--sp-3) var(--sp-4);
  flex: 1;
  overflow-y: auto;
}

.cookie-panel__desc {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  margin-bottom: var(--sp-3);
  line-height: 1.6;
}

/* ── Catégorie cookie ─────────────────────────────────────── */
.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--clr-border);
}

.cookie-category:last-child { border-bottom: none; }

.cookie-category__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cookie-category__name {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--clr-text-primary);
}

.cookie-category__desc {
  font-size: var(--fs-xs);
  color: var(--clr-text-secondary);
  line-height: 1.5;
}

/* ── Toggle switch ────────────────────────────────────────── */
.cookie-toggle {
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.cookie-toggle--forced {
  cursor: not-allowed;
  opacity: 0.7;
}

.cookie-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cookie-toggle__track {
  position: relative;
  display: flex;
  align-items: center;
  width: 44px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--clr-text-muted);
  transition: background var(--dur-base);
}

.cookie-toggle__track.is-on,
.cookie-toggle__input:checked + .cookie-toggle__track {
  background: var(--clr-accent);
  box-shadow: var(--glow-sm);
}

.cookie-toggle__thumb {
  position: absolute;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left var(--dur-base) var(--ease-out);
  pointer-events: none;
}

.cookie-toggle__track.is-on .cookie-toggle__thumb,
.cookie-toggle__input:checked + .cookie-toggle__track .cookie-toggle__thumb {
  left: calc(44px - 18px - 3px);
}

.cookie-toggle:focus-within .cookie-toggle__track {
  outline: 2px solid var(--clr-accent-mid);
  outline-offset: 2px;
}

/* ── Pied du panneau ──────────────────────────────────────── */
.cookie-panel__footer {
  display: flex;
  gap: var(--sp-2);
  justify-content: flex-end;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--clr-border);
  flex-shrink: 0;
}

/* ── Lien "Gérer les cookies" dans le footer ──────────────── */
.footer__cookie-link {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  transition: color var(--dur-fast);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__cookie-link:hover { color: var(--clr-accent-bright); }

.footer__cookie-link:focus-visible {
  outline: 2px solid var(--clr-accent-mid);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }

  .cookie-banner__actions {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
  }

  .cookie-panel__footer {
    flex-direction: column-reverse;
  }

  .cookie-panel__footer .cookie-btn {
    width: 100%;
  }
}
