/* ========================================================================
   BUPA Architectures — Design tokens V2 FUSIONNÉS
   Charte 2026 — Option 1 : Terre cuite (primaire) + Lavande (accent éditorial)
   ADR-001 validé Frantz le 2026-05-06
   ======================================================================== */

/* Polices auto-hébergées (privacy by design — aucune connexion à Google Fonts). Voir fonts/fonts.css */
@import url('fonts/fonts.css');

:root {
  /* ---------- Couleurs primaires (90% de la surface) ---------- */
  --color-ink:           #0F1B1E;    /* noir-vert profond — texte principal */
  --color-ink-soft:      #2A3436;    /* texte secondaire */
  --color-mute:          #6B7578;    /* texte tertiaire, méta */
  --color-line:          #D8D4CE;    /* filets, bordures */
  --color-paper:         #F6F2EC;    /* fond crème — surface principale */
  --color-paper-alt:     #EFEAE2;    /* fond crème appuyé — cartes */
  --color-white:         #FFFFFF;

  /* ---------- Accents primaires : terre, forêt, brique ---------- */
  --color-accent:        #DBB2B9;    /* terre cuite — CTA, fil rouge, badges */
  --color-accent-hover:  #A34354;
  --color-forest:        #2F4A3A;    /* vert profond — expertises végétales */
  --color-brick:         #65343D;    /* brique — patrimoine, réhabilitation */

  /* ---------- Accent navigation & hero (chartreuse — pilotable admin charte) ---------- */
  /* Logo « Architectures », item de menu actif, titre hero (ville en italique),
     point « hint ». Le -solid est la variante foncée pour le contraste quand la
     nav devient claire au scroll. */
  --color-accent-nav:       #F948B8;
  --color-accent-nav-solid: #F948B8;

  /* ---------- Accent éditorial secondaire (10% — usage strict) ---------- */
  /* Règle : lavande = pensée, voix, pitches presse, italiques de titre,
     liens dans corps de texte éditorial, contributions métropolitaines.
     JAMAIS sur CTA principal, JAMAIS sur badge frugalité. */
  --color-lavande:       #F948B8;    /* accent éditorial */
  --color-lavande-ink:   #F948B8;    /* lavande hover */
  --color-lavande-wash:  #FDEDFC;    /* fond très clair lavande */

  /* ---------- Légation Pacman (signature historique repeinte) ---------- */
  --color-pacman-body:   #B8512A;    /* corps Pacman repeint terre cuite */
  --color-pacman-eye:    #6B6BD6;    /* œil Pacman repeint lavande */

  /* ---------- Typographies ---------- */
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* ---------- Échelle typographique (modular, ratio 1.250) ---------- */
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  2rem;
  --fs-3xl:  2.75rem;
  --fs-4xl:  3.75rem;
  --fs-5xl:  5rem;

  /* ---------- Hauteurs de ligne ---------- */
  --lh-tight:   1.1;
  --lh-snug:    1.25;
  --lh-normal:  1.5;
  --lh-relaxed: 1.7;

  /* ---------- Graisse ---------- */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* ---------- Espacement (base 8) ---------- */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.5rem;
  --sp-6:  2rem;
  --sp-7:  3rem;
  --sp-8:  4rem;
  --sp-9:  6rem;
  --sp-10: 8rem;

  /* ---------- Rayons ---------- */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* ---------- Ombres ---------- */
  --shadow-sm: 0 1px 2px rgba(15, 27, 30, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 27, 30, 0.06);
  --shadow-lg: 0 16px 40px rgba(15, 27, 30, 0.08);

  /* ---------- Grille & conteneur ---------- */
  --container-max: 1280px;
  --container-padding: clamp(1rem, 4vw, 2.5rem);
  --grid-gap: clamp(1rem, 2vw, 1.5rem);
  --col-text: 680px;
  --col-narrow: 520px;

  /* ---------- Transitions ---------- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 300ms;
  --dur-slow: 600ms;

  /* ---------- Z-index ---------- */
  --z-header: 50;
  --z-modal: 100;
  --z-toast: 200;
}

/* ========================================================================
   Reset minimal + base
   ======================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, video, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--color-accent); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--color-accent-hover); }

/* Liens éditoriaux dans corps de texte longs (essais, manifestes, projets long-form) */
.prose a, .editorial a {
  color: var(--color-lavande);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover, .editorial a:hover { color: var(--color-lavande-ink); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  color: var(--color-ink);
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-4);
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: var(--fw-light); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: var(--fw-light); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); font-weight: var(--fw-medium); }

/* Italique dans les titres = lavande (signature voix BUPA) */
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--color-lavande);
  font-weight: var(--fw-light);
}

p { margin: 0 0 1.2em; }

/* ========================================================================
   Conteneurs
   ======================================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}
.container--text { max-width: var(--col-text); }
.container--narrow { max-width: var(--col-narrow); }

.section { padding: var(--sp-9) 0; }
.section--lg { padding: var(--sp-10) 0; }
.section--sm { padding: var(--sp-7) 0; }

/* ========================================================================
   Composants — boutons
   Règle : CTA principal = TERRE. Lien éditorial = LAVANDE.
   ======================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.95rem 1.6rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: all var(--dur-fast) var(--ease-out);
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-white);
  transform: translateY(-1px);
}
.btn--secondary {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-ink);
}
.btn--secondary:hover {
  background: var(--color-ink);
  color: var(--color-paper);
}
/* Ghost = lien éditorial type "lire la suite" */
.btn--ghost {
  background: transparent;
  color: var(--color-lavande);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-lavande);
  border-radius: 0;
}
.btn--ghost:hover { color: var(--color-lavande-ink); border-bottom-color: var(--color-lavande-ink); }

/* ========================================================================
   Badges
   ======================================================================== */
.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  line-height: 1;
}
.badge--terre   { background: rgba(184, 81, 42, 0.12); color: var(--color-accent); }
.badge--forest  { background: rgba(47, 74, 58, 0.12); color: var(--color-forest); }
.badge--brick   { background: rgba(125, 64, 40, 0.12); color: var(--color-brick); }
.badge--lavande { background: var(--color-lavande-wash); color: var(--color-lavande-ink); }
.badge--neutral { background: var(--color-line); color: var(--color-ink-soft); }

/* ========================================================================
   Eyebrow + lede
   ======================================================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-mute);
  margin-bottom: var(--sp-4);
  display: inline-block;
}
.eyebrow--lavande { color: var(--color-lavande); }

.lede {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.4;
  font-weight: var(--fw-light);
  color: var(--color-ink-soft);
  max-width: var(--col-text);
}

/* ========================================================================
   Pitch éditorial (citations, contributions, presse) — fond LAVANDE
   ======================================================================== */
.pitch {
  background: var(--color-lavande-wash);
  border-left: 3px solid var(--color-lavande);
  padding: var(--sp-6) var(--sp-7);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--color-ink-soft);
  font-weight: var(--fw-light);
  margin: var(--sp-7) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.pitch__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-lavande-ink);
  font-weight: var(--fw-medium);
}

/* ========================================================================
   Cards projet (gabarit conservé du site-v2)
   ======================================================================== */
.card-project {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-base) var(--ease-out);
  text-decoration: none;
  color: inherit;
}
.card-project:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  color: inherit;
}
.card-project__media {
  aspect-ratio: 4/3;
  background: var(--color-paper-alt);
  overflow: hidden;
}
.card-project__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
.card-project:hover .card-project__media img { transform: scale(1.03); }
.card-project__body {
  padding: var(--sp-5);
  display: flex; flex-direction: column;
  gap: var(--sp-3); flex: 1;
}
.card-project__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--color-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card-project__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  color: var(--color-ink);
}
.card-project__excerpt {
  font-size: var(--fs-sm);
  color: var(--color-ink-soft);
  line-height: var(--lh-normal);
}
.card-project__footer {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--color-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--color-mute);
}
.card-project__footer .arrow {
  color: var(--color-accent);
  transition: transform var(--dur-fast);
}
.card-project:hover .card-project__footer .arrow { transform: translateX(4px); }

/* ========================================================================
   Facts cartouche projet (chiffres clés)
   ======================================================================== */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--color-paper-alt);
  border-radius: var(--radius-md);
}
.facts__item { display: flex; flex-direction: column; gap: var(--sp-1); }
.facts__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-mute);
}
.facts__value {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  color: var(--color-ink);
  font-weight: var(--fw-medium);
}

/* ========================================================================
   Accessibilité
   ======================================================================== */
:focus-visible {
  outline: 2px solid var(--color-lavande);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ========================================================================
   Reduced motion
   ======================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
