/* ============================================================
   Cheval 3F — accueil, page « Les 3F » et blocs repris par le guide.
   Photographie d'abord : une grande image d'ouverture, puis trois
   photos pour Forage, Friends, Freedom.
   ============================================================ */

/* --- En-tête transparent sur l'accueil, blanc dès qu'on défile --- */
body.accueil .site-header { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; transition: background-color .25s ease; }
body.accueil .site-header:not(.is-scrolled) .brand,
body.accueil .site-header:not(.is-scrolled) .brand span,
body.accueil .site-header:not(.is-scrolled) .site-nav a:not(.btn),
body.accueil .site-header:not(.is-scrolled) .nav-toggle { color: #fff; }
body.accueil .site-header:not(.is-scrolled) .site-nav .btn-primary { background: #fff; color: var(--c-ink); }
body.accueil .site-header.is-scrolled { background: rgba(255, 255, 255, 0.96); border-bottom-color: var(--c-line); }
@media (max-width: 860px) {
  body.accueil .site-header:not(.is-scrolled) .site-nav a:not(.btn) { color: var(--c-ink); }
}

/* --- Ouverture plein écran --- */
.hero { position: relative; min-height: min(94vh, 860px); display: flex; align-items: flex-end; color: #fff; background: #3a2d22; overflow: hidden; }
.hero-photo, .hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo img { object-fit: cover; object-position: 50% 55%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(12, 18, 14, 0.82) 0%, rgba(12, 18, 14, 0.35) 42%, rgba(12, 18, 14, 0) 70%),
    linear-gradient(to bottom, rgba(12, 18, 14, 0.45) 0%, rgba(12, 18, 14, 0) 22%);
}
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-top: 140px; padding-bottom: 64px; }
.hero h1 { color: #fff; max-width: 15ch; margin-bottom: 0.35em; }
.hero .lede { color: rgba(255, 255, 255, 0.92); margin-bottom: 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-primary { background: #fff; color: var(--c-ink); }
.hero .btn-primary:hover { background: #e9efe9; }
.hero .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.85); }
.hero .btn-secondary:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.hero-note { margin: 18px 0 0; font-size: 0.92rem; color: rgba(255, 255, 255, 0.82); }
.hero-credit { position: absolute; right: 16px; bottom: 10px; z-index: 1; margin: 0; font-size: 0.72rem; color: rgba(255, 255, 255, 0.6); }

/* Page « Les 3F » : en-tête sans photo. */
.hero-simple { padding: 72px 0 40px; }
.hero-simple h1 { max-width: 16ch; }

/* --- Les trois F : trois photos --- */
.panneaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: var(--content-width); margin: 0 auto; padding: 72px 24px 8px; }
.panneau {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 460px; padding: 28px; border-radius: var(--radius-l); overflow: hidden;
  color: #fff; text-decoration: none; background-size: cover; background-position: center;
  isolation: isolate;
}
.panneau::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(12, 18, 14, 0.86) 0%, rgba(12, 18, 14, 0.4) 48%, rgba(12, 18, 14, 0.05) 100%);
}
.panneau-forage { background-image: url("../assets/photos/forage.webp"); background-position: 55% 40%; }
.panneau-friends { background-image: url("../assets/photos/friends.webp"); }
.panneau-freedom { background-image: url("../assets/photos/freedom.webp"); }
.panneau h2 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.8rem); margin: 0 0 10px; display: flex; align-items: center; gap: 12px; }
.panneau h2::before { content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--f-forage); }
.panneau-friends h2::before { background: #8fd0a9; }
.panneau-freedom h2::before { background: #8db8e8; }
.panneau p { margin: 0; color: rgba(255, 255, 255, 0.92); max-width: 32ch; }
.panneau-lien { margin-top: 18px; font-weight: 600; color: #fff; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
@media (max-width: 860px) {
  .panneaux { grid-template-columns: 1fr; padding-top: 48px; }
  .panneau { min-height: 340px; }
}

/* --- Déroulé --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.step-card { padding: 28px; border-radius: var(--radius-m); background: var(--c-bg-alt); }
.step-number { display: block; font-weight: 500; font-size: 3rem; line-height: 1; letter-spacing: -0.04em; margin-bottom: 18px; color: var(--c-moss); }
.step-card h3 { margin-bottom: 0.5em; }
.step-card p { color: var(--c-ink-soft); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* --- Citation --- */
.section-alt { background: var(--c-bg-alt); }
.observation { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.observation-quote { font-weight: 500; letter-spacing: -0.035em; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; margin: 0; }
@media (max-width: 860px) { .observation { grid-template-columns: 1fr; gap: 24px; } }

/* --- Catégories --- */
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.category-card { padding: 24px; border-radius: var(--radius-m); background: var(--c-bg-alt); }
.category-card h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.category-card h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; background: #c5ccc8; }
.category-card[data-f="forage"] h3::before { background: var(--f-forage); }
.category-card[data-f="friends"] h3::before { background: var(--f-friends); }
.category-card[data-f="freedom"] h3::before { background: var(--f-freedom); }
.category-card p { margin: 0; color: var(--c-ink-soft); font-size: 0.97rem; }
.categories-legende { margin: 16px 0 0; font-size: 0.92rem; color: var(--c-ink-soft); }
@media (max-width: 960px) { .categories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .categories-grid { grid-template-columns: 1fr; } }

/* --- Deux colonnes de principe --- */
.discover { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.discover-col { padding: 36px 36px 20px; border-radius: var(--radius-l); background: #fff; }
.discover-col h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
@media (max-width: 860px) { .discover { grid-template-columns: 1fr; } }

/* --- Avis professionnel --- */
.reassurance { background: var(--c-moss-pale); border-radius: var(--radius-l); max-width: 820px; padding: 36px 36px 20px; }
.reassurance > .eyebrow { display: block; margin: 0 0 8px; color: var(--c-moss) !important; }
.reassurance h2 { margin: 0 0 18px; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.reassurance ul { list-style: none; margin: 0; padding: 0; }
.reassurance li { padding: 12px 0 12px 24px; border-top: 1px solid rgba(47, 93, 70, 0.18); position: relative; }
.reassurance li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 8px; height: 8px; border-radius: 50%; background: var(--c-moss); }

/* --- Appel final --- */
.final-cta { padding-top: 24px; }
.final-cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; background: var(--c-moss); color: #fff; border-radius: var(--radius-l); padding: 56px 48px; max-width: calc(var(--content-width) - 48px); }
.final-cta h2 { margin: 0; color: #fff; max-width: 18ch; }
.final-cta .lede { margin: 12px 0 0; color: rgba(255, 255, 255, 0.85); }
.final-cta .btn-primary { background: #fff; color: var(--c-ink); }
.final-cta .btn-primary:hover { background: #e9efe9; }
@media (max-width: 640px) { .final-cta .wrap { padding: 36px 24px; } }

/* --- Questions fréquentes : liens vers les conseils --- */
.questions-liste { list-style: none; margin: 28px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.questions-liste li { display: flex; }
.questions-liste a { flex: 1; display: block; padding: 18px 20px; border-radius: var(--radius-m); background: var(--c-bg-alt); color: var(--c-ink); font-weight: 600; text-decoration: none; line-height: 1.35; }
.questions-liste a:hover { background: var(--c-moss-pale); }
@media (max-width: 860px) { .questions-liste { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .questions-liste { grid-template-columns: 1fr; } }

/* --- Page fiche d'urgence --- */
.fiche-page { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.fiche-liste { margin: 20px 0 28px; }
.fiche-apercu { width: 100%; height: auto; border: 1px solid var(--c-line); border-radius: 6px; }
@media (max-width: 860px) { .fiche-page { grid-template-columns: 1fr; } }

/* --- Héros animé : vidéo du troupeau en fond, texte qui monte doucement --- */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-video.is-playing { opacity: 1; }
.hero .lede, .hero-actions, .hero-note { animation: monte .9s cubic-bezier(.2,.7,.2,1) both; }
.hero .lede { animation-delay: .15s; } .hero-actions { animation-delay: .3s; } .hero-note { animation-delay: .45s; }
@keyframes monte { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-defiler { position: absolute; left: 50%; bottom: 22px; z-index: 2; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255,255,255,.7); border-radius: 14px; }
.hero-defiler span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: defile 1.8s ease-in-out infinite; }
@keyframes defile { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .hero .lede, .hero-actions, .hero-note, .hero-defiler span { animation: none; } }
@media (max-width: 700px) { .hero-defiler { display: none; } }

/* --- Animations sobres (js/animations.js) : tout reste lisible sans JS --- */
.mots .mot { display: inline-block; opacity: 0; filter: blur(7px); transform: translateY(0.45em); }
.mots.joue .mot { animation: mot-monte .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes mot-monte { from { opacity: 0; filter: blur(7px); transform: translateY(0.45em); } to { opacity: 1; filter: blur(0); transform: none; } }

.chiffres { background: #f4f5f2; padding: 44px 24px; }
.chiffres-liste { list-style: none; margin: 0 auto; padding: 0; max-width: var(--content-width); display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.chiffre { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; letter-spacing: -0.04em; color: #2f5d46; font-variant-numeric: tabular-nums; }
.chiffre-legende { display: block; margin-top: 10px; font-size: 0.9rem; color: var(--c-ink-soft); }
@media (max-width: 700px) { .chiffres { padding: 32px 20px; } .chiffres-liste { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; } }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .panneau.inclinable { transition: transform .25s ease-out; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); will-change: transform; }
  .panneau.inclinable::after { content: ""; position: absolute; inset: 0; z-index: -2; background: inherit; transition: transform .5s ease-out; }
  .panneau.inclinable.survol::after { transform: scale(1.05); }
}

/* Vidéo du héros qui devient une carte au défilement */
.hero.carte-active { background: var(--c-bg); }
.hero.carte-active .hero-photo { transform-origin: 50% 0; transform: translateY(var(--ty, 0px)) scale(var(--s, 1)); border-radius: var(--r, 0px); overflow: hidden; will-change: transform; }
.hero.carte-active::after { transform-origin: 50% 0; transform: translateY(var(--ty, 0px)) scale(var(--s, 1)); border-radius: var(--r, 0px); }
