/* ==========================================================================
   BABAKAA — landing page
   Feuille de style unique. Aucun framework, aucun préprocesseur.
   Tokens repris de design_handoff_landing_babakaa/README.md.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Polices (auto-hébergées, variables, sous-ensemble latin)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  src: url("fonts/jost-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Couleurs */
  --ink: #201e1d;
  --accent: #ec3013;         /* rouge atelier */
  --accent-700: #ae1800;     /* rouge foncé — sur-titres */
  --accent-400: #ff563c;     /* rouge clair — sur fond sombre */
  --accent-600: #dd2b0f;     /* rouge survol */
  --accent-100: #ffe0d9;     /* texte secondaire sur aplat rouge */
  --accent-200: #ff9783;     /* filets fins sur aplat rouge */
  --bg: #f3f2f2;
  --surface: #eae9e9;
  --n200: #e2e0e0;           /* fond des emplacements photo (hors charte) */
  --n300: #d7d3d3;
  --n400: #bab6b6;
  --n600: #7d7979;
  --n700: #605d5d;
  --n800: #444141;
  --white: #ffffff;

  /* Mise en page */
  --container: 1240px;
  --pad: 40px;               /* padding horizontal du conteneur */
  --section-y: 96px;         /* rythme vertical des sections */
  --nav-h: 78px;             /* hauteur de la barre collante */
  --bar-h: 56px;             /* hauteur de la barre WhatsApp fixe (mobile) */

  /* Échelle typographique — paliers explicites, jamais d'unité de viewport */
  --t-h1: 68px;
  --t-h2: 46px;
  --t-contact: 60px;
  --t-lead: 19px;
  --t-body: 18px;
  --t-body-sm: 15px;

  --ease: 120ms ease-out;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ol, ul, figure { margin: 0; }

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: background-color var(--ease), color var(--ease);
}

/* Aucun anneau de focus bleu par défaut. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Cibles d'ancre : compenser la barre collante. */
[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Séparateur de section — toujours 2 px encre, jamais un filet fin. */
.rule-b { border-bottom: 2px solid var(--ink); }

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

/* --------------------------------------------------------------------------
   4. Typographie partagée
   -------------------------------------------------------------------------- */

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-700);
  line-height: 1.4;
}

h1 {
  font-size: var(--t-h1);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}

h2 {
  font-size: var(--t-h2);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--n800);
}

.body { color: var(--n800); }

.body-sm {
  font-size: var(--t-body-sm);
  line-height: 1.65;
  color: var(--n700);
}

.label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--n600);
}

/* --------------------------------------------------------------------------
   5. Logo
   -------------------------------------------------------------------------- */

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark { flex: none; }

/* BAB + compas + KAA, alignés sur la ligne de base. */
.logo-word {
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 0.82;
  display: flex;
  align-items: flex-end;
  gap: 1px;
}

.logo-word svg { flex: none; }

/* --------------------------------------------------------------------------
   6. Boutons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* Pas moins de 1.2 : les capitales accentuées (É, À) dépassent la hauteur
     de capitale et seraient rognées par un interlignage à 1. */
  line-height: 1.2;
  /* Cible tactile : jamais moins de 44 px de haut. */
  min-height: 44px;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 18px 28px;
}

.btn-primary:hover { background: var(--accent-600); }

.btn-ghost {
  border: 2px solid var(--ink);
  padding: 16px 26px;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn-sm {
  font-size: 13px;
  padding: 14px 22px;
}

.btn-ink {
  background: var(--ink);
  color: var(--white);
  padding: 20px 32px;
  font-size: 15px;
}

.btn-ink:hover {
  background: var(--white);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   7. Emplacements photo
   Tant que le client n'a pas fourni ses images, chaque emplacement reste un
   aplat neutre marqué de son intitulé : la page ne montre jamais d'image
   cassée. Remplacer le contenu par <img> (voir images/LISEZ-MOI.txt).
   -------------------------------------------------------------------------- */

.ph {
  position: relative;
  background: var(--n200);
  min-width: 0;      /* sans ça, l'image impose sa largeur à la piste de grille */
  overflow: hidden;
}

.ph > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Intitulé de l'emplacement vide. */
.ph[data-slot]::after {
  content: attr(data-slot);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--n600);
}

/* Dès qu'une vraie image est posée, l'intitulé disparaît. */
.ph:has(img)::after { content: none; }

/* Plaque de légende sur photo. */
.plaque {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   8. Barre de navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}

.nav > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.btn) {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* Cible tactile : ces liens restent visibles jusqu'à 900 px, donc sur
     tablette. Le remplissage vertical ne déplace rien — la barre est en flex. */
  display: flex;
  align-items: center;
  min-height: 44px;
}

.nav-links a:not(.btn):hover { color: var(--accent); }

.nav .btn {
  background: var(--accent);
  color: var(--white);
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
}

.nav .btn:hover { background: var(--accent-600); }

/* --------------------------------------------------------------------------
   9. Hero
   -------------------------------------------------------------------------- */

.hero > .container {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
}

.hero-text {
  padding: 88px 56px 88px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text .kicker { margin-bottom: 28px; }
.hero-text h1 { margin-bottom: 28px; }

.hero-text .lead {
  max-width: 520px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-photo {
  min-height: 620px;
  border-left: 2px solid var(--ink);
}

.hero-photo .plaque {
  padding: 14px 20px;
  letter-spacing: 0.16em;
}

/* --------------------------------------------------------------------------
   10. Bandeau des trois métiers
   -------------------------------------------------------------------------- */

.trades > .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trade { padding: 40px 32px; }
.trade:first-child { padding-left: 0; }
.trade:last-child { padding-right: 0; }
.trade + .trade { border-left: 2px solid var(--ink); }

.trade h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.trade p { margin-top: 8px; }

/* --------------------------------------------------------------------------
   11. L'artisan
   -------------------------------------------------------------------------- */

.maker > .container {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 80px;
  align-items: start;
}

.maker-photo {
  height: 520px;
  border: 2px solid var(--ink);
}

.maker-text .kicker { margin-bottom: 24px; }
.maker-text h2 { margin-bottom: 28px; }
.maker-text p { margin-bottom: 20px; }
.maker-text p:last-of-type { margin-bottom: 40px; }

.facts {
  border-top: 2px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fact { padding: 24px; }
.fact:nth-child(odd) { padding-left: 0; }
.fact:nth-child(even) {
  padding-right: 0;
  border-left: 1px solid var(--n300);
}
.fact:nth-child(-n + 2) { border-bottom: 1px solid var(--n300); }
.fact:nth-child(n + 3) { padding-bottom: 0; }

.fact dt { margin-bottom: 8px; }

.fact dd {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   12. Réalisations
   -------------------------------------------------------------------------- */

.work > .container {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.section-head .kicker { margin-bottom: 24px; }

/* Le fond encre visible dans la gouttière de 2 px fait office de filet. */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  background: var(--ink);
  border: 2px solid var(--ink);
}

.gallery > .ph { height: 340px; }
.gallery > .ph:nth-child(1) { grid-column: span 2; height: 460px; }
.gallery > .ph:nth-child(2) { height: 460px; }

/* --------------------------------------------------------------------------
   13. Inspirations
   -------------------------------------------------------------------------- */

.inspiration {
  background: var(--surface);
}

.inspiration > .container {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 80px;
  align-items: start;
}

.inspiration .kicker { margin-bottom: 24px; }
.inspiration h2 { margin-bottom: 28px; }
.inspiration .body { margin-bottom: 36px; }

.steps {
  margin-bottom: 40px;
  padding-left: 20px;
  font-size: 17px;
  line-height: 1.9;
  color: var(--n800);
}

.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--ink);
  border: 2px solid var(--ink);
}

.inspiration-grid > .ph { height: 300px; }

/* --------------------------------------------------------------------------
   14. Processus
   -------------------------------------------------------------------------- */

.process > .container {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.process .kicker { margin-bottom: 24px; }
.process h2 { margin-bottom: 56px; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.step { padding: 32px 28px 0; }
.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; }
.step + .step { border-left: 1px solid var(--n300); }

.step-num {
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.step h3 {
  margin: 20px 0 10px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   15. Bandeau contact — le seul aplat de couleur de la page
   -------------------------------------------------------------------------- */

.contact { background: var(--accent); }

.contact > .container {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: end;
}

.contact h2 {
  font-size: var(--t-contact);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--white);
  margin-bottom: 32px;
}

.contact .lead {
  color: var(--accent-100);
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 40px;
}

.contact-list {
  color: var(--white);
  margin: 0;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--accent-200);
  font-size: 16px;
  font-weight: 600;
}

.contact-row:first-child { border-top: 2px solid var(--white); }

.contact-row dt, .contact-row dd { margin: 0; }
.contact-row a:hover { color: var(--accent-100); }

/* --------------------------------------------------------------------------
   16. Pied de page
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: var(--n400);
}

.footer > .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 40px;
  padding-bottom: 40px;
}

.footer .logo-word {
  color: var(--bg);
  font-size: 15px;
}

.footer-baseline {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-legal { font-size: 13px; }

/* --------------------------------------------------------------------------
   17. Barre WhatsApp fixe (mobile uniquement)
   -------------------------------------------------------------------------- */

.wa-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--accent);
  color: var(--white);
  min-height: var(--bar-h);
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.wa-bar:hover { background: var(--accent-600); }

/* --------------------------------------------------------------------------
   18. Lightbox (facultative, activée seulement si une vraie photo est posée)
   -------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(32, 30, 29, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 2px solid var(--bg);
  color: var(--bg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--bg);
  color: var(--ink);
}

.ph.zoomable { cursor: zoom-in; }

/* ==========================================================================
   19. Responsive — trois paliers, jamais d'unité de viewport en typographie
   ========================================================================== */

/* -------------------- 640 – 1099 px -------------------- */
@media (max-width: 1099px) {
  :root {
    --pad: 32px;
    --t-h1: 48px;
    --t-h2: 36px;
    --t-contact: 40px;
    --section-y: 72px;
  }

  /* Photo au-dessus du texte. */
  .hero > .container { grid-template-columns: minmax(0, 1fr); }
  .hero-text {
    order: 2;
    padding: 56px 0;
  }
  .hero-photo {
    order: 1;
    min-height: 420px;
    border-left: 0;
    border-bottom: 2px solid var(--ink);
    margin: 0 calc(var(--pad) * -1);
  }

  .maker > .container { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .maker-photo { order: 1; height: 420px; }
  .maker-text { order: 2; }

  /* Inversé ici : le texte reste au-dessus des images de référence. */
  .inspiration > .container { grid-template-columns: minmax(0, 1fr); gap: 48px; }

  .trades > .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trade { padding: 32px 24px; }
  .trade:nth-child(odd) { padding-left: 0; }
  .trade:nth-child(even) { padding-right: 0; }
  .trade:nth-child(3) {
    border-left: 0;
    border-top: 2px solid var(--ink);
    grid-column: span 2;
  }

  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { padding: 28px 24px; }
  .step:nth-child(odd) { padding-left: 0; border-left: 0; }
  .step:nth-child(even) { padding-right: 0; border-left: 1px solid var(--n300); }
  .step:nth-child(n + 3) { border-top: 1px solid var(--n300); }

  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery > .ph,
  .gallery > .ph:nth-child(2) { height: 300px; }
  .gallery > .ph:nth-child(1) { grid-column: span 2; height: 380px; }

  .inspiration-grid > .ph { height: 220px; }

  .contact > .container { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}

/* Le menu d'ancres disparaît avant que la place ne manque. */
@media (max-width: 900px) {
  .nav-links a:not(.btn) { display: none; }
}

/* -------------------- < 640 px -------------------- */
@media (max-width: 639px) {
  :root {
    --pad: 20px;
    --t-h1: 34px;
    --t-h2: 28px;
    --t-contact: 34px;
    --t-lead: 17px;
    --t-body: 16px;
    --t-body-sm: 15px;
    --section-y: 56px;
    --nav-h: 60px;
  }

  /* La barre fixe ne doit jamais masquer le pied de page. */
  body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

  .nav > .container { padding-top: 12px; padding-bottom: 12px; }
  .nav-links .btn { display: none; }
  .wa-bar { display: block; }

  h1 { line-height: 1.02; }

  .hero-text { padding: 40px 0 48px; }
  .hero-photo { min-height: 300px; }
  .hero-photo .plaque { padding: 10px 14px; font-size: 11px; }

  .hero-actions { gap: 12px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .btn-primary { padding: 18px 24px; }
  .btn-ghost { padding: 16px 22px; }

  /* Les filets verticaux deviennent des filets horizontaux. */
  .trades > .container { grid-template-columns: minmax(0, 1fr); }
  .trade { padding: 24px 0; }
  .trade + .trade { border-left: 0; border-top: 2px solid var(--ink); }
  .trade:nth-child(3) { grid-column: auto; }

  .maker > .container { gap: 40px; }
  .maker-photo { height: 320px; }

  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact { padding: 20px 0; border-bottom: 1px solid var(--n300); }
  .fact:nth-child(even) { border-left: 0; }
  .fact:last-child { border-bottom: 0; padding-bottom: 0; }

  .section-head { margin-bottom: 32px; gap: 24px; }
  .section-head .btn { width: 100%; text-align: center; }

  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery > .ph,
  .gallery > .ph:nth-child(1),
  .gallery > .ph:nth-child(2) {
    grid-column: auto;
    height: 260px;
  }

  .inspiration-grid > .ph { height: 150px; }
  .inspiration .btn { display: block; text-align: center; }

  .steps-grid { grid-template-columns: minmax(0, 1fr); }
  .step { padding: 24px 0; border-left: 0 !important; }
  .step + .step { border-top: 1px solid var(--n300); }

  .contact-row { font-size: 15px; }

  .footer > .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* --------------------------------------------------------------------------
   20. Préférences utilisateur
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  .nav, .wa-bar, .lightbox { display: none !important; }
  body { padding-bottom: 0; }
}
