﻿/**
 * Page Header Module - Styles
 *
 * CSS Custom Properties utilisÃ©es :
 * --cj-ph-bg-color : Couleur de fond (rgb)
 * --cj-ph-bg-image : Image de fond (url)
 * --cj-ph-min-height : Hauteur minimum
 * --cj-ph-overlay-rgb : Couleur du degradÃ©
 * --cj-ph-overlay-opacity : OpacitÃ© du degradÃ© en bas
 * --cj-ph-overlay-stop : Position ou le degradÃ© atteint sa couleur
 * --cj-ph-title-max-width : Largeur maximum du titre en desktop
 */

/* ================================================
   RESET DES CONTENEURS THEMIFY PARENTS
   ================================================ */

/* Supprimer les paddings/margins des conteneurs Themify quand ils contiennent notre module */
.module-pageheader,
.cj-ph-module-wrap {
    margin: 0 !important;
}

/* Row parente - classes ajoutees par PHP/JS + :has() pour navigateurs modernes */
.cj-ph-row,
.cj-row-has-pageheader {
    padding: 0 !important;
    margin: 0 !important;
}

/* Column parente */
.cj-ph-column,
.cj-row-has-pageheader .themify_builder_column,
.cj-row-has-pageheader .module_column,
.cj-row-has-pageheader .tb-column {
    padding: 0 !important;
}

/* Row inner */
.cj-ph-row-inner,
.cj-row-has-pageheader > .row_inner,
.cj-row-has-pageheader > .row_inner > .module_column,
.cj-row-has-pageheader > .row_inner > .module_column > .module-pageheader:not(.cj-page-header),
.cj-row-has-pageheader > .row_inner > .tb-column,
.cj-row-has-pageheader > .row_inner > .tb-column > .module-pageheader:not(.cj-page-header) {
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

@supports selector(:has(*)) {
    .themify_builder_row:has(.module-pageheader),
    .module_row:has(.module-pageheader) {
        padding: 0 !important;
        margin: 0 !important;
    }

    .themify_builder_column:has(.module-pageheader),
    .module_column:has(.module-pageheader),
    .tb-column:has(.module-pageheader) {
        padding: 0 !important;
    }

    .row_inner:has(.module-pageheader) {
        padding: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }
}

/* ================================================
   CONTAINER PRINCIPAL
   ================================================ */

.cj-page-header {
    --cj-ph-padding-x: clamp(24px, 6vw, 116px);
    position: relative;
    min-height: var(--cj-ph-min-height, 100vh) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 110px var(--cj-ph-padding-x) 80px !important;
    overflow: hidden;
    background: var(--cj-ph-bg-color, rgb(11, 10, 9));
    color: #f5f2ec;
    box-sizing: border-box;
    width: 100%;
}

.cj-page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(var(--cj-ph-overlay-rgb, 11, 10, 9), 0) 0%,
        rgba(var(--cj-ph-overlay-rgb, 11, 10, 9), var(--cj-ph-overlay-opacity, 0.86)) var(--cj-ph-overlay-stop, 100%)
    );
    pointer-events: none;
}

/* Assurer une hauteur minimum mÃªme sans contenu */
.cj-page-header__content:empty::before {
    content: "Ajoutez du contenu dans les options du module";
    display: block;
    padding: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Layout centrÃ© */
.cj-page-header--center {
    align-items: center;
    text-align: center;
    padding: 128px 6% 118px;
}

/* ================================================
   FOND / MEDIA
   ================================================ */

.cj-page-header__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--cj-ph-bg-image) center center / cover no-repeat;
}

.cj-page-header--bg-scroll .cj-page-header__media {
    position: absolute;
}

.cj-page-header--bg-fixed .cj-page-header__media {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
}

body.themify_builder_active .cj-page-header--bg-fixed .cj-page-header__media,
body.tb_show_guidelines .cj-page-header--bg-fixed .cj-page-header__media {
    position: absolute;
    width: auto;
    height: auto;
}

.module-pageheader.cj-page-header {
    padding-left: var(--cj-ph-padding-x) !important;
    padding-right: var(--cj-ph-padding-x) !important;
}

@media (prefers-reduced-motion: reduce) {
    .cj-page-header--bg-fixed .cj-page-header__media {
        position: absolute;
    }
}

/* ================================================
   OVERLAY
   ================================================ */

.cj-page-header__overlay {
    display: none !important;
}

/* Overlay sombre (par dÃ©faut) */
.cj-page-header--overlay-dark .cj-page-header__overlay {
    background: none !important;
}

/* Overlay clair */
.cj-page-header--overlay-light .cj-page-header__overlay {
    background: none !important;
}

/* ================================================
   CONTENU
   ================================================ */

.cj-page-header__content {
    position: relative;
    z-index: 3;
    max-width: 1180px;
}

/* Layout centrÃ© */
.cj-page-header--center .cj-page-header__content {
    display: grid;
    justify-items: center;
    width: min(85vw, 1500px);
    max-width: none;
}

/* ================================================
   EYEBROW (Sur-titre badge)
   ================================================ */

.cj-page-header__eyebrow {
    display: inline-block;
    font-family: var(--cj-font-display);
    font-size: 13px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #0b0a09;
    background: #eb5d0f;
    padding: 7px 13px;
    margin-bottom: 28px;
}

/* ================================================
   TITRE
   ================================================ */

.cj-page-header__title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    max-width: min(100%, var(--cj-ph-title-max-width, 1180px));
    margin: 0;
    font-family: "Saira Condensed", sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(42px, 7.2vw, 112px);
    line-height: 0.93;
    letter-spacing: -0.01em;
}

/* Ligne de titre (contient un ou plusieurs spans) */
.cj-page-header__title-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    max-width: 100%;
    row-gap: 10px;
    column-gap: 0;
    line-height: 0.82;
}

/* Spans du titre */
.cj-page-header__title-primary,
.cj-page-header__title-accent {
    display: inline-flex;
    align-items: center;
    min-height: 0.98em;
    line-height: 0.82;
    padding: 0.03em 0.08em 0.11em;
    margin-right: 0.02em;
    box-sizing: border-box;
    white-space: nowrap;
    /* Pour que le surlignage se coupe proprement sur les retours Ã  la ligne automatiques */
}

/* Fond sombre */
.cj-page-header__title-primary {
    background: #0b0a09;
    color: #f5f2ec;
    box-shadow: 0.06em 0 0 #0b0a09, -0.06em 0 0 #0b0a09;
}

/* Fond orange (accent) */
.cj-page-header__title-accent {
    background: #eb5d0f;
    color: #0b0a09;
    box-shadow: 0.06em 0 0 #eb5d0f, -0.06em 0 0 #eb5d0f;
}

.cj-page-header__title-line .cj-page-header__title-word:last-child {
    margin-right: 0;
}

/* Espace reel entre les mots (texte lu correctement par le SEO / les
   lecteurs d'ecran) mais sans largeur visuelle, pour ne pas casser le
   chainage visuel des "pilules" de mots. */
.cj-page-header__title-space {
    display: inline-block;
    width: 0;
    overflow: hidden;
}

/* CentrÃ© */
.cj-page-header--center .cj-page-header__title {
    align-items: center;
    max-width: none;
}

.cj-page-header--center .cj-page-header__title-line {
    justify-content: center;
}

/* ================================================
   INTRODUCTION
   ================================================ */

.cj-page-header__intro {
    display: inline-block;
    max-width: 600px;
    margin: 28px 0 0;
    font-family: "Saira", sans-serif;
    font-size: clamp(16px, 1.4vw, 20px);
    line-height: 1.52;
    color: #f3eee5;
    background: rgba(11, 10, 9, 0.58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 14px 18px;
}

/* CentrÃ© */
.cj-page-header--center .cj-page-header__intro {
    max-width: 80%;
}

/* ================================================
   BOUTONS
   ================================================ */

.cj-page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

/* CentrÃ© */
.cj-page-header--center .cj-page-header__actions {
    justify-content: center;
    margin-top: 34px;
}

/* Buttons use shared assets/buttons.css. */

/* ================================================
   STATS BAR
   ================================================ */

.cj-page-header__stats {
    position: absolute;
    bottom: 48px;
    left: 6%;
    right: 6%;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    gap: 48px;
}

.cj-page-header__stat-group {
    display: contents;
}

.cj-page-header__stat {
    min-width: 0;
}

.cj-page-header__stat-number {
    font-family: "Saira Condensed", sans-serif;
    font-weight: 900;
    font-size: 46px;
    line-height: 1;
    color: #f3efe8;
}

.cj-page-header__stat-suffix {
    color: #eb5d0f;
}

.cj-page-header__stat-label {
    font-family: var(--cj-font-display);
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8d877d;
    margin-top: 4px;
}

.cj-page-header__stat-divider {
    width: 1px;
    height: 46px;
    background: rgba(255, 255, 255, 0.14);
}

/* ================================================
   TORN DIVIDERS
   ================================================ */

.cj-page-header__torn-light {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: #f5f2ec;
    clip-path: polygon(0 55%, 100% 18%, 100% 100%, 0 100%);
    z-index: 4;
}

.cj-page-header__torn-orange {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: #eb5d0f;
    clip-path: polygon(0 50%, 100% 10%, 100% 20%, 0 58%);
    z-index: 5;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1024px) {
    .cj-page-header {
        padding: 100px 5% 40px;
    }

    .cj-page-header--center {
        padding: 110px 5% 100px;
    }

    .cj-page-header__stats {
        gap: 30px;
    }

    .cj-page-header__stat-number {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .cj-page-header {
        min-height: auto;
        padding: 90px 5% 60px;
    }

    .cj-page-header--has-stats {
        padding-bottom: 72px;
    }

    .cj-page-header__title {
        font-size: clamp(52px, 14vw, 76px);
        gap: 7px;
        max-width: 100%;
    }

    .cj-page-header__intro {
        max-width: 100%;
        font-size: 15px;
    }

    .cj-page-header__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .cj-page-header--center .cj-page-header__actions {
        align-items: center;
    }

    .cj-page-header__stats {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(100%, 520px);
        margin-top: 40px;
        gap: 24px 18px;
        align-items: start;
        justify-items: center;
    }

    .cj-page-header__stat-group {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .cj-page-header__stat-group:nth-child(odd):last-child,
    .cj-page-header__stat-group:only-child {
        grid-column: 1 / -1;
        width: min(100%, 240px);
    }

    .cj-page-header__stat {
        text-align: center;
    }

    .cj-page-header__stat-number {
        font-size: clamp(32px, 10vw, 42px);
    }

    .cj-page-header__stat-label {
        max-width: 18ch;
        margin: 6px auto 0;
        font-size: 11px;
        letter-spacing: 0.14em;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .cj-page-header__stat-divider {
        display: none;
    }

    .cj-page-header__torn-light,
    .cj-page-header__torn-orange {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .cj-page-header {
        padding: 80px 4% 50px;
    }

    .cj-page-header--center {
        padding-left: 4% !important;
        padding-right: 4% !important;
    }

    .cj-page-header__title {
        font-size: clamp(48px, 15vw, 64px);
        gap: 6px;
    }

    .cj-page-header__eyebrow {
        font-size: 10px;
        padding: 5px 10px;
    }

    .cj-page-header__button {
        width: fit-content;
        max-width: 100%;
    }

    .cj-page-header__button span:first-child {
        flex: 0 1 auto;
        justify-content: flex-start;
    }

    .cj-page-header__stats {
        gap: 22px 12px;
        margin-top: 36px;
    }

    .cj-page-header__stat-label {
        font-size: 10px;
        letter-spacing: 0.12em;
    }
}
