:root {
  --cursor-horse: url('assets/cursor-horse-48.png');
  --ink: #101010;
  --ink-soft: #2d2a26;
  --ivory: #f7f2ec;
  --sand: #efe5d9;
  --gold: #b08a5a;
  --olive: #54624e;
  --stone: #d7c8b9;
  --paper: #ffffff;
      --shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  --radius: 0px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Navigation multi-pages fluide (Chrome/Edge) : seule la pastille nav-pill glisse d'une page
   à l'autre, le reste de la page change instantanément (pas de fondu global). Navigateurs sans
   support : navigation classique, sans effet, aucune régression. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

body {
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.65;
  cursor: var(--cursor-horse) 24 24, auto;
}
a {
  color: inherit;
  text-decoration: none;
  cursor: var(--cursor-horse) 24 24, pointer;
}

button,
input,
textarea,
select {
  cursor: var(--cursor-horse) 24 24, pointer;
}

html {
  scroll-behavior: smooth;
  cursor: var(--cursor-horse) 24 24, auto;
}

body {
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.wrap {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 242, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16, 16, 16, 0.06);
  box-shadow: 0 6px 18px rgba(16, 16, 16, 0.06);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 46px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
}

.nav a {
  position: relative;
  z-index: 1;
  opacity: 0.78;
  padding: 10px 18px;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav a:hover {
  opacity: 1;
}

.nav a.active {
  opacity: 1;
  color: var(--ivory);
}

/* Pastille de page active : positionnée en JS (app.js) pour ne jamais faire bouger les liens.
   Pas de transition ici : elle apparaît directement à la bonne position sur chaque page.
   Le glissement d'une page à l'autre est géré uniquement par la View Transitions API ci-dessus. */
.nav-pill {
  position: absolute;
  background: var(--ink);
  border-radius: var(--radius);
  z-index: 0;
  pointer-events: none;
  view-transition-name: nav-pill;
}

.nav-toggle {
  display: none;
}

.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;
}

.burger {
  display: inline-grid;
  gap: 5px;
}

.burger span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  display: block;
  border-radius: var(--radius);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius);
  position: relative;
  background: var(--ink);
  color: var(--ivory);
  font-weight: 600;
  border: 1px solid var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 10px 24px rgba(12, 10, 8, 0.18);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
}

.btn.small {
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.8px;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(176, 138, 90, 0.6);
}

.btn:hover::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
}
.btn.ghost {
  background: rgba(176, 138, 90, 0.16);
  color: var(--ink);
  box-shadow: none;
  border-color: rgba(176, 138, 90, 0.55);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-carousel {
  position: relative;
  z-index: 1;
  padding: 16px;
  background: var(--paper);
}

/* Petit sceau tête de cheval dans le coin du cadre, repris du logo */
.hero-carousel::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 64px;
  height: 64px;
  background: var(--paper) url("assets/horse-head-icon.png") center/58% no-repeat;
  border-radius: 50%;
  box-shadow: var(--shadow);
  pointer-events: none;
  z-index: 2;
}

.carousel {
  position: relative;
  width: 100%;
  height: calc(100vh - 73px - 32px);
  min-height: 480px;
  max-height: 960px;
  overflow: hidden;
  background: var(--ink);
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.carousel-slide.is-active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Photo trop basse résolution pour être recadrée en plein cadre : on l'affiche en
   entier, centrée sur fond blanc, plutôt que de la recadrer/agrandir. */
.carousel-slide--contain img {
  object-fit: contain;
  background: #ffffff;
}

/* Actualité avec plusieurs photos : petites galeries en fondu enchaîné automatique */
.carousel-slide--gallery img {
  position: absolute;
  inset: 0;
  animation: news-gallery-fade 10s ease-in-out infinite;
}

.carousel-slide--gallery img:nth-child(2) {
  animation-delay: 5s;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(16, 16, 16, 0.35);
  color: var(--ivory);
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.carousel-arrow:hover {
  background: rgba(16, 16, 16, 0.55);
  transform: translateY(-50%) scale(1.05);
}

.carousel-arrow.prev {
  left: 20px;
}

.carousel-arrow.next {
  right: 20px;
}

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.carousel-dot {
  width: 28px;
  height: 28px;
  padding: 10px;
  border: none;
  background: transparent;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 4px, transparent 4px);
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.2s ease, transform 0.2s ease;
}

.carousel-dot.is-active {
  background-image: radial-gradient(var(--gold) 4px, transparent 4px);
  transform: scale(1.15);
}

.hero {
  padding: 60px 0 90px;
  position: relative;
  z-index: 1;
}

.hero-ornament {
  position: absolute;
  inset: 12% 6% auto auto;
  width: min(420px, 46vw);
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 138, 90, 0.25), rgba(176, 138, 90, 0));
  filter: blur(2px);
  z-index: 0;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 64px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.9rem, 5vw, 4.6rem);
  line-height: 1.03;
  margin-bottom: 20px;
}

.lead {
  font-size: 1.05rem;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin: 28px 0 24px;
  flex-wrap: wrap;
}

.hero-alert {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 16, 16, 0.08);
}

/* Page News : liste complète, en grille qui s'adapte au nombre d'actualités */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.news-grid article {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 16, 16, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-grid article:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(12, 10, 8, 0.12);
}

.news-photo img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* Photo trop basse résolution pour être recadrée : affichée en entier sur fond blanc */
.news-photo--contain img {
  object-fit: contain;
  background: #ffffff;
}

/* Actualité avec plusieurs photos : petites galeries en fondu enchaîné automatique */
.news-photo--gallery {
  position: relative;
  height: 180px;
}

.news-photo--gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: news-gallery-fade 10s ease-in-out infinite;
}

.news-photo--gallery img:nth-child(2) {
  animation-delay: 5s;
}

@keyframes news-gallery-fade {
  0%, 45% { opacity: 1; }
  55%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

.news-body {
  padding: 22px;
}

.news-date {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 8px;
}

/* Diapositive d'actualité insérée dans le carrousel photo de l'accueil (news.js) */
.carousel-news {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  max-width: min(360px, calc(100% - 48px));
  background: var(--paper);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.carousel-news h3 {
  margin-bottom: 6px;
}

.carousel-news p:not(.news-date) {
  color: var(--ink-soft);
  font-size: 14px;
}

.hero-alert strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.hero-alert span {
  font-size: 14px;
  color: var(--ink-soft);
}

.hero-card {
  background: var(--paper);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(176, 138, 90, 0.2);
  margin-top: 18px;
}

.hero-card .card-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.hero-card a {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--gold);
}

.hero-alert,
.hero-card,
.panel,
.teacher-card,
.tarifs-card,
.news-grid article,
.contact-card {
  border-color: rgba(176, 138, 90, 0.45);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(176, 138, 90, 0.08);
}

.hero-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 320px 200px;
  gap: 14px;
}

.media-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 16, 16, 0.08);
  box-shadow: var(--shadow);
  background: var(--paper);
}

.media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-tile figcaption {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0), rgba(16, 16, 16, 0.7));
  color: var(--ivory);
  padding: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
}

.media-tile:hover {
  border-color: var(--gold);
  box-shadow: 0 18px 40px rgba(176, 138, 90, 0.28);
}

.media-tile.photo-slot:hover {
  background: linear-gradient(180deg, #f9efe4 0%, #eddcc7 100%);
  color: var(--ink);
}

.media-tile.tall {
  grid-row: span 2;
}

.photo-slot {
  border: 1px dashed rgba(176, 138, 90, 0.6);
  background: linear-gradient(180deg, #fbf7f2 0%, #efe0cf 100%);
  color: #6f4c2b;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 11px;
  text-align: center;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.photo-slot span {
  max-width: 90%;
  line-height: 1.5;
}

.media-tile.photo-slot {
  min-height: 180px;
}

/* Galerie de 3 photos par cheval (élevage) : grille régulière à hauteur de ligne fixe,
   chaque photo reste centrée dans sa cellule sans jamais être agrandie au-delà de sa
   taille native (pour éviter le flou) ni recadrée (pas de perte de contenu). */
.horse-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  align-items: center;
  justify-items: center;
  gap: 14px;
}

.horse-gallery img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 16, 16, 0.08);
}

.split {
  position: relative;
  padding: 110px 0;
  background: linear-gradient(120deg, #fbf7f2 0%, #efe2d4 100%);
  border-top: 1px solid rgba(16, 16, 16, 0.06);
  border-bottom: 1px solid rgba(16, 16, 16, 0.06);
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.split-text h3 {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

#historique .split-grid {
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 24px;
}

/* Ligne verticale élégante entre les deux paragraphes, qui s'allonge au survol */
.split-divider {
  width: 16px;
  align-self: stretch;
  position: relative;
}

.split-divider::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 65%;
  background: rgba(176, 138, 90, 0.4);
  transform: translate(-50%, -50%);
  transition: height 0.3s ease, background-color 0.3s ease;
}

.split-divider:hover::before {
  height: calc(100% - 8px);
  background-color: var(--gold);
}

.split-text h1,
.split-text h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 18px;
}

.split-panels {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 16, 16, 0.08);
}

.panel-photo {
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.panel-photo.single {
  grid-template-columns: 1fr;
}

.panel-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panel.accent {
  background: linear-gradient(135deg, #f2e2cf, #f9f2e8);
}

.services,
.teachers {
  padding: 110px 0;
}

.section-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 24px;
}

#contact h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 18px;
}

.section-head::after {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: rgba(176, 138, 90, 0.45);
  margin-top: 12px;
}

.installations-atelier {
  display: grid;
  gap: 26px;
}

.atelier-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.atelier-strip.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.atelier-strip.cols-2 .strip-photo {
  height: 380px;
}

#historique {
  padding-bottom: 60px;
}

.strip-photo {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 200px;
}

.strip-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Galerie photos des installations : groupes légendés (texte au-dessus des photos concernées),
   4 colonnes au total ; chaque groupe occupe 1, 2 ou 4 colonnes selon son nombre de photos. */
.feature-groups {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  margin-top: 12px;
}

.feature-group.span-2 {
  grid-column: span 2;
}

.feature-group.span-4 {
  grid-column: 1 / -1;
}

.feature-group__caption {
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
}

.feature-group__photos {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
}

.feature-group__photos.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.feature-group__photos.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.feature-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  box-shadow: var(--shadow);
}

.video-frame__title {
  margin-top: 56px;
  margin-bottom: 0;
  text-align: center;
}

/* Vidéo YouTube intégrée, format 16:9 responsive */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  overflow: hidden;
  margin-top: 40px;
  box-shadow: var(--shadow);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.teacher-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.teacher-card {
  overflow: hidden;
  background: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.teacher-card:hover {
  transform: translateY(-6px);
  border-color: rgba(176, 138, 90, 0.5);
  box-shadow: 0 22px 46px rgba(12, 10, 8, 0.18);
}

.teacher-card > .portrait {
  float: right;
  width: 320px;
  height: 220px;
  margin: 0 0 12px 40px;
  overflow: hidden;
  border-radius: var(--radius);
}

.teacher-card:nth-child(even) > .portrait {
  float: left;
  margin: 0 40px 12px 0;
}

.teacher-card > h3 {
  margin-bottom: 8px;
}

.teacher-card > p.eyebrow {
  margin-bottom: 8px;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pricing {
  padding: 110px 0;
  background: linear-gradient(180deg, #f6f0e7, #efe4d8);
}

.tarifs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tarifs-card {
  background: var(--paper);
  padding: 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 16, 16, 0.06);
}
.tarifs-card h3 {
  margin-bottom: 16px;
}

.tarifs-card.featured {
  border: 1px solid rgba(176, 138, 90, 0.6);
  background: linear-gradient(180deg, #ffffff 0%, #f9f2e8 100%);
  box-shadow: 0 22px 50px rgba(176, 138, 90, 0.22);
}
.tarif-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(16, 16, 16, 0.06);
  font-size: 14px;
}

.tarif-row span {
  flex: 1;
  min-width: 0;
}

.tarif-row strong {
  min-width: 150px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tarif-row:last-child {
  border-bottom: none;
}

.tarifs-notes {
  margin-top: 24px;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.news {
  padding: 110px 0;
}

.news-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.news-controls {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.news-note {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.news-tag {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(176, 138, 90, 0.45);
  color: #6f4c2b;
  background: rgba(176, 138, 90, 0.16);
  padding: 4px 8px;
  line-height: 1;
}

.news-tag.upcoming {
  border-color: rgba(84, 98, 78, 0.6);
  color: #54624e;
  background: rgba(84, 98, 78, 0.16);
}

/* Statut de vente d'un cheval d'élevage : badge bien visible plutôt qu'un simple eyebrow discret */
.status-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.status-tag.status-a-vendre {
  color: #54624e;
  background: rgba(84, 98, 78, 0.16);
  border: 1px solid rgba(84, 98, 78, 0.55);
}

.status-tag.status-reservee {
  color: #8a5a1f;
  background: rgba(176, 138, 90, 0.22);
  border: 1px solid rgba(176, 138, 90, 0.6);
}

.status-tag.status-vendu {
  color: #6b6b6b;
  background: rgba(16, 16, 16, 0.08);
  border: 1px solid rgba(16, 16, 16, 0.2);
}


.contact {
  padding: 120px 0 140px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.contact-info h2 {
  margin-bottom: 12px;
}

.contact-info p {
  margin-bottom: 6px;
}

.contact-info p:last-of-type {
  margin-bottom: 0;
}

.contact-card {
  background: var(--paper);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  border: 1px solid rgba(16, 16, 16, 0.06);
}

.contact-card input,
.contact-card textarea {
  width: 100%;
  border: 1px solid rgba(16, 16, 16, 0.15);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
}

.contact-social {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
}

.contact-social .social-icons {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.contact-social .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6f4c2b;
  padding: 2px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.contact-social .social-icon:hover {
  transform: translateY(-2px);
  color: #6f4c2b;
}

.contact-social .social-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.map-block {
  margin-top: 30px;
}

.map-frame {
  border: 1px solid rgba(16, 16, 16, 0.12);
  box-shadow: var(--shadow);
  background: var(--paper);
  overflow: hidden;
  border-radius: var(--radius);
}

.map-frame iframe {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

.legal {
  padding: 150px 0 100px;
}

.legal h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-bottom: 6px;
}

.legal .updated {
  font-size: 13px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 40px;
}

.error-cta {
  margin-top: 24px;
}

.legal h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin: 36px 0 14px;
}

.legal p,
.legal li {
  color: var(--ink-soft);
  max-width: 760px;
  margin-bottom: 12px;
}

.legal ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal a {
  color: var(--gold);
  text-decoration: underline;
}

.legal a.btn {
  color: var(--ivory);
  text-decoration: none;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--ink);
  color: var(--ivory);
  border-radius: var(--radius);
  border: 1px solid rgba(176, 138, 90, 0.4);
  box-shadow: var(--shadow);
  transform: translateY(160%);
  transition: transform 0.4s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner-text {
  flex: 1 1 320px;
  font-size: 14px;
  line-height: 1.6;
}

.cookie-banner-text a {
  color: var(--gold);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
}

.cookie-banner .btn {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(176, 138, 90, 0.4);
  background: var(--ink);
  color: var(--ivory);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--gold);
  color: var(--ink);
}

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid rgba(16, 16, 16, 0.06);
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Effet "cascade" : chaque bloc d'un même groupe apparaît un peu après le précédent */
.hero-media .media-tile:nth-child(1) { transition-delay: 0.05s; }
.hero-media .media-tile:nth-child(2) { transition-delay: 0.15s; }
.hero-media .media-tile:nth-child(3) { transition-delay: 0.25s; }

.split-panels .panel:nth-child(1) { transition-delay: 0s; }
.split-panels .panel:nth-child(2) { transition-delay: 0.1s; }
.split-panels .panel:nth-child(3) { transition-delay: 0.2s; }
.split-panels .panel:nth-child(4) { transition-delay: 0.3s; }
.split-panels .panel:nth-child(5) { transition-delay: 0.4s; }

.atelier-strip .strip-photo:nth-child(1) { transition-delay: 0s; }
.atelier-strip .strip-photo:nth-child(2) { transition-delay: 0.12s; }
.atelier-strip .strip-photo:nth-child(3) { transition-delay: 0.24s; }

/* Sections "zoom scroll-driven" : par défaut, une simple photo plein cadre statique */
/* (fallback sans JS, avec prefers-reduced-motion, et sur mobile) */
.scroll-zoom {
  position: relative;
  isolation: isolate;
}

.scroll-zoom__pin {
  position: relative;
  height: 70vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--ivory);
}

.scroll-zoom__media {
  position: absolute;
  inset: 0;
}

.scroll-zoom__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
}

.scroll-zoom__caption {
  position: relative;
  z-index: 2;
  margin: 0 0 48px;
  padding: 10px 22px;
  color: #fdfaf5;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  text-align: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

/* Etat "épinglé" : ajouté en JS uniquement si GSAP/ScrollTrigger tourne (desktop + mouvement autorisé) */
.scroll-zoom--pinned {
  height: 220vh;
}

.scroll-zoom--pinned .scroll-zoom__pin {
  position: sticky;
  top: 0;
  height: 100vh;
}

/* Utilisateurs qui demandent moins de mouvement : on coupe toutes les transitions/animations */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
  }

  .scroll-zoom__img {
    transition: none !important;
  }
}

/* Bandeau photo plein cadre avec léger zoom continu en CSS pur (pas d'épinglage au scroll) */
.photo-banner {
  position: relative;
  height: 82vh;
  min-height: 480px;
  max-height: 820px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.photo-banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: photo-banner-zoom 16s ease-in-out infinite alternate;
}

@keyframes photo-banner-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.22); }
}

.photo-banner__caption {
  position: relative;
  z-index: 2;
  margin: 0 0 48px;
  padding: 10px 22px;
  color: #fdfaf5;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  text-align: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
  animation: photo-banner-caption 7s ease-in-out infinite;
}

/* Le texte arrive de la gauche, reste 3s, repart à droite, puis attend 2s avant de revenir de la gauche */
@keyframes photo-banner-caption {
  0% { transform: translateX(-70vw); }
  14.3% { transform: translateX(0); }
  57.1% { transform: translateX(0); }
  71.4% { transform: translateX(70vw); }
  100% { transform: translateX(70vw); }
}

@media (prefers-reduced-motion: reduce) {
  .photo-banner__img,
  .photo-banner__caption {
    animation: none;
  }

  .news-photo--gallery img,
  .carousel-slide--gallery img {
    animation: none;
  }
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
@media (max-width: 900px) {
  .site-header .wrap {
    padding: 12px 0;
  }

  .logo-text {
    font-size: 16px;
  }
  .hero-ornament {
    opacity: 0.5;
    width: 260px;
    height: 260px;
  }
  .nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius);
    border: 1px solid rgba(16, 16, 16, 0.2);
    background: transparent;
    font-family: inherit;
  }

  .nav.open {
    position: absolute;
    top: 70px;
    right: 4vw;
    display: grid;
    background: var(--paper);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .nav.open a {
    padding: 8px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  /* Sans ce correctif, les 2 colonnes de texte de la page Histoire restaient
     cote a cote (tres etroites) au lieu de s'empiler sur mobile/tablette. */
  #historique .split-grid {
    grid-template-columns: 1fr;
  }

  #historique .split-divider {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(2.3rem, 7vw, 3.2rem);
  }

  .lead {
    font-size: 1rem;
  }

  .news-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .atelier-strip {
    grid-template-columns: 1fr 1fr;
  }

  .hero-media {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 180px;
  }

  .media-tile.tall {
    grid-row: span 1;
  }

  .feature-groups {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 600px) {
  .horse-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  .carousel {
    height: 42vh;
    min-height: 260px;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .hero {
    padding: 70px 0;
  }

  .split,
  .services,
  .news {
    padding: 64px 0;
  }

  .contact {
    padding: 64px 0 80px;
  }

  .legal {
    padding: 100px 0 64px;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    right: 14px;
    bottom: 14px;
    font-size: 16px;
  }

  .cookie-banner-actions .btn {
    width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .scroll-zoom__pin {
    height: 50vh;
  }

  .section-head h1,
  #contact h1,
  .split-text h1 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }

  .wrap {
    width: min(1200px, 90vw);
  }

  .map-frame iframe {
    height: 260px;
  }

  .site-footer .wrap {
    justify-content: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .hero-alert,
  .hero-card,
  .panel,
  .tarifs-card,
  .contact-card {
    padding: 18px;
  }

  .teacher-grid {
    gap: 36px;
  }

  .teacher-card > .portrait,
  .teacher-card:nth-child(even) > .portrait {
    float: none;
    width: 100%;
    height: 230px;
    margin: 0 0 16px;
  }

  .contact-social .social-logo {
    width: 36px;
    height: 36px;
  }

  .atelier-strip {
    grid-template-columns: 1fr;
  }

  .hero-media {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 180px 180px;
  }

  .feature-groups {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Avec une seule colonne explicite, "span 2" forcerait une colonne implicite
     supplémentaire (et donc décalerait aussi les groupes en span-4) : on l'annule ici. */
  .feature-group.span-2 {
    grid-column: auto;
  }

  .feature-group__photos {
    gap: 16px;
  }

  .feature-group__photos.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) and (max-height: 480px) and (orientation: landscape) {
  .carousel {
    height: 78vh;
    min-height: 200px;
    max-height: 320px;
  }

  .hero {
    padding: 40px 0;
  }
}

