/* =========================================
        0. BRAND VARIABLES (Sang & Encre)
        ========================================= */
:root {
    --color-primary: #000000;
    --color-secondary: #ffffff;
    --color-accent: #b91c1c;
    --color-accent-hover: #991b1b;
    --transition-base: all 0.3s ease;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

/* =========================================
        1. RESET & BASE
        ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: #fff;
    overflow-x: hidden;
    color: #1f2937;
}

/* =========================================
        2. NAVIGATION (Circuit Style)
        ========================================= */
/* 
   =========================================
   GLOBAL LAYERING (Z-INDEX STACK)
   =========================================
   - Background Canvas:   -1
   - Page Hero/Content:   10
   - Hero Content:        20
   - Contextual Subnav:   None (Static/Flow)
   - Mobile Overlay:      200
   - Main Header (Nav):   1000
   - Mobile Toggle:       1200 (Always on top)
*/

.main-header {
    position: relative;
    /* NON-FIXÉ comme demandé */
    width: 100%;
    z-index: 1000;
    /* Distinct from hero layers */
    background-color: transparent;
    margin-top: 20px;
    margin-bottom: 30px;
    /* MARGE ENTRE LE MENU ET LE CONTENU */
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    height: 90px;
    padding: 0 20px;
    position: relative;
    /* z-index: auto; */
}

.nav-group {
    display: flex;
    align-items: center;
    flex: 1;
    height: 100%;
    position: relative;
    z-index: 10;
    /* Lines stay visible but low */
}

.nav-group.left {
    justify-content: flex-end;
    padding-right: 20px;
}

.nav-group.right {
    justify-content: flex-start;
    padding-left: 20px;
}

.circuit-line {
    height: 3px;
    background-color: var(--color-accent);
    flex-grow: 1;
    position: relative;
    opacity: 1;
    /* More visible */
}

.circuit-line::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px var(--color-accent);
}

.nav-group.left .circuit-line::before {
    left: 0;
}

.nav-group.right .circuit-line::before {
    right: 0;
}

.nav-links-wrapper {
    display: flex;
    gap: 25px;
    padding: 0 20px;
}

.nav-links-wrapper a {
    text-decoration: none;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    position: relative;
    transition: var(--transition-base);
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-links-wrapper a:hover {
    color: var(--color-accent);
}

.nav-links-wrapper a:hover::after {
    width: 100%;
}

/* Contextual In-Page Sub-navigation */
.contextual-subnav {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 10%;
    position: relative;
    /* Removed sticky and z-index as requested */
    display: flex;
    justify-content: center;
    gap: 0;
}

.subnav-link {
    text-decoration: none;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 25px 30px;
    position: relative;
    transition: all 0.3s ease;
}

.subnav-link:hover {
    color: #000;
}

.subnav-link.active {
    color: #b91c1c;
}

.subnav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #b91c1c;
}

@media (max-width: 768px) {
    .contextual-subnav {
        padding: 0 20px;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .subnav-link {
        padding: 20px 15px;
        white-space: nowrap;
    }
}

/* Center the module wrapper and handle z-index for logo button to stay on top */
.center-module-wrapper {
    position: relative;
    z-index: 1200;
    /* Above overlay (200) and header (1000) */
    cursor: default;
    /* Pas cliquable par défaut (Desktop) */
}

.center-shape {
    background-color: var(--color-accent);
    color: white;
    width: 180px;
    height: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s;
    box-shadow: 0 5px 20px rgba(185, 28, 28, 0.4);
}

.center-shape:hover {
    transform: scale(1.08);
    background-color: var(--color-accent-hover);
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.center-module-wrapper.active .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.center-module-wrapper.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.center-module-wrapper.active .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    /* Behind header but above content */
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-overlay a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    margin: 12px 0;
    font-weight: 800;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s ease;
    text-transform: uppercase;
}

.mobile-overlay.active a {
    transform: translateY(0);
    opacity: 1;
}

.mobile-overlay.active a:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-overlay.active a:nth-child(2) {
    transition-delay: 0.15s;
}

.mobile-overlay.active a:nth-child(3) {
    transition-delay: 0.2s;
}

.mobile-overlay a:hover {
    color: var(--color-accent);
}

/* =========================================
        3. LAYOUT (Test Blocks)
        ========================================= */
.container {
    max-width: 1024px;
    margin: 0 auto;
    width: 100%;
}

.bn_haut {
    height: 100px;
    /* Rouge Pharma RSE */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.content_gb_haut {
    display: flex;
    align-items: flex-start;
    background-color: transparent;
}

.bn_gauche,
.bn_droite {
    flex: 0 0 100px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.content_haut {
    flex: 1;
    background-color: white;
    padding: 20px;
    min-height: 600px;
    box-shadow: inset 0 0 0 1px #ddd;
}

.fullsize_black {
    width: 100%;
    height: 300px;
    background-color: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
        4. MOBILE ADJUSTMENTS
        ========================================= */
@media (max-width: 991px) {
    .center-module-wrapper {
        cursor: pointer;
    }

    .nav-group {
        display: flex;
    }

    .nav-links-wrapper {
        display: none;
    }

    .center-shape {
        width: 100px;
        height: 60px;
        clip-path: polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%);
    }

    .logo-text {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .navbar {
        height: 80px;
    }
}

@media (max-width: 768px) {

    /* Global Typography Responsive */
    h1,
    .page-title,
    .article-title {
        font-size: 2.25rem !important;
        letter-spacing: -1px !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.4rem !important;
    }

    .editorial-text {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
    }

    /* Layout Adjustments */
    .bn_gauche,
    .bn_droite {
        display: none;
    }

    .bn_haut {
        height: 80px;
    }

    .content_gb_haut {
        display: block;
        padding: 0;
    }

    .content_haut {
        width: 100%;
        min-height: 400px;
        padding: 30px 20px !important;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Sections Padding */
    .content-section {
        padding: 60px 20px !important;
    }

    /* Hero Scaling */
    .page-hero {
        height: 30vh !important;
        min-height: 200px !important;
    }

    .article-hero {
        height: 45vh !important;
        min-height: 300px !important;
    }

    .hero-content {
        padding: 0 20px !important;
    }
}

@media (max-width: 480px) {

    .cta-banner,
    .cta-box {
        padding: 50px 20px !important;
    }

    .cta-button,
    .cta-btn {
        width: 100%;
        padding: 15px 20px !important;
        font-size: 0.9rem !important;
    }
}