/* Institut Gersende — feuille de style unique
   Actor (titres) · DM Sans (texte) */

@font-face {
  font-family: 'Actor';
  src: url('polices/actor-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('polices/dmsans-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('polices/dmsans-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --encre: #16161a;
  --encre-doux: #5f5f6a;
  --ligne: #e7e2d9;
  --fond: #fdfcfa;
  --fond-doux: #f4f0ea;
  --accent: #a08963;
  --accent-clair: #c4b193;

  --largeur: 1240px;
  --gouttiere: clamp(20px, 5vw, 56px);
  --titre: 'Actor', Georgia, serif;
  --texte: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --entete-h: 78px;
  --courbe: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--entete-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--texte);
  font-size: 17px;
  line-height: 1.75;
  color: var(--encre);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--titre);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0 0 .55em;
}

h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); letter-spacing: -.005em; }

p { margin: 0 0 1.25em; }

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

.mesure { max-width: 62ch; }

/* ═══════════════════════════════════════════════════════ En-tête */

.site-entete {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--courbe);
}

/* Le flou est porté par un pseudo-élément, PAS par l'en-tête lui-même :
   backdrop-filter fait de l'élément un bloc conteneur pour ses descendants
   en position:fixed, ce qui enfermerait le menu plein écran dans la barre. */
.site-entete::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: color-mix(in srgb, var(--fond) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: background .3s var(--courbe);
  content: '';
}

/* la bordure n'apparaît qu'une fois la page défilée */
.site-entete.defilee { border-bottom-color: var(--ligne); }
.site-entete.defilee::before { background: color-mix(in srgb, var(--fond) 94%, transparent); }

.entete-rangee {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: var(--entete-h);
}

/* La nav occupe toute la rangee : liens centres, bouton pousse a droite.
   Rien n'est en position absolue, donc rien ne peut se superposer. */
.site-nav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 24px;
}

.site-nav .nav-liste { flex: 1; }
.site-nav .entete-action { flex-shrink: 0; }

.nav-liste {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  /* espacement fluide : avec huit entrées, un gap fixe déborde d'un cheveu
     sur certaines largeurs et fait passer le menu sur deux lignes */
  gap: 2px clamp(14px, 1.5vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-liste a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-size: .88rem;
  white-space: nowrap;
  text-decoration: none;
  color: var(--encre-doux);
  transition: color .25s var(--courbe);
}

/* soulignement qui se déploie depuis le centre */
.nav-liste a::after {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width .3s var(--courbe);
  content: '';
}

.nav-liste a:hover,
.nav-liste a:focus-visible { color: var(--encre); }
.nav-liste a:hover::after,
.nav-liste a:focus-visible::after { width: 100%; }

.nav-liste a[aria-current='page'] { color: var(--encre); }
.nav-liste a[aria-current='page']::after { width: 100%; }

.entete-action {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  font-size: .84rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--encre);
  border: 1px solid var(--encre);
  border-radius: 999px;
  white-space: nowrap;
  transition: color .25s var(--courbe), background .25s var(--courbe);
}

.entete-action:hover { color: var(--fond); background: var(--encre); }

/* Sans nom de marque, la barre serait vide en mobile : ce bouton la remplit
   et donne l'action principale. Il n'existe qu'en dessous du seuil du menu. */
.entete-action--mobile { display: none; }

/* ---- bouton menu (mobile) ---- */

.nav-bouton {
  /* relative obligatoire : les trois traits sont en absolute a l'interieur */
  position: relative;
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  padding: 0;
  background: none;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  cursor: pointer;
}

.nav-bouton span,
.nav-bouton span::before,
.nav-bouton span::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  margin-left: -9px;
  background: var(--encre);
  transition: transform .3s var(--courbe), opacity .2s linear;
  content: '';
}

.nav-bouton span { top: 50%; margin-top: -.75px; }
.nav-bouton span::before { left: 0; margin-left: 0; transform: translateY(-6px); }
.nav-bouton span::after  { left: 0; margin-left: 0; transform: translateY(6px); }

.nav-bouton[aria-expanded='true'] span { background: transparent; }
.nav-bouton[aria-expanded='true'] span::before { transform: rotate(45deg); }
.nav-bouton[aria-expanded='true'] span::after  { transform: rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-bouton { display: block; margin-left: 16px; }

  /* le bouton de la barre remplace celui du menu deroulant */
  .entete-action--mobile { display: inline-flex; margin-right: auto; }
  .site-nav .entete-action { display: none; }

  /* menu plein écran */
  .site-nav {
    position: fixed;
    inset: var(--entete-h) 0 0;
    z-index: 90;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 var(--gouttiere);
    overflow-y: auto;
    background: var(--fond);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .3s var(--courbe), transform .3s var(--courbe), visibility .3s;
  }

  .site-nav.ouvert { opacity: 1; visibility: visible; transform: none; }

  .nav-liste {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .nav-liste li { width: 100%; border-bottom: 1px solid var(--ligne); }
  .nav-liste li:first-child { border-top: 1px solid var(--ligne); }

  .nav-liste a {
    display: block;
    padding: 20px 0;
    font-family: var(--titre);
    font-size: clamp(1.3rem, 4.4vw, 1.8rem);
    color: var(--encre);
  }

  .nav-liste a::after { display: none; }
  .nav-liste a[aria-current='page'] { color: var(--accent); }


}

/* ═══════════════════════════════════════════════════════ Hero */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(460px, 78vh, 780px);
  margin-top: calc(var(--entete-h) * -1);
  padding-top: var(--entete-h);
  overflow: hidden;
  background: var(--encre);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: zoom-lent 16s var(--courbe) forwards;
}

@keyframes zoom-lent {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

/* dégradé pour que le texte blanc reste lisible sur toute image */
.hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
              rgba(12,12,14,.45) 0%,
              rgba(12,12,14,.15) 38%,
              rgba(12,12,14,.78) 100%);
  content: '';
}

.hero-texte {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(48px, 8vw, 92px);
  max-width: 900px;
  color: #fff;
}

.hero-surtitre {
  margin: 0 0 18px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-clair);
}

.hero h1 { color: #fff; margin-bottom: .35em; }

.hero .chapo {
  max-width: 56ch;
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255, 255, 255, .85);
}

/* hero court pour les pages sans grande image d'ambiance */
.hero--compact { min-height: clamp(380px, 56vh, 560px); }

/* ═══════════════════════════════════════════════════════ Bandeaux (accueil) */

.bandeau {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(430px, 64vh, 620px);
  overflow: hidden;
  background: var(--encre);
}

/* le premier bandeau passe sous l'en-tête translucide */
.bandeau:first-child {
  margin-top: calc(var(--entete-h) * -1);
  padding-top: var(--entete-h);
  min-height: clamp(500px, 76vh, 720px);
}

.bandeau-fond {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bandeau::after {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, .28);
  content: '';
}

.bandeau > .conteneur { position: relative; z-index: 2; }

.bandeau-carte {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* hauteur commune : sans elle, les cartes vont de 354 à 439 px selon la
     longueur du texte, et la colonne de bandeaux paraît bancale au défilement */
  min-height: 400px;
  max-width: 620px;
  margin-inline: auto;
  padding: clamp(36px, 5vw, 62px) clamp(28px, 4.5vw, 58px);
  text-align: center;
  background: var(--fond);
}

.bandeau-carte h1,
.bandeau-carte h2 { margin-bottom: .5em; }

/* le premier bandeau porte le H1 : un cran au-dessus des suivants */
.bandeau-carte h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); }

.bandeau-carte p {
  margin-bottom: 1.8em;
  color: var(--encre-doux);
}

.bandeau-carte .bouton { margin-inline: auto; }

/* ═══════════════════════════════════════════════════════ Sections */

.section { padding: clamp(72px, 11vw, 140px) 0; }
.section--doux { background: var(--fond-doux); }
.section--serre { padding: clamp(52px, 7vw, 84px) 0; }

.section-titre { max-width: 66ch; margin-bottom: 8px; }

.oeil {
  display: block;
  margin-bottom: 20px;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}

.chapo {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.65;
  color: var(--encre-doux);
}

/* ---- duo texte + image ---- */

.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.duo-image {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}

.duo-image img {
  width: 100%;
  transition: transform 1.1s var(--courbe);
}

.duo-image:hover img { transform: scale(1.035); }

/* ---- grille de cartes ---- */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 1px;
  margin-top: clamp(48px, 6vw, 72px);
  background: var(--ligne);
  border: 1px solid var(--ligne);
}

.carte {
  position: relative;
  padding: clamp(32px, 3.4vw, 46px);
  background: var(--fond);
  transition: background .35s var(--courbe);
}

.section--doux .carte { background: var(--fond-doux); }

.carte h3 { margin-bottom: .5em; }
.carte p { margin-bottom: 0; color: var(--encre-doux); font-size: .97rem; }

.carte-lien { display: block; text-decoration: none; }
.carte-lien:hover { background: var(--fond-doux); }
.section--doux .carte-lien:hover { background: var(--fond); }

.carte-num {
  display: block;
  margin-bottom: 22px;
  font-family: var(--titre);
  font-size: .95rem;
  color: var(--accent);
}

.suite {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--encre);
}

.suite::after {
  transition: transform .3s var(--courbe);
  content: '→';
}

.carte-lien:hover .suite::after { transform: translateX(5px); }

/* ---- listes ---- */

.liste-cochee { margin: 0 0 1.4em; padding-left: 0; list-style: none; }

.liste-cochee li {
  position: relative;
  margin-bottom: .85em;
  padding-left: 30px;
}

.liste-cochee li::before {
  position: absolute;
  left: 0;
  top: .72em;
  width: 14px;
  height: 1px;
  background: var(--accent);
  content: '';
}

/* ---- encadré ---- */

.encadre {
  margin: 36px 0;
  padding: clamp(26px, 3vw, 38px);
  background: var(--fond);
  border: 1px solid var(--ligne);
  border-left: 2px solid var(--accent);
}

.section--doux .encadre { background: var(--fond-doux); }
.encadre p:last-child { margin-bottom: 0; }

/* ---- partenaires ---- */

.partenaires {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  margin-top: 34px;
}

.partenaires img {
  max-height: 54px;
  width: auto;
  filter: grayscale(1);
  opacity: .55;
  transition: opacity .3s var(--courbe), filter .3s var(--courbe);
}

.partenaires img:hover { filter: none; opacity: 1; }

/* ═══════════════════════════════════════════════════════ Formulaire */

.form-bloc {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  margin-top: 52px;
}

@media (max-width: 860px) { .form-bloc { grid-template-columns: 1fr; } }

.champ { margin-bottom: 22px; }

.champ label {
  display: block;
  margin-bottom: 8px;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--encre-doux);
}

/* 16px minimum : en dessous, Safari iOS zoome au focus et ne dézoome jamais */
.champ input,
.champ textarea {
  width: 100%;
  padding: 14px 0;
  font-family: inherit;
  font-size: 16px;
  color: var(--encre);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ligne);
  border-radius: 0;
  transition: border-color .3s var(--courbe);
}

.champ input:hover,
.champ textarea:hover { border-bottom-color: var(--accent-clair); }

.champ input:focus,
.champ textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.champ textarea { min-height: 130px; resize: vertical; }

.bouton {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 500;
  color: var(--fond);
  background: var(--encre);
  border: 1px solid var(--encre);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: color .28s var(--courbe), background .28s var(--courbe);
}

.bouton:hover { color: var(--encre); background: transparent; }

.bouton--clair { color: var(--encre); background: transparent; }
.bouton--clair:hover { color: var(--fond); background: var(--encre); }

.coordonnees { margin: 0; }

.coordonnees dt {
  margin-top: 26px;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.coordonnees dt:first-child { margin-top: 0; }
.coordonnees dd { margin: 6px 0 0; font-size: 1.05rem; }
.coordonnees a { text-decoration: none; border-bottom: 1px solid var(--ligne); }
.coordonnees a:hover { border-bottom-color: var(--encre); }

.message {
  margin-bottom: 28px;
  padding: 20px 24px;
  border: 1px solid var(--ligne);
  border-left-width: 2px;
}

.message--ok    { border-left-color: #6f8f6f; background: #f2f6f2; }
.message--souci { border-left-color: #b06a6a; background: #fbf2f2; }

/* ═══════════════════════════════════════════════════════ Pied de page */

.site-pied {
  padding: clamp(64px, 8vw, 104px) 0 44px;
  background: var(--encre);
  color: #a8a8b2;
  font-size: .93rem;
}

.site-pied a {
  color: #e8e8ec;
  text-decoration: none;
  transition: color .25s var(--courbe);
}

.site-pied a:hover { color: #fff; }

.pied-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(34px, 4vw, 56px);
}

.pied-titre {
  margin: 0 0 18px;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-clair);
}

.pied-liste { margin: 0; padding: 0; list-style: none; }
.pied-liste li { margin-bottom: 11px; }

.pied-bas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  justify-content: space-between;
  margin-top: clamp(48px, 6vw, 76px);
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .84rem;
  color: #74747e;
}

/* ═══════════════════════════════════════════════════════ Apparition au défilement */

.apparait {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--courbe), transform .7s var(--courbe);
}

.apparait.vue { opacity: 1; transform: none; }

/* Sans JavaScript, rien ne doit rester invisible */
.no-js .apparait { opacity: 1; transform: none; }

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