/* ============================================================
   FPRO - core.css - commun a tous les sites clients
   Mobile d'abord. Aucune dependance externe, aucune police distante.
   Version 1
   ============================================================ */

/* --- 1. Reglages de base -------------------------------------------------- */

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

:root {
  --pas: 4px;
  --gouttiere: 20px;
  --largeur: 1120px;
  --largeur-texte: 62ch;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 20px;

  --ombre-s: 0 1px 2px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.04);
  --ombre-m: 0 2px 6px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);

  --t-rapide: .15s ease;
  --t-normal: .25s ease;

  /* echelle typographique fluide */
  --t-xs: .8125rem;
  --t-s: .9375rem;
  --t-m: 1.0625rem;
  --t-l: clamp(1.125rem, 1rem + .5vw, 1.25rem);
  --t-h3: clamp(1.1875rem, 1.05rem + .6vw, 1.375rem);
  --t-h2: clamp(1.5rem, 1.25rem + 1.2vw, 2rem);
  --t-h1: clamp(2rem, 1.5rem + 2.6vw, 3.125rem);
}

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

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police-corps);
  font-size: var(--t-m);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video { max-width: 100%; height: auto; display: block; }
img { background: var(--accent-clair); }

h1, h2, h3, h4 {
  font-family: var(--police-titres);
  font-weight: var(--titres-graisse, 650);
  line-height: 1.2;
  letter-spacing: var(--titres-espacement, -.02em);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

p { margin: 0 0 1em; }
p:last-child, ul:last-child, ol:last-child, dl:last-child { margin-bottom: 0; }

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

strong { font-weight: 650; }

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

::selection { background: var(--accent-clair); color: var(--encre); }

/* --- 2. Utilitaires ------------------------------------------------------- */

.contenant {
  width: 100%;
  max-width: var(--largeur);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.mesure { max-width: var(--largeur-texte); }

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

.lien-evitement {
  position: absolute;
  left: var(--gouttiere); top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-contraste);
  padding: 10px 16px;
  border-radius: var(--r-s);
  transition: top var(--t-rapide);
}
.lien-evitement:focus { top: 10px; }

/* --- 3. Boutons ----------------------------------------------------------- */

.bouton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-s);
  font-family: var(--police-corps);
  font-size: var(--t-s);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-rapide), border-color var(--t-rapide), transform var(--t-rapide);
  min-height: 46px;
}
.bouton:active { transform: translateY(1px); }

.bouton--plein {
  background: var(--accent);
  color: var(--accent-contraste);
}
.bouton--plein:hover { background: var(--accent-fonce); color: var(--accent-contraste); }

.bouton--contour {
  background: transparent;
  border-color: var(--trait-fort);
  color: var(--encre);
}
.bouton--contour:hover { border-color: var(--accent); color: var(--accent-fonce); background: var(--accent-clair); }

.bouton--discret {
  background: var(--accent-clair);
  color: var(--accent-fonce);
}
.bouton--discret:hover { background: var(--accent); color: var(--accent-contraste); }

.bouton svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --- 4. En-tete ----------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--trait);
}
.entete__in {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.marque {
  font-family: var(--police-titres);
  font-weight: 650;
  font-size: var(--t-l);
  letter-spacing: -.02em;
  color: var(--encre);
  text-decoration: none;
  line-height: 1.1;
  margin-right: auto;
}
.marque span {
  display: block;
  font-family: var(--police-corps);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--encre-2);
}

.nav { display: none; }
.nav a {
  color: var(--encre-2);
  text-decoration: none;
  font-size: var(--t-s);
  padding: 8px 10px;
  border-radius: var(--r-s);
}
.nav a:hover { color: var(--accent-fonce); background: var(--accent-clair); }
.entete .bouton { display: none; }

@media (min-width: 900px) {
  .nav { display: flex; gap: 2px; }
  .entete .bouton { display: inline-flex; }
}

/* --- 5. Sections ---------------------------------------------------------- */

/* l'en-tete est collante : les ancres doivent s'arreter dessous */
[id] { scroll-margin-top: 84px; }

.section { padding-block: clamp(44px, 7vw, 84px); }
.section + .section { border-top: 1px solid var(--trait); }
.section--surface { background: var(--surface); }
.section__titre { margin-bottom: 1.2em; }

/* --- 6. Bandeau d'accueil, structure A : le portrait domine --------------- */

.accueil {
  background: var(--surface);
  border-bottom: 1px solid var(--trait);
  overflow: hidden;
}
.accueil__in {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  padding-block: clamp(36px, 6vw, 76px);
  align-items: center;
}
.accueil__texte > p { color: var(--encre-2); font-size: var(--t-l); max-width: 46ch; }
.accueil__sur {
  display: inline-block;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent-fonce);
  background: var(--accent-clair);
  padding: 5px 11px;
  border-radius: 99px;
  margin-bottom: 18px;
}
.accueil__soustitre {
  font-size: var(--t-l);
  color: var(--encre-2);
  margin: -.4em 0 1em;
}
.accueil__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.portrait {
  position: relative;
  border-radius: var(--r-l);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--ombre-m);
  max-width: 460px;
  margin-inline: auto;
  width: 100%;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Mobile : structure A met la photo en premier, en banniere. */
@media (max-width: 859px) {
  .accueil__media { order: -1; }
  .portrait { aspect-ratio: 5 / 4; max-width: none; border-radius: var(--r-m); }
  .portrait img { object-position: center 30%; }
}

@media (min-width: 860px) {
  .accueil__in { grid-template-columns: 1.15fr .85fr; }
  .accueil--inverse .accueil__in { grid-template-columns: .85fr 1.15fr; }
  .accueil--inverse .accueil__media { order: -1; }
}

/* --- 7. Bande de reperes -------------------------------------------------- */

.reperes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--trait);
  border-block: 1px solid var(--trait);
}
.repere {
  background: var(--surface);
  padding: 18px 20px;
}
.repere__cle {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--encre-2);
  margin-bottom: 3px;
}
.repere__val { font-weight: 600; font-size: var(--t-s); }

/* --- 8. Grilles et cartes ------------------------------------------------- */

.duo {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
}
@media (min-width: 860px) {
  .duo { grid-template-columns: 1fr 1fr; align-items: start; }
  .duo--large-gauche { grid-template-columns: 1.3fr 1fr; }
  /* la colonne visuelle suit la lecture au lieu de laisser un grand vide */
  .duo--large-gauche > .figure,
  .duo > .carte { position: sticky; top: 100px; }
}

.carte {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--r-m);
  padding: clamp(20px, 3vw, 28px);
}
.carte + .carte { margin-top: 16px; }

.figure {
  border-radius: var(--r-m);
  overflow: hidden;
  box-shadow: var(--ombre-s);
}
.figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* --- 9. Listes ------------------------------------------------------------ */

.motifs, .parcours {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  gap: 10px;
}
.motifs li, .parcours li {
  position: relative;
  padding-left: 30px;
}
.motifs li::before, .parcours li::before {
  content: "";
  position: absolute;
  left: 4px; top: .62em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.etapes {
  counter-reset: etape;
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  gap: 18px;
}
.etapes li {
  counter-increment: etape;
  position: relative;
  padding-left: 50px;
  min-height: 34px;
}
.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0; top: 0;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-clair);
  color: var(--accent-fonce);
  font-weight: 700;
  font-size: var(--t-s);
  font-family: var(--police-corps);
}

.faq { margin: 0; }
.faq dt {
  font-weight: 650;
  margin-top: 1.1em;
  color: var(--encre);
}
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: .2em 0 0; color: var(--encre-2); }

.pratique {
  margin: 0;
  display: grid;
  gap: 2px;
}
.pratique dt {
  font-size: var(--t-xs);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--encre-2);
  margin-top: 1em;
}
.pratique dt:first-child { margin-top: 0; }
.pratique dd { margin: 0; }

.coordonnees { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 8px; }

/* --- 10. Tableaux --------------------------------------------------------- */

.t, .h {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
}
.t td, .h td { padding: 11px 0; border-bottom: 1px solid var(--trait); vertical-align: baseline; }
.t tr:last-child td, .h tr:last-child td { border-bottom: 0; }
.t td:last-child {
  text-align: right;
  font-weight: 650;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.h td:first-child { color: var(--encre-2); width: 45%; }
.h td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.h tr[data-aujourdhui] td { color: var(--accent-fonce); font-weight: 650; }

.tableau-defilant { overflow-x: auto; }

/* --- 11. Mentions et reserves --------------------------------------------- */

.mention, .reserve, .urgence {
  font-size: var(--t-s);
  color: var(--encre-2);
  border-left: 3px solid var(--trait-fort);
  padding-left: 14px;
  margin-top: 1.2em;
}
.urgence { border-color: var(--alerte); color: var(--alerte); font-weight: 500; }

.tel-fort {
  font-family: var(--police-titres);
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 .2em;
}
.tel-fort a { text-decoration: none; color: var(--encre); }
.tel-fort a:hover { color: var(--accent-fonce); }
.adresse-forte { font-weight: 650; }

/* --- 12. Carte et acces --------------------------------------------------- */

.plan {
  border-radius: var(--r-m);
  overflow: hidden;
  border: 1px solid var(--trait);
  background: var(--accent-clair);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.plan a { font-weight: 600; }

/* --- 13. Formulaire ------------------------------------------------------- */

.form { display: grid; gap: 16px; max-width: 34rem; }
.champ { display: grid; gap: 6px; }
.champ label { font-size: var(--t-s); font-weight: 600; }
.champ input, .champ textarea {
  font: inherit;
  font-size: var(--t-s);
  padding: 12px 14px;
  border: 1px solid var(--trait-fort);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--encre);
  width: 100%;
}
.champ textarea { min-height: 130px; resize: vertical; }
.champ input:focus, .champ textarea:focus { border-color: var(--accent); }
.consentement {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--t-s);
  color: var(--encre-2);
}
.consentement input { margin-top: .25em; flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.pot-de-miel { position: absolute; left: -9999px; }
.form__retour { font-size: var(--t-s); }
.form__retour[data-etat="ok"] { color: var(--accent-fonce); }
.form__retour[data-etat="erreur"] { color: var(--alerte); }

/* --- 14. Pied de page ----------------------------------------------------- */

.pied {
  background: var(--surface);
  border-top: 1px solid var(--trait);
  padding-block: 40px 28px;
  font-size: var(--t-s);
  color: var(--encre-2);
}
.pied__grille {
  display: grid;
  gap: 24px;
  margin-bottom: 26px;
}
@media (min-width: 700px) { .pied__grille { grid-template-columns: repeat(3, 1fr); } }
.pied h2 {
  font-size: var(--t-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--encre-2);
  margin-bottom: .8em;
}
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pied a { color: var(--encre-2); }
.pied a:hover { color: var(--accent-fonce); }
.pied__legal {
  border-top: 1px solid var(--trait);
  padding-top: 20px;
  font-size: var(--t-xs);
  line-height: 1.6;
}

/* --- 15. Barre d'action mobile -------------------------------------------- */

.barre-mobile {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 1px;
  background: var(--trait);
  border-top: 1px solid var(--trait);
  padding-bottom: env(safe-area-inset-bottom);
}
.barre-mobile a {
  background: var(--surface);
  color: var(--encre);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 4px 8px;
  font-size: var(--t-xs);
  font-weight: 600;
  min-height: 58px;
}
.barre-mobile a:first-child { background: var(--accent); color: var(--accent-contraste); }
.barre-mobile svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body { padding-bottom: 66px; }

@media (min-width: 900px) {
  .barre-mobile { display: none; }
  body { padding-bottom: 0; }
}

/* --- 16. Impression ------------------------------------------------------- */

@media print {
  .entete, .barre-mobile, .accueil__actions, .form { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
  .section { padding-block: 16px; break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
