/* ==========================================================================
   Groupe Guitel — feuille de style
   Polices : celles de la charte graphique Herio
     - Hanken Grotesk : textes, interface, étiquettes
     - (Spectral, serif de la charte, n'est plus utilisée : tous les titres sont en Hanken Grotesk pour rester homogènes)
   Couleurs : noir, gris, blanc (pas de beige)
   ========================================================================== */

:root {
  --ink: #111111;
  --ink-soft: rgba(17, 17, 17, 0.72);
  --gray: #f1f1f1;
  --line: rgba(17, 17, 17, 0.14);

  --font-sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Spectral", Georgia, serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; max-width: 100%; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; display: flex; flex-direction: column; }
main > * { flex-shrink: 0; }

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--ink); }
img { max-width: 100%; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(48px, 7vw, 96px) 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 12px 20px; z-index: 999; }
.skip-link:focus { left: 20px; top: 20px; }
.hp { position: absolute; left: -9999px; }

/* ------------------------------------------------------------------ */
/* Onglets en haut de page (pas de barre) */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 100; }
.site-header .brand, .site-header .nav-toggle { display: none; }
.nav-row { display: flex; justify-content: flex-end; padding-top: 22px; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(18px, 3vw, 36px); }
.nav-links a {
  position: relative;
  padding: 6px 0;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.nav-links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Accueil : logo + photo de Benoit */
/* Le logo en haut, centré, sur fond noir ; la photo en dessous, pleine largeur */
.home-hero {
  display: flex; flex-direction: column;
  padding: 0;
  background: transparent;
}
.home-hero .copy {
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(34px, 3vw, 46px) 24px clamp(24px, 2.2vw, 32px);
}
.hero-logo { margin: 0; line-height: 0; }
.hero-logo img { width: clamp(150px, 11vw, 180px); height: auto; }
/* Hauteur de la photo calculée sur l'écran : le début du texte reste visible sous la photo, sans défiler */
.home-hero .photo { position: relative; overflow: hidden; height: clamp(300px, max(calc(100svh - 520px), 26vw), 700px); }
.home-hero .photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 41%;
  filter: grayscale(1) contrast(1.08);
}

/* Écrans d'ordinateur peu hauts (portables) : bandeau du logo plus compact pour laisser sa place à la photo */
@media (min-width: 861px) and (max-height: 780px) {
  .hero-logo img { width: 128px; }
  .home-hero .copy { padding: 22px 24px 16px; }
}
/* Accueil : texte de Benoit + photo de famille */
#parcours { padding: clamp(36px, 4vw, 56px) 0 clamp(48px, 6vw, 80px); }
.parcours-grid {
  display: grid;
  grid-template-columns: minmax(0, 4.2fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: stretch;
}
/* La photo suit exactement la hauteur du texte (même haut, même bas), avec un bloc gris décalé derrière */
.parcours-photo { position: relative; margin: 0 22px 22px 0; min-height: 320px; }
.parcours-photo::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px; background: #ebebeb; z-index: 0;
}
.parcours-photo img {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  object-fit: cover; object-position: center 25%;
  filter: grayscale(1);
}
.parcours-text p { font-size: 1.05rem; line-height: 1.75; color: #333333; margin-bottom: 1.1em; }
.parcours-text p:first-child { margin-top: 0; }
.parcours-text strong { font-weight: 600; color: var(--ink); }
.signature { display: block; width: clamp(220px, 26vw, 300px); height: auto; margin: 1.6em 0 0; }

/* ------------------------------------------------------------------ */
/* Nos activités : cartes photo avec logo blanc */
.page-head { padding: 120px 0 36px; }
.page-head h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); }
.activities-head { position: relative; overflow: hidden; padding: 112px 0 36px; }
.activities-head .container { position: relative; z-index: 1; }
.activities-head h1 {
  text-align: center; text-transform: uppercase; font-weight: 600;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem); letter-spacing: 0.26em; line-height: 1.2;
}
/* décoration 1 : trait noir court sous le titre */
.activities-head h1::after { content: ""; display: block; width: 64px; height: 3px; background: var(--ink); margin: clamp(16px, 2vw, 24px) auto 0; }
/* décoration 2 : arbre du logo, très pâle, à droite du titre */
.activities-head::after {
  content: ""; position: absolute; left: 50%; top: 40px; width: 420px; height: 190px; transform: translateX(-50%);
  background: url("../img/logos/groupe-guitel-logo.webp") no-repeat top center / 420px auto;
  opacity: 0.07; pointer-events: none;
}
.activity-section { padding-top: 0; padding-bottom: clamp(40px, 5vw, 72px); }
.activity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.4vw, 28px); }
.activity-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  min-height: clamp(420px, calc(100vh - 330px), 640px);
  padding: clamp(26px, 3vw, 44px);
  background: var(--ink); color: #ffffff; text-align: center; text-decoration: none;
  transition: transform 0.4s var(--ease);
}
.activity-card:hover { transform: translateY(-6px); }
.activity-card .card-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  transition: transform 0.6s var(--ease);
}
.activity-card:hover .card-photo { transform: scale(1.05); }
.activity-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(17, 17, 17, 0.68); transition: background 0.4s var(--ease);
}
.activity-card:hover::before { background: rgba(17, 17, 17, 0.76); }
.activity-card.gontel::before { background: rgba(17, 17, 17, 0.74); }
.activity-card.gontel:hover::before { background: rgba(17, 17, 17, 0.8); }
.activity-card .card-logo {
  position: relative; z-index: 2; width: 78%; max-height: 56%; object-fit: contain; margin: auto 0;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
}
.activity-card.gontel .card-logo { width: 74%; }
.activity-card.carno .card-logo { width: 80%; }
.activity-card p { position: relative; z-index: 2; margin: 0; color: #ffffff; font-size: 1rem; font-weight: 500; line-height: 1.4; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }
.activity-card.herio .card-photo { object-position: 50% 50%; }
.activity-card.carno .card-photo { object-position: 72% 50%; }
.activity-card.gontel .card-photo { object-position: 42% 50%; }

/* ------------------------------------------------------------------ */
/* Page de contact */
.contact-section {
  position: relative; overflow: hidden;
  padding: 110px 0 clamp(56px, 7vw, 96px);
  flex: 1 0 auto;
  background: #fafafa;
}
.contact-section .container { position: relative; z-index: 1; }
.contact-layout {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr);
  gap: clamp(32px, 7vw, 110px); align-items: start;
}
.contact-info .cl {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 12px;
}
.contact-info .cv { font-size: 1.02rem; color: #444444; margin: 0 0 32px; }
.cform .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cform .cf-field { margin-bottom: 22px; }
.cform label {
  display: block; margin-bottom: 8px;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: #666666;
}
.cform input, .cform textarea {
  width: 100%; padding: 14px; border: 1px solid #dcdcdc; border-radius: 0;
  background: var(--gray); font-family: var(--font-sans); font-size: 1rem; color: var(--ink);
}
.cform input:focus, .cform textarea:focus { outline: none; border-color: var(--ink); background: #ffffff; }
.cform textarea { min-height: 150px; resize: vertical; }
.cform .cf-submit {
  padding: 17px 30px; border: 1px solid var(--ink); background: var(--ink); color: #ffffff; cursor: pointer;
  font-family: var(--font-sans); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.cform .cf-submit:hover { background: transparent; color: var(--ink); }
.btn {
  display: inline-block; padding: 14px 28px; border: 1px solid var(--ink);
  font-weight: 600; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
.btn:hover { background: var(--ink); color: #ffffff; }

/* ------------------------------------------------------------------ */
/* Pied de page */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.75); padding: 36px 0 18px; }
.footer-main { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-logo { height: 64px; width: auto; }
.footer-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.footer-links a {
  display: inline-flex; align-items: center; color: #ffffff; text-decoration: none;
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.footer-links a:hover { opacity: 0.7; }
.footer-links svg { width: 22px; height: 22px; fill: currentColor; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8rem; color: rgba(255, 255, 255, 0.55);
}
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-bottom a { color: rgba(255, 255, 255, 0.55); }
.footer-bottom a:hover { color: #ffffff; }

/* ------------------------------------------------------------------ */
/* Apparition douce au défilement */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ------------------------------------------------------------------ */
/* Téléphone */
@media (max-width: 860px) {
  body { font-size: 15px; line-height: 1.55; }

  .nav-row { justify-content: flex-start; padding-top: 18px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.78rem; }
  body.home .nav-links a { color: #ffffff; }
  body.home .nav-links a.is-active::after { background: #ffffff; }

  .home-hero .photo { height: min(70vw, calc(100svh - 420px)); min-height: 220px; }
  .home-hero .copy { padding: 52px 20px 30px; }
  .hero-logo img { width: 112px; }
  .home-hero .copy { padding-bottom: 22px; }

  #parcours { padding: 32px 0 28px; }
  .parcours-grid { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .parcours-photo { max-width: 190px; min-height: 0; aspect-ratio: 3 / 4; }
  .parcours-text p { font-size: 0.88rem; line-height: 1.6; margin-bottom: 0.8em; }
  .signature { width: 150px; margin-top: 1em; }

  .page-head { padding: 76px 0 12px; }
  .page-head h1 { font-size: 2.3rem; }
  .activities-head { padding: 84px 0 22px; }
  .activities-head h1 { font-size: 1.2rem; letter-spacing: 0.22em; }
  .activities-head h1::after { width: 48px; height: 3px; margin-top: 12px; }
  .activities-head::after { width: 300px; height: 140px; background-size: 300px auto; top: 36px; }
  .activity-grid { grid-template-columns: 1fr; gap: 12px; }
  .activity-card { min-height: 230px; padding: 18px; }
  .activity-card .card-logo { width: 62%; max-height: 56%; }
  .activity-card.gontel .card-logo { width: 58%; }
  .activity-card.carno .card-logo { width: 64%; }

  .contact-section { padding-top: 76px; padding-bottom: 28px; min-height: 0; }
  .contact-layout { grid-template-columns: 1fr; gap: 18px; }
  .contact-info .cv { margin-bottom: 8px; font-size: 0.9rem; }
  .cform .cf-row { grid-template-columns: 1fr; gap: 0; }
  .cform .cf-field { margin-bottom: 12px; }
  .cform input, .cform textarea { padding: 10px 12px; font-size: 0.92rem; }
  .cform textarea { min-height: 96px; }
  .cform label { font-size: 0.7rem; margin-bottom: 5px; }
  .cform .cf-submit { padding: 13px 22px; }

  .site-footer { padding: 24px 0 12px; }
  .footer-logo { height: 48px; }
  .footer-links { gap: 20px; }
  .footer-links a { font-size: 0.8rem; }
  .footer-bottom { margin-top: 16px; padding-top: 12px; font-size: 0.72rem; }
}

/* ==========================================================================
   VERSION DORÉE — détails or ajoutés à la version noir / gris / blanc
   Réglages : --gold (or de base), --gold-deep (or foncé), --gold-pale (or clair)
   --gold-line = dégradé utilisé pour tous les traits et filets
   ========================================================================== */
:root {
  --gold: #d4af37;
  --gold-deep: #a8862a;
  --gold-pale: #ead9ae;
  --gold-line: linear-gradient(90deg, #b8932a 0%, #f0dc8c 48%, #d4af37 100%);
  --gold-block: linear-gradient(145deg, #f0e2bd 0%, #d8bd80 55%, #c19c55 100%);
}
::selection { background: var(--gold-pale); color: var(--ink); }

/* menu : soulignement or sous l'onglet actif */
.nav-links a.is-active::after { background: var(--gold); height: 2px; }
body.home .nav-links a.is-active::after { background: var(--gold); }

/* accueil : pas de cadre derrière la photo de famille, liens du texte soulignés en gris */
.parcours-photo { margin: 0; }
.parcours-photo::before { display: none; }
.parcours-text a { text-decoration: underline; text-decoration-color: #9a9a9a; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.parcours-text a:hover { text-decoration-color: var(--ink); }

/* onglets : toujours blancs sur le bandeau noir du haut de l'accueil */
body.home .nav-links a { color: #ffffff; }

/* titres : trait or dégradé (nos activités garde son trait centré) */
.activities-head h1::after { background: var(--gold); height: 3px; }
.page-head:not(.activities-head) h1::after { content: ""; display: block; width: 56px; height: 3px; background: var(--gold); margin-top: 18px; }

/* contact : trait or sous « Adresse », contour or dans les champs actifs */
.contact-info .cl::after { content: ""; display: block; width: 32px; height: 2px; background: var(--gold); margin-top: 8px; }
.cform input:focus, .cform textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25); }

/* pied de page : filet or dégradé en haut, survols or clair */
.site-footer { position: relative; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold-line); }
.footer-links a:hover, .footer-bottom a:hover { color: var(--gold-pale); opacity: 1; }
.footer-bottom { border-top-color: rgba(212, 175, 55, 0.3); }

/* ==========================================================================
   TEST « fond gris-beige » (page nos-activites-v2.html) : photo en haut,
   logo en couleur (Herio terracotta, Gontel bleu, Carno vert sauge) sur fond gris-beige
   ========================================================================== */
.activity-grid.v2 .activity-card { background: #e7e2d9; color: var(--ink); justify-content: flex-start; padding: 0; }
.activity-grid.v2 .activity-card::before { display: none; }
.activity-grid.v2 .card-photo { position: relative; inset: auto; flex: 0 0 56%; height: 56%; }
.activity-grid.v2 .card-logo { filter: none; margin: auto 0; padding: 0; width: 62%; max-height: 30%; }
.activity-grid.v2 .activity-card.gontel .card-logo { width: 56%; }
.activity-grid.v2 .activity-card.carno .card-logo { width: 62%; }
.activity-grid.v2 .activity-card p { color: #4a4640; text-shadow: none; margin: 0 22px 26px; font-weight: 500; }
@media (max-width: 860px) {
  .activity-grid.v2 .activity-card { min-height: 360px; }
  .activity-grid.v2 .card-logo { width: 50%; }
  .activity-grid.v2 .activity-card.gontel .card-logo { width: 46%; }
}

/* Version test : texte d'explication révélé en couleur au survol (page nos-activites-survol.html) */
.activity-grid.reveal-text .activity-card p {
  align-self: stretch; padding: 15px 18px; background: #f1eee7; color: var(--tx, #2b2b29);
  text-shadow: none; font-weight: 500;
  opacity: 0; transform: translateY(14px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.activity-grid.reveal-text .activity-card:hover p,
.activity-grid.reveal-text .activity-card:focus-visible p { opacity: 1; transform: translateY(0); }
.activity-grid.reveal-text .activity-card.herio { --tx: #9c4a30; }
.activity-grid.reveal-text .activity-card.gontel { --tx: #1b2a5a; }
.activity-grid.reveal-text .activity-card.carno { --tx: #5f7350; }
@media (hover: none) { .activity-grid.reveal-text .activity-card p { opacity: 1; transform: none; } }

/* Variante : texte coloré directement sur la photo, sans bandeau (page nos-activites-survol-sans-fond.html) */
.activity-grid.reveal-text.bare .activity-card p {
  background: none; padding: 0 4px 6px; font-weight: 600; font-size: 1.06rem;
  color: var(--tb); text-shadow: 0 1px 10px rgba(0,0,0,.55);
}
.activity-grid.reveal-text.bare .activity-card.herio { --tb: #f0976f; }
.activity-grid.reveal-text.bare .activity-card.gontel { --tb: #a9bff2; }
.activity-grid.reveal-text.bare .activity-card.carno { --tb: #bdd3a6; }

/* Variante sans fond : texte blanc au repos, il prend sa couleur uniquement au survol de la carte */
.activity-grid.reveal-text.bare .activity-card p {
  opacity: 1; transform: none; color: #ffffff;
  transition: color .45s var(--ease);
}
.activity-grid.reveal-text.bare .activity-card:hover p,
.activity-grid.reveal-text.bare .activity-card:focus-visible p { color: var(--tb); opacity: 1; transform: none; }

/* Téléphone : accueil (texte plus petit, photo sous le texte) et activités (texte plus petit) */
@media (max-width: 860px) {
  .parcours-photo { order: 2; max-width: 210px; }
  .parcours-text p { font-size: 0.8rem; line-height: 1.55; margin-bottom: 0.75em; }
  .activity-card p,
  .activity-grid.reveal-text.bare .activity-card p { font-size: 0.8rem; line-height: 1.35; }
}

/* Téléphone : onglets repliés dans un bouton carré à deux traits (en haut à droite) ; photo de l'accueil centrée */
@media (max-width: 860px) {
  .parcours-photo { margin: 0 auto; width: min(210px, 100%); }
  .nav-row { position: relative; justify-content: flex-end; padding: 16px 16px 0; }
  .site-header .nav-toggle {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    width: 40px; height: 40px; padding: 0; cursor: pointer;
    background: transparent; border: 0; color: var(--ink);
  }
  .site-header .nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; }
  .site-header .nav-toggle span:nth-child(3) { display: none; }
  body.home .site-header .nav-toggle { color: #ffffff; }
  .nav-row nav { position: absolute; right: 16px; top: 64px; z-index: 110; }
  .nav-links { display: none; }
  html.nav-open .nav-links {
    display: flex; flex-direction: column; gap: 4px; min-width: 190px; padding: 12px 18px;
    background: #ffffff; border: 1px solid var(--ink);
  }
  .nav-links a, body.home .nav-links a { color: var(--ink); font-size: 0.8rem; padding: 8px 0; }
  .nav-links a.is-active::after, body.home .nav-links a.is-active::after { background: var(--gold); bottom: 4px; }
}

/* Nos activités : fin soulignement de la couleur de la marque sous la description, au survol */
.activity-card.herio  { --card-line: #bc5a3c; }
.activity-card.gontel { --card-line: #5575d4; }
.activity-card.carno  { --card-line: #9cAF88; }
.activity-card p::after {
  content: ""; display: block; height: 2px; width: 0; margin: 10px auto 0;
  background: var(--card-line, #ffffff); transition: width 0.45s var(--ease);
}
.activity-card:hover p::after,
.activity-card:focus-visible p::after { width: 44px; }
/* Page contact : arbre du logo en filigrane derrière le formulaire (sa pointe dépasse au-dessus de la case « Votre message ») */
.contact-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("../img/logos/groupe-guitel-arbre-filigrane.png") no-repeat right 10% top 19.75rem / min(450px, 60%) auto;
  opacity: 0.09;
}
@media (max-width: 860px) {
  .contact-section::before { background-position: center bottom 16px; background-size: min(300px, 80%) auto; opacity: 0.09; }
}
/* champs du formulaire légèrement translucides : le filigrane se devine à travers */
.contact-section .cform input, .contact-section .cform textarea { background: rgba(244, 244, 244, 0.62); }
.contact-section .cform input:focus, .contact-section .cform textarea:focus { background: #ffffff; }

/* Page contact : logo (version sombre) au-dessus de l'adresse */
.contact-logo { display: block; width: clamp(150px, 15vw, 200px); height: auto; margin: 0 0 clamp(26px, 3vw, 40px); }
@media (max-width: 860px) { .contact-logo { width: 130px; margin-bottom: 20px; } }

/* Accueil : la photo de Benoit et ses enfants est toujours affichée en entier (jamais recadrée) */
.parcours-grid { align-items: start; }
.parcours-photo { min-height: 0; aspect-ratio: auto; }
.parcours-photo img { position: static; display: block; width: 100%; height: auto; object-fit: contain; }

/* Téléphone et tablette : photo de Benoit seul zoomée, avec la tête proche du bandeau
   (le haut de sa tête est placé à environ 10 % de la hauteur de la photo) */
@media (max-width: 860px) {
  .home-hero .photo img { transform: scale(1.18); transform-origin: 50% 38%; }
  @supports (width: 1cqw) {
    .home-hero .photo { container-type: size; }
    .home-hero .photo img {
      inset: 0 auto auto 0; height: auto; object-fit: fill;
      transform: translateY(calc(10cqh - 0.257 * 1.65 * 100cqw / 1.79)) scale(1.65);
      transform-origin: 50% 0;
    }
  }
}

/* ================================================================== */
/* Adaptation automatique aux tailles d'écran                          */
/* Téléphone < 600 px | tablette 600-860 px | ordinateur > 860 px      */
/* + téléphone en paysage + très grands écrans                         */
/* ================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Tablette (portrait) : texte plus lisible, texte à gauche et photo à droite, trois cartes d'activités côte à côte */
@media (min-width: 600px) and (max-width: 860px) {
  .parcours-grid { grid-template-columns: minmax(0, 1fr) 230px; gap: 32px; align-items: start; }
  .parcours-photo { order: 2; margin: 0; width: 230px; max-width: none; }
  .parcours-text p { font-size: 0.98rem; line-height: 1.65; }
  .activity-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .activity-card { min-height: clamp(300px, 52svh, 440px); padding: 16px; }
  .activity-card .card-logo { width: 80%; max-height: 50%; }
  .activity-card.gontel .card-logo { width: 76%; }
  .activity-card.carno .card-logo { width: 82%; }
  .activity-card p,
  .activity-grid.reveal-text.bare .activity-card p { font-size: 0.82rem; }
}

/* Téléphone tenu en paysage (écran large mais très peu haut) */
@media (max-width: 900px) and (max-height: 500px) {
  .home-hero .copy { padding: 14px 20px 10px; }
  .hero-logo img { width: 84px; }
  .home-hero .photo { height: max(200px, calc(100svh - 110px)); min-height: 200px; }
  .activities-head { padding-top: 60px; padding-bottom: 12px; }
  .contact-section { padding-top: 64px; }
}

/* Grands écrans : tout grandit proportionnellement au lieu de rester petit au milieu de la page */
@media (min-width: 1700px) {
  html { font-size: 112.5%; }
  :root { --container: 1320px; }
  .home-hero .photo { height: clamp(300px, max(calc(100svh - 560px), 26vw), 780px); }
}
@media (min-width: 2200px) {
  html { font-size: 125%; }
  :root { --container: 1500px; }
  .home-hero .photo { height: clamp(300px, max(calc(100svh - 620px), 26vw), 860px); }
}

/* Fenêtres hautes (écran de bureau, double écran, demi-écran) : photo de Benoit zoomée, la tête proche du bandeau noir
   (le haut de sa tête est placé à environ 10 % de la hauteur de la photo, quelle que soit la taille de la fenêtre) */
@media (min-width: 861px) and (min-height: 861px) {
  .home-hero .photo img { object-position: 50% 48%; transform: scale(1.35); transform-origin: 50% 0; }
  @supports (width: 1cqw) {
    .home-hero .photo { container-type: size; }
    .home-hero .photo img {
      inset: 0 auto auto 0; height: auto; object-fit: fill; /* l'image garde ses proportions : sa hauteur = largeur / 1,79 */
      transform: translateY(calc(10cqh - 0.257 * 1.35 * 100cqw / 1.79)) scale(1.35);
    }
  }
}