/* ==========================================================================
   LAYOUT - Conteneur, grille, header, footer, sections
   ========================================================================== */

/* ── Conteneur ──────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s8);
}

.container--narrow { max-width: 780px; }
.container--wide   { max-width: 1400px; }

/* ── Grilles ────────────────────────────────────────────────────────────── */
.grid   { display: grid; }
.grid--2 { grid-template-columns: repeat(2, 1fr); gap: var(--s8); }
.grid--3 { grid-template-columns: repeat(3, 1fr); gap: var(--s8); }
.grid--4 { grid-template-columns: repeat(4, 1fr); gap: var(--s6); }

/* ── Page wrapper ───────────────────────────────────────────────────────── */
.page-wrapper {
  padding-top: var(--header-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrapper main { flex: 1; }

/* ── Sections ───────────────────────────────────────────────────────────── */
[id] { scroll-margin-top: var(--header-h); }

.section       { padding-block: var(--s24); background: var(--black); color: var(--white); }
.section--sm   { padding-block: var(--s16); }
.section--lg   { padding-block: var(--s32); }

.section--white { background: var(--white); color: var(--gray-800); }

.section--gray {
  background: var(--black-soft);
  border-top: var(--border-dark);
  border-bottom: var(--border-dark);
  color: var(--white);
}

.section--dark {
  background: var(--black-soft);
  color: var(--white);
}

.section--darker {
  background: var(--black);
  color: var(--white);
}

.section--red {
  background: var(--gradient-red);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

/* Grain subtil sur les sections rouges */
.section--red::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ── Section header (label + titre + sous-titre) ────────────────────────── */
.section-header        { margin-bottom: var(--s12); }
.section-header--center { text-align: center; }
.section-header--center .section-subtitle { margin-inline: auto; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: var(--s3);
}

/* Petite barre avant le label */
.section-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--red);
  border-radius: var(--r-full);
  flex-shrink: 0;
}

/* Petite barre après le label */
.section-label::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--red);
  border-radius: var(--r-full);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
}

.section-subtitle {
  font-family: var(--font-display);
  margin-top: var(--s4);
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 560px;
}

.section--dark  .section-subtitle,
.section--darker .section-subtitle,
.section--gray .section-subtitle { color: rgba(255,255,255,0.55); }

/* Divider */
.divider {
  width: 40px;
  height: 3px;
  background: var(--gradient-red);
  border-radius: var(--r-full);
  margin-block: var(--s5);
}

.divider--center { margin-inline: auto; }

/* ── HEADER ─────────────────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
}

/* Barre principale */
.header {
  transition: background var(--t-base), border-color var(--t-base);
}

.header.scrolled {
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header__bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
  padding-inline: var(--s8);
  max-width: var(--max-w);
  margin-inline: auto;
}

/* Logo */
.header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}

.header__logo img {
  height: 26px;
  width: auto;
  display: block;
}

/* Nav desktop */
.header__nav {
  display: flex;
  align-items: center;
  gap: var(--s1);
  flex: 1;
  justify-content: center;
}

.header__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  padding: 0.4rem 0.85rem;
  letter-spacing: 0.02em;
  transition: color var(--t-fast);
  white-space: nowrap;
}

.header__link:hover  { color: var(--white); }
.header__link.active { color: var(--white); font-weight: 600; }

/* Droite : CTA + burger */
.header__right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--s3);
}

/* CTA desktop */
.header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--white);
  background: var(--red);
  border-radius: var(--r-lg);
  white-space: nowrap;
  transition: background var(--t-fast);
}

.header__cta:hover { background: var(--red-dark); }

/* Burger */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,0.12);
  transition: border-color var(--t-fast), background var(--t-fast);
}

.header__burger:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.25);
}

.header__burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--white);
  border-radius: var(--r-full);
  transition: transform var(--t-base), opacity var(--t-base);
  transform-origin: center;
}

/* Mobile menu overlay */
.header__mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(5,5,5,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: var(--s4) var(--s6) var(--s8);
  gap: 0;
}

.header__mobile-menu.is-open { display: flex; }

.header__mobile-link {
  display: block;
  padding: var(--s4) 0;
  font-size: var(--text-xl);
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color var(--t-fast);
}

.header__mobile-link:last-of-type { border-bottom: none; }
.header__mobile-link:hover { color: var(--white); }

.header__mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--s6);
  padding: 0.85rem 1.5rem;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--white);
  background: var(--red);
  border-radius: var(--r-lg);
  text-align: center;
  transition: background var(--t-fast);
}

.header__mobile-cta:hover { background: var(--red-dark); }

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.footer {
  background: #030405;
  color: rgba(255,255,255,0.55);
  padding-top: var(--s20);
  padding-bottom: var(--s8);
  border-top: 1px solid rgba(255,51,56,0.15);
  position: relative;
  overflow: hidden;
}

/* Accent décoratif rouge bas-gauche */
.footer::before {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  border-radius: var(--r-full);
  background: radial-gradient(circle, rgba(255,51,56,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: var(--s12);
  margin-bottom: var(--s16);
  position: relative;
}

/* Logo footer */
.footer__brand-logo {
  height: 28px;
  width: auto;
  margin-bottom: var(--s5);
  opacity: 0.9;
}

.footer__brand-desc {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(255,255,255,0.38);
  max-width: 240px;
}

/* Colonnes nav */
.footer__col-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--s5);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.4);
  transition: color var(--t-fast);
}

.footer__link:hover { color: var(--white); }

/* Barre du bas */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s8);
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.25);
  flex-wrap: wrap;
  gap: var(--s4);
}

/* Icônes réseaux sociaux */
.footer__social {
  display: flex;
  gap: var(--s3);
}

.footer__social-link {
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.footer__social-link:hover {
  border-color: var(--red);
  color: var(--white);
  background: var(--red);
  transform: translateY(-2px);
}
