/* ==========================================================================
   BASE — polices, couleurs, réglages généraux, utilitaires
   ========================================================================== */

/* Polices hébergées sur le site (aucun appel à Google Fonts : plus rapide et sans suivi des visiteurs) */
@font-face { font-family: "Aboreto"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/aboreto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Adamina"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/adamina-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/open-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/open-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  /* couleurs du site */
  --navy: #000455;          /* bleu marine principal */
  --navy-ink: #070b5a;      /* titres */
  --navy-deep: #010253;
  --text: #333;
  --muted: #666;
  --field: #eee;
  --white: #fff;
  --danger: #b00020;

  /* polices */
  --font-display: "Aboreto", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-serif: "Adamina", Georgia, "Times New Roman", serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* mesures */
  --header-h: 84px;
  --header-h-small: 60px;
  --container: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h-small) + 12px);
  background: var(--navy);
}

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Fond bleu à palmiers, fixe (visible sur la page « Rio San Juan ») */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--navy);
  background-image: url("../img/bg/bg-blue-1366.jpg");
  background-image: image-set(
    url("../img/bg/bg-blue-1366.avif") type("image/avif"),
    url("../img/bg/bg-blue-1366.webp") type("image/webp"),
    url("../img/bg/bg-blue-1366.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
}

img, picture, video, iframe { max-width: 100%; }
img, video { height: auto; }
img { vertical-align: middle; }

h1, h2, h3, h4, p, figure, ul { margin-top: 0; }

a { color: inherit; }

/* Focus clavier bien visible (accessibilité) */
:focus-visible { outline: 3px solid #5b8cff; outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* ------------------------------------------------------------- utilitaires */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 300;
  padding: 10px 16px;
  background: var(--white); color: var(--navy);
  font-family: var(--font-display); font-weight: 700;
  transform: translateY(-200%);
  transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* Animation d'apparition au défilement (ajoutée par assets/js/reveal.js ; sans JavaScript, tout est visible) */
.reveal-hidden { opacity: 0; transform: translateY(26px); }
.reveal-hidden.is-visible { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s ease; }

/* Respecte le réglage « réduire les animations » du système */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-hidden { opacity: 1; transform: none; }
}

/* Impression : uniquement le contenu */
@media print {
  .site-header, .site-footer, .skip-link, .hero__down, .video-frame, .video-vertical { display: none !important; }
  body { padding-top: 0; background: #fff; color: #000; }
  body::before { display: none; }
}
