/* ==========================================================================
   BASE - Fonts, Variables, Reset, Typography
   ========================================================================== */

/* Font Faces */
@font-face {
  font-family: 'Plaak33';
  src: url('../fonts/205-Plaak33.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  ascent-override: 80%;
  descent-override: 20%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Plaak56';
  src: url('../fonts/205-Plaak56.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  ascent-override: 80%;
  descent-override: 20%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'BodyQuotes';
  src: local('Helvetica Neue'), local('Arial'), local('Roboto'), local('Liberation Sans'), local('Nimbus Sans'), local('DejaVu Sans');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  /* guillemets, and the typographic apostrophe and quotes: MS PGothic draws
     them full width (« l’ invention ») */
  unicode-range: U+00AB, U+00BB, U+2039, U+203A, U+2018, U+2019, U+201C, U+201D;
}

/* MS PGothic : licence web NON VÉRIFIÉE. Police Microsoft (données Ricoh),
   fichier de 7,3 Mo. Employée sur décision du responsable du site du 15/11/2026,
   en attendant : licence à vérifier avant la mise en ligne ou peu après.
   Une fois la licence réglée, ne garder que les caractères latins (sous-ensemble). */
@font-face {
  font-family: 'MSPGothic';
  src: url('../fonts/ms-pgothic-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Additional title fonts (h1, keypoints, title font chosen per project in the Panel) */
@font-face {
  font-family: 'Plaak21A';
  src: url('../fonts/205-Plaak21A.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  ascent-override: 70%;
  descent-override: 0%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Plaak21B';
  src: url('../fonts/205-Plaak21B.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plaak26';
  src: url('../fonts/205-Plaak26.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plaak44B';
  src: url('../fonts/205-Plaak44B.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colors (maquette Figma : noir #050505, blanc cassé #F0EFEF) */
  --bg: #050505;
  --fg: #F0EFEF;
  /* Fond des pages claires : #FFFFFF dessiné ou #F0EFEF noté, en attente
     de la graphiste (question Q3) ; inchangé d'ici là */
  --color-light-bg: #f5f5f2;
  --muted: #b8b8b0;
  --color-orange: #fc5600;
  --accent: var(--color-orange);
  
  /* Layout */
  --gap: 16px;
  --section-padding-y: 16px;
  --panel-inline-padding: 20px;
  --nav-panel-max-width: 340px;
  --overlay-panel-max-width: 570px;
  --footer-grid-gap: 16px;
  --hero-overlay-padding: clamp(24px, 6vw, 80px);
  --logo-height: 64px;
  /* Space kept free at the top of a page: the fixed logo starts at --gap
     from the top and is --logo-height tall (96px on phones, 148px from 768px) */
  --header-offset: calc(var(--logo-height) + 2 * var(--gap));
  --max-width: 1200px;
  --max-width-wide: 1360px;
  --content-max-width: 800px;
  --section-stack-space: clamp(48px, 6vw, 64px);
  
  /* Typography - Fonts */
  --font-title: 'Plaak33', 'Helvetica Neue', Arial, sans-serif;
  --font-subtitle: 'Plaak56', 'Helvetica Neue', Arial, sans-serif;
  --font-ui: 'Plaak56', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'BodyQuotes', 'MSPGothic', 'Helvetica Neue', Arial, sans-serif;
  
  /* Typography - Scale */
  --text-base: 17px;
  --text-sm: 14px;
  --text-md: 20px;
  --text-lg: 22px;
  --text-xl: 24px;
  
  /* Page titles (H1), maquette : Plaak 21A, 100px à 393px de large, 215px à 1280,
     227px au plus ; interpolation linéaire entre les deux largeurs dessinées */
  --size-h1: clamp(100px, calc(49px + 12.97vw), 227px);

  /* Typography - Headings */
  --heading-h1-min: 28px;
  --heading-h1-max: 56px;
  --heading-h2-min: 22px;
  --heading-h2-max: 40px;
  --heading-h3-min: 18px;
  --heading-h3-max: 28px;
  
  /* Line heights */
  --line-height-body: 1.6;
  --line-height-heading: 1.2;

  /* Title vertical stretch */
  --title-scale-y: 1.4;
}

@media (min-width: 768px) {
  :root {
    --gap: 24px;
    --section-padding-y: 24px;
    --panel-inline-padding: 32px;
    --nav-panel-max-width: 400px;
    --footer-grid-gap: 24px;
    --logo-height: 100px;
    --text-base: 18px;
    --text-md: 22px;
    --text-lg: 24px;
    --text-xl: 28px;
    --heading-h1-min: 32px;
    --heading-h2-min: 24px;
    --heading-h3-min: 20px;
  }
}

/* Texte courant sur ordinateur : 22px (maquette) ; interligne inchangé
   et taille sur téléphone inchangée, en attente de la graphiste (Q7) */
@media (min-width: 960px) {
  :root {
    --text-base: 22px;
  }
}

@media (min-width: 1280px) {
  :root {
    --max-width: 1280px;
    --max-width-wide: 1440px;
  }
}

/* ==========================================================================
   CENTRALISED HEADING STYLES
   Change font-family, weight, transform etc. in ONE place.
   Page-specific CSS only needs to override size, margin, color, etc.
   ========================================================================== */

/* All h1 — title font */
h1 {
  font-family: 'Plaak21A', var(--font-title);
  font-weight: normal;
  text-transform: uppercase;
  /* Maquette : aucun espacement de lettres sur les titres. Sans espacement,
     le navigateur applique les ligatures des Plaak (« NOTRE » → « Nᵗʳᵉ »,
     « AVENUE » → « Aᵛ ») : on les coupe, comme pour la newsletter au lot 1 */
  letter-spacing: 0;
  font-variant-ligatures: none;
  line-height: var(--line-height-heading);
  /* transform: scaleY(var(--title-scale-y)); */
}

/* All h2, h3 — subtitle font */
h2, h3 {
  font-family: var(--font-subtitle);
  font-weight: normal;
  text-transform: uppercase;
  line-height: var(--line-height-heading);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--bg);
  color: var(--fg);
  line-height: var(--line-height-body);
  overflow-x: hidden;
  overflow-x: clip;
}

html {
  scroll-padding-top: var(--header-offset);
  overflow-x: hidden;
  overflow-x: clip;
}

/* Theme: Light */
body.theme-light {
  --bg: var(--color-light-bg);
  --fg: #050505;
  --muted: #444;
}

body.theme-light .header-logo .logo-small {
  filter: invert(1);
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  line-height: inherit;
}