/* ============================================================
   NETFORCE — Global CSS
   Composants réutilisables partagés entre toutes les pages
   ============================================================ */

/* ------------------------------------------------------------
   SECTION BADGE
   Étiquette supérieure au-dessus des titres de section.
   Usage : class="section-badge [modificateur]"

   Modificateurs disponibles :
     --light      fond sombre  → texte blanc/semi-transparent
     --centered   ligne des deux côtés, badge centré
   ------------------------------------------------------------ */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #137AA9;
    margin-bottom: 1rem;
}

.section-badge::before {
    content: '';
    width: 24px;
    height: 2px;
    background: currentColor;
    flex-shrink: 0;
}

/* — variante fond sombre — */
.section-badge--light {
    color: rgba(255, 255, 255, 0.6);
}

/* — variante centrée (lignes de deux côtés) — */
.section-badge--centered {
    display: flex;
    justify-content: center;
}

.section-badge--centered::after {
    content: '';
    width: 24px;
    height: 2px;
    background: currentColor;
    flex-shrink: 0;
}

/* ------------------------------------------------------------
   POPUP INVESTISSEMENT (accueil)
   ------------------------------------------------------------ */

.nf-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.72s;
    background: rgba(8, 14, 24, 0.45);
    pointer-events: none;
}

.nf-popup-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition:
        opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0s;
}

.nf-popup {
    position: relative;
    width: min(520px, 100%);
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(19, 122, 169, 0.22);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 20px 48px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    transform: translate3d(0, 28px, 0) scale(0.97);
    opacity: 0;
    transition:
        transform 0.78s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.72s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0.06s;
    will-change: transform, opacity;
}

.nf-popup-backdrop:not(.is-open) .nf-popup {
    transition-delay: 0s;
}

.nf-popup-backdrop.is-open .nf-popup {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.06),
        0 28px 56px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nf-popup-topline {
    height: 3px;
    background: linear-gradient(90deg, #137aa9 0%, #5bb8da 55%, #c9a962 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    border-radius: 18px 18px 0 0;
}

.nf-popup-hero {
    height: 218px;
    background: radial-gradient(ellipse 80% 90% at 50% 44%, #d6eaf6 0%, #e4f1f9 55%, #ddedf7 100%);
    position: relative;
    overflow: hidden;
}

.nf-popup-hero-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

.nf-popup-hero-map:active {
    cursor: grabbing;
}

.nf-popup-hero-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(228, 241, 249, 0) 0%,
        rgba(228, 241, 249, 0.3) 50%,
        rgba(255, 255, 255, 1) 100%
    );
    pointer-events: none;
}

.nf-popup-hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 22px 20px;
    z-index: 2;
    text-align: center;
    pointer-events: none;
}

.nf-popup-hero-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    max-width: 100%;
    margin-top: -8px;
}

/* Ethnocentric via .font-ethno (défini sur index.html) */
.nf-popup-hero-kicker {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 0;
    padding: 0 6px;
    overflow: hidden;
    isolation: isolate;
    font-size: clamp(12px, 3.2vw, 19px);
    font-weight: 400;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
    color: #0d5e82;
    text-align: center;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.75),
        0 1px 0 rgba(255, 255, 255, 0.9);
}

.nf-popup-hero-kicker::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 0;
    width: 42%;
    height: 140%;
    background: linear-gradient(
        100deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 18%,
        rgba(255, 255, 255, 0.65) 50%,
        rgba(255, 255, 255, 0) 82%,
        transparent 100%
    );
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 1;
    animation: none;
}

.nf-popup-backdrop.is-open .nf-popup-hero-kicker::after {
    animation: nfPopupTextShine 2.9s ease-in-out infinite;
}

.nf-popup-hero-deck {
    margin: 0;
    max-width: 26em;
    font-family:
        'Outfit',
        ui-sans-serif,
        system-ui,
        sans-serif;
    font-size: clamp(12px, 2.1vw, 15px);
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    letter-spacing: -0.02em;
    text-align: center;
}

.nf-popup-hero-deck-em {
    color: #137aa9;
    font-weight: 700;
}

.nf-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(19, 122, 169, 0.2);
    color: rgba(15, 23, 42, 0.45);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s,
        border-color 0.2s,
        transform 0.15s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    line-height: 1;
}

.nf-popup-close:hover {
    background: #fff;
    border-color: rgba(19, 122, 169, 0.45);
    color: #0f172a;
    transform: scale(1.08);
}

.nf-popup-body {
    padding: 4px 24px 28px;
}

.nf-popup-badge {
    position: relative;
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 14px;
    padding: 0 12px 14px;
    overflow: hidden;
    isolation: isolate;
    font-size: clamp(10px, 2.8vw, 14px);
    font-weight: 400;
    letter-spacing: 0.12em;
    line-height: 1.25;
    text-transform: uppercase;
    text-align: center;
    color: #0d5e82;
    transform-origin: center center;
    background-image: linear-gradient(#137aa9, #137aa9);
    background-size: 52px 2px;
    background-position: center bottom;
    background-repeat: no-repeat;
}

.nf-popup-badge::after {
    content: '';
    position: absolute;
    top: -15%;
    left: 0;
    width: 45%;
    height: 130%;
    background: linear-gradient(
        100deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 15%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0) 85%,
        transparent 100%
    );
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 1;
    animation: none;
}

.nf-popup-backdrop.is-open .nf-popup-badge::after {
    animation: nfPopupTextShine 2.9s ease-in-out infinite;
    animation-delay: 0.75s;
}

.nf-popup-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.4px;
    margin: 0 auto 10px;
    max-width: 16em;
    text-align: center;
}

/* Priorité sur les h2 globaux de index.html (28px !important) */
.nf-popup h2.nf-popup-title {
    font-size: 22px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.4px !important;
    margin: 0 auto 10px !important;
    max-width: 16em !important;
    font-family:
        'Outfit',
        ui-sans-serif,
        system-ui,
        sans-serif !important;
    color: #0f172a !important;
    text-align: center !important;
}

.nf-popup-title em {
    font-style: normal;
    color: #137aa9;
}

.nf-popup-sub {
    font-size: 12.5px;
    font-weight: 300;
    color: #5d7080;
    line-height: 1.7;
    margin-bottom: 16px;
}

.nf-popup-live {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    background: #f0f8ff;
    border: 1px solid rgba(19, 122, 169, 0.18);
    border-radius: 10px;
    margin-bottom: 14px;
}

.nf-popup-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3a9e50;
    flex-shrink: 0;
    animation: nfLivePulse 1.5s ease-in-out infinite;
}

@keyframes nfLivePulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(0.85);
    }
}

.nf-popup-live-text {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #607a8a;
}

.nf-popup-live-num {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-left: auto;
    letter-spacing: -0.3px;
}

.nf-popup-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.nf-popup-stat {
    background: #f2f7fb;
    border: 1px solid rgba(19, 122, 169, 0.12);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    transition:
        background 0.2s,
        border-color 0.2s;
}

.nf-popup-stat:hover {
    background: #e8f3fa;
    border-color: rgba(19, 122, 169, 0.25);
}

.nf-popup-stat-val {
    font-size: 16px;
    font-weight: 700;
    color: #137aa9;
    line-height: 1;
    margin-bottom: 4px;
    display: block;
    letter-spacing: -0.2px;
}

.nf-popup-stat-lbl {
    font-size: 7.5px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #8a9bb0;
}

.nf-popup-cta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    background: #137aa9;
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 8px;
    transition:
        background 0.22s,
        transform 0.15s,
        box-shadow 0.22s;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.nf-popup-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    transition: transform 0.55s ease;
}

.nf-popup-cta:hover::before {
    transform: translateX(100%);
}

.nf-popup-cta:hover {
    background: #0d5e82;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(19, 122, 169, 0.3);
}

.nf-popup-cta:active {
    transform: translateY(0);
}

.nf-popup-cta svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nf-popup-cta:hover svg {
    transform: translateX(4px);
}

.nf-popup-skip {
    display: block;
    width: 100%;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.28);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 0;
    transition: color 0.2s;
    border-radius: 6px;
}

.nf-popup-skip:hover {
    color: rgba(15, 23, 42, 0.55);
}

.nf-popup-legal {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    font-size: 9px;
    color: rgba(15, 23, 42, 0.28);
    line-height: 1.65;
    text-align: center;
    letter-spacing: 0.2px;
}

.nf-popup-legal-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #3a9e50;
    vertical-align: middle;
    margin-right: 4px;
    animation: nfLivePulse 1.5s ease-in-out infinite;
}

.nf-popup-backdrop.is-open .nf-popup-hero-kicker,
.nf-popup-backdrop.is-open .nf-popup-hero-deck,
.nf-popup-backdrop.is-open .nf-popup-title,
.nf-popup-backdrop.is-open .nf-popup-sub,
.nf-popup-backdrop.is-open .nf-popup-live,
.nf-popup-backdrop.is-open .nf-popup-stats,
.nf-popup-backdrop.is-open .nf-popup-cta,
.nf-popup-backdrop.is-open .nf-popup-skip,
.nf-popup-backdrop.is-open .nf-popup-legal {
    animation: nfFadeUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nf-popup-backdrop.is-open .nf-popup-badge {
    animation:
        nfFadeUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) both,
        nfPopupBadgeScale 2.7s ease-in-out infinite;
    animation-delay: 0.26s, 0.85s;
}

.nf-popup-backdrop.is-open .nf-popup-hero-kicker {
    animation-delay: 0.14s;
}

.nf-popup-backdrop.is-open .nf-popup-hero-deck {
    animation-delay: 0.22s;
}

.nf-popup-backdrop.is-open .nf-popup-title {
    animation-delay: 0.3s;
}

.nf-popup-backdrop.is-open .nf-popup-sub {
    animation-delay: 0.34s;
}

.nf-popup-backdrop.is-open .nf-popup-live {
    animation-delay: 0.38s;
}

.nf-popup-backdrop.is-open .nf-popup-stats {
    animation-delay: 0.42s;
}

.nf-popup-backdrop.is-open .nf-popup-cta {
    animation-delay: 0.46s;
}

.nf-popup-backdrop.is-open .nf-popup-skip {
    animation-delay: 0.5s;
}

.nf-popup-backdrop.is-open .nf-popup-legal {
    animation-delay: 0.54s;
}

@keyframes nfFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes nfPopupTextShine {
    0% {
        transform: translate3d(-130%, 0, 0) skewX(-11deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    48% {
        transform: translate3d(130%, 0, 0) skewX(-11deg);
        opacity: 0.9;
    }
    55%,
    100% {
        transform: translate3d(130%, 0, 0) skewX(-11deg);
        opacity: 0;
    }
}

@keyframes nfPopupBadgeScale {
    0%,
    100% {
        transform: scale(1.07);
    }
    50% {
        transform: scale(1.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .nf-popup-backdrop,
    .nf-popup-backdrop.is-open,
    .nf-popup,
    .nf-popup-backdrop.is-open .nf-popup {
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    .nf-popup-backdrop.is-open .nf-popup-hero-kicker,
    .nf-popup-backdrop.is-open .nf-popup-hero-deck,
    .nf-popup-backdrop.is-open .nf-popup-badge,
    .nf-popup-backdrop.is-open .nf-popup-title,
    .nf-popup-backdrop.is-open .nf-popup-sub,
    .nf-popup-backdrop.is-open .nf-popup-live,
    .nf-popup-backdrop.is-open .nf-popup-stats,
    .nf-popup-backdrop.is-open .nf-popup-cta,
    .nf-popup-backdrop.is-open .nf-popup-skip,
    .nf-popup-backdrop.is-open .nf-popup-legal {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
    }

    .nf-popup-hero-kicker::after,
    .nf-popup-badge::after {
        animation: none !important;
    }

    .nf-popup-badge {
        animation: none !important;
        transform: none !important;
    }
}

@media (max-width: 480px) {
    .nf-popup {
        border-radius: 14px;
    }

    .nf-popup-hero {
        height: 185px;
    }

    .nf-popup-hero-kicker {
        font-size: clamp(11px, 4vw, 16px);
        letter-spacing: 0.1em;
    }

    .nf-popup-hero-deck {
        font-size: 12px;
        max-width: 100%;
    }

    .nf-popup-body {
        padding: 4px 18px 24px;
    }

    .nf-popup-title,
    .nf-popup h2.nf-popup-title {
        font-size: 19px !important;
    }

    .nf-popup-sub {
        font-size: 12px;
    }

    .nf-popup-stat-val {
        font-size: 14px;
    }

    .nf-popup-cta {
        font-size: 10px;
        padding: 13px 18px;
    }
}
