/* =====================================================================
   Page « Activités » (/activites)
   Même monde que les pages Chambres et Menu : en-tête orange avec trois photos
   en polaroïds, fond crème, titres en Rancho, galeries que l'on fait glisser,
   navigation collante entre les activités.
   ===================================================================== */

.act-espace-entete { height: var(--hauteur-entete, 112px); background: #e7a45c; }

.page-activites {
    --act-fond: #fffaf3;
    --act-papier: #fcefdc;
    --act-orange: #e7a45c;
    --act-encre: #3d2614;
    --act-titre: #4a260b;
    --act-texte: #5a4232;
    --act-doux: #6e5340;
    --act-brun: #7a4612;
    --act-action: #a2631d;
    --act-violet: #6f2a86;
    --act-vert: #0e7a3e;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    display: block;
    background: var(--act-fond);
    color: var(--act-encre);
}
.page-activites ::selection { background: var(--act-violet); color: #fff; }
.page-activites h1, .page-activites h2, .page-activites h3 { font-family: 'Rancho', cursive; font-weight: 400; letter-spacing: 0; color: var(--act-titre); }
.page-activites h1 span, .page-activites h2 span { font-family: inherit; }
.page-activites a:focus-visible, .page-activites button:focus-visible { outline: 3px solid var(--act-action); outline-offset: 3px; }

/* ---------- En-tête ---------- */
.act-tete { display: grid; gap: 28px; align-items: center; padding: 18px 16px 36px; background: var(--act-orange); }
.act-tete > * { min-width: 0; }
.act-tete h1 { display: flex; align-items: center; gap: .2em; font-size: clamp(3rem, 12vw, 5.2rem); line-height: .95; }
.act-fleur-titre { width: .8em; height: .8em; }
.act-accroche { max-width: 44ch; margin-top: 14px; font-size: 1.08rem; line-height: 1.6; color: #4f2c10; }

.act-tete-photos { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; aspect-ratio: 16 / 10; }
.act-tete-photos img {
    width: 100%; height: 100%; max-height: none; object-fit: cover; border: 6px solid #fff; border-radius: 6px;
    box-shadow: 0 16px 30px -18px rgba(74, 38, 11, .8);
    transform: rotate(var(--pente)); animation: act-poser .6s var(--ease-out) var(--delai, 0ms) both;
}
.act-photo-a { grid-row: 1 / 3; --pente: -1.4deg; }
.act-photo-b { --pente: 1.8deg; --delai: 80ms; }
.act-photo-c { --pente: -.8deg; --delai: 160ms; }
@keyframes act-poser { from { opacity: 0; transform: translateY(14px) rotate(0deg) scale(.97); } }
@media (max-width: 639px) { .act-tete-photos { display: none; } } /* sur téléphone, les activités d'abord */
@media (min-width: 900px) {
    .act-tete { grid-template-columns: 1.05fr .95fr; gap: 56px; padding: 40px max(32px, calc((100% - 1180px) / 2)) 60px; }
}

/* ---------- Navigation entre les activités (collante) ---------- */
.act-nav {
    position: sticky; top: var(--entete-compacte, 0px); z-index: 50;
    padding: 10px 0; background: var(--act-fond);
    box-shadow: 0 1px 0 rgba(122, 70, 18, .1);
}
.act-nav ul {
    position: relative; /* repère des pastilles pour le défilement automatique (activites.js) */
    display: flex; gap: 8px; max-width: 1180px; margin: 0 auto; padding: 0 16px; list-style: none;
    overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}
.act-nav ul::-webkit-scrollbar { display: none; }
.act-nav li { flex: none; list-style: none; }
.page-activites .act-nav a {
    display: block; padding: 9px 16px; border-radius: 999px;
    background: var(--act-papier); color: var(--act-brun);
    font-size: .92rem; font-weight: 600; line-height: 1.25; white-space: nowrap; text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.page-activites .act-nav a[aria-current="true"] { background: var(--act-titre); color: #fff; }
@media (min-width: 900px) {
    .act-nav ul { -webkit-mask-image: none; mask-image: none; padding: 0 24px; }
}

/* ---------- Une activité : galerie + texte ---------- */
.act-bloc {
    display: grid; gap: 22px; max-width: 1180px; margin: 0 auto; padding: 40px 16px 8px;
    scroll-margin-top: 44px; /* s'ajoute au scroll-padding de la page (barre compacte) : juste sous la navigation */
}
.act-bloc > * { min-width: 0; }
.act-texte h2 { font-size: clamp(2.3rem, 7vw, 3.1rem); line-height: 1; text-wrap: balance; }
.act-texte p { max-width: 62ch; margin-top: 12px; font-size: 1rem; line-height: 1.7; color: var(--act-texte); }
.act-texte p:first-of-type { margin-top: 14px; }
.act-liste { max-width: 62ch; margin: 10px 0 0; padding: 0; list-style: none; }
.act-liste li {
    position: relative; padding: 5px 0 5px 22px; list-style: none;
    font-size: 1rem; line-height: 1.6; color: var(--act-texte);
}
.act-liste li::before {
    content: ""; position: absolute; left: 4px; top: .95em; width: 7px; height: 7px; border-radius: 50%;
    background: var(--act-violet); opacity: .75;
}
.page-activites .act-note {
    padding: 12px 14px; border-radius: 12px; background: var(--act-papier);
    font-size: .95rem; color: var(--act-doux);
}
@media (min-width: 900px) {
    .act-bloc { grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 64px 24px 16px; }
    .act-bloc-inverse > .act-galerie { order: 2; }
}

/* Galerie : on fait glisser, ou flèches sur ordinateur (comme la page Chambres) */
.act-galerie { position: relative; overflow: hidden; border-radius: 20px; background: #f3e4d0; box-shadow: 0 22px 44px -30px rgba(74, 38, 11, .75); }
.act-galerie-piste {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    aspect-ratio: 4 / 3; scroll-behavior: smooth; overscroll-behavior-x: contain;
}
.act-galerie-piste::-webkit-scrollbar { display: none; }
.act-galerie-piste:focus-visible { outline: 3px solid var(--act-violet); outline-offset: -3px; }
.act-galerie-piste img { flex: 0 0 100%; width: 100%; height: 100%; max-height: none; max-width: none; object-fit: cover; scroll-snap-align: start; }
.page-activites .act-galerie-bouton {
    position: absolute; top: 50%; display: grid; place-items: center; width: 42px; height: 42px; margin-top: -21px;
    border: 0; border-radius: 50%; background: rgba(255, 250, 243, .92); color: var(--act-titre); cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(43, 23, 9, .6); transition: opacity .2s ease, transform .16s var(--ease-out);
}
.act-galerie-bouton[hidden] { display: none; }
.act-galerie-bouton:active { transform: scale(.97); }
.act-galerie-bouton:disabled { opacity: 0; pointer-events: none; }
.act-galerie-bouton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.act-galerie-precedent { left: 12px; }
.act-galerie-suivant { right: 12px; }
@media (hover: none) { .page-activites .act-galerie-bouton { display: none; } }
.act-galerie-compteur {
    position: absolute; right: 12px; bottom: 12px; padding: 3px 9px; border-radius: 999px;
    background: rgba(43, 23, 9, .62); color: #fff; font-size: .78rem; font-weight: 500; font-variant-numeric: tabular-nums;
}

/* ---------- Randonnées et balades ---------- */
.act-randonnees {
    margin-top: 56px; padding: 48px 16px 56px; background: var(--act-papier);
    scroll-margin-top: 44px;
}
.act-randonnees-tete, .act-cartes { max-width: 1180px; margin: 0 auto; }
.act-randonnees-tete h2 { display: flex; align-items: center; gap: .3em; font-size: clamp(2.3rem, 7vw, 3.1rem); line-height: 1; }
.act-randonnees-tete > p { max-width: 62ch; margin-top: 14px; font-size: 1rem; line-height: 1.7; color: var(--act-texte); }
.act-balades { display: grid; gap: 10px; max-width: 900px; margin: 14px 0 0; padding: 0; list-style: none; }
.act-balades li {
    padding: 14px 18px; border-radius: 14px; background: var(--act-fond); list-style: none;
    font-size: .98rem; line-height: 1.6; color: var(--act-texte);
}
.act-balades strong { color: var(--act-encre); font-weight: 600; }

.act-cartes { display: grid; gap: 22px; margin-top: 34px; }
.act-carte {
    display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 20px; background: #fff;
    box-shadow: 0 1px 0 rgba(122, 70, 18, .06), 0 20px 40px -28px rgba(74, 38, 11, .6);
}
.act-carte img { width: 100%; height: auto; max-height: none; aspect-ratio: 3 / 2; object-fit: cover; }
.act-carte-corps { padding: 18px 20px 22px; }
.act-carte h3 { font-size: 2rem; line-height: 1; }
.act-carte p { margin-top: 10px; font-size: .97rem; line-height: 1.65; color: var(--act-texte); }
@media (min-width: 760px) { .act-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .act-cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .act-randonnees { padding: 64px 24px 72px; } }

/* ---------- Photos : image() (controller/seo.php) met chaque photo dans un <picture> (WebP) ----------
   Le <picture> s'efface de la mise en page : l'image reste l'élément placé dans la grille, la galerie ou la carte. */
.act-tete-photos picture, .act-galerie-piste picture, .act-carte picture { display: contents; }

/* ---------- « Pour aller plus loin » (bloc commun de style.css) ---------- */
.page-activites .pg-pratique-liste h3 { font-family: 'Poppins', sans-serif; font-weight: 600; }
.page-activites .act-carte-corps .pg-lien-fleche { margin-top: 12px; }

/* ---------- Appel : une sortie avec un guide ---------- */
.act-appel { padding: 44px 16px 52px; background: var(--act-orange); text-align: center; }
.act-appel h2 { font-size: clamp(2.3rem, 7vw, 3.1rem); line-height: 1; }
.act-appel p { max-width: 46ch; margin: 12px auto 0; font-size: 1.05rem; line-height: 1.6; color: #4f2c10; }
.act-appel-boutons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.page-activites a.act-bouton {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px; border-radius: 999px;
    background: var(--act-titre); color: #fff; font-weight: 600; text-decoration: none;
    box-shadow: 0 8px 18px -12px rgba(74, 38, 11, .9);
    transition: background-color .2s ease, transform .16s var(--ease-out);
}
.page-activites a.act-bouton-whatsapp { background: var(--act-vert); }
.page-activites a.act-bouton .icone-whatsapp { width: 20px; height: 20px; }
.page-activites a.act-bouton:active { transform: scale(.97); }
.act-appel a:focus-visible { outline-color: var(--act-titre); }

@media (hover: hover) and (pointer: fine) {
    .page-activites .act-nav a:not([aria-current="true"]):hover { background: #f6dfc0; }
    .page-activites a.act-bouton:hover { background: var(--act-brun); }
    .page-activites a.act-bouton-whatsapp:hover { background: #0c8a44; }
}

@media (prefers-reduced-motion: reduce) {
    .act-tete-photos img { animation: act-fondu .3s ease both; }
    @keyframes act-fondu { from { opacity: 0; } }
    .act-galerie-piste { scroll-behavior: auto; }
    .act-galerie-bouton:active, .page-activites a.act-bouton:active { transform: none; }
}
