/* ============================================================
   @font-face — Self-hosted (RGPD-friendly, perf optimale)
   ============================================================ */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/Manrope-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Manrope-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Manrope-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Manrope-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/Manrope-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Gloock';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Gloock-Regular.woff2') format('woff2');
}

/* ============================================================
   SOL·IA — DESIGN TOKENS (v2.0)
   Source unique de vérité. Tous les composants doivent consommer
   ces variables — aucune valeur "magique" en dur dans les feuilles.
   ============================================================ */

/* @import Google Fonts supprimé — chargement via <link> dans chaque HTML (évite le render-blocking) */

:root {
  /* ——— COULEURS STRUCTURELLES ——— */
  --black:        #0A0A0A;       /* fond principal — jamais #000 pur */
  --black-soft:   #141414;       /* surfaces légèrement surélevées */
  --gold:         #D4AF37;       /* accent signature — 10% pixel MAX */
  --gold-dark:    #C9A430;       /* hover / actif */
  --ivory:        #F5F2EB;       /* texte principal sur fond sombre — jamais #FFF pur */
  --gray:         #9A9A9A;       /* texte secondaire */
  --gray-dark:    #333333;       /* bordures, texte tertiaire */

  /* ——— COULEURS SYSTÈME (sobres, usage parcimonieux) ——— */
  --error:        #8B2635;       /* rouge brique, pas rouge vif */
  --success:      #3F5E3D;       /* vert mousse, pas vert vif */

  /* TOTAL : 9 couleurs nommées. Plafond atteint, ne pas en ajouter. */

  /* ——— TYPOGRAPHIE ——— */
  --font-display: 'Gloock', 'Times New Roman', serif;
  --font-body:    'Manrope', -apple-system, 'Helvetica Neue', Arial, sans-serif;

  /* ——— ÉCHELLE 4pt (aucune valeur arbitraire) ——— */
  --s-1:   4px;
  --s-2:   8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  /* ——— RAYONS (éditorial, pas SaaS arrondi) ——— */
  --r-0: 0;
  --r-1: 1px;
  --r-2: 2px;           /* maximum autorisé */

  /* ——— HAIRLINES ——— */
  --line:        1px solid var(--gray-dark);
  --line-gold:   1px solid var(--gold);
  --line-faint:  1px solid rgba(212, 175, 55, 0.25);

  /* ——— SHADOWS (uniquement sur hover, accent or) ——— */
  --glow-gold:   0 20px 60px rgba(212, 175, 55, 0.08);
  --glow-gold-2: 0 24px 72px rgba(212, 175, 55, 0.14);

  /* ——— TIMINGS ——— */
  --t-fast:  180ms cubic-bezier(.2, .8, .2, 1);
  --t-base:  260ms cubic-bezier(.2, .8, .2, 1);
  --t-slow:  420ms cubic-bezier(.2, .8, .2, 1);
}

/* ============================================================
   RESET ÉDITORIAL
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh; /* fallback navigateurs anciens */
  min-height: 100svh; /* moderne — pas de jump iOS sur scroll */
}

img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
a { color: var(--ivory); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--gold); }

::selection { background: var(--gold); color: var(--black); }

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;      /* Gloock n'a qu'un poids */
  color: var(--ivory);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.005em;
  /* Évite la dernière ligne orpheline sur les titres ≤ 6 lignes */
  text-wrap: balance;
}

h1 { font-size: clamp(42px, 5.5vw, 72px); line-height: 1.05; }
h2 { font-size: clamp(30px, 3.8vw, 44px); line-height: 1.1;  }
h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; }
h4 { font-size: clamp(18px, 2vw,   22px); line-height: 1.2;  font-family: var(--font-body); font-weight: 600; letter-spacing: 0.01em; }

p, li { color: var(--ivory); margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--s-4); }

.lead { font-size: 20px; line-height: 1.5; color: var(--ivory); }
.muted { color: var(--gray); }

/* Eyebrow — micro-label, Manrope 600 small-caps, jamais monospace */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-3);
}

/* Citation serif italique */
blockquote {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.3;
  color: var(--ivory);
  border: 0;
  margin: var(--s-7) 0;
  padding: 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1240px; margin: 0 auto; padding: 0 var(--s-5); }
.container--narrow { max-width: 720px; }
.section { padding: var(--s-9) 0; }

.horizon-divider {
  width: 80px;
  height: 1px;
  background: var(--gold);
  border: 0;
  margin: var(--s-5) auto;
}

.horizon-rule {
  border: 0;
  border-top: var(--line-gold);
  position: relative;
  margin: var(--s-7) 0;
}
.horizon-rule::before,
.horizon-rule::after {
  content: ""; position: absolute; top: -4px;
  width: 1px; height: 8px; background: var(--gold);
}
.horizon-rule::before { left: 0; }
.horizon-rule::after  { right: 0; }

/* ============================================================
   NAVIGATION
   ============================================================ */
nav#nav {
  position: fixed; inset: 0 0 auto 0;
  padding: var(--s-4) var(--s-6);
  background: rgba(10, 10, 10, 0.86);
  border-bottom: var(--line-faint);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
}
nav#nav .logo { height: 56px; width: auto; }
nav#nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s-6); }
nav#nav a { font-size: 15px; font-weight: 400; color: var(--ivory); }
nav#nav a:hover { color: var(--gold); }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-3) var(--s-6);
  min-height: 44px; /* WCAG 2.2 AA touch target */
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: var(--r-0);
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}
.btn--primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  box-shadow: var(--glow-gold-2);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn--outline:hover {
  background: var(--gold);
  color: var(--black);
  box-shadow: var(--glow-gold);
}

.btn--ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--gray-dark);
}
.btn--ghost:hover {
  border-color: var(--ivory);
  color: var(--ivory);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: calc(var(--s-10) + var(--s-7)) 0 var(--s-9);
}
.hero__pre { /* eyebrow au-dessus du titre */ }
.hero__title { max-width: 16ch; }
.hero__lead  { max-width: 44ch; margin-top: var(--s-5); color: var(--gray); }
.hero__actions { margin-top: var(--s-7); display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* ============================================================
   CARTES (ÉDITORIAL, PAS DE SHADOW)
   ============================================================ */
.card {
  padding: var(--s-6);
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--r-0);
  transition: border-color var(--t-base), transform var(--t-base);
}
.card:hover {
  border-color: rgba(212, 175, 55, 0.55);
}
.card__num {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
}
.card__title {
  font-family: var(--font-display);
  font-size: 26px;
  margin: var(--s-3) 0 var(--s-3);
  color: var(--ivory);
}
.card__desc { color: var(--gray); font-size: 15px; line-height: 1.55; }
.card__more {
  display: inline-block;
  margin-top: var(--s-4);
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  font-size: 14px;
}
.card__more:hover { color: var(--ivory); border-color: var(--ivory); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: var(--s-8) var(--s-5) var(--s-5);
  border-top: var(--line-faint);
  color: var(--gray);
  font-size: 14px;
}
footer .logo { height: 72px; }
footer a { color: var(--ivory); }
footer a:hover { color: var(--gold); }

/* ============================================================
   FORMULAIRES SOBRES
   ============================================================ */
input, textarea, select {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  background: transparent;
  color: var(--ivory);
  border: 0;
  border-bottom: 1px solid var(--gray-dark);
  border-radius: var(--r-0);
  font: 400 16px/1.5 var(--font-body);
  transition: border-color var(--t-base);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-bottom-color: var(--gold);
}
label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: var(--s-2);
}


/* ——— SKIP LINK A11Y ——— */
.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  background: var(--gold);
  color: var(--black);
  padding: var(--s-3) var(--s-5);
  z-index: 9999;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top var(--t-base);
}
.skip-link:focus {
  top: 0;
  color: var(--black);
  outline: 2px solid var(--ivory);
  outline-offset: -2px;
}

/* ============================================================
   ACCESSIBILITÉ
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
/* input:focus { outline: none } a une spécificité supérieure à :focus-visible — on le surclasse explicitement */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   NAVIGATION MOBILE — BURGER
   ============================================================ */
.nav-burger {
  display: none; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 44px; height: 44px; /* WCAG 2.2 AA touch target */
  padding: 4px; background: none; border: none; flex-shrink: 0;
}
.nav-burger span {
  display: block; width: 24px; height: 1.5px; background: var(--gold);
  transition: all var(--t-base);
}
.nav-burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 10, 0.97); z-index: 99;
  flex-direction: column; align-items: center; justify-content: center; gap: 36px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--ivory); text-decoration: none;
  font-family: var(--font-display); font-size: 22px;
  letter-spacing: 3px; text-transform: uppercase;
  transition: color var(--t-base);
}
.nav-mobile a:hover { color: var(--gold); }

@media (max-width: 640px) {
  nav#nav ul { display: none; }
  .nav-burger { display: flex; }

  /* Réduit la respiration verticale sur mobile (gain UX scroll) */
  .section { padding: var(--s-8) 0; }
  .hero { padding: calc(var(--s-9) + var(--s-3)) 0 var(--s-8); }

  /* Container un peu moins serré sur très petit écran */
  .container { padding: 0 var(--s-4); }
}

/* ============================================================
   LIGHTBOX — zoom au clic sur les photos utiles
   Activé par /js/lightbox.js
   ============================================================ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 9999;
  padding: 24px;
  cursor: zoom-out;
  animation: lb-in 0.2s ease-out;
}
.lightbox--open { display: flex; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 96px);
  max-height: calc(100svh - 96px);
  object-fit: contain;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.6);
  animation: lb-img 0.25s ease-out;
}
@keyframes lb-img {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.lightbox__caption {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  text-align: center;
  font-size: 13px;
  color: var(--ivory);
  background: rgba(10, 10, 10, 0.7);
  padding: 6px 14px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.lightbox__close {
  position: fixed;
  top: 16px; right: 16px;
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid var(--gold);
  color: var(--gold);
  width: 44px; height: 44px;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 10000;
}
.lightbox__close:hover {
  background: var(--gold);
  color: var(--black);
}

.lightbox__hint {
  position: fixed;
  top: 16px; left: 16px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  font-family: var(--font-body);
}

@media (max-width: 640px) {
  .lightbox { padding: 8px; }
  .lightbox__hint { display: none; }
}
