/* ------------------------------------------------------------------
   O'Fobour Bois — feuille de style unique
   Passe graphique du 2 septembre 2026 : palette dérivée du logo,
   typographie Jost* pour les titres.

   Tout se pilote depuis le bloc :root ci-dessous.
   ------------------------------------------------------------------ */

/* ---------------------------- typographie --------------------------
   Jost* — géométrique libre (SIL OFL), très proche du logo, qui est
   dessiné dans le genre Century Gothic / Futura. Hébergé localement,
   pas de Google Fonts : aucune requête tierce, aucune adresse IP de
   visiteur transmise.

   Les fichiers sont dans ../fonts/, réduits au jeu français : 31 ko
   pour les deux. Détail de la fabrication dans fonts/LISEZ-MOI.md.

   font-display: swap + pile de repli : si les fichiers manquent, le
   site s'affiche en police système sans rien casser.

   Jost* © indestructible type*, SIL Open Font License 1.1.
   Texte de la licence : ../fonts/OFL.txt
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- fonds ---
     Papier très légèrement chaud : reprend la température du gris du
     logo sans concurrencer les tons de bois des photos. */
  --fond:        #f5f4f1;
  --fond-creux:  #e9e8e3;

  /* --- encres ---
     --encre-douce est exactement le gris du logo (#575656).
     --encre en est la version assombrie, pour les titres. */
  --encre:       #2b2a29;   /* 13.0:1 sur --fond */
  --encre-douce: #575656;   /*  6.7:1 sur --fond — AA pour le corps */
  --trait:       #d8d6d0;

  /* --- accent ---
     --accent est l'orange exact du logo (#F2910A). Contraste 2.2:1 :
     décoratif uniquement, jamais de texte dessus en clair.
     --accent-texte est la déclinaison foncée, 4.8:1, utilisable
     pour les liens. Ne pas l'éclaircir sans revérifier. */
  --accent:        #f2910a;
  --accent-texte:  #9c5c00;
  --accent-voile:  #f2910a26;   /* 15 % — filets et survols */

  /* --- typographie --- */
  --sys:    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --titres: "Jost", var(--sys);
  --texte:  1rem/1.65 var(--sys);
  --mesure: 62ch;                        /* longueur de ligne confortable */

  /* --- rythme --- */
  --marge:  clamp(1.25rem, 5vw, 4rem);
  --air:    clamp(1.75rem, 4.5vw, 3rem);
}

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

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

body {
  margin: 0;
  font: var(--texte);
  color: var(--encre);
  background: var(--fond);
  text-wrap: pretty;
}

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

h1, h2, h3 {
  font-family: var(--titres);
  font-weight: 500;
  letter-spacing: -0.005em;   /* Jost est déjà serré : moins de resserrage */
  line-height: 1.15;
  margin: 0 0 1rem;
}

/* Les titres de section sont traités en « surtitre » : petites
   capitales espacées, comme le « BOIS » du logo. Le contenu de la
   page porte le poids visuel, pas les intertitres. */
h2 {
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--encre-douce);
}

/* Le petit filet orange sous les titres de section : seul endroit où
   l'orange pur apparaît hors bouton d'appel. */
h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.7rem;
  background: var(--accent);
}

p { margin: 0 0 1.1em; }

a { color: inherit; }

/* Lien d'évitement : visible seulement au clavier */
.saut {
  position: absolute;
  left: -9999px;
}
.saut:focus {
  left: var(--marge);
  top: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--encre);
  color: var(--fond);
  text-decoration: none;
}

/* ---------------------------- structure ---------------------------- */

.entete,
main > section,
.pied {
  padding-inline: var(--marge);
  margin-inline: auto;
  max-width: 72rem;
}

/* ----------------------------- boutons -----------------------------
   Aplat orange + texte --encre (6.0:1). Jamais de blanc dessus. */

.bouton {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 1.3rem;
  border: 1.5px solid var(--encre);
  border-radius: 999px;
  font-family: var(--titres);
  font-weight: 500;
  color: var(--encre);
  text-decoration: none;
  transition: background-color 150ms ease;
}
.bouton:hover { background: var(--accent-voile); }

.bouton-plein {
  background: var(--accent);
  border-color: var(--accent);
}
.bouton-plein:hover { background: #f5a43a; }

/* ----------------------------- en-tête -----------------------------
   Logo en grand, titre, slogan, deux boutons. Pas d'image : les photos
   sont regroupées dans la section Atelier. */

.entete {
  padding-block: clamp(1.5rem, 4vw, 2.5rem) var(--air);
}

/* Logo à gauche, bouton de contact en haut à droite. */
.entete-haut {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  width: clamp(160px, 42vw, 400px);
  height: auto;
}

.accroche {
  font-family: var(--titres);
  font-weight: 500;
  margin: clamp(1.25rem, 4vw, 2.25rem) 0 0;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.1;
  color: var(--encre);
  text-wrap: balance;
}

/* --------------------------- intertitres ---------------------------- */

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--encre);
}

.intro {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--encre-douce);
}
.intro > :last-child { margin-bottom: 0; }

/* ---------------------- présentation + services --------------------- */

.presentation {
  padding-block: var(--air);
  border-top: 1px solid var(--trait);
}

.cartes {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1px;                         /* le filet entre cartes = le fond */
  background: var(--trait);
  border: 1px solid var(--trait);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.cartes li {
  background: var(--fond);
  padding: 1.5rem 1.4rem 1.6rem;
}
.note {
  margin: 1.25rem 0 0;
  font-size: 0.925rem;
  color: var(--encre-douce);
  padding-left: 0.9rem;
  border-left: 3px solid var(--accent);
}

.cartes p { margin: 0; color: var(--encre-douce); font-size: 0.975rem; }

/* ------------------------------ atelier ----------------------------- */

.atelier { padding-block: var(--air); }

.atelier-medias {
  display: grid;
  gap: clamp(0.6rem, 2vw, 1.1rem);
  margin-top: 2.5rem;
}
@media (min-width: 52rem) {
  .atelier-medias { grid-template-columns: 1.4fr 1fr; }
}

.atelier-medias figure { margin: 0; background: var(--fond-creux); position: relative; }
.atelier-medias img,
.atelier-medias video {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
@media (min-width: 52rem) {
  .atelier-video:not(.large) video { aspect-ratio: auto; min-height: 100%; }
  .atelier-video.large { grid-column: 1 / -1; }
}
.atelier-video.large video { aspect-ratio: 16 / 9; }

.atelier-video figcaption {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: #2b2a29cc;
  color: var(--fond);
  font-size: 0.8rem;
  border-radius: 999px;
}

/* ----------------------------- galerie ----------------------------- */

.atelier .grille { margin-top: clamp(0.6rem, 2vw, 1.1rem); }

/* Avec cinq photos : deux larges puis trois, sans trou en fin de grille.
   Ne s'applique qu'à partir de la tablette, et seulement s'il y en a
   exactement cinq ; sinon la grille automatique reprend la main. */
@media (min-width: 48rem) {
  .atelier .grille:has(> figure:nth-child(5):last-child) {
    grid-template-columns: repeat(6, 1fr);
  }
  .atelier .grille:has(> figure:nth-child(5):last-child) > figure { grid-column: span 2; }
  .atelier .grille:has(> figure:nth-child(5):last-child) > figure:nth-child(-n+2) { grid-column: span 3; }
}

.grille {
  display: grid;
  gap: clamp(0.6rem, 2vw, 1.1rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin-top: 2rem;
}

.grille figure {
  margin: 0;
  background: var(--fond-creux);
  overflow: hidden;
}

.grille img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 400ms ease;
}

/* Léger rapprochement au survol. Neutralisé par prefers-reduced-motion
   plus bas, et sans effet au doigt sur mobile. */
@media (hover: hover) {
  .grille figure:hover img { transform: scale(1.03); }
}

.vers-insta { margin-top: 2rem; }

.vers-insta a {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--accent);
  text-decoration: none;
  font-weight: 500;
  color: var(--encre);
}

.vers-insta a:hover { background: var(--accent-voile); }

/* ----------------------------- contact ----------------------------- */

.contact {
  padding-block: var(--air);
  border-top: 1px solid var(--trait);
}

.contact-tete { margin-top: 0.5rem; }

.contact address {
  font-style: normal;
  display: grid;
  gap: 0.65rem;
  justify-items: start;
}

/* overflow-wrap : garde-fou. Une adresse e-mail longue est un mot
   insécable et ferait déborder la page sur un écran de 320 px. */
.ligne {
  color: var(--encre-douce);
  overflow-wrap: anywhere;
}

.contact a.ligne {
  text-decoration: none;
  border-bottom: 1px solid var(--trait);
  padding-block: 6px;              /* zone tactile confortable */
  transition: border-color 150ms ease;
}

.contact a.ligne:hover { border-bottom-color: var(--accent); }

.tel,
.mail {
  font-family: var(--titres);
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  color: var(--encre);
  letter-spacing: 0;
}
.mail { font-size: clamp(1.1rem, 3.5vw, 1.35rem); }

.horaires { font-size: 0.925rem; }

/* L'équipe : portraits carrés, nom, citation. */
.titre-equipe {
  margin-top: clamp(2rem, 4.5vw, 2.75rem);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--encre-douce);
}

.equipe {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 1.5rem clamp(1.25rem, 3vw, 2.5rem);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .equipe { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .equipe { grid-template-columns: repeat(3, 1fr); } }

/* Portrait à gauche, nom et citation à droite : neuf personnes tiennent
   en trois rangées nettes, sans vignettes géantes. */
.equipe figure {
  margin: 0;
  display: grid;
  grid-template-columns: clamp(84px, 22vw, 108px) 1fr;
  gap: 1rem;
  align-items: center;
}

.equipe img,
.sans-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--fond-creux);
  border-radius: 50%;
}

.sans-photo {
  display: grid;
  place-items: center;
  font-family: var(--titres);
  font-size: 2rem;
  color: var(--encre-douce);
}

.equipe strong {
  display: block;
  font-family: var(--titres);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--encre);
}
.equipe q {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--encre-douce);
  quotes: "« " " »";
}
.equipe q::before,
.equipe q::after { color: var(--accent-texte); }

/* ------------------------------ pied ------------------------------- */

.pied {
  padding-block: 2rem 5.5rem;      /* laisse la place au bouton d'appel */
  font-size: 0.85rem;
  color: var(--encre-douce);
  border-top: 1px solid var(--trait);
}

/* --------------------- bouton d'appel (mobile) ---------------------
   Seul aplat d'orange de la page. Texte en --encre dessus : 6.0:1,
   conforme AA. Ne jamais y mettre du blanc (2.4:1). */

.appel-mobile {
  position: fixed;
  inset: auto 1rem 1rem auto;
  z-index: 5;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 1.4rem;
  background: var(--accent);
  color: var(--encre);
  text-decoration: none;
  font-family: var(--titres);
  font-weight: 500;
  border-radius: 999px;
  box-shadow: 0 2px 12px #2b2a2926;
}

@media (min-width: 48rem) {
  .appel-mobile { display: none; }   /* inutile sur ordinateur */
  .pied { padding-bottom: 2.5rem; }
}

/* ---------------------------- accessibilité ------------------------ */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .grille figure:hover img { transform: none; }
  .bouton { transition: none; }
}
