/* ==========================================================================
   NERION ARCHITECTURE IT — PORTAIL CLIENT SÉCURISÉ (_CLIENT.CSS)
   --------------------------------------------------------------------------
   Gabarit exclusif et modulaire pour la page : espace-client.php
   ZÉRO !important — Spécificité saine par cascade combinée (2026)
   ========================================================================= */

/* ==========================================================================
   1. INFRASTRUCTURE STRUCTURELLE ET MAILLAGE BLUEPRINT DE FOND
   ========================================================================== */

.packs-php-layout {
    background-color: #061318;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(112, 200, 193, 0.06) 0%, transparent 60%),
        linear-gradient(rgba(112, 200, 193, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 200, 193, 0.035) 1px, transparent 1px);
    background-size: cover, 40px 40px, 40px 40px;
    background-attachment: fixed;
}

.packs-php-layout .client-portal-container {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 140px 24px 60px 24px; 
}

/* ==========================================================================
   2. MIRE DE CONNEXION INITIALE (DÉCONNECTÉ)
   ========================================================================== */

.packs-php-layout .client-portal-container .auth-bento-capsule {
    max-width: 450px;
    width: 100%;
    background: rgba(18, 53, 68, 0.45);
    border: 1px solid rgba(112, 200, 193, 0.15);
    border-top: 3px solid var(--corail);
    padding: 45px 35px;
    border-radius: 4px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 25px 55px rgba(4, 13, 18, 0.65);
    margin: 20px;
    box-sizing: border-box;
}

.packs-php-layout .auth-bento-capsule h2 {
    padding-bottom: 30px;
    color: var(--text-white);
    font-weight: 300;
}

.packs-php-layout .auth-bento-capsule h2 span {
    color: var(--accent-light);
    font-weight: 800;
}

.packs-php-layout .auth-bento-capsule .panier-error-notification-card {
    background: rgba(216, 137, 114, 0.08);
    border: 1px dashed rgba(216, 137, 114, 0.25);
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: left;
}

.packs-php-layout .auth-bento-capsule .panier-error-notification-card p {
    color: var(--corail);
    font-weight: 700;
    font-size: 13px;
    font-family: monospace;
    margin: 0;
}

.packs-php-layout .auth-bento-capsule input[type="text"],
.packs-php-layout .auth-bento-capsule input[type="password"],
.packs-php-layout .auth-bento-capsule input[type="email"] {
    background: #061318;
    border: 1px solid rgba(112, 200, 193, 0.2);
    color: #FFFFFF;
    padding: 12px 16px;
    margin: 6px 0;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: var(--transition-fluid);
}

.packs-php-layout .auth-bento-capsule input:focus {
    border-color: var(--accent-light);
    background: #0b2530;
}

.packs-php-layout .auth-bento-capsule .btn-submit-auth {
    background: var(--corail);
    color: #061318;
    font-weight: 800;
    padding: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 15px 0;
    width: 100%;
    transition: var(--transition-fluid);
}

.packs-php-layout .auth-bento-capsule .btn-submit-auth:hover {
    background-color: #FFFFFF;
    color: #061318;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(112, 200, 193, 0.25);
}

.packs-php-layout .auth-bento-capsule a[href*="action=activation"] {
    color: var(--accent-light);
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
    width: max-content;
    border-bottom: 1px dashed rgba(112, 200, 193, 0.3);
}

.packs-php-layout .auth-bento-capsule a[href*="action=activation"]:hover {
    color: var(--corail);
    border-bottom: 1px dashed rgba(226, 148, 126, 0.3);
}


/* ==========================================================================
   3. COCKPIT INTERACTIF SOUVERAIN (ÉTAT CONNECTÉ)
   ========================================================================== */

/* Ligne supérieure d'accueil */
.packs-php-layout main section .dashboard-session-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(112, 200, 193, 0.1);
    padding-bottom: 30px;
    width: 100%;
}

/* 🛠️ FIX DU TAG VOLANT ACCUEIL : Restauration de l'onglet pro */
.packs-php-layout main section .dashboard-session-header .product-badge {
    display: inline-block;
    background: rgba(112, 200, 193, 0.12);
    color: var(--accent-light);
    font-size: 11px; /* Calibré d'origine */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 6px 14px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.packs-php-layout main section .dashboard-session-header h1 {
    font-size: 32px;
    font-weight: 300;
    color: #FFFFFF;
    text-align: left;
    margin: 5px 0 0 0;
    line-height: 1.2;
}

.packs-php-layout main section .dashboard-session-header h1 span {
    color: var(--accent-light);
    font-weight: 800;
}

/* 🛠️ FIX TYPOGRAPHIQUE : Agrandissement et lissage de la description technique sous le h1 */
.packs-php-layout main section .dashboard-session-header p {
    font-size: 16px; 
    line-height: 1.6;
    color: var(--text-ecume);
    margin-top: 12px;
    display: block;
    text-align: left;
}

/* 🛠️ FIX INTERACTIF : Ré-activation de la pulsation au survol sur Remplacer ma clé */
.packs-php-layout main section .dashboard-session-header p a {
    color: #70C8C1;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px dashed rgba(112, 200, 193, 0.4);
    transition: color 0.25s ease, border-color 0.25s ease;
}

.packs-php-layout main section .dashboard-session-header p a:hover {
    color: #E2947E;
    border-bottom-color: #E2947E;
}

/* Le bouton de déconnexion fin */
.packs-php-layout main section .dashboard-session-header div .btn-nav-client {
    border: 1px solid var(--corail);
    color: var(--corail);
    background: transparent;
    padding: 10px 22px;
    border-radius: 4px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-fluid);
}

.packs-php-layout main section .dashboard-session-header div .btn-nav-client:hover {
    background-color: #FFFFFF;
    border-color: #FFFFFF;
    color: #061318;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

/* Alignement des 3 boîtes Bento horizontales */
.packs-php-layout main section .dashboard-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    width: 100%;
    align-items: stretch;
}

/* 🛠️ FIX DES CASIERS GLOSSY : Éclat du halo radial et liseré supérieur */
.packs-php-layout main section .dashboard-bento-grid .brique-tarif-section {
    background-color: rgba(18, 53, 68, 0.35);
    border: 1px solid rgba(112, 200, 193, 0.15); 
    border-top: 3px solid #70C8C1; /* Liseré supérieur bleu néon stable */
    border-radius: 4px;
    padding: 40px 30px;
    box-shadow: 0 15px 35px rgba(4, 13, 18, 0.3);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.packs-php-layout main section .dashboard-bento-grid .brique-tarif-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 18px 0;
    text-align: left;
}

.packs-php-layout main section .dashboard-bento-grid .brique-tarif-section p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-ecume);
    opacity: 0.85;
    text-align: left;
    margin: 0 0 35px 0; /* Réserve d'air fixe pour stabiliser le bouton */
}

/* 🛠️ FIX ANTI-FILEMENT : Le bouton de téléchargement de l'agent est figé, il ne descend plus */
.packs-php-layout main section .dashboard-bento-grid .brique-tarif-section a.btn {
    display: table;
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    padding: 12px 24px;
    font-size: 13px;
    margin: 0 auto 0 auto; /* Suppression des marges automatiques hautes pour bloquer le glissement */
    text-align: center;
    background-color: var(--corail);
    color: #061318;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 20px rgba(216, 137, 114, 0.2);
    transition: var(--transition-fluid);
}

.packs-php-layout main section .dashboard-bento-grid .brique-tarif-section a.btn:hover {
    background-color: #FFFFFF;
    color: #061318;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(112, 200, 193, 0.25);
}


/* ==========================================================================
   4. STRUCTURES DES COMPOSANTS REST & FACTURES INTEGRÉS
   ========================================================================== */

.packs-php-layout main section .bento-details-accordion {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    background: rgba(6, 19, 24, 0.5); 
    border: 1px solid rgba(112, 200, 193, 0.1);
    border-radius: 4px;
    padding: 14px;
    text-align: left;
}

.packs-php-layout main section .bento-details-accordion[open] {
    background: #143b4c;
}

.packs-php-layout main section .bento-details-accordion div p {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-ecume);
}

.packs-php-layout main section .bento-details-accordion div p strong {
    color: #FFFFFF;
    font-weight: 700;
}

.packs-php-layout main section .bento-details-accordion div div[style*="border-left"] {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 10px 0 12px 0;
    padding-left: 10px;
    border-left: 2px solid rgba(112, 200, 193, 0.3);
}

.packs-php-layout main section .bento-details-accordion div div[style*="border-left"] span {
    font-size: 12px;
    color: #70C8C1;
    font-weight: 700;
    font-family: monospace;
    text-transform: uppercase;
    display: block;
    text-align: left;
}

.packs-php-layout main section .btn-action-evolution {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #70C8C1;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px dashed rgba(112, 200, 193, 0.4);
    margin-top: 15px;
    font-family: monospace;
    width: max-content;
}

.packs-php-layout main section #select-annee-compta {
    background: #061318;
    color: #70C8C1;
    border: 1px solid rgba(112, 200, 193, 0.3);
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    font-weight: bold;
    outline: none;
    cursor: pointer;
}

.packs-php-layout main section div[style*="background: rgba(6,19,24,0.5)"][style*="padding: 14px"] {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
5. RESPONSIVE COMPORTEMENTAL MOBILE SÉCURISÉ
========================================================================== */
@media (max-width: 1024px) {
    .packs-php-layout main section .dashboard-bento-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .packs-php-layout main section .dashboard-session-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        padding-bottom: 25px;
        margin-bottom: 30px;
        width: 100%;
    }

    .packs-php-layout main section div[style*="background: rgba(6,19,24,0.5)"][style*="padding: 14px"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/**
 * ==========================================================================
 * 🟢 SYNCHRONISATION MAÎTRESSE : FOND BLUEPRINT FUSIONNÉ CONTINU NERION v24
 * ==========================================================================
 */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh !important;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background-color: #061318 !important;
    
    /* ⚡ LE FAISCEAU BLUEPRINT UNIFIÉ AVEC HALO RADIAL ET GRILLE INDUSTRIALISÉE */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(112, 200, 193, 0.08) 0%, transparent 60%),
        linear-gradient(rgba(112, 200, 193, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 200, 193, 0.04) 1px, transparent 1px) !important;
    
    background-size: cover, 40px 40px, 40px 40px !important;
    background-attachment: fixed !important;
}


/**
 * ==========================================================================
 * BOUTON RETOUR FENETRE DE PREMIERE CONNEXION / REINIT MOT DE PASSE CLIENT
 * ==========================================================================
 */
.packs-php-layout .activation-state a {
    color: var(--accent-light); 
    font-family: monospace; 
    font-size: 12px; 
    font-weight: 700; 
    text-decoration: none; 
    display: inline-block; 
    margin-top: 15px; 
    width: max-content; 
    border-bottom: 1px dashed rgba(112, 200, 193, 0.3);
}

.packs-php-layout .activation-state a:hover {
    color: var(--corail); 
    border-bottom: 1px dashed rgba(226, 148, 126, 0.3);
}