/* Hero « Aurora » — bandeau v3 des fiches activite (review 14/08/2026).
   Port fidele de la maquette Lovable `src/pages/AchatFichierProspection02.tsx`
   (projet datapult-lead-booster). Les jetons ci-dessous sont recopies tels quels
   depuis `src/index.css` de la maquette, en HSL, prefixes --dp- pour ne pas
   entrer en conflit avec les variables du theme. Pour resynchroniser plus tard :
   comparer ce bloc au :root de la maquette, rien d'autre n'est invente ici.

   Charge uniquement quand le champ ACF « Selectionner le modele de bandeau »
   vaut « aurora ». Voir templates/export-model/hero-aurora.php. */

body.has-hero-aurora {
    --dp-background: 40 33% 98%;
    --dp-foreground: 233 47% 13%;
    --dp-card: 0 0% 100%;
    --dp-primary: 252 83% 65%;
    --dp-muted-foreground: 233 15% 45%;
    --dp-border: 240 20% 92%;
    --dp-font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

/* ---------------------------------------------------------------- 1. Fond
   Deux taches seulement, toutes deux a DROITE, posees sur un blanc chaud.
   « background-attachment: fixed » reproduit le calque `fixed inset-0` de la
   maquette : le degrade est cale sur l'ecran, il ne defile pas avec la page. */

body.has-hero-aurora {
    background-color: hsl(var(--dp-background));
    background-image:
        radial-gradient(1200px 600px at 80% 40%, hsl(252 100% 92% / 0.7), transparent 60%),
        radial-gradient(900px 500px at 90% 70%, hsl(333 100% 90% / 0.55), transparent 60%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: 0 0;
    background-size: 100% 100%;
    color: hsl(var(--dp-foreground));
}

body.has-hero-aurora .main,
body.has-hero-aurora .HHbanner_top_wrapper,
body.has-hero-aurora .blc-article,
body.has-hero-aurora .article-content,
body.has-hero-aurora footer {
    background: transparent;
}

/* ------------------------------------------------------------- 2. Gabarit
   <main> devient la grille de la page : colonne gauche = haut de page PUIS
   article, colonne droite = le chat sur les deux rangees. */

body.has-hero-aurora .main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 110px 16px 32px;
}

body.has-hero-aurora .hero-aurora--text {
    grid-column: 1;
    grid-row: 1;
}

body.has-hero-aurora .hero-aurora--chat {
    grid-column: 1;
    grid-row: 2;
    margin-top: 32px;
}

body.has-hero-aurora .HHbanner_top_wrapper {
    grid-column: 1;
    grid-row: 3;
    margin-top: 32px;
}

/* L'article remplit la colonne : plus de conteneur centre ni de deuxieme
   colonne (l'encadre de telechargement a ete retire du bandeau v3). */
body.has-hero-aurora .blc-article .container {
    max-width: none;
    margin: 0;
    padding: 0;
}

body.has-hero-aurora .article-content.article-layout {
    display: block;
}

body.has-hero-aurora .sticky-right {
    display: none;
}

/* Le theme pose trois illustrations decoratives derriere l'article (deco-right,
   deco-bottom, deco-left). Elles n'existent pas dans la maquette et tachent le
   degrade en orange : on les retire sur ce bandeau uniquement. */
body.has-hero-aurora .blc-article:before {
    display: none;
}

/* ---------------------------------------------------- 3. Colonne de gauche */

.hero-aurora__title {
    margin: 0;
    font-family: var(--dp-font-display);
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: hsl(var(--dp-foreground));
}

/* surligner_dans_titre() enveloppe la partie entre asterisques dans un <span>. */
.hero-aurora__title span {
    color: hsl(var(--dp-primary));
}

.hero-aurora__lead {
    margin: 16px 0 0;
    font-size: 15px;
    line-height: 1.625;
    color: hsl(var(--dp-foreground));
}

.hero-aurora__lead strong {
    font-weight: 600;
}

/* Les quatre vignettes : un cadre commun translucide, quatre cartes blanches. */
.hero-aurora__tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 0;
    padding: 12px;
    border: 1px solid hsl(var(--dp-border));
    border-radius: 16px;
    background: hsl(var(--dp-card) / 0.6);
}

.hero-aurora__tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: hsl(var(--dp-card));
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.hero-aurora__tile-icon {
    flex-shrink: 0;
    color: hsl(var(--dp-primary));
}

.hero-aurora__tile-text {
    display: block;
    line-height: 1.25;
}

.hero-aurora__tile-title {
    display: block;
    font-family: var(--dp-font-display);
    font-size: 13px;
    font-weight: 700;
    color: hsl(var(--dp-foreground));
}

.hero-aurora__tile-label {
    display: block;
    font-size: 11px;
    color: hsl(var(--dp-muted-foreground));
}

/* Logos clients, sous les vignettes. */
.hero-aurora__trust {
    margin: 32px 0 0;
}

.hero-aurora__trust .partenairess_title {
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-align: left;
    text-transform: uppercase;
    color: hsl(var(--dp-muted-foreground));
}

.hero-aurora__trust .logo-carousel-wrap {
    margin: 0;
    padding: 0;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.hero-aurora__trust .logo-carousel-track {
    gap: 40px;
}

.hero-aurora__trust .logo-carousel-item {
    width: auto;
    height: 32px;
}

.hero-aurora__trust .logo-carousel-item img {
    max-width: 100px;
    max-height: 100%;
    opacity: 0.7;
}

/* ----------------------------------------------------- 4. Colonne du chat */

/* Contour degrade arc-en-ciel de 1 px autour du chat. */
.hero-aurora__frame-outer {
    padding: 1px;
    border-radius: 1.5rem;
    background: linear-gradient(135deg,
        hsl(252 70% 65%) 0%,
        hsl(333 84% 55%) 30%,
        hsl(45 90% 55%) 65%,
        hsl(211 83% 60%) 100%);
}

.hero-aurora__frame {
    overflow: hidden;
    border: 1px solid hsl(var(--dp-border) / 0.6);
    border-radius: 1.44rem;
    background: hsl(var(--dp-card));
    box-shadow:
        0 10px 40px -12px hsl(240 10% 20% / 0.18),
        0 4px 12px -4px hsl(240 10% 20% / 0.08);
}

.hero-aurora__frame .inner.form-wrap {
    padding: 0;
}

/* form-devis.php impose sa hauteur en style inline : il faut passer devant.
   On vise la fenetre du chat par sa place dans le cadre ET par son etiquette :
   la version en ligne de form-devis.php (prod comme staging) ne porte pas encore
   id="pascrawl-chat", ajoute le 06/08/2026 et jamais transfere. Sans le
   selecteur de position, le chat garderait ses 560 px et laisserait un vide en
   bas du cadre. (03/09/2026) */
.hero-aurora__frame .pascrawl-embed-wrap {
    min-height: 480px !important;
}

.hero-aurora__frame #pascrawl-chat,
.hero-aurora__frame iframe {
    height: 78dvh !important;
    min-height: 480px !important;
    max-height: 680px !important;
    border-radius: 0 !important;
}

.hero-aurora__disclaimer {
    margin: 12px 0 0;
    padding: 0 4px;
    font-size: 11.5px;
    line-height: 1.625;
    color: hsl(var(--dp-muted-foreground));
}

/* ------------------------------------------------- 5. Article sous le hero */

body.has-hero-aurora .main-content {
    padding: 24px 16px;
    border: 1px solid hsl(var(--dp-border));
    border-radius: 24px;
    background: hsl(var(--dp-card) / 0.6);
}

body.has-hero-aurora .main-content h2 {
    font-family: var(--dp-font-display);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.375;
    letter-spacing: -0.01em;
    color: hsl(var(--dp-foreground));
}

body.has-hero-aurora .main-content h3 {
    font-family: var(--dp-font-display);
    color: hsl(var(--dp-foreground));
}

body.has-hero-aurora .main-content p,
body.has-hero-aurora .main-content li {
    font-size: 14.5px;
    line-height: 1.625;
    color: hsl(var(--dp-muted-foreground));
}

/* ------------------------------------------------------------ 6. Largeurs */

@media (min-width: 640px) {
    body.has-hero-aurora .main {
        padding-left: 24px;
        padding-right: 24px;
        padding-top: 130px;
    }

    .hero-aurora__tiles {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        padding: 16px;
    }

    .hero-aurora__tile-title {
        font-size: 13.5px;
    }

    .hero-aurora__tile-label {
        font-size: 11.5px;
    }

    .hero-aurora__trust .logo-carousel-item {
        height: 40px;
    }

    .hero-aurora__trust .logo-carousel-item img {
        max-width: 120px;
    }

    .hero-aurora__frame #pascrawl-chat,
    .hero-aurora__frame iframe {
        height: 620px !important;
        max-height: none !important;
    }

    body.has-hero-aurora .main-content {
        padding: 40px 32px;
    }

    body.has-hero-aurora .main-content h2 {
        font-size: 24px;
    }

    body.has-hero-aurora .main-content p,
    body.has-hero-aurora .main-content li {
        font-size: 15px;
    }
}

@media (min-width: 1024px) {
    body.has-hero-aurora .main {
        grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
        column-gap: 40px;
        padding: 160px 40px 40px;
    }

    body.has-hero-aurora .hero-aurora--chat {
        grid-column: 2;
        /* Deux rangees : le bloc couvre le haut de page ET l'article, ce qui
           donne au sticky de quoi rester visible jusqu'en bas. */
        grid-row: 1 / span 2;
        /* Indispensable : la grille est en align-items:start, sans ce stretch
           la colonne ne fait que la hauteur du chat et le sticky n'a aucune
           course. */
        align-self: stretch;
        margin-top: 0;
    }

    body.has-hero-aurora .HHbanner_top_wrapper {
        grid-row: 2;
        /* lg:mt-32 de la maquette. */
        margin-top: 128px;
    }

    /* Le bloc du haut est centre sur la hauteur du chat. */
    .hero-aurora__intro {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 600px;
    }

    /* lg:top-24 de la maquette. */
    .hero-aurora__sticky {
        position: sticky;
        top: 96px;
    }

    .hero-aurora__lead {
        font-size: 16px;
    }

    .hero-aurora__trust {
        margin-top: 40px;
    }

    .hero-aurora__frame #pascrawl-chat,
    .hero-aurora__frame iframe {
        height: 600px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-aurora__trust .logo-carousel-track {
        animation: none;
    }
}
