/* ==========================================================================
   HeroNews – Hero Section Widget
   Pixel-perfect reproduction du design "The Clinical Concierge"
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Google Fonts Fallbacks & Variables CSS
   -------------------------------------------------------------------------- */
:root {
    --hn-font-headline: 'Manrope', 'Segoe UI', Arial, sans-serif;
    --hn-font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

    /* Palette principale */
    --hn-primary:              #2357ba;
    --hn-primary-container:    #4370d5;
    --hn-on-surface:           #021c39;
    --hn-surface:              #f9f9ff;
    --hn-surface-low:          #f0f3ff;
    --hn-surface-lowest:       #ffffff;
    --hn-surface-variant:      #d5e3ff;
    --hn-surface-container:    #e7eeff;
    --hn-tertiary:             #676000;
    --hn-tertiary-container:   #baae00;
    --hn-tertiary-fixed:       #f5e600;
    --hn-tertiary-fixed-dim:   #d7ca00;
    --hn-on-tertiary-container: #454100;
    --hn-primary-fixed-dim:    #b1c5ff;
    --hn-secondary:            #4a5f80;
    --hn-outline-variant:      #c3c6d5;
    --hn-inverse-surface:      #1b314f;

    /* Overlay gradient – désactivé par défaut */
    --hn-overlay-from: rgba(0, 0, 0, 0);
    --hn-overlay-mid:  rgba(0, 0, 0, 0);
}

/* --------------------------------------------------------------------------
   1. Section principale
   -------------------------------------------------------------------------- */
.hn-hero-section {
    position: relative;
    min-height: 921px;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    font-family: var(--hn-font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Force le widget Elementor wrapper à être sans marges ni bordures */
.elementor-widget-heronews_hero_section,
.elementor-widget-heronews_hero_section > .elementor-widget-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    line-height: 0;
    border: none !important;
    background: none !important;
}

/* Force la section Elementor parente à être pleine largeur */
.elementor-section:has(.elementor-widget-heronews_hero_section),
.e-con:has(.elementor-widget-heronews_hero_section) {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* --------------------------------------------------------------------------
   2. Arrière-plan & overlay
   -------------------------------------------------------------------------- */
.hn-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hn-hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.hn-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        var(--hn-overlay-from) 0%,
        var(--hn-overlay-mid) 55%,
        transparent 100%
    );
}

/* --------------------------------------------------------------------------
   3. Container
   -------------------------------------------------------------------------- */
.hn-hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 80px 96px;
}

.hn-hero-content {
    max-width: 768px;
}

/* --------------------------------------------------------------------------
   4. Badge / Pastille
   -------------------------------------------------------------------------- */
.hn-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 9999px;
    background: rgba(2, 28, 57, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    margin-bottom: 24px;
}

.hn-badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: var(--hn-tertiary-fixed);
    animation: hn-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    flex-shrink: 0;
}

@keyframes hn-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.hn-badge-text {
    color: #ffffff;
    font-family: var(--hn-font-body);
    font-size: 0.75rem;       /* 12px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   5. Titre principal
   -------------------------------------------------------------------------- */
.hn-headline {
    font-family: var(--hn-font-headline);
    font-size: clamp(2.5rem, 5.5vw, 4.5rem); /* 40px → 72px */
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 32px 0;
    padding: 0;
}

.hn-headline-accent {
    color: var(--hn-tertiary-fixed); /* #f5e600 */
}

/* --------------------------------------------------------------------------
   6. Description
   -------------------------------------------------------------------------- */
.hn-description {
    font-family: var(--hn-font-body);
    font-size: clamp(1rem, 1.5vw, 1.25rem);  /* 16px → 20px */
    font-weight: 400;
    color: rgba(240, 243, 255, 0.90);
    line-height: 1.7;
    margin: 0 0 48px 0;
    max-width: 640px;
    padding-left: 32px;
    border-left: 2px solid rgba(177, 197, 255, 0.30);
}

/* --------------------------------------------------------------------------
   7. Boutons
   -------------------------------------------------------------------------- */
.hn-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

/* --- Bouton primaire --- */
.hn-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background-color: var(--hn-tertiary-container);  /* #baae00 */
    color: var(--hn-on-tertiary-container);           /* #454100 */
    font-family: var(--hn-font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(2, 28, 57, 0.20);
    transition: background-color 0.3s ease, transform 0.2s ease;
    line-height: 1;
    white-space: nowrap;
}

.hn-btn-primary:hover {
    background-color: var(--hn-tertiary);  /* #676000 */
    color: var(--hn-on-tertiary-container);
    text-decoration: none;
}

.hn-btn-primary:hover .hn-btn-icon {
    transform: translateX(4px);
}

.hn-btn-icon {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
    font-family: 'Material Symbols Outlined';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- Bouton secondaire --- */
.hn-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background-color: transparent;
    color: #ffffff;
    font-family: var(--hn-font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background-color 0.3s ease;
    line-height: 1;
    white-space: nowrap;
}

.hn-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. Statistiques
   -------------------------------------------------------------------------- */
.hn-stats-wrapper {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.hn-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.hn-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hn-stat-value {
    font-family: var(--hn-font-headline);
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    color: var(--hn-tertiary-fixed); /* #f5e600 */
    margin: 0;
    line-height: 1.2;
}

.hn-stat-label {
    font-family: var(--hn-font-body);
    font-size: 0.75rem;  /* 12px */
    font-weight: 400;
    color: rgba(255, 255, 255, 0.60);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin: 0;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   9. Carte preuve sociale (bottom-right)
   -------------------------------------------------------------------------- */
.hn-social-proof {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 10;
    /* Carte glassmorphism */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    margin: 32px;
    max-width: 420px;
}

.hn-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.hn-avatar {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    border: 2px solid var(--hn-on-surface);
    object-fit: cover;
    margin-left: -16px;
    display: block;
}

.hn-avatars .hn-avatar:first-child {
    margin-left: 0;
}

.hn-avatar-count {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    border: 2px solid var(--hn-on-surface);
    background-color: var(--hn-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--hn-font-body);
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: -16px;
    flex-shrink: 0;
}

.hn-social-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hn-social-title {
    font-family: var(--hn-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.hn-social-subtitle {
    font-family: var(--hn-font-body);
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.50);
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   10. RESPONSIVE
   ========================================================================== */

/* --- Tablette (768px – 1023px) --- */
@media screen and (max-width: 1023px) {
    .hn-hero-section {
        min-height: 700px;
    }

    .hn-hero-container {
        padding: 60px 48px;
    }

    .hn-hero-content {
        max-width: 100%;
    }

    .hn-headline {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }

    .hn-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hn-social-proof {
        position: static;
        margin: 0 0 0 0;
        max-width: 100%;
        border-radius: 12px;
    }

    .hn-hero-container {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }
}

/* --- Mobile (< 768px) --- */
@media screen and (max-width: 767px) {
    .hn-hero-section {
        min-height: 100svh;
        align-items: flex-start;
    }

    .hn-hero-container {
        padding: 48px 24px;
    }

    .hn-headline {
        font-size: clamp(2rem, 9vw, 2.75rem);
        letter-spacing: -0.01em;
    }

    .hn-description {
        font-size: 1rem;
        padding-left: 20px;
        margin-bottom: 36px;
    }

    .hn-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .hn-btn-primary,
    .hn-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .hn-stats-wrapper {
        margin-top: 48px;
        padding-top: 32px;
    }

    .hn-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .hn-stat-value {
        font-size: 1.5rem;
    }

    /* Carte cachée sur mobile (comme dans l'original – hidden lg:block) */
    .hn-social-proof {
        display: none;
    }

    .hn-badge {
        margin-bottom: 20px;
    }
}

/* --- Grand écran (> 1280px) --- */
@media screen and (min-width: 1280px) {
    .hn-hero-container {
        padding: 80px 96px;
    }
}

/* --------------------------------------------------------------------------
   11. Fixes éditeur Elementor & 100% largeur sans bordures blanches
   -------------------------------------------------------------------------- */

/* Empêche Elementor d'ajouter des marges/paddings/bordures au wrapper */
.elementor-widget-heronews_hero_section,
.elementor-widget-heronews_hero_section > .elementor-widget-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    line-height: 0;                  /* empêche gap sous l'image */
}

/* Supprime les marges par défaut d'Elementor sur la colonne parente */
.elementor-column:has(.elementor-widget-heronews_hero_section),
.elementor-col-100:has(.elementor-widget-heronews_hero_section) {
    padding: 0 !important;
}

/* Supprime les marges sur la section Elementor parente (v3 containers) */
.e-con:has(.elementor-widget-heronews_hero_section),
.e-con-inner:has(.elementor-widget-heronews_hero_section) {
    padding: 0 !important;
    margin: 0 !important;
    --padding-block-start: 0 !important;
    --padding-block-end: 0 !important;
    --padding-inline-start: 0 !important;
    --padding-inline-end: 0 !important;
}

/* Supprime les marges sur la section Elementor parente (v2 sections) */
.elementor-section:has(.elementor-widget-heronews_hero_section) > .elementor-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.elementor-section:has(.elementor-widget-heronews_hero_section) {
    padding: 0 !important;
    margin: 0 !important;
}

/* Fix éditeur : image non cliquable par accident */
.elementor-editor-active .hn-hero-bg-img {
    pointer-events: none;
}

/* Carte visible dans l'éditeur pour preview */
.elementor-editor-active .hn-social-proof {
    display: flex !important;
}
