/* ==========================================================================
   NERION ARCHITECTURE IT — NOYAU CENTRAL UNIFIÉ (BASE.CSS)
   --------------------------------------------------------------------------
   Inhérent à 100% des pages du système — Zéro verrou d'urgence !important
   ========================================================================== */

:root {
    /* --- PALETTE COMPOSITE INGENIEUR (DNA NERION) --- */
    --bg-main: #0B2530;       
    --bg-card: #123544;       
    --bg-dark-lab: #061318;   
    --accent-ocean: #1F6170;  
    --accent-light: #70C8C1;  /* Turquoise officiel Nerion */
    
    /* --- GRILLE DE LISIBILITÉ AMÉLIORÉE (CONFORME NORMES WCAG) --- */
    --text-white: #F7FBFA;    
    --text-ecume: #EDFBF8;    /* Écume lumineuse anti-fatigue visuelle */
    --corail: #E2947E;        /* Corail adouci haut de gamme pour les actions */
    --corail-dark: #A9564D;   
    
    /* --- MATRICE GÉOMÉTRIQUE SÉCURISÉE --- */
    --max-width-site: 1150px;
    --font-base: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --transition-fluid: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --space-section: clamp(60px, 8vw, 120px);
}

/* --- RESET TYPOGRAPHIQUE & ARCHITECTURE APPLICATIVE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    background-color: var(--bg-main);
}

body {
    color: var(--text-white);
    font-family: var(--font-base);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 170px; /* Réserve pour le menu fixe */
    background-image: 
        radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 10% 70%, rgba(169, 86, 77, 0.25) 45%, transparent 50%);
    background-attachment: fixed;
}

ul, ol, li, nav, header {
    list-style: none;
    list-style-type: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fluid);
}

p {
    font-size: 15px;
    color: var(--text-ecume);
    line-height: 1.65;
    opacity: 0.95;
}

/* --- INFRASTRUCTURE ET EFFET CHAMÉLÉON DU MENU FIXE --- */
.main-header-fixed-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #0B2530;
    z-index: 1000; 
    border-bottom: none;
    background-image: linear-gradient(to right, transparent 0%, rgba(112, 200, 193, 0.4) 25%, rgba(112, 200, 193, 0.4) 75%, transparent 100%);
    background-position: bottom;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    transition: var(--transition-fluid);
}

.main-header-fixed-wrap.scrolled {
    background-color: #0B2530;       
    background-image: none;
    border-bottom-color: transparent; 
    box-shadow: none;                 
}

.main-header-fixed-wrap.scrolled header,
.main-header-fixed-wrap.scrolled #site-header-interne {
    padding: 10px 20px;              
}

.main-header-fixed-wrap.scrolled .logo-container svg,
.main-header-fixed-wrap.scrolled #logo-svg {
    height: 24px;                    
    width: 24px;                     
    transform: scale(1);             
    transition: height 0.5s ease, width 0.5s ease;
}

.main-header-fixed-wrap.scrolled .logo-text {
    font-size: 20px;                 
    letter-spacing: 2px;             
    transition: font-size 0.5s ease;
}

.main-header-fixed-wrap.scrolled .tagline-feel {
    opacity: 0;                      
    height: 0;
    margin-top: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, height 0.3s ease;
}

header, #site-header-interne {
    width: 100%;        
    max-width: var(--max-width-site);
    margin: 0 auto;
    padding: 35px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    transition: padding 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.logo-container { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    text-decoration: none; 
}

#logo-text-block { 
    display: flex; 
    flex-direction: column; 
}

.logo-text { 
    font-size: 26px; 
    font-weight: 900; 
    letter-spacing: 3px; 
    color: var(--text-white); 
    line-height: 1; 
}

.tagline-feel { 
    font-size: 10px; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: var(--corail); 
    font-weight: 700; 
    display: block; 
    margin-top: 5px; 
    line-height: 1; 
}

/* --- NAVIGATION DESKTOP --- */
nav.nav-links { 
    display: flex; 
    align-items: center; 
    gap: 35px; 
}

nav.nav-links a {
    color: var(--text-ecume);
    text-decoration: none;
    font-size: 14.5px;            
    font-weight: 700;
    text-transform: uppercase;    
    letter-spacing: 1px;
    opacity: 0.8;
    position: relative;
    padding: 10px 0;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    transition: color 0.3s ease;
}

nav.nav-links a:hover, 
nav.nav-links a.current-page { 
    color: var(--accent-light); 
    opacity: 1; 
}

/* Bouton Spécifique Espace Client (Dolibarr/Synology) */
nav.nav-links a.btn-nav-client {
    padding: 10px 30px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(112, 200, 193, 0.4);
    border-radius: 4px;
    color: var(--accent-light);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition-fluid);
}

nav.nav-links a.btn-nav-client:hover {
    background-color: rgba(112, 200, 193, 0.08);
    border-color: var(--accent-light);
    box-shadow: 0 0 12px rgba(112, 200, 193, 0.2);
    color: var(--text-white);
    opacity: 1;
}

/* --- DROPDOWN NAVIGATION --- */
.dropdown { 
    position: relative; 
    display: inline-flex; 
    align-items: center; 
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;                                      
    transform: translateY(0px);                   
    background-color: #061318;                     
    min-width: 250px;
    border-radius: 4px;
    border: 1px solid rgba(112, 200, 193, 0.2);    
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    padding: 10px 0;                               
    z-index: 1000; 
    box-sizing: border-box;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.dropdown:hover .dropdown-menu { 
    display: block; 
    opacity: 1; 
    transform: translateY(6px); 
}

.dropdown-menu li {
    display: block;
    width: 100%;
    color: var(--text-ecume);
    font-size: 13px;                               
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;                             
    white-space: nowrap;
    box-sizing: border-box;
    padding: 12px;                                 
    background: transparent;
    transition: background-color 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.dropdown-menu a {
    display: inline-block;                         
    margin-left: 0;             
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s ease; 
    transform: translate3d(0, 0, 0);               
}

.dropdown-menu li:hover { 
    background-color: rgba(112, 200, 193, 0.08); 
}

.dropdown-menu li:hover a {
    color: var(--accent-light);    
    transform: translate3d(6px, 0, 0);             
}

/* --- BURGER MOBILE INTERACTION --- */
.burger-menu-btn, #mobile-burger-trigger { 
    display: none; 
    width: 30px; 
    height: 22px; 
    background: transparent; 
    border: none; 
    position: relative; 
    z-index: 9999; 
    flex-direction: column; 
    justify-content: space-between; 
    cursor: pointer;
}

/* Châssis des 3 barres physiques initiales */
.burger-menu-btn span { 
    display: block; 
    width: 100%; 
    height: 3px; 
    background-color: var(--text-ecume); 
    border-radius: 2px; 
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.3s ease; 
    transform-origin: center; /* 🟢 Ancrage au centre exact pour figer la symétrie axiale */
}

/* 🛠️ CINÉTIQUE DE MUTATION MILIMÉTRÉE (STATE: OPEN) */

/* La barre du haut descend au centre de la boîte et pivote à 45° */
.burger-menu-btn.open span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
    background-color: var(--corail); /* Allumage corail Nerion officiel */
}

/* La barre du milieu s'efface proprement sur elle-même */
.burger-menu-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

/* La barre du bas monte au centre de la boîte et pivote à -45° */
.burger-menu-btn.open span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
    background-color: var(--corail);
}

/* --- COCKPIT PIED DE PAGE GLOBAL --- */
footer { 
    background-color: #061318; 
    padding: 70px 20px 40px 20px; 
    border-top: none; 
    background-image: linear-gradient(to right, transparent 0%, rgba(112, 200, 193, 0.4) 25%, rgba(112, 200, 193, 0.4) 75%, transparent 100%); 
    background-position: top; 
    background-size: 100% 1px; 
    background-repeat: no-repeat;
    width: 100%; 
    display: block; 
    clear: both; 
    position: relative; 
    z-index: 5; 
}

.footer-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: 1.8fr 1fr 1fr 1fr; 
    gap: 40px; 
}

.footer-brand { 
    display: flex; 
    align-items: flex-start; 
    gap: 20px; 
}

.footer-brand p { 
    font-size: 14px; 
    color: var(--text-ecume); 
    opacity: 0.8; 
    line-height: 1.6; 
    text-align: left; 
}

.footer-col h6 { 
    font-size: 13px; 
    text-transform: uppercase; 
    letter-spacing: 1.5px; 
    color: var(--accent-light); 
    margin-bottom: 20px; 
    font-weight: 700; 
}

.footer-col ul li { 
    margin-bottom: 12px; 
}

.footer-col ul li a { 
    color: var(--text-ecume); 
    text-decoration: none; 
    font-size: 14px; 
    opacity: 0.85; 
    transition: var(--transition-fluid); 
}

.footer-col ul li a:hover { 
    color: var(--corail); 
    opacity: 1; 
}

.footer-bottom { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding-top: 25px; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 13px; 
    color: var(--text-ecume); 
    opacity: 0.6; 
}

/* --- MODULE COMPLÉMENTAIRE : BANDEAU DE COOKIES GIVRÉ --- */
.cookie-fixed-alert {
    position: fixed;
    bottom: -100%; 
    left: 24px;
    max-width: 600px;
    width: calc(100% - 48px);
    background: rgba(18, 53, 68, 0.85); 
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(112, 200, 193, 0.15);
    border-top: 3px solid var(--accent-light); 
    border-radius: 12px;
    padding: 24px 30px;
    box-shadow: 0 15px 40px rgba(4, 13, 18, 0.5);
    z-index: 99999; 
    transition: bottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.cookie-fixed-alert.cookie-active {
    bottom: 24px;
}

.cookie-inside-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.cookie-text-side {
    text-align: left;
    flex: 1;
}

.cookie-text-side h5 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-white);
    margin-bottom: 6px;
}

.cookie-text-side p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-ecume);
    margin: 0;
}

.cookie-action-side {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-cookie-primary, .btn-cookie-secondary {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition-fluid);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-cookie-primary {
    background-color: var(--corail);
    color: var(--bg-dark-lab);
}

.btn-cookie-primary:hover {
    background-color: var(--text-white);
    transform: translateY(-2px);
}

.btn-cookie-secondary {
    background-color: transparent;
    color: var(--text-ecume);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-cookie-secondary:hover {
    border-color: var(--corail);
    color: var(--corail);
    transform: translateY(-2px);
}

/* ==========================================================================
   CEINTURE DE SÉCURITÉ MOBILE RESPONSIVE UNIVERSELLE (HEADER & FOOTER)
   ========================================================================== */
@media (max-width: 1250px) {
    /* Ajustements généraux de structure haute */
    header, #site-header-interne {
        padding: 25px 24px;
    }
}

@media (max-width: 850px) { 
    /* Masquage des colonnes secondaires du footer sur mobile pour éviter l'encombrement */
    .footer-col { 
        display: none; 
    } 
    
    .footer-container { 
        grid-template-columns: 1fr; 
        gap: 0; 
        text-align: center; 
    } 
    
    /* Pilote du bloc de marque au centre du smartphone */
    .footer-brand { 
        flex-direction: column; 
        align-items: center;          
        justify-content: center;
        width: 100%;
        margin-bottom: 25px;
    } 

    .footer-brand .logo-container {
        display: flex;
        flex-direction: column;
        align-items: center;          
        justify-content: center;
        margin: 0 auto 15px auto;     
    }
    
    .footer-brand p { 
        text-align: center; 
        max-width: 500px; 
        margin: 0 auto; 
    } 
    
    .footer-bottom { 
        flex-direction: column; 
        gap: 12px; 
        text-align: center; 
    } 
}

@media (max-width: 768px) {
    /* Comportement du Burger et déploiement du rideau de nuit mobile */
    .burger-menu-btn, #mobile-burger-trigger { 
        display: flex; 
    }
    
    nav.nav-links { 
        display: flex; 
        flex-direction: column; 
        position: fixed; 
        top: 0; 
        right: -100%; 
        width: 280px; 
        height: 100vh; 
        background-color: #071921; 
        padding: 100px 30px 40px 30px; 
        gap: 25px; 
        box-shadow: -15px 0 50px rgba(0, 0, 0, 0.5); 
        z-index: 105; 
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    }
    
    nav.nav-links.active { 
        right: 0; 
    }
    
    /* Neutralisation des menus déroulants PC sur smartphone */
    .dropdown-menu { 
        display: none; 
        visibility: hidden; 
        opacity: 0; 
    }
    
    /* Redimensionnement du bouton de connexion client sur mobile */
    nav.nav-links .btn-nav-client {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        padding: 12px 20px;
    }

    /* Adaptation du caisson de cookies */
    .cookie-fixed-alert {
        left: 12px;
        width: calc(100% - 24px);
        padding: 20px;
    }
    
    .cookie-fixed-alert.cookie-active {
        bottom: 12px;
    }
    
    .cookie-inside-box {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .cookie-action-side {
        justify-content: flex-end;
    }
}