/* ==========================================================================
   Rubby NTS — feuille de style unique
   Palette et police reprises du site d'origine : #0d141a, #4c6793, Open Sans.
   ========================================================================== */

/* Open Sans est servi depuis notre propre domaine, pas depuis Google Fonts :
   plus de requête bloquante vers un tiers, et plus d'adresse IP du visiteur
   transmise hors UE — le site publie une politique RGPD, elle doit être vraie.
   Fichiers : fonte variable 300-600, sous-ensembles latin et latin-ext
   (Open Sans, Apache License 2.0). */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/fonts/open-sans-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: "Open Sans";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/fonts/open-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --fond: #ffffff;
  --fond-doux: #f2f3f6;
  --fond-sombre: #0d141a;
  --fond-sombre-2: #1a1a2e;
  --accent: #4c6793;
  --accent-clair: #6b86b3;
  --texte: #0d141a;
  --texte-doux: #4a5568;
  --texte-inverse: #ffffff;
  --bordure: #dadce0;

  --largeur: 1140px;
  --largeur-texte: 46rem;
  --rayon: 10px;
  --ombre: 0 1px 3px rgba(13, 20, 26, .08), 0 8px 24px rgba(13, 20, 26, .06);

  --police: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
}

/* --- socle ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--fond-sombre); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--texte);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: .5em; }

/* accessibilité : cible de saut et focus visible partout */
.saut-contenu {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--fond-sombre); color: #fff; padding: .8rem 1.2rem;
  border-radius: 0 0 var(--rayon) 0;
}
.saut-contenu:focus { left: 0; color: #fff; }

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

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 1.25rem; }

/* --- en-tête -------------------------------------------------------------- */

.entete {
  position: sticky; top: 0; z-index: 50;
  background: var(--fond-sombre);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.entete__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.marque { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.marque img { width: 42px; height: 42px; border-radius: 8px; }
.marque__nom {
  color: #fff; font-weight: 600; font-size: 1.05rem; letter-spacing: .02em;
}

.nav ul { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .55rem .9rem; border-radius: 6px;
  color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .97rem;
}
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .14); }

.burger {
  display: none; background: none; border: 0; cursor: pointer;
  padding: .5rem; color: #fff; border-radius: 6px;
}
.burger svg { display: block; }

@media (max-width: 780px) {
  .burger { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--fond-sombre);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    display: none;
  }
  .nav[data-ouvert="true"] { display: block; }
  .nav ul { flex-direction: column; padding: .6rem 1.25rem 1.1rem; }
  .nav a { padding: .75rem .6rem; }
}

/* --- héros ---------------------------------------------------------------- */

.heros {
  position: relative;
  background: var(--fond-sombre);
  color: var(--texte-inverse);
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  overflow: hidden;
}
.heros::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--heros-image);
  background-size: cover; background-position: center;
  opacity: .28;
}
.heros::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(13, 20, 26, .94) 32%, rgba(13, 20, 26, .58) 100%);
}
.heros > * { position: relative; z-index: 1; }
.heros h1 { color: #fff; max-width: 20ch; }
.heros__accroche {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: rgba(255, 255, 255, .88);
  max-width: 46ch; margin-bottom: 2rem;
}

/* bandeau de titre des pages secondaires */
.bandeau {
  background: var(--fond-sombre); color: #fff;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.bandeau h1 { color: #fff; margin-bottom: .3em; }
.bandeau p { color: rgba(255, 255, 255, .82); max-width: 60ch; margin: 0; }

/* --- boutons -------------------------------------------------------------- */

.bouton {
  display: inline-block; padding: .85rem 1.7rem;
  background: var(--accent); color: #fff;
  border: 2px solid var(--accent);
  border-radius: var(--rayon);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  cursor: pointer; font-family: inherit;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.bouton:hover { background: var(--accent-clair); border-color: var(--accent-clair); color: #fff; }
.bouton--fantome {
  background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5);
}
.bouton--fantome:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

/* --- sections ------------------------------------------------------------- */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--doux { background: var(--fond-doux); }
.section__intro { max-width: var(--largeur-texte); margin-bottom: 2.5rem; }
.section__intro p:last-child { margin-bottom: 0; }

.grille { display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .grille--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) { .grille--2 { grid-template-columns: repeat(2, 1fr); } }

.carte {
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.75rem;
  box-shadow: var(--ombre);
}
.carte h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.carte p:last-child { margin-bottom: 0; }
.carte__numero {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; margin-bottom: 1rem;
  border-radius: 50%; background: var(--fond-doux);
  color: var(--accent); font-weight: 600;
}
.section--doux .carte { background: #fff; }

/* deux colonnes texte + image */
.duo { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 860px) {
  .duo { grid-template-columns: 1.05fr .95fr; gap: 3.5rem; }
  .duo--inverse > *:first-child { order: 2; }
}
.duo img { border-radius: var(--rayon); box-shadow: var(--ombre); width: 100%; }

/* chiffres clés */
.chiffres { display: grid; gap: 1.25rem; }
@media (min-width: 620px) { .chiffres { grid-template-columns: repeat(4, 1fr); } }
.chiffre {
  text-align: center; padding: 1.5rem 1rem;
  background: #fff; border: 1px solid var(--bordure); border-radius: var(--rayon);
}
.chiffre__valeur {
  display: block; font-size: 2rem; font-weight: 600; color: var(--accent);
  line-height: 1.1; margin-bottom: .35rem;
}
.chiffre__libelle { font-size: .92rem; color: var(--texte-doux); }

/* encart d'information */
.encart {
  border-left: 4px solid var(--accent);
  background: var(--fond-doux);
  padding: 1.4rem 1.6rem;
  border-radius: 0 var(--rayon) var(--rayon) 0;
  margin: 2rem 0;
}
.encart p:last-child { margin-bottom: 0; }

/* --- pages de contenu long (mentions, CGV, règlement…) -------------------- */

.prose { max-width: var(--largeur-texte); }
.prose h2 {
  font-size: 1.35rem; margin-top: 2.4rem; padding-top: 1.6rem;
  border-top: 1px solid var(--bordure);
}
.prose h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 1.12rem; margin-top: 1.8rem; }
.prose h4 { font-size: 1.02rem; margin-top: 1.5rem; color: var(--texte-doux); }
.prose ul { padding-left: 1.3em; }
.prose .maj { display: block; color: var(--texte-doux); font-size: .95rem; margin-bottom: 2rem; }
.prose address { font-style: normal; }

/* --- formulaire ----------------------------------------------------------- */

.formulaire { max-width: 34rem; }
.champ { margin-bottom: 1.25rem; }
.champ label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .4rem; }
.champ input, .champ textarea {
  width: 100%; padding: .75rem .9rem;
  font-family: inherit; font-size: 1rem; color: var(--texte);
  background: #fff; border: 1px solid var(--bordure); border-radius: 8px;
}
.champ input:focus, .champ textarea:focus { border-color: var(--accent); }
.champ textarea { min-height: 9rem; resize: vertical; }
.obligatoire { color: #c0392b; }

.message { padding: 1rem 1.2rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: .97rem; }
.message--ok { background: #def4f0; border: 1px solid #9ad6c8; color: #14503f; }
.message--ko { background: #ffe8ef; border: 1px solid #fea8c2; color: #8a1538; }
.message[hidden] { display: none; }

/* --- coordonnées ---------------------------------------------------------- */

.coordonnees { list-style: none; padding: 0; margin: 0; }
.coordonnees li { display: flex; gap: .7rem; margin-bottom: 1rem; align-items: flex-start; }
.coordonnees strong { display: block; font-size: .9rem; color: var(--texte-doux); font-weight: 600; }

/* --- pied de page --------------------------------------------------------- */

.pied {
  background: var(--fond-sombre-2); color: rgba(255, 255, 255, .72);
  padding: 3.5rem 0 2rem; font-size: .95rem; margin-top: auto;
}
.pied a { color: rgba(255, 255, 255, .82); }
.pied a:hover { color: #fff; }
.pied h2 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.pied__grille { display: grid; gap: 2.5rem; }
@media (min-width: 780px) { .pied__grille { grid-template-columns: 1.4fr 1fr 1fr; } }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: .6rem; }

.reseaux { display: flex; gap: .6rem; margin-top: 1.2rem; }
.reseaux a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  background: rgba(255, 255, 255, .1);
}
.reseaux a:hover { background: rgba(255, 255, 255, .2); }
.reseaux svg { width: 20px; height: 20px; fill: #fff; }

.pied__qualiopi { background: #fff; padding: .7rem 1rem; border-radius: 8px; display: inline-block; margin-top: 1.4rem; }
.pied__qualiopi img { width: 190px; }

.pied__bas {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: .9rem;
}

/* --- divers --------------------------------------------------------------- */

body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .entete, .pied, .burger, .saut-contenu { display: none; }
  body { font-size: 11pt; }
  .bandeau { background: none; color: #000; padding: 0 0 1rem; }
  .bandeau h1, .bandeau p { color: #000; }
}
