/* ============================================================
   LANDING V2 — Hero "Mosaïque vivante", preuve avant/après,
   occasions, CTA navbar
   ============================================================ */

/* ----- Hero mosaïque vivante ----- */
.masthead-v2 {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 620px;
    overflow: hidden;
    background: #1a2530;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image de base (LCP) : la photo pleine, sous le canvas */
.masthead-v2 .hero-base-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Canvas d'assemblage mosaïque, par-dessus l'image */
.masthead-v2 #heroMosaicCanvas {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* Voile pour la lisibilité du texte */
.masthead-v2 .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(
        to bottom,
        rgba(20, 30, 42, 0.62) 0%,
        rgba(20, 30, 42, 0.38) 45%,
        rgba(20, 30, 42, 0.72) 100%
    );
    pointer-events: none;
}

.masthead-v2 .hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    padding: 0 1.5rem;
    max-width: 880px;
    pointer-events: none; /* laisse passer le survol vers le canvas... */
}

/* ...sauf sur les éléments cliquables */
.masthead-v2 .hero-content a,
.masthead-v2 .hero-content button {
    pointer-events: auto;
}

.masthead-v2 h1 {
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
    margin-bottom: 1.2rem;
    line-height: 1.15;
}

.masthead-v2 .hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.masthead-v2 .hero-cta-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.6rem;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
    border: none;
    padding: 1.05rem 2.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 6px 24px rgba(39, 174, 96, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: hero-pulse 2.6s infinite;
}

.btn-hero-primary:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.6);
    animation: none;
}

@keyframes hero-pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(39, 174, 96, 0.45); }
    50% { box-shadow: 0 6px 34px rgba(39, 174, 96, 0.75); }
}

@media (prefers-reduced-motion: reduce) {
    .btn-hero-primary { animation: none; }
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    padding: 1.05rem 2.2rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    transition: background 0.25s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Rangée de réassurance sous les CTA */
.hero-trust-row {
    display: flex;
    gap: 0.6rem 1.6rem;
    justify-content: center;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-trust-row .trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.hero-trust-row .trust-item .flag-fr-hero {
    width: 18px;
    height: auto;
    border-radius: 2px;
}

/* Indice de scroll */
.hero-scroll-hint {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    text-decoration: none;
    animation: scroll-bounce 2.2s infinite;
}

.hero-scroll-hint:hover { color: #fff; }

@keyframes scroll-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 7px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-scroll-hint { animation: none; }
}

/* ----- Alignement vertical de la navbar (desktop) ----- */
/* Tous les items (liens texte, bouton CTA, drapeaux) partagent le même
   centrage vertical au lieu de dépendre de leurs hauteurs individuelles */
@media (min-width: 992px) {
    #mainNav .navbar-nav {
        align-items: center;
    }

    #mainNav .navbar-nav .nav-item {
        display: flex;
        align-items: center;
    }

    #mainNav .navbar-nav .nav-link {
        display: inline-flex;
        align-items: center;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* ----- CTA dans la navbar ----- */
.navbar-cta {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff !important;
    border-radius: 50px;
    padding: 0.5rem 1.3rem !important;
    font-weight: 700;
    margin-left: 0.8rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.navbar-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.5);
    color: #fff !important;
}

@media (max-width: 991px) {
    .navbar-cta {
        display: inline-block;
        margin: 0.5rem 0 0 0;
    }
}

/* ----- Section preuve : avant/après inline ----- */
.proof-section {
    padding: 5rem 0;
    background: #f8f9fa;
}

.ba-inline {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
}

.ba-inline img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Empêcher toute sélection (surlignage bleu) pendant le drag du curseur */
.ba-inline,
.ba-inline * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.ba-inline .ba-before {
    position: absolute;
    inset: 0;
    clip-path: inset(0 50% 0 0);
}

.ba-inline .ba-before img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-inline .ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #fff;
    transform: translateX(-50%);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}

.ba-inline .ba-handle::after {
    /* Flèches en SVG : les caractères ◄ ► avaient des tailles inégales selon la police */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 30px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 30'><path d='M19 9 L11 15 L19 21 Z' fill='%2334495e'/><path d='M27 9 L35 15 L27 21 Z' fill='%2334495e'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 46px 30px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ba-inline .ba-label {
    position: absolute;
    top: 14px;
    background: rgba(20, 30, 42, 0.75);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    pointer-events: none;
}

.ba-inline .ba-label-before { left: 14px; }
.ba-inline .ba-label-after { right: 14px; }

/* ----- Section occasions ----- */
.occasions-section {
    padding: 5rem 0;
}

.occasion-card {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    height: 220px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.occasion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.occasion-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.occasion-card:hover img {
    transform: scale(1.06);
}

.occasion-card .occasion-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 30, 42, 0.85) 0%, rgba(20, 30, 42, 0.1) 55%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.1rem 1.2rem;
}

.occasion-card .occasion-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0;
}

.occasion-card .occasion-text {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.85rem;
    margin: 0.15rem 0 0;
}

/* Cartes occasions "pro" sans image */
.occasion-card-pro {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.2rem;
}

.occasion-card-pro i {
    font-size: 2.2rem;
    color: #2ecc71;
    margin-bottom: 0.6rem;
}

.occasion-card-pro .occasion-title { font-size: 1.1rem; color: #fff; }
.occasion-card-pro .occasion-text { color: rgba(255, 255, 255, 0.75); }

/* ----- Responsive hero mobile ----- */
@media (max-width: 768px) {
    .masthead-v2 {
        height: 92vh;
        min-height: 560px;
    }

    .masthead-v2 .hero-cta-row .btn-hero-primary,
    .masthead-v2 .hero-cta-row .btn-hero-secondary {
        width: 100%;
        max-width: 340px;
    }

    .hero-trust-row {
        font-size: 0.82rem;
        gap: 0.4rem 1rem;
        padding: 0 0.5rem;
    }

    .occasion-card { height: 180px; }
}

/* ----- Bande de réassurance (au-dessus des tarifs) ----- */
.reassurance-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.reassurance-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: 0.88rem;
    color: #444;
    line-height: 1.35;
}

.reassurance-item i {
    font-size: 1.4rem;
    color: #27ae60;
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .reassurance-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .reassurance-row {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

/* ----- Resserrage vertical entre Occasions et Tarifs ----- */
/* .page-section impose 8rem de padding qui s'additionne aux 5rem
   de .occasions-section : on divise l'écart par deux */
.occasions-section {
    padding-bottom: 3rem;
}

#pricing.page-section {
    padding-top: 3.5rem;
}

/* Carte Entreprises : cadrer l'image vers le haut pour ne pas tronquer
   le sommet de l'affiche de vœux (object-fit cover centre par défaut) */
.occasion-card[href="/entreprise"] img {
    object-position: center top;
}

/* ----- Resserrage vertical entre Tarifs et Témoignages ----- */
#pricing.page-section {
    padding-bottom: 4rem;
}

#testimonials.page-section {
    padding-top: 3.5rem;
}

/* ----- Loupe du hero (desktop) : révèle les photos de la mosaïque ----- */
.hero-loupe {
    position: absolute;
    z-index: 3;               /* au-dessus du canvas, sous le texte et les CTA */
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), inset 0 0 12px rgba(0, 0, 0, 0.25);
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* ----- Hero : hauteur exacte sous les bandeaux fixes ----- */
/* Le body a un padding-top de 35px (bandeau France) : 100vh débordait
   d'autant sous la ligne de flottaison et masquait l'indice de scroll */
.masthead-v2 {
    height: calc(100vh - 35px);
}

body.promo-banner-visible .masthead-v2 {
    height: calc(100vh - 105px); /* bandeau promo (70px) + bandeau France (35px) */
}

/* ----- Hero desktop : texte centré sur le tiers bas, visages dégagés ----- */
@media (min-width: 992px) {
    .masthead-v2 {
        align-items: flex-end;      /* le contenu s'ancre en bas du hero */
    }

    .masthead-v2 .hero-content {
        text-align: center;
        max-width: 900px;
        padding-bottom: 64px;       /* laisse la place à "Découvrez la magie" */
    }

    /* Titre compact : une phrase par ligne, sans écraser les visages */
    .masthead-v2 h1 {
        font-size: clamp(2rem, 2.8vw, 2.8rem);
        margin-bottom: 0.8rem;
    }

    .masthead-v2 .hero-subtitle {
        font-size: clamp(0.95rem, 1.3vw, 1.1rem);
        margin-bottom: 1.3rem;
        max-width: 720px;
    }

    .masthead-v2 .hero-cta-row {
        margin-bottom: 1rem;
    }

    /* Voile dégradé vertical : visages révélés en haut, texte lisible en bas */
    .masthead-v2 .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(20, 30, 42, 0.45) 0%,
            rgba(20, 30, 42, 0.08) 22%,
            rgba(20, 30, 42, 0.12) 48%,
            rgba(20, 30, 42, 0.68) 76%,
            rgba(20, 30, 42, 0.88) 100%
        );
    }
}
