/* =========================================================
   CAMPAGNE HALLOWEEN 2026 : hero de la page d'accueil FR
   public/content/themes/radicle/campagnes/halloween-2026/accueil.css

   Chargée seulement sur l'accueil, campagne active
   (App\Providers\CampagneServiceProvider). Gabarit :
   resources/views/partials/campagnes/halloween-accueil.blade.php.
   Points de rupture alignés sur Block Visibility (768 / 992 px).
   ========================================================= */

.hlw-accueil {
    --hlw-orange: #f16b2c;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* l'en-tête transparent est posé par-dessus le haut du hero */
    padding: 5.5rem 1.25rem 2.5rem;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(ellipse 90% 50% at 50% 28%, #3b0f60 0%, #1c0730 45%, #020101 100%);
}

.hlw-accueil__interieur {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.25rem;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

/* ---------------------------------------------------------
   Texte et bouton
   --------------------------------------------------------- */
.hlw-accueil__texte {
    text-align: center;
}

.hlw-accueil__marque {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.hlw-accueil__titre,
.hlw-accueil__accroche {
    margin: 0;
    line-height: 0;
}

.hlw-accueil__titre img {
    display: block;
    width: min(100%, 34rem);
    height: auto;
    margin-inline: auto;
    filter: drop-shadow(0 4px 24px rgba(241, 107, 44, 0.35));
}

.hlw-accueil__accroche {
    margin-top: clamp(0.75rem, 1.6vw, 1.25rem);
}

.hlw-accueil__accroche img {
    display: block;
    width: min(92%, 30rem);
    height: auto;
    margin-inline: auto;
}

.hlw-accueil__detail {
    max-width: 34ch;
    margin: 1rem auto 1.25rem;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}

.hlw-accueil__bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.25rem;
    border-radius: 999px;
    background-color: var(--hlw-orange);
    color: #ffffff !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hlw-accueil__bouton:hover,
.hlw-accueil__bouton:focus-visible {
    background-color: #ff7d3f;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(241, 107, 44, 0.45);
}

.hlw-accueil__bouton:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* ---------------------------------------------------------
   Tableau : la photo de la LP dans le cadre doré, posé avec
   border-image (coins intacts, côtés étirés). Mobile et
   tablette : CADRE_MOBILE (640 px, bords 68 / 48 / 68 / 52).
   Sur mobile il reste assez petit pour que le bouton tienne
   dans le premier écran.
   --------------------------------------------------------- */
.hlw-accueil__tableau {
    display: flex;
    justify-content: center;
    order: -1;
}

.hlw-accueil__cadre {
    --hlw-k: calc(100cqw / 640);
    position: relative;
    container-type: inline-size;
    width: min(100%, calc(34svh * 1400 / 1514), 22rem);
    aspect-ratio: 1400 / 1514;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.6));
}

.hlw-accueil__visuel {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 55%;
}

.hlw-accueil__bord {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-style: solid;
    border-image: url("cadre-mobile.webp") 68 48 68 52 stretch;
    border-width: calc(68 * var(--hlw-k)) calc(48 * var(--hlw-k)) calc(68 * var(--hlw-k)) calc(52 * var(--hlw-k));
}

/* Éclairs : le double flash du GIF de la LP (images de 30 ms),
   repris toutes les 7 secondes, sans aller jusqu'au blanc pur. */
.hlw-accueil__eclair {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-color: #ffffff;
    opacity: 0;
    animation: hlw-accueil-eclair 7s linear 1.2s infinite;
}

@keyframes hlw-accueil-eclair {
    0%,
    2.9% {
        opacity: 0;
    }

    3% {
        opacity: 0.17;
    }

    3.4% {
        opacity: 0.55;
    }

    3.9% {
        opacity: 0.85;
    }

    4.3% {
        opacity: 0.6;
    }

    4.7% {
        opacity: 0.3;
    }

    5.1% {
        opacity: 0;
    }

    5.6% {
        opacity: 0.35;
    }

    6% {
        opacity: 0.85;
    }

    6.4% {
        opacity: 0.5;
    }

    6.8% {
        opacity: 0.2;
    }

    7.3%,
    100% {
        opacity: 0;
    }
}

/* ---------------------------------------------------------
   Deux paires d'yeux dans la nuit (yeux ronds, yeux de chat),
   derrière le contenu, chacune à son rythme. Sur mobile, de
   part et d'autre du tableau ; masquées sur tablette, faute
   de place.
   --------------------------------------------------------- */
.hlw-accueil__yeux {
    position: absolute;
    z-index: 0;
    display: block;
    height: auto;
    pointer-events: none;
}

.hlw-accueil__yeux--ronds {
    left: 4%;
    top: calc(5.5rem + 22svh);
    width: 40px;
    animation: hlw-accueil-yeux-ronds 5.2s linear infinite;
}

.hlw-accueil__yeux--chat {
    right: 4%;
    top: calc(5.5rem + 3svh);
    width: 46px;
    animation: hlw-accueil-yeux-chat 6.8s linear 1.5s infinite;
}

/* ---------------------------------------------------------
   Tablette et grand écran : texte à gauche, tableau à droite.
   --------------------------------------------------------- */
@media (min-width: 768px) {
    .hlw-accueil {
        padding: clamp(6rem, 13vh, 8.5rem) clamp(2rem, 5vw, 5rem) 3rem;
        background: radial-gradient(ellipse 70% 60% at 72% 45%, #3b0f60 0%, #1c0730 45%, #020101 100%);
    }

    .hlw-accueil__interieur {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: clamp(2rem, 5vw, 6rem);
    }

    .hlw-accueil__texte {
        text-align: left;
    }

    .hlw-accueil__titre img,
    .hlw-accueil__accroche img {
        margin-inline: 0;
    }

    .hlw-accueil__detail {
        margin: 1.25rem 0 1.75rem;
    }

    .hlw-accueil__tableau {
        order: 0;
    }

    .hlw-accueil__cadre {
        width: min(100%, calc((100svh - 11rem) * 1400 / 1514), 40rem);
    }

    .hlw-accueil__yeux {
        display: none;
    }
}

/* ---------------------------------------------------------
   Grand écran : cadre CADRE_DESKTOP (1602 px, bords
   169 / 124 / 170 / 129) et yeux dans la nuit.
   --------------------------------------------------------- */
@media (min-width: 992px) {
    .hlw-accueil__cadre {
        --hlw-k: calc(100cqw / 1602);
    }

    .hlw-accueil__bord {
        border-image: url("cadre-desktop.webp") 169 124 170 129 stretch;
        border-width: calc(169 * var(--hlw-k)) calc(124 * var(--hlw-k)) calc(170 * var(--hlw-k)) calc(129 * var(--hlw-k));
    }

    .hlw-accueil__yeux {
        display: block;
    }

    /* En bas à gauche, sous le texte. */
    .hlw-accueil__yeux--ronds {
        left: clamp(1.5rem, 4vw, 4rem);
        top: auto;
        bottom: 9%;
        width: clamp(48px, 4.5vw, 80px);
    }

    /* Au-dessus du titre, dans le ciel de la colonne de texte. */
    .hlw-accueil__yeux--chat {
        left: 30%;
        right: auto;
        top: 17%;
        width: clamp(56px, 5vw, 96px);
    }
}

/* Les yeux s'éteignent puis se rallument, comme sur la LP ;
   les deux rythmes ne tombent jamais ensemble au départ. */
@keyframes hlw-accueil-yeux-ronds {
    0%,
    55%,
    100% {
        opacity: 0.9;
    }

    62%,
    80% {
        opacity: 0;
    }
}

@keyframes hlw-accueil-yeux-chat {
    0%,
    18%,
    100% {
        opacity: 0.9;
    }

    24%,
    40% {
        opacity: 0;
    }

    46% {
        opacity: 0.9;
    }
}

/* ---------------------------------------------------------
   Visiteurs qui demandent moins d'animations : rien ne bouge,
   pas d'éclair, les yeux restent allumés.
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .hlw-accueil__eclair,
    .hlw-accueil__yeux {
        animation: none !important;
    }

    .hlw-accueil__bouton {
        transition: none;
    }
}
