/* ==========================================================================
   TRIOPARC — Finitions (retours du 7 octobre)
   Chargée en dernier sur toutes les pages.
   ========================================================================== */

/* 1. Halos (masses fluides) contenus dans leur section et estompés près des bords :
      ils ne passent plus par-dessus ni par-dessous les sections voisines. */
.section__halos {
  position: absolute; inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 180px, #000 calc(100% - 180px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 180px, #000 calc(100% - 180px), transparent 100%);
}

/* 2. Sous la courbe des heros : la section suivante remonte sous le hero.
      Les coins découpés laissent voir sa vraie couleur, plus de teinte différente. */
main.page > section:first-child { position: relative; z-index: 3; }
main.page > section:first-child + section { margin-top: -170px; padding-top: 170px; }

/* 3. Heros des pages intérieures : image plus grande et fondue dans un fond fluide,
      jeu de lumière doux à gauche (plus haut de gamme, plus immersif). */
@media (min-width: 721px) {
  main.page > section:first-child:not(.hero--profondeur) :is([class*="hero__media"], [class*="hero__visuel"]) {
    left: 24% !important;
    width: 76% !important;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .22) 12%, rgba(0, 0, 0, .7) 28%, #000 46%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .22) 12%, rgba(0, 0, 0, .7) 28%, #000 46%);
  }
  main.page > section:first-child:not(.hero--profondeur) :is([class*="hero__media"], [class*="hero__visuel"])::after,
  main.page > section:first-child:not(.hero--profondeur) [class*="hero__fusion"] { display: none !important; }
  main.page > section:first-child:not(.hero--profondeur) [class*="hero__voile"] {
    background-image:
      linear-gradient(180deg, rgba(3, 5, 16, .62) 0%, rgba(3, 5, 16, 0) 20%),
      linear-gradient(0deg, rgba(3, 5, 16, .5) 0%, rgba(3, 5, 16, 0) 26%),
      radial-gradient(1000px 620px at 16% 42%, rgba(122, 62, 200, .5) 0%, rgba(122, 62, 200, 0) 70%),
      linear-gradient(90deg, rgba(9, 10, 34, .94) 0%, rgba(9, 10, 34, .82) 26%, rgba(9, 10, 34, .45) 44%, rgba(9, 10, 34, 0) 60%) !important;
  }
  /* Transition « embrouillée » entre le fond et l'image */
  main.page > section:first-child:not(.hero--profondeur) [class*="hero__voile"]::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 20%; width: 30%;
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 58%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 58%, transparent 100%);
    pointer-events: none;
  }
  /* Rubans de lumière (cyan-violet en haut, orangé-rose en bas) */
  main.page > section:first-child:not(.hero--profondeur) [class*="hero__voile"]::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 0; width: 64%;
    background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 1200 900%22 preserveAspectRatio=%22none%22%3E%3Cdefs%3E%3ClinearGradient id=%22a%22 x1=%220%22 x2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%2338c6f0%22 stop-opacity=%220%22/%3E%3Cstop offset=%22.35%22 stop-color=%22%2338c6f0%22/%3E%3Cstop offset=%22.75%22 stop-color=%22%23a06bff%22/%3E%3Cstop offset=%221%22 stop-color=%22%23a06bff%22 stop-opacity=%220%22/%3E%3C/linearGradient%3E%3ClinearGradient id=%22b%22 x1=%220%22 x2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%23ff6fa8%22 stop-opacity=%220%22/%3E%3Cstop offset=%22.3%22 stop-color=%22%23ff8a5c%22/%3E%3Cstop offset=%22.7%22 stop-color=%22%23ff6fa8%22/%3E%3Cstop offset=%221%22 stop-color=%22%23a06bff%22 stop-opacity=%220%22/%3E%3C/linearGradient%3E%3Cfilter id=%22f1%22 x=%22-20%25%22 y=%22-60%25%22 width=%22140%25%22 height=%22220%25%22%3E%3CfeGaussianBlur stdDeviation=%2218%22/%3E%3C/filter%3E%3Cfilter id=%22f2%22 x=%22-20%25%22 y=%22-60%25%22 width=%22140%25%22 height=%22220%25%22%3E%3CfeGaussianBlur stdDeviation=%2244%22/%3E%3C/filter%3E%3Cfilter id=%22f3%22 x=%22-30%25%22 y=%22-30%25%22 width=%22160%25%22 height=%22160%25%22%3E%3CfeGaussianBlur stdDeviation=%2280%22/%3E%3C/filter%3E%3C/defs%3E%3Cellipse cx=%22300%22 cy=%22420%22 rx=%22330%22 ry=%22250%22 fill=%22%237a3ec8%22 opacity=%22.32%22 filter=%22url(%23f3)%22/%3E%3Cpath d=%22M-60 170 C 230 70 520 160 820 470%22 fill=%22none%22 stroke=%22url(%23a)%22 stroke-width=%2226%22 opacity=%22.35%22 filter=%22url(%23f1)%22/%3E%3Cpath d=%22M-60 170 C 230 70 520 160 820 470%22 fill=%22none%22 stroke=%22url(%23a)%22 stroke-width=%222.4%22 opacity=%22.9%22/%3E%3Cpath d=%22M-80 860 C 160 650 430 600 760 700%22 fill=%22none%22 stroke=%22url(%23b)%22 stroke-width=%22120%22 opacity=%22.42%22 filter=%22url(%23f2)%22/%3E%3Cpath d=%22M-80 860 C 160 650 430 600 760 700%22 fill=%22none%22 stroke=%22url(%23b)%22 stroke-width=%222%22 opacity=%22.75%22/%3E%3Cpath d=%22M-40 760 C 190 600 470 560 820 640%22 fill=%22none%22 stroke=%22url(%23a)%22 stroke-width=%221.4%22 opacity=%22.45%22/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
    mix-blend-mode: screen;
    opacity: .85;
    pointer-events: none;
  }
}

/* 4. Barre d'infos (40 px) : un peu d'air entre le menu et le texte des heros */
@media (min-width: 1025px) {
  main.page > section:first-child:not(.hero--profondeur) > .container { margin-top: 40px; }
}

/* ==========================================================================
   Retours du 8 octobre
   ========================================================================== */

/* 5. Fond uniforme sur toutes les pages : un seul dégradé mauve foncé (celui de la page Événements),
      qui s'assombrit avant le pied de page. Les sections n'ont plus leur propre fond (bleu, mauve, pâle…). */
main.page {
  background:
    linear-gradient(180deg, rgba(2, 4, 14, 0) calc(100% - 1100px), rgba(9, 11, 36, .7) calc(100% - 420px), #02040e 100%),
    linear-gradient(180deg, #0c0d2a 0, #171540 640px, #16133b 55%, #16143f 100%);
}
main.page > section.section { background: none !important; }

/* ==========================================================================
   Optimisation mobile (retours du 8 octobre)
   Pleine largeur (16 px de marge), paragraphes 16 px, titres 38 px, sous-titres 15 px,
   heros : image en haut fondue vers le bas, texte sous l'image.
   ========================================================================== */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .nav, .nav__menu { padding-inline: 16px; }
}

/* Heros mobiles : l'image occupe le haut, fondue vers le bas ; le texte vient dessous (plus par-dessus) */
@media (max-width: 720px) {
  main.page > section:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
    padding: var(--nav-h) 0 24px !important;
    background: transparent !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  main.page > section:first-child > :is([class*="hero__media"], [class*="hero__visuel"], .hero__scene) {
    position: relative !important;
    inset: auto !important;
    left: 0 !important; top: auto !important;
    flex: none !important;
    width: 100% !important;
    height: min(80vw, 340px) !important;
    opacity: 1 !important;
    transform: none !important;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 52%, rgba(0, 0, 0, .45) 78%, transparent 100%) !important;
    mask-image: linear-gradient(180deg, #000 0%, #000 52%, rgba(0, 0, 0, .45) 78%, transparent 100%) !important;
  }
  main.page > section:first-child > :is([class*="hero__media"], [class*="hero__visuel"], .hero__scene) img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important;
    transform: none !important;
  }
  main.page > section:first-child > :is([class*="hero__media"], [class*="hero__visuel"])::after { display: none !important; }
  main.page > section:first-child :is([class*="hero__voile"], [class*="hero__fusion"], [class*="hero__scroll"], .hero__foule) { display: none !important; }
  main.page > section:first-child > .container {
    position: relative;
    z-index: 2;
    margin-top: -40px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .hero--profondeur .hero__content { padding-top: 0; gap: 32px; }
  main.page > section:first-child + section { margin-top: 0 !important; padding-top: 0 !important; }
}

/* Typographie mobile : titres 38 px, paragraphes 16 px, sous-titres (surtitres) 15 px */
@media (max-width: 720px) {
  main.page h1,
  main.page h2:is(.h2, .about__h2, .attr-fiche__title, .attr-others__h2, .attractions__h2, .car-h2, .contact-h2, .cta__h2,
    .evt-details__h2, .evt-form__h2, .evt-types__h2, .hist-h2, .hist-recrut__h2, .jouer-cta__h2, .offres-h2,
    .plan-view__title, .play__h2, .resa-formulaire__title, .resa-view__title, .social__h2) {
    font-size: 38px !important;
    line-height: 1.08 !important;
    letter-spacing: -0.38px !important;
    white-space: normal !important;
  }
  main.page :is(h1, h2) span:not(.sr-only) { font-size: inherit !important; }

  main.page :is(p, dd, figcaption, li.hist-media__item):not(.eyebrow):not([class*="eyebrow"]):not([class*="price"]):not([class*="title"]):not([class*="titre"]):not([class*="stat"]):not([class*="label"]):not([class*="num"]):not([class*="note"]):not([class*="tag"]):not([class*="meta"]):not([class*="badge"]):not([class*="legal"]):not([class*="todo"]):not(.hist-quote__p),
  main.page p.about__tag, main.page :is(.evt-aside-card__note, .resto-zones__note, .car-offre__meta) {
    font-size: 16px !important;
  }

  main.page :is(.eyebrow, [class*="eyebrow"], .attr-fiche__label, .evt-form__label, .evt-aside-card__label) {
    font-size: 15px !important;
    letter-spacing: 3.6px !important;
  }

  /* Encadrés : moins de marge intérieure pour garder la largeur */
  .attr-fiche__info, .offer-card, .contact-card { padding-inline: 20px !important; }
}
