/* ==================================== */
/* 1. FONT DEFINITIONS                  */
/* ==================================== */
@font-face {
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 300 900;
    src: url(./font/figtree.woff2) format('woff2');
}
@font-face {
    font-family: 'Figtree';
    font-style: italic;
    font-weight: 300 900;
    src: url(./font/figtree-italic.woff2) format('woff2');
}

/* ==================================== */
/* 2. CSS VARIABLES (TOUTES)            */
/* ==================================== */
:root {
    --primary-color: #0E0E0C;
    --secondary-color: #4facfe;
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, #481700 100%);
    --secondary-gradient: linear-gradient(90deg, rgba(255, 189, 27, 0.00) 0%, #FFBD1B 100%), #F7931D;
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --active-gradient: linear-gradient(180deg, rgba(229, 229, 225, 0.00) 0%, #E5E5E1 100%), #F4F4F1;
    --text-dark: var(--primary-color);
    --text-medium: #67645A;
    --text-light: #6c757d;
    --border-color: #908d7f;
    --error-color: #e74c3c;
    --icon-color: #ba0d61;
    --font-family-system-sans-serif:
        'Figtree',
        system-ui,
        -apple-system,
        'Segoe UI',
        roboto,
        'Helvetica Neue',
        'Noto Sans',
        'Liberation Sans',
        arial,
        sans-serif,
        'Apple Color Emoji',
        'Segoe UI Emoji',
        'Segoe UI Symbol',
        'Noto Color Emoji';
}

/* ==================================== */
/* 3. GLOBAL & BODY STYLES              */
/* ==================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-system-sans-serif, 'sans-serif');
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
    line-height: 1.6;
    padding-top: 100px;
}

/* Conteneurs principaux - PARTAGÉS entre les 2 pages */
.form-container, .container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 900px;
    width: 100%;
}

h1 {
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
    font-weight: 700;
}

/* ==================================== */
/* 4. HEADER STYLES (PARTAGÉ)           */
/* ==================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(14, 14, 12, 0.85);
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);    
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    box-sizing: border-box;
}

.header-logo img {
    max-height: 50px;
    transition: transform 0.3s ease;
}

.header-logo:hover img {
    transform: scale(1.05);
}

.lang-switcher {
    display: flex;
    gap: 12px;
}

.lang-btn {
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px; 
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-family-system-sans-serif);
}

.lang-btn img {
    width: 24px;
    height: auto;
    border-radius: 3px;
}

.lang-btn:hover {
    transform: translateY(-2px);
}

.lang-btn.active {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}

/* ==================================== */
/* 5. FORM BASE STYLES (PARTAGÉS)       */
/* ==================================== */
.question-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 30px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 16px;
}

.required {
    color: var(--error-color);
    font-weight: 700;
}

.form-input, select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6em;
    transition: all 0.3s ease;
    background-color: #fff;
    font-family: inherit;
}

.form-input:focus, select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.1);
}

.error-message {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 8px;
    display: none;
    font-weight: 500;
}

.error-message.show {
    display: block;
}

/* ==================================== */
/* 6. CLASSES UTILITY PARTAGÉES         */
/* ==================================== */
.hidden {
    display: none !important;
}

.show {
    display: block;
}

/* Disclaimer partagé entre les 2 pages */
.disclaimer {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px 30px;
    margin-bottom: 30px;
    text-align: center;
}

.disclaimer h3 {
    color: #856404;
    margin-bottom: 15px;
    text-align: center; 
    font-size: 1.2em;   
}

.disclaimer p {
    color: #856404;
    font-size: 0.95em;
    line-height: 1.6;
}

.disclaimer p p {
    margin-top: 1em;
}

.services-cta {
    text-align: center;
    margin-top: 60px; /* Ajoute l'espace supérieur */
    padding-top: 40px; /* Ajoute un espace intérieur */
    border-top: 1px solid #eee; /* Ajoute une ligne de séparation visuelle */
}

.services-cta h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.services-cta p {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.cta-button.primary {
    background: var(--secondary-gradient);
    color: var(--text-dark);
    box-shadow: 0 4px 20px rgba(247, 147, 29, 0.3);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.4);
}

/* ==================================== */
/* 7. COMPOSANTS PARTAGÉS QUESTIONS     */
/* ==================================== */
/* Ces éléments sont utilisés dans les 2 pages selon l'analyse */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.badges-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.level-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.level-badge.basique {
    background: #d4edda;
    color: #155724;
}

.level-badge.important {
    background: #fff3cd;
    color: #856404;
}

.level-badge.essentiel {
    background: #f8d7da;
    color: #721c24;
}

.reference-badge {
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

/* ==================================== */
/* 8. GRAPHIQUES PARTAGÉS               */
/* ==================================== */
.chart-container {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.chart-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
}

.bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: auto;
    padding: 20px;
    border-bottom: 2px solid #dee2e6;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 120px;
}

.bar {
    width: 60px;
    background: var(--secondary-gradient);
    border-radius: 5px 5px 0 0;
    transition: height 1s ease;
    position: relative;
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    color: #333;
}

.bar-label {
    margin-top: 10px;
    text-align: center;
    font-size: 0.9em;
    color: #666;
    line-height: 1.3;
}

/* ==================================== */
/* 9. RESPONSIVE GLOBAL                 */
/* ==================================== */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
    
    .site-header {
        padding: 15px 20px;
    }
    
    .header-logo img {
        max-height: 40px;
    }

    .lang-btn span {
        display: none; 
    }
    
    .lang-btn {
        padding: 6px;
        width: 40px;
        height: 40px;
        justify-content: center;
        border-radius: 50%;
    }
    
    .lang-btn img {
        width: 28px;
    }

    .form-container, .container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 26px;
    }

    .question-title {
        font-size: 22px;
    }
    
    .question-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .badges-container {
        flex-wrap: wrap;
    }
    
    .bar-chart {
        flex-direction: column;
        height: auto;
        align-items: center;
    }
    
    .bar-group {
        width: 100%;
        max-width: none;
        margin-bottom: 20px;
    }
    
    .bar {
        height: 40px !important;
        width: 100%;
    }
    
    .bar-value {
        top: 50%;
        transform: translate(-50%, -50%);
        color: white;
    }
}

/* ==================================== */
/* À VÉRIFIER - ÉLÉMENTS INCERTAINS     */
/* ==================================== */
/*
À confirmer si ces éléments sont utilisés dans les 2 pages ou seulement une :

.active - utilisé dans common ET nis2-form (à vérifier si vraiment partagé)
.function-title - semble spécifique aux questions mais à vérifier
.interpretation - semble spécifique aux questions mais à vérifier

Si ces classes ne sont utilisées que dans une seule page, les déplacer 
vers le fichier approprié (nis2-form.css ou nis2-riskform.css).
*/