/* ============================================
   STYLE.CSS — Fondations & variables
   Thème ENSPE v2 : blanc, bleu marine, or
   ============================================ */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/fredoka-latin-300-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-300-700.woff2') format('woff2');
}

:root {
  /* Fonds */
  --color-fond: #FFFFFF;
  --color-fond-doux: #F4F6FA;
  --color-fond-bleu: #1F2F63;
  --color-fond-bleu-fonce: #1F2F63;

  /* Bleu marine */
  --color-bleu: #1F2F63;
  --color-bleu-clair: #3D55A8;
  --color-bleu-pale: #E7ECF7;

  /* Or */
  --color-or: #C8912F;
  --color-or-clair: #E9B54D;
  --color-or-sombre: #A8781F;
  --color-orange: #C8802F;

  /* Textes */
  --color-texte: #2A3245;
  --color-texte-doux: #5A6478;
  --color-texte-tres-doux: #8B93A6;
  --color-blanc: #FFFFFF;
  --color-ivoire: #F8F5EE;
  --color-fond-chaud: #FCFAF5;

  /* Bordures */
  --color-bordure: #E3E7F0;
  --color-bordure-or: rgba(200, 145, 47, 0.35);

  /* Typographies */
  --font-titre: 'Fredoka', 'Inter', sans-serif;
  --font-corps: 'Inter', -apple-system, 'Segoe UI', sans-serif;

  /* Échelle typographique */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  /* Espacements */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;

  /* Rayons */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Effets */
  --ombre-douce: 0 12px 40px rgba(31, 47, 99, 0.10);
  --ombre-forte: 0 24px 60px rgba(31, 47, 99, 0.16);
  --ombre-or: 0 8px 28px rgba(200, 145, 47, 0.28);
  --transition: 0.25s cubic-bezier(0.33, 1, 0.68, 1);
  --transition-lente: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-corps);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-texte);
  background-color: var(--color-fond);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(233, 181, 77, 0.4);
  color: var(--color-bleu);
}

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

ul[role="list"] { list-style: none; }

a {
  color: var(--color-bleu);
  text-decoration: none;
  transition: color var(--transition);
  cursor: pointer;
}
a:hover { color: var(--color-or-sombre); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-bleu);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-fond);
  color: var(--color-bleu);
  font-weight: 700;
  box-shadow: var(--ombre-forte);
  transform: translateY(calc(-100% - 1rem));
  transition: transform var(--transition);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- Titres ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-titre);
  font-weight: 500;
  line-height: 1.08;
  color: var(--color-bleu);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
h4 { font-size: var(--text-lg); }

h1 em, h2 em {
  font-style: italic;
  color: var(--color-or);
}

p { max-width: 68ch; }

/* ---------- Structure ---------- */
.conteneur {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
  .conteneur { padding: 0 var(--space-lg); }
}

.section { padding: var(--space-2xl) 0; }
.section--grande { padding: calc(var(--space-2xl) * 1.2) 0; }
.section--douce { background: var(--color-fond-doux); }

.centrer { text-align: center; }

.grille-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.grille-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.grille-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 768px) {
  .grille-2 { grid-template-columns: repeat(2, 1fr); }
  .grille-3 { grid-template-columns: repeat(3, 1fr); }
  .grille-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .grille-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Surtitre ---------- */
.surtitre {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-or-sombre);
}
.surtitre::before {
  content: '';
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-or));
  flex-shrink: 0;
}

.en-tete-section {
  max-width: 720px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}
.en-tete-section .surtitre { margin-bottom: var(--space-sm); }
.en-tete-section .surtitre::after {
  content: '';
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, var(--color-or), transparent);
  flex-shrink: 0;
}
.en-tete-section h2 { margin-bottom: var(--space-sm); }
.en-tete-section p {
  color: var(--color-texte-doux);
  margin: 0 auto;
}

/* ---------- Séparateur or ---------- */
.separateur-or {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--color-or);
}
.separateur-or::before,
.separateur-or::after {
  content: '';
  height: 1px;
  width: min(90px, 20vw);
  background: linear-gradient(90deg, transparent, var(--color-bordure-or));
}
.separateur-or::after {
  background: linear-gradient(90deg, var(--color-bordure-or), transparent);
}

/* ---------- Halo doré clair ---------- */
.aurore {
  position: relative;
  overflow: hidden;
}
.aurore::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto;
  height: 80%;
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, rgba(233, 181, 77, 0.16) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 80% 8%, rgba(31, 47, 99, 0.06) 0%, transparent 60%);
  pointer-events: none;
}
.aurore > * { position: relative; z-index: 1; }

/* ---------- Pastilles ---------- */
.badge-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-bordure);
  border-radius: 100px;
  background: var(--color-fond-doux);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-texte-doux);
}

/* ---------- Accessibilité ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
