/* =====================================================================
   RDV MAJUNGA - Grand en-tête de la page d'accueil
   ---------------------------------------------------------------------
   Chargée uniquement sur l'accueil (AccueilController : pageStyles).
   Toutes les règles commencent par .page-accueil (classe du <body> de
   l'accueil) ou .home-hero : aucune autre page n'est concernée.

   1. Couleurs propres à l'en-tête
   2. Barre de navigation
   3. Photos et voile de lecture
   4. Accroche : badge, surtitre, titre, texte, boutons
   5. Carrousel : défilement automatique, légende
   5 bis. Six diapositives : textes superposés, transitions, menu
   6. Carte de recherche de disponibilité
   7. Tablette et téléphone
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. COULEURS
   ------------------------------------------------------------------ */
.page-accueil {
    --hh-petrole: #063b46;
    --hh-canard: #075a67;
    --hh-turquoise: #24d7d2;
    --hh-orange: #f58a1f;
    --hh-orange-fonce: #df7710;
    --hh-champ: #f6f9fa;
    --hh-filet: #d9e4e7;
    --hh-gris: #5f7a82;
    /* Bande claire sous la photo, où se pose la moitié de la carte de recherche */
    --hh-bande: 104px;
}

/* ---------------------------------------------------------------------
   2. BARRE DE NAVIGATION (même aspect avant et après défilement)
   ------------------------------------------------------------------ */
.page-accueil .site-header,
.page-accueil .site-header.is-solid,
.page-accueil .site-header.is-transparent {
    background: var(--hh-petrole);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px rgba(4, 30, 36, .18);
}
.page-accueil .site-header.is-transparent::before { display: none; }

/* Le logo garde sa plaque blanche : son dessin foncé reste lisible sur le pétrole */
.page-accueil .site-header .brand-logo {
    height: 56px;
    padding: 4px 6px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.page-accueil .site-header .brand,
.page-accueil .site-header .brand-name { color: #fff; text-shadow: none; }
.page-accueil .site-header .brand-name small { color: var(--hh-turquoise); letter-spacing: .16em; }

.page-accueil .site-header .main-nav ul { gap: 6px; }
.page-accueil .site-header .main-nav a {
    padding: 10px 12px;
    color: rgba(255, 255, 255, .86);
    font-size: .88rem;
    letter-spacing: .01em;
}
.page-accueil .site-header .main-nav a .icon { display: none; }
.page-accueil .site-header .main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.page-accueil .site-header .main-nav a.active { color: #fff; }
.page-accueil .site-header .main-nav a.active::after {
    bottom: -2px;
    width: calc(100% - 24px);
    height: 3px;
    background: var(--hh-turquoise);
}
.page-accueil .site-header .main-nav a:focus-visible { outline: 2px solid var(--hh-turquoise); outline-offset: 2px; }

.page-accueil .site-header .header-actions { gap: 12px; }
.page-accueil .site-header .header-actions .btn { border-radius: 999px; padding: 11px 20px; font-size: .86rem; }
.page-accueil .site-header .header-actions .btn-sun { background: var(--hh-orange); box-shadow: 0 6px 18px rgba(245, 138, 31, .32); }
.page-accueil .site-header .header-actions .btn-sun:hover { background: var(--hh-orange-fonce); }
.page-accueil .site-header .header-actions .btn-outline,
.page-accueil .site-header .header-actions .btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
}
.page-accueil .site-header .header-actions .btn-outline:hover,
.page-accueil .site-header .header-actions .btn-ghost:hover { background: #fff; border-color: #fff; color: var(--hh-petrole); }
.page-accueil .site-header .header-actions .btn:focus-visible { outline: 2px solid var(--hh-turquoise); outline-offset: 3px; }
.page-accueil .site-header .nav-toggle {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
}

/* ---------------------------------------------------------------------
   3. PHOTOS ET VOILE DE LECTURE
   La photo s'arrête au-dessus d'une bande claire : la carte de
   recherche chevauche la limite, comme sur la maquette.
   ------------------------------------------------------------------ */
.home-hero {
    isolation: isolate;
    min-height: min(94vh, 880px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* La règle générale .hero aligne à droite : ici chaque bloc prend toute la largeur */
    align-items: stretch;
    padding: calc(var(--header-h) + 56px) 0 0;
    background: transparent;
    overflow: hidden;
}
.home-hero .hero-slider { top: var(--header-h); bottom: var(--hh-bande); }
.home-hero .hero-slide img { object-position: center 50%; }

/* Voile pétrole soutenu à gauche sous le texte, qui s'efface vers la droite */
.home-hero::after {
    inset: var(--header-h) 0 var(--hh-bande) 0;
    background:
        linear-gradient(90deg,
            rgba(6, 59, 70, .96) 0%,
            rgba(6, 59, 70, .86) 28%,
            rgba(6, 59, 70, .5) 50%,
            rgba(6, 59, 70, .08) 72%,
            rgba(6, 59, 70, 0) 100%),
        linear-gradient(to top, rgba(6, 59, 70, .42) 0%, rgba(6, 59, 70, 0) 34%);
}

/* ---------------------------------------------------------------------
   4. ACCROCHE
   ------------------------------------------------------------------ */
.home-hero__inner { position: relative; z-index: 2; }
.home-hero__content { max-width: 720px; padding-bottom: 44px; }

.home-hero__tag {
    gap: 8px;
    margin-bottom: 26px;
    padding: 8px 16px 8px 12px;
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .22);
    font-size: .84rem;
    letter-spacing: .01em;
}

.home-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    color: var(--hh-turquoise);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.home-hero__eyebrow::after {
    content: "";
    width: 38px;
    height: 2px;
    border-radius: 2px;
    background: var(--hh-orange);
}

.home-hero .home-hero__title {
    margin: 0 0 22px;
    font-family: var(--font-title);
    font-size: clamp(2.4rem, 1rem + 3.3vw, 4.4rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.012em;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .22);
    text-wrap: balance;
}
.home-hero__title-line { display: block; }
.home-hero__title-accent { color: var(--hh-turquoise); }

.home-hero .home-hero__subtitle {
    max-width: 545px;
    margin: 0 0 34px;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(1rem, .92rem + .35vw, 1.16rem);
    line-height: 1.6;
}

.home-hero__actions { gap: 16px; }
.home-hero__actions .btn {
    min-height: 56px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: .98rem;
    font-weight: 700;
}
.home-hero .home-hero__cta { background: var(--hh-orange); box-shadow: 0 10px 26px rgba(245, 138, 31, .34); }
.home-hero .home-hero__cta:hover { background: var(--hh-orange-fonce); color: #fff; }
.home-hero__cta-arrow { transition: transform var(--transition); }
.home-hero__cta:hover .home-hero__cta-arrow { transform: translateX(3px); }
.home-hero .home-hero__cta-secondary {
    background: rgba(6, 59, 70, .25);
    border-color: rgba(255, 255, 255, .7);
    backdrop-filter: blur(4px);
}
.home-hero .home-hero__cta-secondary:hover { background: #fff; border-color: #fff; color: var(--hh-petrole); }
.home-hero__actions .btn:focus-visible { outline: 3px solid var(--hh-turquoise); outline-offset: 3px; }

/* ---------------------------------------------------------------------
   5. CARROUSEL : défilement automatique, sans commandes.
   Seule la légende de la photo reste, en bas à droite de l'image
   (masquée sur téléphone par les règles générales du site).
   ------------------------------------------------------------------ */
@media (min-width: 781px) {
    .home-hero .hero-pager {
        left: auto;
        right: clamp(20px, 4vw, 64px);
        bottom: calc(var(--hh-bande) + 150px);
        align-items: flex-end;
    }
    .home-hero .hero-pager__caption {
        max-width: 300px;
        text-align: right;
        font-size: .72rem;
        color: rgba(255, 255, 255, .85);
    }
}

/* Tablette : la carte de recherche monte haut sur la photo, la légende passe en haut */
@media (min-width: 781px) and (max-width: 1180px) {
    .home-hero .hero-pager { top: calc(var(--header-h) + 22px); bottom: auto; }
}

/* ---------------------------------------------------------------------
   5 bis. SIX DIAPOSITIVES
   Les textes sont empilés dans la même case de grille : la hauteur
   reste celle du plus long, rien ne saute quand la diapositive change.
   ------------------------------------------------------------------ */
.home-hero__slides { display: grid; }
.home-hero__slide {
    grid-area: 1 / 1;
    align-self: end;
    visibility: hidden;
    opacity: 0;
    transition: opacity 380ms ease, visibility 0s linear 380ms;
}
.home-hero__slide.is-active { visibility: visible; opacity: 1; transition: opacity 380ms ease, visibility 0s; }

/* Apparition progressive : badge et surtitre, puis titre, texte, boutons */
.home-hero__slide > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 520ms ease, transform 620ms cubic-bezier(.2, .7, .2, 1);
}
.home-hero__slide.is-active > * { opacity: 1; transform: none; }
.home-hero__slide.is-active > :nth-child(2) { transition-delay: 70ms; }
.home-hero__slide.is-active > :nth-child(3) { transition-delay: 140ms; }
.home-hero__slide.is-active > :nth-child(4) { transition-delay: 210ms; }
.home-hero__slide.is-active > :nth-child(5) { transition-delay: 280ms; }

/* Fondu enchaîné plus doux que celui des autres pages */
.home-hero .hero-slide { transition: opacity 800ms ease, visibility 0s linear 800ms; }
.home-hero .hero-slide.is-active { transition: opacity 800ms ease, visibility 0s; }
.home-hero .hero-slide img { transform: scale(1.04); transition: transform 7s ease-out; }
.home-hero .hero-slide.is-active img { transform: scale(1); }

/* Menu : le soulignement turquoise suit la diapositive affichée */
.page-accueil .site-header .main-nav a::after,
.page-accueil .site-header .main-nav a.active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -2px;
    width: auto;
    height: 3px;
    border-radius: 2px;
    background: var(--hh-turquoise);
    transform: scaleX(0);
    transition: transform 320ms ease;
}
.page-accueil .site-header .main-nav a.active::after,
.page-accueil.has-hero-sync .site-header .main-nav a.is-hero-current::after { transform: scaleX(1); }
.page-accueil.has-hero-sync .site-header .main-nav a.active:not(.is-hero-current)::after { transform: scaleX(0); }
.page-accueil.has-hero-sync .site-header .main-nav a.is-hero-current { color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .home-hero__slide, .home-hero__slide > *, .home-hero .hero-slide, .home-hero .hero-slide img,
    .page-accueil .site-header .main-nav a::after { transition: none !important; transform: none !important; }
}

/* ---------------------------------------------------------------------
   6. CARTE DE RECHERCHE DE DISPONIBILITÉ
   ------------------------------------------------------------------ */
.home-hero .availability-bar--hero { position: relative; z-index: 3; margin-top: 0; }
.home-hero .availability-card {
    padding: 26px 30px 30px;
    border: 0;
    border-radius: 28px;
    box-shadow: 0 26px 60px rgba(6, 59, 70, .16), 0 2px 8px rgba(6, 59, 70, .06);
}

.home-hero .availability-card__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.home-hero .availability-card__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: none;
    border-radius: 50%;
    background: #e3f6f7;
    color: var(--hh-canard);
}
.home-hero .availability-card__icon .icon { width: 28px; height: 28px; }
.home-hero .availability-card__head h2 {
    margin: 0 0 3px;
    font-family: var(--font-body);
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--hh-petrole);
    letter-spacing: -.005em;
}
.home-hero .availability-card__head p { margin: 0; color: var(--hh-gris); font-size: .92rem; }

.home-hero .availability-card form {
    grid-template-columns: repeat(2, minmax(0, 1.12fr)) repeat(2, minmax(0, 1fr)) auto;
    gap: 18px;
}
.home-hero .availability-card .field label {
    margin-bottom: 8px;
    font-size: .84rem;
    font-weight: 700;
    color: var(--hh-petrole);
}

/* Champ avec son icône à gauche */
.home-hero .availability-input { position: relative; display: block; }
.home-hero .availability-input > .icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hh-gris);
    pointer-events: none;
}
.home-hero .availability-input input {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 14px 0 44px;
    border: 1px solid var(--hh-filet);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 500;
    text-align: left;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.home-hero .availability-input input:hover { border-color: #b9ccd1; }
.home-hero .availability-input input:focus {
    outline: none;
    border-color: var(--hh-canard);
    box-shadow: 0 0 0 4px rgba(7, 90, 103, .14);
}
.home-hero .availability-input:focus-within > .icon { color: var(--hh-canard); }

.home-hero .availability-card .btn {
    height: 56px;
    padding: 0 30px;
    border-radius: 999px;
    background: var(--hh-canard);
    font-size: .98rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(7, 90, 103, .28);
}
.home-hero .availability-card .btn:hover { background: var(--hh-petrole); }
.home-hero .availability-card .btn:focus-visible { outline: 3px solid var(--hh-turquoise); outline-offset: 3px; }

/* ---------------------------------------------------------------------
   7. TABLETTE ET TÉLÉPHONE
   ------------------------------------------------------------------ */
@media (max-width: 1320px) {
    .page-accueil .site-header .main-nav a { padding: 9px 10px; font-size: .84rem; }
}

@media (max-width: 1180px) {
    .home-hero .availability-card form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-hero .availability-card .btn { grid-column: 1 / -1; }
    .page-accueil { --hh-bande: 150px; }
}

@media (max-width: 1120px) {
    .page-accueil .site-header .brand-logo { height: 50px; }
}

@media (max-width: 780px) {
    .page-accueil { --hh-bande: 120px; }
    .home-hero { min-height: 0; padding-top: calc(var(--header-h) + 64px); }
    .home-hero__content { padding-bottom: 34px; }
    /* Sur téléphone, le voile couvre toute la largeur : le texte occupe tout l'écran */
    .home-hero::after {
        background:
            linear-gradient(180deg, rgba(6, 59, 70, .55) 0%, rgba(6, 59, 70, .78) 55%, rgba(6, 59, 70, .92) 100%);
    }
    .home-hero__tag { margin-bottom: 18px; }
}

@media (max-width: 620px) {
    .home-hero .home-hero__title { font-size: clamp(2.2rem, 1.3rem + 4.6vw, 2.9rem); }
    .home-hero__actions { flex-direction: column; align-items: stretch; gap: 12px; }
    .home-hero__actions .btn { width: 100%; min-height: 52px; justify-content: center; }

    .home-hero .availability-card { padding: 18px 16px 18px; border-radius: 22px; }
    .home-hero .availability-card__head { gap: 12px; margin-bottom: 14px; }
    .home-hero .availability-card__icon { width: 44px; height: 44px; }
    .home-hero .availability-card__icon .icon { width: 22px; height: 22px; }
    .home-hero .availability-card__head h2 { font-size: 1.1rem; }
    .home-hero .availability-card__head p { font-size: .84rem; }
    .home-hero .availability-card form { gap: 12px 10px; }
    .home-hero .availability-card .field label { margin-bottom: 5px; font-size: .78rem; }
    .home-hero .availability-input > .icon { left: 11px; }
    .home-hero .availability-input input { height: 48px; padding: 0 8px 0 34px; font-size: .9rem; border-radius: 12px; }
    .home-hero .availability-card .btn { height: 52px; margin-top: 2px; }
}

@media (max-width: 380px) {
    .home-hero .availability-input > .icon { display: none; }
    .home-hero .availability-input input { padding-left: 10px; }
}
