/*
 * A-GIR — kit du front, direction « passe-partout » : un seul écran, sans défilement.
 * Couleurs, polices, tailles, espaces, mesures et durées sont des tokens de :root :
 * hors de :root, ni ce fichier ni index.css n'en écrivent un en dur.
 */

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/playfair-display-latin.woff2") format("woff2");
  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: "Playfair Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/playfair-display-italic-latin.woff2") format("woff2");
  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: "Montserrat";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  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;
}

:root {
  /* Couleurs de la charte */
  --bleu-nuit: #0b223a;
  --or: #c9a86a;
  --sable: #eae3d7;
  --blanc: #ffffff;

  /* Dérivées de la charte */
  --or-clair: #dcc596;
  --brume: #b9b2a6;
  --filet-sombre: rgba(234, 227, 215, 0.18);
  --or-filet: rgba(201, 168, 106, 0.55);
  --transparent: rgba(0, 0, 0, 0);

  /* La photographie du crépuscule, son voile de bleu nuit, et le passe-partout doré qui tient l'écran */
  --voile: linear-gradient(180deg, rgba(11, 34, 58, 0.72) 0%, rgba(11, 34, 58, 0.56) 45%, rgba(11, 34, 58, 0.94) 100%);
  --cadrage: 74% 50%;
  --passe: var(--space-3);

  /* Typographies */
  --font-titre: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-texte: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --fs-mention: 0.8125rem;
  --fs-pilier: clamp(0.8125rem, 0.76rem + 0.2vw, 0.9375rem);
  --fs-bouton: 0.9375rem;
  --fs-texte: 1rem;
  --fs-chapeau: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --fs-devise: clamp(2.25rem, 1.5rem + 2.8vw, 4rem);

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  --lh-titre: 1.16;
  --lh-texte: 1.55;

  --ls-titre: -0.005em;
  --ls-courant: 0.01em;
  --ls-mention: 0.04em;
  --ls-marque: 0.18em;
  --ls-pilier: 0.3em;

  --mesure: 44ch;

  /* Espaces et écran */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --page-x: clamp(1.5rem, 0.4rem + 4vw, 4.5rem);
  --ecran-y: clamp(1.5rem, 4svh, 3rem);
  --gouttiere: clamp(1rem, 0.5rem + 1.6vw, 2rem);
  --page-max: 1280px;
  --colonnes: 12;
  --ecran-h: 100dvh;
  /* La marque se règle sur la largeur et sur la hauteur, pour que tout tienne dans l'écran. */
  --marque-h: min(clamp(4.5rem, 2.5rem + 7vw, 8.5rem), 15svh);

  /* Formes et mouvements */
  --trait: 1px;
  --focus: 2px;
  --rayon: 0;
  --rond: 50%;
  --point: 0.25rem;
  --bouton-h: 3.25rem;
  --fleche-l: 1.5rem;
  --fleche-h: 0.75rem;
  --decale-survol: 0.375rem;
  --soulignement: 0.28em;
  --duree: 0.35s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 1024px) {
  :root {
    --voile: linear-gradient(90deg, rgba(11, 34, 58, 0.82) 0%, rgba(11, 34, 58, 0.36) 55%, rgba(11, 34, 58, 0.72) 100%), linear-gradient(180deg, var(--transparent) 45%, rgba(11, 34, 58, 0.9) 100%);
    --cadrage: 50% 50%;
    --passe: var(--space-5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bleu-nuit);
}

body {
  margin: 0;
  font-family: var(--font-texte);
  font-size: var(--fs-texte);
  font-weight: var(--fw-regular);
  line-height: var(--lh-texte);
  color: var(--sable);
  background: var(--bleu-nuit);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

p {
  max-width: var(--mesure);
  text-wrap: pretty;
}

em {
  font-style: italic;
}

a {
  color: inherit;
  text-underline-offset: var(--soulignement);
}

::selection {
  background: var(--or);
  color: var(--bleu-nuit);
}

:focus-visible {
  outline: var(--focus) solid var(--or);
  outline-offset: var(--space-1);
}

.insecable {
  white-space: nowrap;
}

/* ——— L'écran : la photographie plein cadre, son voile, et le cadre du contenu ——— */
.ecran {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: var(--ecran-h);
  overflow: hidden;
  background: var(--bleu-nuit);
}

.ecran__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--cadrage);
}

.ecran__voile {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--voile);
  pointer-events: none;
}

.ecran__cadre {
  flex: 1 0 auto;
  display: grid;
  width: 100%;
  max-width: calc(var(--page-max) + 2 * var(--page-x));
  margin-inline: auto;
  padding: var(--ecran-y) var(--page-x);
}

/* ——— La marque : le logotype A-GIR, traversé par son arc doré, et ses deux lignes ——— */
.marque {
  flex: 0 0 auto;
  width: auto;
  height: var(--marque-h);
  overflow: visible;
}

.marque__lettres {
  fill: currentColor;
}

.marque__trait,
.marque__arc {
  fill: var(--or);
}

.signature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  color: var(--blanc);
}

/* Les lignes du logotype et les quatre mots de la marque : les seules capitales espacées. */
.lignes {
  display: grid;
  gap: var(--space-2);
  font-family: var(--font-texte);
  font-size: var(--fs-pilier);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-marque);
  line-height: var(--lh-titre);
  text-transform: uppercase;
  color: var(--blanc);
}

.lignes span:last-child {
  color: var(--or);
}

.piliers li {
  font-size: var(--fs-pilier);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-pilier);
  line-height: var(--lh-titre);
  text-transform: uppercase;
  color: var(--blanc);
}

.devise {
  font-family: var(--font-titre);
  font-size: var(--fs-devise);
  font-weight: var(--fw-regular);
  line-height: var(--lh-titre);
  letter-spacing: var(--ls-titre);
  color: var(--blanc);
  text-wrap: balance;
}

.devise em {
  color: var(--sable);
}

.chapeau {
  font-size: var(--fs-chapeau);
  font-weight: var(--fw-light);
  line-height: var(--lh-texte);
  color: var(--brume);
}

/* ——— Le seul bouton : écrire à A-GIR ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: var(--bouton-h);
  padding: 0 var(--space-6);
  border: var(--trait) solid var(--transparent);
  border-radius: var(--rayon);
  font-family: var(--font-texte);
  font-size: var(--fs-bouton);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-courant);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--duree) var(--ease), border-color var(--duree) var(--ease);
}

.btn--or {
  background: var(--or);
  border-color: var(--or);
  color: var(--bleu-nuit);
}

.btn--or:hover {
  background: var(--or-clair);
  border-color: var(--or-clair);
}

.fleche {
  flex: 0 0 auto;
  width: var(--fleche-l);
  height: var(--fleche-h);
  transition: transform var(--duree) var(--ease);
}

.btn:hover .fleche {
  transform: translateX(var(--decale-survol));
}

/* ——— La mention du pied, dans l'écran ——— */
.mention {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-5);
  font-size: var(--fs-mention);
  letter-spacing: var(--ls-mention);
  line-height: var(--lh-texte);
  color: var(--brume);
}

.mention p {
  max-width: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .fleche {
    transition: none;
  }

  .btn:hover .fleche {
    transform: none;
  }
}
