/* Bloc Hero – Application mobile
   Typographie et couleurs via les classes du theme (@apply).
   Le titre porte la classe h1/h2 du theme dans le PHP.
   Valeurs de calage du visuel : en dur, pas d'equivalent dans le theme.
   Marges de section hors @layer (sinon la reinitialisation du theme gagne). */

@layer components {

    .oveo-hero-app { overflow-x: clip; }

    .oveo-hero-app .ham-card {
        @apply relative flex flex-col;
        gap: 32px;
        border-radius: 20px;
    }

    .oveo-hero-app .ham-card--gradient {
        background: linear-gradient(129.32deg, #2669E3 16.36%, #0D4DC4 78.51%);
    }

    .oveo-hero-app .ham-card--flat { @apply bg-bleu; }

    .oveo-hero-app .ham-content {
        @apply flex flex-col items-start w-full text-white;
        gap: 24px;
    }

    .oveo-hero-app .ham-headings {
        @apply flex flex-col w-full;
        gap: 8px;
    }

    .oveo-hero-app .ham-title { @apply m-0 text-white; }

    .oveo-hero-app .ham-subtitle {
        @apply m-0 text-white font-book text-22;
        line-height: 1;
    }

    .oveo-hero-app .ham-title strong,
    .oveo-hero-app .ham-subtitle strong { @apply font-heavy; }

    .oveo-hero-app .ham-text {
        @apply m-0 text-white font-book text-20;
        line-height: 1.5;
    }

    .oveo-hero-app .ham-cta { @apply !text-noir; }

    .oveo-hero-app .ham-advantages {
        @apply flex flex-wrap m-0 p-0 list-none w-full;
        gap: 24px;
    }

    .oveo-hero-app .ham-adv {
        @apply flex flex-col items-center text-center;
        gap: 4px;
    }

    .oveo-hero-app .ham-adv-icon {
        @apply w-auto object-contain;
        height: 28px;
    }

    .oveo-hero-app .ham-adv-label {
        @apply text-white font-heavy text-16;
        line-height: 1;
    }

    /* ---------- Visuel ---------- */

    .oveo-hero-app .ham-media {
        @apply relative w-full;
        height: 300px;
        order: -1;
    }

    .oveo-hero-app .ham-visual {
        @apply absolute block;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    @media (min-width: 768px) {
        .oveo-hero-app .ham-subtitle { @apply text-26; }
    }

    @media (min-width: 1024px) {

        /* === REGLAGES DU VISUEL ===
           height : taille du mockup
           top    : position verticale, >50% = plus bas
           left   : position horizontale, >50% = plus a droite */

        .oveo-hero-app .ham-card {
            @apply flex-row items-center;
            gap: 24px;
            min-height: 420px;
        }

        .oveo-hero-app .ham-content {
            flex: 1 1 0;
            min-width: 340px;
            max-width: 580px;
            gap: 32px;
        }

        .oveo-hero-app .ham-subtitle { @apply text-32; }

        .oveo-hero-app .ham-media {
            flex: 0 1 420px;
            align-self: stretch;
            height: auto;
            order: 0;
        }

        .oveo-hero-app .ham-visual { top: 54%; left: 50%; }
        .oveo-hero-app .ham-media--none .ham-visual { top: 50%; }
        .oveo-hero-app .ham-media--sm   .ham-visual { top: 52%; }
        .oveo-hero-app .ham-media--lg   .ham-visual { top: 56%; }
    }
}

/* Marges de section : hors @layer.
   Marge basse a zero : l'ombre portee du PNG fait l'espacement.
   Si le visuel est remplace par une image sans ombre, retablir une marge. */
.oveo-hero-app {
    padding-top: 24px;
    padding-bottom: 0;
}

@media (min-width: 1024px) {
    .oveo-hero-app { padding-top: 60px; }
}

/* Marges internes de la carte : hors @layer. */
.oveo-hero-app .ham-card {
    padding: 40px 24px;
}

@media (min-width: 1024px) {
    .oveo-hero-app .ham-card {
        padding: 48px 0 48px 80px;
    }
}

/* Dimensions du visuel : hors @layer, sinon la reinitialisation
   max-width:100% du theme sur les images gagne.
   === REGLAGES DU MOCKUP : hauteurs ajustables ici === */
.oveo-hero-app .ham-visual {
    width: auto;
    height: 340px;
    max-width: none;
}

@media (min-width: 1024px) {
    .oveo-hero-app .ham-visual { height: 560px; }
    .oveo-hero-app .ham-media--none .ham-visual { height: 440px; }
    .oveo-hero-app .ham-media--sm   .ham-visual { height: 560px; }
    .oveo-hero-app .ham-media--lg   .ham-visual { height: 760px; }
}

/* Palier intermediaire (570 -> 1023 px) : bloc empile mais centre,
   texte plafonne et visuel agrandi, pour se rapprocher du rendu mobile.
   === REGLAGES DE CE PALIER === */
@media (min-width: 570px) and (max-width: 1023px) {
    .oveo-hero-app .ham-content {
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
        align-items: center;
        text-align: center;
    }
    .oveo-hero-app .ham-visual { height: 440px; }
    .oveo-hero-app .ham-media  { height: 400px; }
}

/* Espacements du bloc texte, resserres.
   ham-headings : titre -> sous-titre
   ham-content  : bloc texte -> bouton */
.oveo-hero-app .ham-headings { gap: 4px; }
.oveo-hero-app .ham-content  { gap: 16px; }

@media (min-width: 1024px) {
    .oveo-hero-app .ham-content { gap: 20px; }
}
