﻿/* ========================================
   ClassBACS - Styles principaux
   Premium SaaS Design System v3.0
   ======================================== */

/* Variables CSS */
:root {
    /* --- Typography System --- */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Font Scale - Refined for premium feel */
    --text-xs: 0.6875rem;
    /* 11px */
    --text-sm: 0.75rem;
    /* 12px */
    --text-base: 0.8125rem;
    /* 13px */
    --text-md: 0.875rem;
    /* 14px */
    --text-lg: 1rem;
    /* 16px */
    --text-xl: 1.125rem;
    /* 18px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 2rem;
    /* 32px */
    --text-4xl: 2.5rem;
    /* 40px */

    /* --- Palette de Couleurs ClassBACS --- */
    /* Primary: Navy profond - Autorité & Structure */
    --primary-color: #0C2340;
    --primary-dark: #071428;
    --primary-light: #1A3A5C;
    --primary-softer: #E8EFF7;
    --primary-gradient: linear-gradient(135deg, #0C2340 0%, #071428 100%);

    /* Secondary: Cyan électrique - Énergie & Flux */
    --secondary-color: #00B4D8;
    --secondary-dark: #0090B0;
    --secondary-light: #48CAE4;
    --secondary-softer: #E0F8FD;

    /* Classes GTB (standard DPE - inchangées fonctionnellement) */
    --class-a: #16A34A;
    --class-a-bg: #F0FDF4;
    --class-b: #65A30D;
    --class-b-bg: #F7FEE7;
    --class-c: #CA8A04;
    --class-c-bg: #FEFCE8;
    --class-d: #DC2626;
    --class-d-bg: #FEF2F2;
    --class-nd: #64748B;
    --class-nd-bg: #F1F5F9;

    /* Neutres & Surfaces */
    --bg-app: #F8FAFC;
    --bg-surface: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-elevated: #ffffff;
    --bg-tertiary: #F1F5F9;

    --text-main: #0F172A;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-on-primary: #ffffff;

    --border-light: #E2E8F0;
    --border-color: #E2E8F0;
    --border-focus: #48CAE4;

    /* --- Design System Tokens --- */
    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Legacy spacing aliases */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Rayons (Soft UI) */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Enhanced Shadows - Premium depth */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(12, 35, 64, 0.04);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(12, 35, 64, 0.05);
    --shadow-hover: 0 8px 30px rgba(37, 99, 235, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(12, 35, 64, 0.03);
    --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(37, 99, 235, 0.08);

    /* Glass effects */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);

    /* Transitions */
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --duration-fast: 150ms;
    --duration-normal: 250ms;
}

/* Reset et base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}


body {
    font-family: var(--font-primary);
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Layout principal
   ======================================== */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-sm) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(12, 35, 64, 0.01);
    gap: var(--space-lg);
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    max-width: 360px;
    min-width: 180px;
}

.header-progress {
    background: var(--bg-app);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    border: 1px solid var(--border-light);
}

.header-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.header-progress-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.header-progress-percent {
    font-size: var(--text-sm);
    color: var(--primary-color);
    font-weight: 700;
}

.header-progress-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.header-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    transition: width var(--duration-normal) var(--ease-smooth);
    width: 0%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.header-separator {
    width: 1px;
    height: 28px;
    background-color: var(--border-light);
    margin: 0 var(--space-sm);
}

.header-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-titles .main-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--primary-color);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.header-titles .subtitle {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}


/* Main content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========================================
   Sidebar - Premium Redesign
   ======================================== */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.02);
}

.project-info {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface);
}

.project-info h3 {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.info-group {
    margin-bottom: var(--space-sm);
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group label {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.info-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast);
    background: var(--bg-app);
}

.info-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.06);
}

/* Navigation des domaines */
.domain-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
}

.domain-nav h3 {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    padding-left: 4px;
    font-weight: 600;
}

.domain-nav ul {
    list-style: none;
}

.domain-nav li {
    margin-bottom: 3px;
}

.domain-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-smooth);
    border: 1px solid transparent;
}

.domain-nav a:hover {
    background: var(--bg-app);
    color: var(--primary-color);
}

.domain-nav a.active {
    background: var(--primary-softer);
    color: var(--primary-dark);
    font-weight: 600;
    border-color: rgba(12, 35, 64, 0.06);
}

.domain-nav .domain-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--duration-fast);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.domain-nav a:hover .domain-icon {
    color: var(--primary-color);
}

.domain-nav a.active .domain-icon {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.domain-nav .domain-class-badge {
    margin-left: auto;
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.domain-nav a.active .domain-class-badge {
    background: white;
    color: var(--primary-dark);
}

/* Badges de classe */
.class-A {
    background-color: var(--class-a-bg) !important;
    color: var(--class-a) !important;
}

.class-B {
    background-color: var(--class-b-bg) !important;
    color: var(--class-b) !important;
}

.class-C {
    background-color: var(--class-c-bg) !important;
    color: var(--class-c) !important;
}

.class-D {
    background-color: var(--class-d-bg) !important;
    color: var(--class-d) !important;
}

/* Progress section */
.progress-section {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.progress-section h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    transition: width var(--transition-normal);
    width: 0%;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ========================================
   Content Area
   ======================================== */
.content-area {
    flex: 1;
    padding: var(--space-xl);
    padding-right: calc(var(--space-xl) + 60px);
    /* Default: panel collapsed */
    overflow-y: auto;
    background: var(--bg-app);
    position: relative;
}

/* When panel is expanded, add more padding */
.content-area.panel-expanded {
    padding-right: calc(var(--space-xl) + 320px);
}

/* Welcome Screen - Premium SaaS Redesign */
.welcome-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-xl);
    background:
        radial-gradient(ellipse at 20% 20%, rgba(12, 35, 64, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 180, 216, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, var(--bg-app) 100%);
    overflow-y: auto;
}

.welcome-content {
    max-width: 800px;
    width: 100%;
    padding: var(--space-2xl);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 4px 24px rgba(12, 35, 64, 0.06),
        0 8px 48px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Hero Icon - Premium GTB Badge */
.welcome-content>i {
    font-size: 2rem;
    color: white;
    margin-bottom: var(--space-lg);
    background: var(--primary-gradient);
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(12, 35, 64, 0.25),
        0 0 0 4px rgba(12, 35, 64, 0.1);
    transform: rotate(-3deg);
    transition: all 0.4s var(--ease-bounce);
    position: relative;
}

.welcome-content>i::after {
    content: 'GTB';
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 0.625rem;
    font-weight: 800;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--secondary-color), #0090B0);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    letter-spacing: 0.08em;
    box-shadow: 0 2px 8px rgba(0, 180, 216, 0.4);
}

.welcome-content:hover>i {
    transform: rotate(0deg) scale(1.05);
    box-shadow:
        0 12px 40px rgba(12, 35, 64, 0.28),
        0 0 0 6px rgba(12, 35, 64, 0.15);
}

.welcome-content h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    font-family: var(--font-heading);
}

.welcome-content>p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto var(--space-xl);
    line-height: 1.7;
}

/* Welcome Buttons Container */
.welcome-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.welcome-buttons .btn-large {
    padding: 16px 32px;
    font-size: var(--text-md);
    font-weight: 600;
    border-radius: var(--radius-lg);
    min-width: 180px;
    transition: all 0.3s var(--ease-smooth);
}

.welcome-buttons .btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 16px rgba(12, 35, 64, 0.25);
}

.welcome-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(12, 35, 64, 0.32);
}

.welcome-buttons .btn-secondary {
    background: white;
    border: 2px solid var(--border-light);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.welcome-buttons .btn-secondary:hover {
    border-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(12, 35, 64, 0.1);
}

/* Feature Cards - Premium Design */
.welcome-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    max-width: 100%;
}

.feature {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(12, 35, 64, 0.06);
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(12, 35, 64, 0.12);
    border-color: rgba(12, 35, 64, 0.15);
}

.feature:hover::before {
    transform: scaleX(1);
}

.feature i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0 auto var(--space-md) auto;
    background: linear-gradient(135deg, var(--primary-softer), rgba(12, 35, 64, 0.06));
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.feature:hover i {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(12, 35, 64, 0.2);
}

.feature h4 {
    font-size: var(--text-lg);
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-heading);
}

.feature p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Domain Content */
.domain-content {
    max-width: 900px;
    margin: 0 auto;
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.domain-title {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.domain-number {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.domain-title h2 {
    font-size: 1.75rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.domain-class {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.domain-class .class-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.domain-class .class-badge {
    font-size: 1.5rem;
    font-weight: 800;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    min-width: 50px;
    text-align: center;
}

/* Class Badge Color Variants */
.class-badge.class-A {
    background: var(--class-a-bg);
    color: var(--class-a);
}

.class-badge.class-B {
    background: var(--class-b-bg);
    color: var(--class-b);
}

.class-badge.class-C {
    background: var(--class-c-bg);
    color: var(--class-c);
}

.class-badge.class-D {
    background: var(--class-d-bg);
    color: var(--class-d);
}

.class-badge.class-nd {
    background: var(--class-nd-bg);
    color: var(--class-nd);
    font-size: 1.25rem;
}

/* Conformity Badge - N/D state */
.conformity-badge.nd {
    background: var(--class-nd-bg);
    color: var(--class-nd);
}

/* Conformity Badge - Partial state (Classe C: Conforme BACS, Non éligible CEE) */
.conformity-badge.partiel {
    background: #fef3c7;
    color: #b45309;
}

/* Domain Header Actions Container */
.domain-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.btn-outline-warning.btn-sm {
    background: transparent;
    border: 1.5px solid #e67e22;
    color: #d35400;
    padding: 8px 14px;
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline-warning.btn-sm:hover {
    background: #e67e22;
    color: white;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
    transform: translateY(-1px);
}

.btn-outline-warning.btn-sm i {
    font-size: 0.85em;
}

/* ========================================
   Criteria Cards
   ======================================== */
.criteria-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.criteria-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--duration-fast) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.criteria-card:hover {
    box-shadow: var(--shadow-lg);
    /* Plus d'ombre au survol */
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.criteria-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border-light);
    transition: background var(--duration-normal);
}

.criteria-card.evaluated {
    border-color: var(--secondary-color);
    background: linear-gradient(to right, rgba(12, 35, 64, 0.02), transparent);
}

.criteria-card.evaluated::before {
    background: var(--secondary-color);
}

.criteria-card.sans-objet {
    opacity: 0.7;
    background: var(--bg-app);
}

.criteria-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.criteria-info {
    flex: 1;
}

.criteria-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-xs);
}

.criteria-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.criteria-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.criteria-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

/* Options de niveau */
.criteria-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.option-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    background: var(--bg-surface);
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-softer);
    box-shadow: 0 0 0 1px var(--primary-color), var(--shadow-md);
}

.option-card input[type="radio"] {
    display: none;
}

.option-radio {
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    background: white;
    transition: all var(--duration-fast);
}

.option-card:hover .option-radio {
    border-color: var(--primary-light);
}

.option-card.selected .option-radio {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.option-card.selected .option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.option-content {
    flex: 1;
}

.option-level {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
    color: var(--primary-dark);
}

.option-level .level-badge {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.option-level .level-badge.level-A {
    background: var(--class-a-bg);
    color: var(--class-a);
}

.option-level .level-badge.level-B {
    background: var(--class-b-bg);
    color: var(--class-b);
}

.option-level .level-badge.level-C {
    background: var(--class-c-bg);
    color: var(--class-c);
}

.option-level .level-badge.level-D {
    background: var(--class-d-bg);
    color: var(--class-d);
}

.option-title {
    font-size: 0.8125rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Option Sans Objet */
.option-card.sans-objet-option {
    border-style: dashed;
    background: var(--bg-tertiary);
}

.option-card.sans-objet-option .option-level {
    color: var(--text-muted);
}

/* ========================================
   Navigation buttons
   ======================================== */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

/* ========================================
   Results Screen
   ======================================== */
/* Results Screen */
.results-screen {
    max-width: 900px;
    margin: 0 auto;
}

.results-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.results-header h1 {
    font-size: 2rem;
    color: var(--text-main);
}

.results-header i {
    color: var(--class-a);
    margin-right: var(--space-sm);
}

.results-summary {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.final-class-card {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    min-width: 320px;
    border: 1px solid var(--border-light);
}

.final-class-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.final-class-value {
    display: block;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.final-class-card.class-A {
    border-top: 6px solid var(--class-a);
}

.final-class-card.class-A .final-class-value {
    color: var(--class-a);
}

.final-class-card.class-B {
    border-top: 6px solid var(--class-b);
}

.final-class-card.class-B .final-class-value {
    color: var(--class-b);
}

.final-class-card.class-C {
    border-top: 6px solid var(--class-c);
}

.final-class-card.class-C .final-class-value {
    color: var(--class-c);
}

.final-class-card.class-D {
    border-top: 6px solid var(--class-d);
}

.final-class-card.class-D .final-class-value {
    color: var(--class-d);
}

/* Résultats détaillés */
.results-details {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-light);
}

.results-details h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
}

.domain-results {
    display: grid;
    gap: var(--space-md);
}

.domain-result-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-app);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all var(--duration-fast);
}

.domain-result-item:hover {
    background: white;
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.domain-result-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.domain-result-info {
    flex: 1;
}

.domain-result-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
    color: var(--text-main);
}

.domain-result-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.domain-result-class {
    font-size: 1.25rem;
    font-weight: 700;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
}

/* Recommandations */
.results-recommendations {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-light);
}

.results-recommendations h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
}

.results-recommendations h3 i {
    color: var(--class-c);
    margin-right: var(--space-sm);
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.recommendation-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-app);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--class-c);
}

.recommendation-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--class-c-bg);
    color: var(--class-c);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.recommendation-content {
    flex: 1;
}

.recommendation-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-main);
}

.recommendation-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.recommendation-impact {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    font-size: 0.75rem;
    color: var(--class-a);
    font-weight: 600;
}

/* Results actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

/* ========================================
   Buttons
   ======================================== */
/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    letter-spacing: 0.01em;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--primary-light);
    color: var(--primary-color);
    background: var(--bg-app);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover:not(:disabled) {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.btn-large {
    padding: 14px 32px;
    font-size: var(--text-lg);
    font-weight: 600;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-large:active {
    transform: translateY(0);
}

/* ========================================
   Modal
   ======================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.125rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.modal-section {
    margin-bottom: var(--spacing-lg);
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.modal-section p {
    color: var(--text-primary);
    line-height: 1.6;
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    z-index: 1001;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--class-a);
}

.toast.success .toast-icon {
    color: var(--class-a);
}

.toast.warning {
    border-left: 4px solid var(--class-c);
}

.toast.warning .toast-icon {
    color: var(--class-c);
}

.toast.error {
    border-left: 4px solid var(--class-d);
}

.toast.error .toast-icon {
    color: var(--class-d);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.toast-message {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }

    .welcome-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .header-left,
    .header-right {
        width: 100%;
        justify-content: center;
    }

    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .domain-nav {
        max-height: 200px;
    }

    .content-area {
        padding: var(--spacing-md);
    }

    .domain-header {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .domain-title {
        justify-content: center;
    }

    .criteria-options {
        grid-template-columns: 1fr;
    }

    .navigation-buttons {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .navigation-buttons .btn {
        width: 100%;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions .btn {
        width: 100%;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {

    .sidebar,
    .navigation-buttons,
    .results-actions,
    .app-header .btn {
        display: none !important;
    }

    .app-header {
        position: static;
    }

    .content-area {
        padding: 0;
    }

    .criteria-card {
        break-inside: avoid;
    }
}


/* ========================================
   Synthesis Page Styles
   ======================================== */

/* Navigation separator */
.nav-separator {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-md) 0;
}

/* Project Fiche Button */
.project-info-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Changed from center */
    gap: var(--space-md);
    /* Increased gap */
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0284c7;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1px solid #bae6fd;
    cursor: pointer;
    transition: all var(--duration-fast);
    width: 100%;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    position: relative;
}

.project-info-btn:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border-color: #0284c7;
    box-shadow: var(--shadow-md);
}

.project-info-btn i.fa-building {
    font-size: 1.1rem;
    flex-shrink: 0;
    /* Prevent icon shrinking */
}

/* Edit icon specifically */
.project-info-btn i.fa-edit {
    margin-left: auto;
    /* Push to right */
    font-size: 0.8rem;
    opacity: 0.7;
}

.project-info-btn:hover i.fa-edit {
    opacity: 1;
}

.synthesis-nav {
    list-style: none;
}

.synthesis-nav a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-color);
}

.synthesis-nav a:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    border-color: var(--primary-color);
}

.synthesis-nav a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-dark);
}

.synthesis-nav a.active .domain-icon {
    background: rgba(255, 255, 255, 0.2);
}

.synthesis-nav a.active .domain-class-badge {
    background: rgba(255, 255, 255, 0.2);
}

/* Synthesis Page Layout */
.synthesis-page {
    max-width: 1000px;
    margin: 0 auto;
}

.synthesis-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.synthesis-header h1 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

.synthesis-header h1 i {
    color: var(--primary-color);
    margin-right: var(--space-sm);
}

.synthesis-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Export Actions (below global card) */
.synthesis-export-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

/* Export Buttons */
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-primary);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-export i {
    font-size: 1rem;
}

.btn-export-pdf {
    background: #0C2340;
    color: white;
}

.btn-export-pdf:hover {
    background: #071428;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(12, 35, 64, 0.28);
}

.btn-export-excel {
    background: #00B4D8;
    color: white;
}

.btn-export-excel:hover {
    background: #0090B0;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.32);
}

/* Global Class Card */
.synthesis-global {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.global-class-card {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-2xl);
    min-width: 450px;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border-top: 6px solid var(--text-muted);
    text-align: center;
}

.global-class-card.class-A { border-top-color: var(--class-a); }
.global-class-card.class-B { border-top-color: var(--class-b); }
.global-class-card.class-C { border-top-color: var(--class-c); }
.global-class-card.class-D { border-top-color: var(--class-d); }

.global-class-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

/* Grade Badge Circle */
.global-class-grade-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.global-class-grade-badge {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 4px solid var(--text-muted);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.global-class-card.class-A .global-class-grade-badge {
    background: var(--class-a-bg);
    border-color: var(--class-a);
    box-shadow: 0 6px 28px rgba(0, 180, 216, 0.22);
}

.global-class-card.class-B .global-class-grade-badge {
    background: var(--class-b-bg);
    border-color: var(--class-b);
    box-shadow: 0 6px 28px rgba(132, 204, 22, 0.25);
}

.global-class-card.class-C .global-class-grade-badge {
    background: var(--class-c-bg);
    border-color: var(--class-c);
    box-shadow: 0 6px 28px rgba(234, 179, 8, 0.25);
}

.global-class-card.class-D .global-class-grade-badge {
    background: var(--class-d-bg);
    border-color: var(--class-d);
    box-shadow: 0 6px 28px rgba(239, 68, 68, 0.25);
}

.global-class-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.global-class-card.class-A .global-class-value { color: var(--class-a); }
.global-class-card.class-B .global-class-value { color: var(--class-b); }
.global-class-card.class-C .global-class-value { color: var(--class-c); }
.global-class-card.class-D .global-class-value { color: var(--class-d); }

/* Badges Row */
.global-class-badges {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.bacs-compliance {
    font-size: var(--text-sm);
    font-weight: 600;
}

.bacs-compliance .badge-success,
.bacs-compliance .badge-warning,
.bacs-compliance .badge-danger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
}

.bacs-compliance .badge-success {
    background: var(--class-a-bg);
    color: var(--class-a);
}

.bacs-compliance .badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.bacs-compliance .badge-danger {
    background: var(--class-d-bg);
    color: var(--class-d);
}

.bacs-compliance.conforme {
    background: none;
    color: inherit;
}
.bacs-compliance.non-conforme {
    background: none;
    color: inherit;
}
.bacs-compliance.partiel {
    background: none;
    color: inherit;
}
.bacs-compliance.en-cours {
    background: none;
    color: var(--text-muted);
}

.global-class-description-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

/* Domains Grid */
.synthesis-domains {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-light);
}

.synthesis-domains h2 {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    color: var(--text-main);
}

.domains-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Synthesis Domain Cards */
.synth-domain-card {
    background: var(--bg-app);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 1px solid var(--border-light);
    border-left: 5px solid var(--text-muted);
    transition: all var(--duration-fast) var(--ease-smooth);
    cursor: pointer;
    gap: var(--space-md);
}

.synth-domain-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: white;
}

.synth-domain-card.class-A { border-left-color: var(--class-a); background: var(--class-a-bg); }
.synth-domain-card.class-B { border-left-color: var(--class-b); background: var(--class-b-bg); }
.synth-domain-card.class-C { border-left-color: var(--class-c); background: var(--class-c-bg); }
.synth-domain-card.class-D { border-left-color: var(--class-d); background: var(--class-d-bg); }
.synth-domain-card.class-nd { border-left-color: var(--text-muted); }

.synth-domain-card.class-A:hover { background: #d1fae5; }
.synth-domain-card.class-B:hover { background: #ecfccb; }
.synth-domain-card.class-C:hover { background: #fef3c7; }
.synth-domain-card.class-D:hover { background: #fee2e2; }

.synth-card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    min-width: 0;
}

.synth-card-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.synth-card-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.3;
    text-align: left;
}

.synth-card-grade {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.synth-card-grade-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: 1.35rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-muted);
    background: white;
    border: 3px solid var(--text-muted);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.synth-card-grade-badge.grade-A {
    color: var(--class-a);
    border-color: var(--class-a);
    background: white;
    box-shadow: 0 3px 12px rgba(0, 180, 216, 0.18);
}

.synth-card-grade-badge.grade-B {
    color: var(--class-b);
    border-color: var(--class-b);
    background: white;
    box-shadow: 0 3px 12px rgba(132, 204, 22, 0.2);
}

.synth-card-grade-badge.grade-C {
    color: var(--class-c);
    border-color: var(--class-c);
    background: white;
    box-shadow: 0 3px 12px rgba(234, 179, 8, 0.2);
}

.synth-card-grade-badge.grade-D {
    color: var(--class-d);
    border-color: var(--class-d);
    background: white;
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.2);
}

.synth-card-grade-badge.grade-nd {
    color: var(--text-muted);
    border-color: var(--text-muted);
    font-size: 1rem;
    font-weight: 700;
}

.synth-card-conformity-wrapper {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    min-width: 180px;
}

.synth-card-conformity {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.synth-card-conformity.conforme {
    color: var(--class-a);
}

.synth-card-conformity.partiel {
    color: #b45309;
}

.synth-card-conformity.non-conforme {
    color: var(--class-d);
}

.synth-card-conformity.non-evalue {
    color: var(--text-muted);
}

.synth-card-conformity.nd {
    color: var(--text-secondary);
}


.synthesis-table-section {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-light);
}

.synthesis-table-section h2 {
    margin-bottom: var(--space-lg);
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.synthesis-table {
    width: 100%;
    border-collapse: collapse;
}

.synthesis-table th,
.synthesis-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.synthesis-table th {
    background: var(--bg-app);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}


@media (max-width: 768px) {
    .global-class-card {
        min-width: auto;
        width: 100%;
    }

    .synth-card-conformity-wrapper {
        min-width: auto;
    }

    .synthesis-export-actions {
        flex-direction: column;
    }

    .btn-export {
        width: 100%;
    }
}


/* ========================================
   Fiche Site Page Styles
   ======================================== */

/* Navigation principale - Premium Redesign */
.main-nav {
    list-style: none;
    margin-bottom: var(--space-sm);
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: #0369a1;
    font-size: var(--text-base);
    font-weight: 600;
    transition: all var(--transition-fast);
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
}

.main-nav .domain-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    color: #0284c7;
    flex-shrink: 0;
}

.main-nav a:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border-color: #0284c7;
}

.main-nav a:hover .domain-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.main-nav a.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    border-color: #0369a1;
}

.main-nav a.active .domain-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-subtitle {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: var(--space-sm) 0;
    padding: 0 4px;
    font-weight: 600;
}

.nav-badge {
    margin-left: auto;
    font-size: var(--text-sm);
    color: #64748b;
    opacity: 0.7;
}

.main-nav a.active .nav-badge,
.main-nav a:hover .nav-badge {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

/* Fiche Site Page Layout */
.fiche-site-page {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: var(--space-lg);
}

.fiche-site-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.fiche-site-header h1 {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 4px;
}

.fiche-site-header h1 i {
    color: var(--primary-color);
    margin-right: var(--space-sm);
}

.fiche-site-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
}

/* Section Lot Technique - Compact Layout */
.lot-section {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-sm);
}

.lot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-app);
    cursor: pointer;
    user-select: none;
    transition: background var(--duration-fast);
    gap: 12px;
}

.lot-header:hover {
    background: var(--primary-softer);
}

.lot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* Hide subtitle "Cliquez pour développer" */
.lot-subtitle {
    display: none;
}

.lot-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s var(--ease-bounce);
}

.lot-toggle {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: transform 0.25s ease;
}

.lot-section.open .lot-toggle {
    transform: rotate(180deg);
}

/* Specific colors for icons - Restored vibrancy */
.lot-icon.chauffage {
    background: #fee2e2;
    color: #dc2626;
}

/* Red */
.lot-icon.ecs {
    background: #dbeafe;
    color: #2563eb;
}

/* Blue */
.lot-icon.refroidissement {
    background: #e0f2fe;
    color: #0284c7;
}

/* Sky */
.lot-icon.ventilation {
    background: #f3e8ff;
    color: #9333ea;
}

/* Purple */
.lot-icon.eclairage {
    background: #fef9c3;
    color: #ca8a04;
}

/* Yellow-Gold */
.lot-icon.stores {
    background: #dcfce7;
    color: #16a34a;
}

/* Green */
.lot-icon.gtb {
    background: #fce7f3;
    color: #db2777;
}

/* Pink */

.lot-header:hover .lot-icon {
    transform: scale(1.05);
}

.lot-title {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.lot-content {
    display: none;
    padding: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.lot-section.open .lot-content {
    display: block;
}

/* Sous-sections */
.lot-subsection {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-field select,
.form-field input[type="text"],
.form-field input[type="number"],
.form-field textarea {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: var(--bg-app);
    color: var(--text-main);
    transition: all var(--duration-fast);
}

.form-field select:focus,
.form-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.1);
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-app);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast);
    font-size: 0.8125rem;
}

.checkbox-item:hover {
    border-color: var(--primary-color);
}

.checkbox-item.selected {
    background: var(--primary-softer);
    border-color: var(--primary-color);
    color: var(--primary-dark);
}

/* Fiche Site Actions */
.fiche-site-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

/* Alert box */
.bacs-impact-alert {
    background: var(--primary-softer);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.bacs-impact-alert h4 {
    color: var(--primary-dark);
}

.bacs-impact-tag {
    background: white;
    border: 1px solid var(--primary-light);
    color: var(--primary-dark);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 768px) {
    .fiche-site-actions {
        flex-direction: column;
    }

    .fiche-site-actions .btn {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   Panneau des critères restants (droite) - Premium Redesign
   ======================================== */

.remaining-panel {
    width: 320px;
    min-width: 320px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    position: fixed;
    top: 64px;
    right: 0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.remaining-panel.collapsed {
    width: 60px;
    min-width: 60px;
    overflow: visible;
    background: var(--bg-surface);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.remaining-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 1;
    transition: opacity 0.2s ease 0.1s;
    width: 320px;
    /* Keep content width fixed to prevent squashing */
}

.remaining-panel.collapsed .remaining-content-wrapper {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

/* Toggle Button - Redesigned */
.panel-toggle-btn {
    position: absolute;
    left: -14px;
    top: 20px;
    width: 28px;
    height: 28px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 100;
    color: var(--primary-color);
    transition: all 0.3s;
}

.remaining-panel.collapsed .panel-toggle-btn {
    left: 5px;
    top: 10px;
    width: 50px;
    /* Full width of collapsed panel */
    height: 180px;
    /* Tall vertical button */
    border-radius: var(--radius-md);
    background: var(--primary-softer);
    border: 1px solid var(--primary-light);
    flex-direction: column;
    gap: 10px;
    box-shadow: none;
}

.remaining-panel.collapsed .panel-toggle-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.panel-toggle-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.remaining-panel.collapsed .panel-toggle-btn i {
    transform: rotate(180deg);
    margin-bottom: 5px;
}

.panel-toggle-btn .toggle-text {
    display: none;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--primary-dark);
    letter-spacing: 0.05em;
}

.remaining-panel.collapsed .panel-toggle-btn .toggle-text {
    display: block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    /* Read from bottom up */
    white-space: nowrap;
}


.remaining-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
}

.remaining-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.remaining-header h4 i {
    color: var(--primary-color);
}

.remaining-count {
    background: var(--primary-softer);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    border: 1px solid var(--primary-light);
}

.remaining-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Groupe par domaine */
.remaining-domain-group {
    border-bottom: 1px solid var(--border-light);
}

.remaining-domain-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-app);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

.remaining-domain-group:first-child .remaining-domain-title {
    border-top: none;
}

.remaining-domain-title .domain-badge {
    display: none;
    /* Cleaner look */
}

/* Item critère */
.remaining-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    /* Increased gap */
    padding: var(--space-sm) var(--space-lg);
    cursor: pointer;
    transition: all var(--duration-fast);
    border-left: 3px solid transparent;
}

.remaining-item:hover {
    background: var(--primary-softer);
    border-left-color: var(--primary-color);
}

.remaining-item-id {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-app);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.remaining-item:hover .remaining-item-id {
    color: var(--primary-dark);
    background: white;
}

.remaining-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Stack name and badge */
    gap: 4px;
}

.remaining-item-name {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
    font-weight: 500;
}

.remaining-item:hover .remaining-item-name {
    color: var(--primary-dark);
}

.remaining-status-badge {
    font-size: 0.625rem;
    font-weight: 600;
    color: #92400e;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 3px 8px;
    border-radius: 6px;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Responsive - cacher sur petits écrans */
@media (max-width: 1200px) {
    .remaining-panel {
        width: 220px;
        min-width: 220px;
    }
}

@media (max-width: 1024px) {
    .remaining-panel {
        display: none;
    }
}


/* Animation de mise en évidence pour le critère ciblé */
@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
        border-color: var(--primary-color);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
        border-color: var(--primary-color);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
        border-color: var(--primary-color);
    }
}

.criteria-card.highlight-pulse {
    animation: highlightPulse 0.8s ease-out 2;
    border-color: var(--primary-color) !important;
    background: var(--primary-light) !important;
}

/* Project Info Page - Compact */
.project-info-page {
    max-width: 700px;
    margin: 0 auto;
    padding: var(--space-md) 0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.page-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.page-header h1 {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 4px;
}

.page-header h1 i {
    color: var(--primary-color);
    margin-right: var(--space-sm);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-md);
}

.project-info-form {
    background: var(--bg-surface);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--text-main);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s;
}

.input-with-icon input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    transition: all 0.2s;
    background: var(--bg-app);
    color: var(--text-main);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.06);
}

.input-with-icon input:focus+i {
    color: var(--primary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .project-info-form {
        padding: 24px;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: var(--spacing-md);
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ========================================
   Toast Notifications - Clean Design
   ======================================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 320px;
    max-width: 420px;
    animation: slideIn 0.3s ease;
    background: white;
    border: 1px solid var(--border-light);
    border-left: 4px solid;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: #059669;
}

.toast.success .toast-icon {
    color: #059669;
}

.toast.warning {
    border-left-color: #d97706;
}

.toast.warning .toast-icon {
    color: #d97706;
}

.toast.error {
    border-left-color: #dc2626;
}

.toast.error .toast-icon {
    color: #dc2626;
}

.toast.info {
    border-left-color: #2563eb;
}

.toast.info .toast-icon {
    color: #2563eb;
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 600;
    font-size: var(--text-md);
    color: var(--text-main);
}

.toast-message {
    font-size: var(--text-base);
    color: var(--text-secondary);
}

/* ========================================
   Criterion Highlight Animation - Border Focus
   ======================================== */
.criteria-card.highlight-pulse {
    animation: borderPulse 0.6s ease-in-out 3;
    background: white !important;
}

@keyframes borderPulse {
    0% {
        border-color: var(--border-light);
        box-shadow: 0 0 0 0 rgba(12, 35, 64, 0);
    }

    50% {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(12, 35, 64, 0.15);
    }

    100% {
        border-color: var(--border-light);
        box-shadow: 0 0 0 0 rgba(12, 35, 64, 0);
    }
}

/* ========================================
   Modal - Criteria Details
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-lg);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-app);
}

.modal-header h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    font-family: var(--font-heading);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--class-d-bg);
    color: var(--class-d);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    background: white;
}

.modal-section {
    margin-bottom: var(--space-lg);
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h4 {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-section p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   Conditional Fields - Option B: Grayed Out
   ======================================== */
.conditional-field {
    transition: opacity 0.25s ease, filter 0.25s ease;
    position: relative;
}

.conditional-field.field-disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(50%);
}

.conditional-field.field-disabled::after {
    content: 'Non applicable';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: var(--bg-app);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-style: italic;
    font-weight: 500;
    z-index: 1;
}

.conditional-field.field-disabled select {
    background-color: var(--bg-tertiary) !important;
    cursor: not-allowed;
}

/* ========================================
   Class Indicators in Select Options
   ======================================== */
.form-group select option[data-class]::after {
    font-weight: 700;
    margin-left: 8px;
}

/* Frequent indicator badge */
.frequent-indicator {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

/* Tooltip styles */
.tooltip-trigger {
    color: var(--text-muted);
    cursor: help;
    margin-left: 4px;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.tooltip-trigger:hover {
    color: var(--primary-color);
}


/* ========================================
   WIZARD FICHE SITE - Premium UX
   ======================================== */

/* Wizard Container */
.wizard-container {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

/* Wizard Header with Stepper */
.wizard-header {
    background: linear-gradient(135deg, var(--primary-softer) 0%, #f8f4fc 100%);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.wizard-title {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.wizard-title-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    color: white;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
}

.wizard-title h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--primary-dark);
    font-family: var(--font-heading);
    margin: 0;
}

.wizard-title p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* Stepper */
.wizard-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.wizard-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border-light);
    z-index: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    z-index: 1;
    flex: 1;
}

.wizard-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    color: var(--text-muted);
    font-size: var(--text-base);
    font-weight: 600;
    transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(12, 35, 64, 0.15);
}

.wizard-step.completed .wizard-step-circle {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.wizard-step-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    transition: color 0.3s ease;
}

.wizard-step.active .wizard-step-label {
    color: var(--primary-color);
}

.wizard-step.completed .wizard-step-label {
    color: var(--secondary-color);
}

/* Wizard Body */
.wizard-body {
    padding: var(--space-xl);
}

.wizard-step-content {
    display: none;
    animation: fadeInUp 0.3s ease;
}

.wizard-step-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Question Card */
.wizard-question {
    margin-bottom: var(--space-xl);
}

.wizard-question:last-child {
    margin-bottom: 0;
}

.wizard-question-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.wizard-question-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-softer);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: var(--text-sm);
    font-weight: 700;
    flex-shrink: 0;
}

.wizard-question-text h4 {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.wizard-question-text p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

.wizard-question-criterion {
    margin-left: auto;
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
}

/* Options Grid */
.wizard-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.wizard-options.multi-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm);
}

/* Grid layout for qualification questions (without criterion property) 
   Applied automatically by app.js for questions that don't impact BACS criteria */
.wizard-options.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm);
}

/* Option Card */
.wizard-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.wizard-option:hover {
    border-color: var(--primary-light);
    background: var(--primary-softer);
}

.wizard-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-softer);
}

.wizard-option input {
    display: none;
}

.wizard-option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.wizard-option.selected .wizard-option-radio {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.wizard-option.selected .wizard-option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.wizard-option-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.wizard-option.selected .wizard-option-checkbox {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.wizard-option.selected .wizard-option-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: white;
}

.wizard-option-content {
    flex: 1;
}

.wizard-option-label {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-primary);
}

/* Class Badge in Option */
.wizard-option-class {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 700;
    flex-shrink: 0;
}

.wizard-option-class.class-D {
    background: var(--class-d-bg);
    color: var(--class-d);
}

.wizard-option-class.class-C {
    background: var(--class-c-bg);
    color: var(--class-c);
}

.wizard-option-class.class-B {
    background: var(--class-b-bg);
    color: var(--class-b);
}

.wizard-option-class.class-A {
    background: var(--class-a-bg);
    color: var(--class-a);
}

/* Expandable Multi-Generator Option - Floating Dropdown */
.wizard-option-expandable {
    position: relative;
}

.wizard-expand-icon {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.wizard-option-expandable.expanded .wizard-expand-icon {
    transform: rotate(180deg);
}

/* Floating Sub-options dropdown */
.wizard-suboptions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
    padding: 8px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.wizard-option-expandable.expanded .wizard-suboptions {
    display: flex;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-suboption {
    background: var(--bg-app);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    padding: 10px 14px !important;
    cursor: pointer;
}

.wizard-suboption:hover {
    background: var(--primary-softer);
    border-color: var(--primary-light);
}

.wizard-suboption.selected {
    background: var(--primary-softer);
    border-color: var(--primary-color);
}

/* Tip Box */
.wizard-tip {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

.wizard-tip-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fbbf24;
    border-radius: 50%;
    color: white;
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.wizard-tip-content {
    font-size: var(--text-sm);
    color: #92400e;
    line-height: 1.5;
}


/* Wizard Footer */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
}

.wizard-progress-info {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.wizard-progress-info strong {
    color: var(--primary-color);
}

.wizard-nav {
    display: flex;
    gap: var(--space-sm);
}

.wizard-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.wizard-btn-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.wizard-btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.wizard-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.wizard-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.wizard-btn-success {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.wizard-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Conditional Question (hidden by default) */
.wizard-question.conditional {
    display: none;
}

.wizard-question.conditional.visible {
    display: block;
}

/* Wizard Summary */
.wizard-summary {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-top: var(--space-lg);
}

.wizard-summary h4 {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.wizard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-sm);
}

.wizard-summary-item {
    background: var(--bg-surface);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-light);
}

.wizard-summary-criterion {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.wizard-summary-class {
    font-size: var(--text-sm);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* ========================================
   WIZARD PAGE - Dedicated Domain Page
   ======================================== */

.wizard-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.wizard-page-header {
    margin-bottom: var(--space-lg);
}

.wizard-back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-back-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    border-color: var(--primary-light);
}

/* Domain Cards for Fiche Site Navigation */
.domain-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.domain-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-card-hover);
    transform: translateX(4px);
}

.domain-card.completed {
    border-left: 4px solid var(--secondary-color);
}

.domain-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-softer);
    border-radius: var(--radius-md);
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.domain-card:hover .domain-card-icon {
    background: var(--primary-color);
    color: white;
}

.domain-card.completed .domain-card-icon {
    background: var(--secondary-color);
    color: white;
}

.domain-card-content {
    flex: 1;
}

.domain-card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    font-family: var(--font-heading);
}

.domain-card-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

.domain-card-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.domain-card-progress {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.domain-card-progress.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.domain-card-progress.completed i {
    color: #10b981;
}

.domain-card-progress.in-progress {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.domain-card-progress.in-progress i {
    color: #f59e0b;
}

.domain-card.in-progress {
    border-left: 3px solid #f59e0b;
}

.domain-card-arrow {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.domain-card:hover .domain-card-arrow {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

/* Wizard Final Step Buttons */
.wizard-footer-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
}

.wizard-final-left {
    display: flex;
    gap: var(--space-sm);
}

.wizard-final-right {
    display: flex;
    gap: var(--space-sm);
}

/* ========================================
   Dashboard Projets - Premium Design
   ======================================== */
.dashboard-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    gap: var(--space-lg);
}

.dashboard-title h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dashboard-title h1 i {
    color: var(--primary-color);
}

.dashboard-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

.dashboard-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Search & Filters */
.dashboard-search {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: var(--text-base);
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    background: var(--bg-surface);
    transition: all var(--transition-fast);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.06);
}

.dashboard-filters select {
    padding: 12px 36px 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    background: var(--bg-surface);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.dashboard-filters select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

/* Project Card */
.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.25s var(--ease-smooth);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-light);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-light);
    transition: background 0.25s ease;
}

.project-card.status-draft::before {
    background: var(--text-muted);
}

.project-card.status-in_progress::before {
    background: linear-gradient(90deg, var(--class-c), var(--primary-color));
}

.project-card.status-completed::before {
    background: linear-gradient(90deg, var(--class-a), var(--secondary-color));
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.project-card-info {
    flex: 1;
    min-width: 0;
}

.project-card-client {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-heading);
}

.project-card-site {
    font-size: var(--text-base);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-class {
    font-size: var(--text-xl);
    font-weight: 800;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    min-width: 40px;
    text-align: center;
}

.project-card-progress {
    margin-bottom: var(--space-md);
}

.project-progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.project-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    transition: width 0.5s var(--ease-smooth);
}

.project-progress-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.project-card-status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.draft {
    background: var(--text-muted);
}

.status-dot.in_progress {
    background: var(--class-c);
    animation: pulse 2s infinite;
}

.status-dot.completed {
    background: var(--class-a);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.project-card-date {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.project-card-actions {
    display: flex;
    gap: var(--space-xs);
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-card:hover .project-card-actions {
    opacity: 1;
}

.project-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-app);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.project-action-btn:hover {
    background: var(--primary-softer);
    color: var(--primary-color);
}

.project-action-btn.delete:hover {
    background: var(--class-d-bg);
    color: var(--class-d);
}

/* Dashboard Empty State */
.dashboard-empty {
    text-align: center;
    padding: var(--space-2xl);
    background: var(--bg-surface);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-xl);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: var(--primary-softer);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.dashboard-empty h2 {
    font-size: var(--text-xl);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-family: var(--font-heading);
}

.dashboard-empty p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* Project Indicator in Header */
.current-project-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--primary-softer);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--primary-color);
    font-weight: 500;
    max-width: 200px;
}

.current-project-indicator i {
    font-size: var(--text-base);
}

.current-project-indicator span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Delete Modal Styles */
.delete-modal-content {
    max-width: 450px;
}

.delete-modal-header {
    background: var(--class-d-bg);
    border-bottom: 1px solid rgba(239, 68, 68, 0.1);
}

.delete-modal-header h3 {
    color: var(--class-d);
}

.delete-modal-header h3 i {
    margin-right: var(--space-sm);
}

.delete-modal-body {
    padding: var(--space-lg);
}

.delete-modal-body>p:first-child {
    font-size: var(--text-base);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.delete-project-info {
    background: var(--bg-app);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.delete-project-info .client-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-md);
}

.delete-project-info .site-name {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.delete-warning {
    color: var(--class-d);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.delete-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-light);
    background: var(--bg-app);
}

.btn-danger {
    background: var(--class-d);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Rename Modal Styles */
.rename-modal-content {
    max-width: 480px;
}

.rename-modal-header {
    background: var(--primary-softer);
    border-bottom: 1px solid rgba(12, 35, 64, 0.1);
}

.rename-modal-header h3 {
    color: var(--primary-color);
}

.rename-modal-header h3 i {
    margin-right: var(--space-sm);
}

.rename-modal-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.rename-field label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.rename-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-surface);
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.rename-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.06);
}

.rename-field input::placeholder {
    color: var(--text-muted);
}

.rename-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-light);
    background: var(--bg-app);
}

.project-action-btn.action-rename:hover {
    background: var(--primary-softer);
    color: var(--primary-color);
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-actions {
        justify-content: stretch;
    }

    .dashboard-actions .btn {
        flex: 1;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card-actions {
        opacity: 1;
    }
}

/* ========================================
   ClassBACS — Fiche Site Grid Hub
   ======================================== */
.fs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 4px 0 24px;
}

.fs-grid-card {
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fs-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(12, 35, 64, 0.13);
    border-color: #0C2340;
}

.fs-grid-card.completed {
    border-color: rgba(0, 180, 216, 0.4);
}

.fs-grid-card.in-progress {
    border-color: rgba(0, 180, 216, 0.6);
    border-width: 2px;
}

.fs-grid-card.fs-grid-card-center {
    grid-column: 2;
}

.fs-card-icon-wrap {
    background: #00B4D8;
    padding: 16px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 72px;
    transition: background 0.22s ease;
    position: relative;
    overflow: hidden;
}

/* Légère texture lumineuse sur le fond cyan */
.fs-card-icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.fs-grid-card:hover .fs-card-icon-wrap {
    background: #0090B0;
}

/* Petit carré navy derrière l'icône */
.fs-card-icon-box {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    background: #0C2340;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(7, 20, 40, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fs-grid-card:hover .fs-card-icon-box {
    transform: scale(1.06);
    box-shadow: 0 6px 16px rgba(7, 20, 40, 0.45);
}

.fs-card-body {
    padding: 14px 16px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fs-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.3;
    margin: 0;
}

.fs-card-sub {
    font-size: 11px;
    color: #94A3B8;
    margin: 0;
    font-weight: 500;
}

.fs-card-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.fs-progress-bar {
    flex: 1;
    height: 3px;
    background: #E2E8F0;
    border-radius: 99px;
    overflow: hidden;
}

.fs-progress-fill {
    height: 100%;
    background: #0C2340;
    border-radius: 99px;
    transition: width 0.4s ease;
}

.fs-grid-card.completed .fs-progress-fill {
    background: linear-gradient(90deg, #0090B0, #00B4D8);
}

.fs-grid-card.in-progress .fs-progress-fill {
    background: linear-gradient(90deg, #00B4D8, #48CAE4);
    box-shadow: 0 0 6px rgba(0, 180, 216, 0.4);
}

.fs-progress-text {
    font-size: 10px;
    font-weight: 700;
    color: #94A3B8;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fs-card-footer {
    padding: 10px 14px;
    border-top: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fs-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fs-badge-done {
    background: rgba(22, 163, 74, 0.1);
    color: #15803D;
    border: 1px solid rgba(22, 163, 74, 0.22);
}

.fs-badge-progress {
    background: rgba(12, 35, 64, 0.08);
    color: #1A3A5C;
    border: 1px solid rgba(12, 35, 64, 0.18);
    font-weight: 700;
}

.fs-badge-progress i {
    color: #1A3A5C;
    animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.fs-badge-start {
    background: var(--primary-softer);
    color: var(--primary-color);
    border: 1px solid rgba(12, 35, 64, 0.1);
}

.fs-card-arrow {
    color: #CBD5E1;
    font-size: 12px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.fs-grid-card:hover .fs-card-arrow {
    transform: translateX(3px);
    color: #0C2340;
}

.fs-grid-card.in-progress .fs-card-arrow {
    color: #00B4D8;
}

/* ========================================
   ClassBACS — Sidebar Dark Theme
   ======================================== */
.sidebar {
    background: #0C2340;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.2);
}

/* --- Infos projet --- */
.project-info {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.project-info h3 {
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
}

.info-group label {
    color: rgba(255, 255, 255, 0.4);
}

.info-group input {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
}

.info-group input:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.info-group input::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

/* --- Labels de section --- */
.domain-nav h3 {
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 10px;
    font-weight: 600;
}

.nav-subtitle {
    color: rgba(255, 255, 255, 0.28);
}

.nav-separator {
    background: rgba(255, 255, 255, 0.07);
}

/* --- Liens nav (tous) --- */
.domain-nav a {
    color: #ffffff;
    border-color: transparent;
    background: transparent;
}

.domain-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: transparent;
}

.domain-nav a.active {
    background: rgba(171, 241, 255, 0.12);
    color: #ffffff;
    border-left: 3px solid #ABF1FF;
    font-weight: 600;
}

/* --- Icônes domaines --- */
.domain-nav .domain-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: none;
}

.domain-nav a:hover .domain-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.domain-nav a.active .domain-icon {
    background: rgba(171, 241, 255, 0.2);
    color: #ffffff;
    box-shadow: none;
}

/* --- Badge classe (A/B/C/D) --- */
.domain-nav .domain-class-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: none;
}

.domain-nav a.active .domain-class-badge {
    background: rgba(171, 241, 255, 0.18);
    color: #ffffff;
}

/* --- Badge icône (edit / clipboard) --- */
.nav-badge {
    color: #ffffff;
}

/* --- Liens Fiche Site / Synthèse Site (main-nav) --- */
.main-nav a {
    background: transparent;
    color: #ffffff;
    border-color: transparent;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.main-nav a.active {
    background: rgba(171, 241, 255, 0.12);
    color: #ffffff;
    border-left: 3px solid #ABF1FF;
    font-weight: 600;
}

.main-nav a .domain-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.main-nav a:hover .domain-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.main-nav a.active .domain-icon {
    background: rgba(171, 241, 255, 0.2);
    color: #ffffff;
}

/* --- Synthèse BACS (synthesis-nav) --- */
.synthesis-nav a {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.synthesis-nav a:hover {
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.synthesis-nav a.active {
    background: rgba(171, 241, 255, 0.12);
    color: #ABF1FF;
    border-color: rgba(171, 241, 255, 0.3);
    font-weight: 600;
}

.synthesis-nav a .domain-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.synthesis-nav a:hover .domain-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.synthesis-nav a.active .domain-icon {
    background: rgba(171, 241, 255, 0.2);
    color: #ffffff;
}

.synthesis-nav a .domain-class-badge,
.synthesis-nav a.active .domain-class-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* --- Footer copyright --- */
.sidebar .domain-nav > div:last-child {
    color: rgba(255, 255, 255, 0.18) !important;
}

/* ============================================================
   WIZARD STEP-MODE — One Question at a Time
   ============================================================ */

/* step-content also display:contents — question cards flow directly to page */
.wizard-container.step-mode .wizard-step-content {
    display: contents !important;
}

/* Hide old stepper + old nav footers */
.wizard-container.step-mode .wizard-stepper,
.wizard-container.step-mode .wizard-footer,
.wizard-container.step-mode .wizard-footer-final {
    display: none !important;
}

/* All questions hidden — only .step-current is shown */
.wizard-container.step-mode .wizard-question {
    display: none !important;
}

.wizard-container.step-mode .wizard-question.step-current {
    display: flex !important;
    flex-direction: column;
    max-width: 720px;
    margin: 2rem auto 5rem;
    padding: 2.5rem 2.75rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 32px rgba(12, 35, 64, 0.09);
    animation: qSlideIn 0.22s ease;
}

@keyframes qSlideIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Question header */
.wizard-container.step-mode .wizard-question-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.wizard-container.step-mode .wizard-question-number {
    min-width: 36px;
    height: 36px;
    background: var(--secondary-softer);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 1.5px solid rgba(0, 180, 216, 0.3);
}

.wizard-container.step-mode .wizard-question-text h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.4;
    margin: 0 0 0.2rem;
}

.wizard-container.step-mode .wizard-question-text p {
    font-size: 0.875rem;
    color: #64748B;
    margin: 0;
}

.wizard-container.step-mode .wizard-question-criterion {
    margin-left: auto;
    font-size: 0.68rem;
    color: var(--secondary-color);
    background: var(--secondary-softer);
    padding: 3px 10px;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
    border: 1px solid rgba(0, 180, 216, 0.2);
}

/* Options: vertical stacked tiles */
.wizard-container.step-mode .wizard-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}

.wizard-container.step-mode .wizard-option {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
    background: #fff;
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.wizard-container.step-mode .wizard-option:hover {
    border-color: var(--secondary-color);
    background: var(--secondary-softer);
    transform: translateX(3px);
}

.wizard-container.step-mode .wizard-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-softer);
    transform: none;
}

.wizard-container.step-mode .wizard-option-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1E293B;
    flex: 1;
}

.wizard-container.step-mode .wizard-option-class {
    margin-left: auto;
    flex-shrink: 0;
}

/* Radio / Checkbox dot */
.wizard-container.step-mode .wizard-option-radio,
.wizard-container.step-mode .wizard-option-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #CBD5E1;
    border-radius: 50%;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.wizard-container.step-mode .wizard-option-checkbox {
    border-radius: 5px;
}

.wizard-container.step-mode .wizard-option.selected .wizard-option-radio,
.wizard-container.step-mode .wizard-option.selected .wizard-option-checkbox {
    border-color: var(--primary-color);
    background: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='3' fill='white'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.wizard-container.step-mode .wizard-option.selected .wizard-option-checkbox {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Tip block */
.wizard-container.step-mode .wizard-tip {
    margin-top: 0;
    margin-bottom: 1rem;
    border-radius: 10px;
}

/* Expert guide: inline below question, no changes needed — inherits existing styles */
.wizard-container.step-mode .expert-guide {
    margin-top: 0.5rem;
}

/* Sub-options */
.wizard-container.step-mode .wizard-option-expandable {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wizard-container.step-mode .wizard-suboption {
    margin-left: 1.5rem;
    border-left: 3px solid var(--secondary-softer);
    border-radius: 0 12px 12px 0;
}

/* ---- qmode-nav bar ---- */
.qmode-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 720px;
    margin: 0 auto 2.5rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(12, 35, 64, 0.05);
}

.qmode-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qmode-progress-label {
    font-size: 0.8rem;
    color: #64748B;
    font-weight: 500;
}

.qmode-progress-label strong {
    color: var(--primary-color);
    font-weight: 700;
}

.qmode-progress-track {
    width: 140px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.qmode-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), #48CAE4);
    border-radius: 99px;
    transition: width 0.35s ease;
}

.qmode-actions {
    display: flex;
    gap: 0.6rem;
}

.qmode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.1s ease;
    font-family: inherit;
}

.qmode-btn:active { transform: scale(0.97); }

.qmode-btn-prev {
    background: #f1f5f9;
    color: #475569;
}
.qmode-btn-prev:hover { background: #e2e8f0; }
.qmode-btn-prev:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.qmode-btn-next {
    background: var(--secondary-color);
    color: #fff;
}
.qmode-btn-next:hover { background: var(--secondary-dark); }

.qmode-btn-finish {
    background: #16A34A;
    color: #fff;
}
.qmode-btn-finish:hover { background: #15803D; }

/* En step-mode : container + body + step-content → display:contents
   Les cartes de questions remontent directement dans .wizard-page-content */
.wizard-container.step-mode,
.wizard-container.step-mode .wizard-body {
    display: contents;
}

.wizard-container.step-mode .wizard-header {
    display: none;
}

/* ---- Barre fixe en bas — 3 zones ---- */
.qmode-actions-bar {
    position: fixed;
    bottom: 0;
    left: 260px;
    right: 0;
    z-index: 300;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(12, 35, 64, 0.08);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.qmode-bar-left,
.qmode-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.qmode-bar-right {
    justify-content: flex-end;
}

/* Zone centrale : titre grand + barre de progression lisible */
.qmode-bar-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 3;
    min-width: 0;
}

.qmode-domain-label {
    font-size: 17px;
    font-weight: 700;
    color: #0C2340;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* Ligne "Q X / Y  ══════════" en ligne */
.qmode-progress {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.qmode-progress-label {
    font-size: 13px;
    color: #64748B;
    font-weight: 600;
    white-space: nowrap;
}

.qmode-progress-label strong {
    color: #0C2340;
    font-weight: 700;
}

.qmode-progress-track {
    width: 200px;
    height: 7px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.qmode-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00B4D8, #48CAE4);
    border-radius: 99px;
    transition: width 0.35s ease;
}

.qmode-btn-back {
    background: #f1f5f9;
    color: #475569;
}
.qmode-btn-back:hover { background: #e2e8f0; }


/* ============================================================
   SYNTHÈSE BACS — Gating + CTA Banner
   ============================================================ */

/* Nav link locked */
.synthesis-nav a.nav-locked {
    opacity: 0.42;
    cursor: not-allowed;
    filter: grayscale(0.35);
}
.synthesis-nav a.nav-locked:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    transform: none;
}
.synthesis-nav a.nav-locked:hover .domain-icon {
    background: rgba(255, 255, 255, 0.1) !important;
}
.nav-lock-icon {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.65;
    flex-shrink: 0;
}

/* CTA Banner — top of Fiche Site when complete */
.fiche-site-cta-banner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, #0C2340 0%, #1A3A5C 100%);
    border: 1.5px solid rgba(0, 180, 216, 0.4);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 4px 24px rgba(12, 35, 64, 0.2);
    animation: ctaBannerIn 0.35s ease;
}

@keyframes ctaBannerIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cta-banner-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: rgba(0, 180, 216, 0.18);
    border: 1px solid rgba(0, 180, 216, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #ABF1FF;
}

.cta-banner-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cta-banner-text strong {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.cta-banner-text span {
    font-size: 0.825rem;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.4;
}

.cta-banner-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 0.72rem 1.4rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 2px 14px rgba(0, 180, 216, 0.4);
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.cta-banner-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(0, 180, 216, 0.5);
}

.cta-banner-btn:active {
    transform: scale(0.97);
}

/* ========================================
   AUTH SCREEN — Phase 1
   ======================================== */

.auth-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-app, #F0F4F8);
    z-index: 9999;
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(12, 35, 64, 0.12);
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Logo */
.auth-logo {
    text-align: center;
}
.auth-logo img {
    height: 40px;
    margin-bottom: 6px;
}
.auth-invite-header {
    text-align: center;
    margin-bottom: 24px;
}
.auth-invite-header i {
    font-size: 36px;
    color: #0C2340;
    margin-bottom: 10px;
    display: block;
}
.auth-invite-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 8px;
}
.auth-invite-header p {
    font-size: 13px;
    color: #64748B;
    margin: 0;
    line-height: 1.5;
}
.auth-tagline {
    font-size: 12px;
    color: var(--text-muted, #94A3B8);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
}

/* Onglets */
.auth-tabs {
    display: flex;
    background: var(--bg-app, #F0F4F8);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}
.auth-tab {
    flex: 1;
    padding: 9px 0;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #94A3B8);
    cursor: pointer;
    transition: all 0.2s;
}
.auth-tab.active {
    background: #fff;
    color: var(--color-primary, #0C2340);
    box-shadow: 0 1px 6px rgba(12, 35, 64, 0.1);
}

/* Formulaires */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.auth-form > .form-group {
    margin-bottom: 22px;
}
.auth-form > .form-grid {
    margin-bottom: 22px;
}
.auth-form > .form-grid > .form-group {
    margin: 0;
}
.auth-form .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main, #1E293B);
    margin-bottom: 7px;
    display: block;
    letter-spacing: 0.01em;
}
.label-hint {
    font-weight: 400;
    color: var(--text-muted, #94A3B8);
}
.auth-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1.5px solid var(--border-light, #E2E8F0);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-main, #1E293B);
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--color-secondary, #00B4D8);
}
.auth-form .form-grid input {
    padding-left: 14px; /* pas d'icône dans la grille prénom/nom */
}
.auth-forgot {
    text-align: right;
    margin-top: -16px;
    margin-bottom: 8px;
}
.auth-forgot a {
    font-size: 12px;
    color: var(--color-secondary, #00B4D8);
    text-decoration: none;
}
.auth-forgot a:hover { text-decoration: underline; }

/* Bouton pleine largeur */
.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
}

/* Messages */
.auth-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.auth-message-error {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}
.auth-message-success {
    background: #F0FDF4;
    color: #16A34A;
    border: 1px solid #BBF7D0;
}

/* Séparateur OAuth */
.auth-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted, #94A3B8);
    font-size: 12px;
}
.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light, #E2E8F0);
}

/* Boutons OAuth */
.auth-oauth {
    display: flex;
    gap: 10px;
}
.btn-oauth {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--border-light, #E2E8F0);
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main, #1E293B);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.btn-oauth:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
}

/* Footer auth */
.auth-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted, #94A3B8);
    margin: 0;
}

/* ========================================
   HEADER — Éléments SaaS (Phase 1)
   ======================================== */

/* Badge plan */
.plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.plan-free       { background: #F1F5F9; color: #64748B; }
.plan-solo       { background: #EFF6FF; color: #2563EB; }
.plan-team       { background: #F0FDF4; color: #16A34A; }
.plan-enterprise { background: #FFF7ED; color: #EA580C; }

/* Bouton Upgrade */
.btn-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    box-sizing: border-box;
}
.btn-upgrade:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* User menu header */
.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Bouton nom utilisateur cliquable */
.header-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    background: #0C2340;
    border: none;
    border-radius: 10px;
    padding: 0 16px;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    color: #fff;
    box-shadow: 0 2px 8px rgba(12, 35, 64, 0.22);
    box-sizing: border-box;
}
.header-user-btn:hover {
    background: #1a3a5c;
    box-shadow: 0 4px 14px rgba(12, 35, 64, 0.32);
}
.header-user-btn i {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
}
.header-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   Page Mon Compte / Mes Projets
   ======================================== */
.account-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md);
}

.account-page-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #E2E8F0;
    margin-bottom: 28px;
}

.account-page-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.18s;
    border-radius: 6px 6px 0 0;
}
.account-page-tab:hover {
    color: #0C2340;
    background: #F8FAFC;
}
.account-page-tab.active {
    color: #0C2340;
    border-bottom-color: #0C2340;
    font-weight: 600;
}
.account-page-tab i {
    font-size: 13px;
}

.account-tab-panel {
    display: none;
}
.account-tab-panel.active {
    display: block;
}

/* Contenu Mon Compte */
.account-info-wrap {
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 8px;
}

.account-card {
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.account-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0C2340 0%, #1e3a5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 34px;
}
.account-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.account-fullname {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
}
.account-email {
    font-size: 13px;
    color: #64748B;
    margin: 0;
}

.account-section-card {
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 20px 24px;
}
.account-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.account-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    color: #1E293B;
}
.account-plan-label {
    font-weight: 600;
    color: #0F172A;
    display: block;
    margin-bottom: 2px;
}
.account-plan-desc {
    font-size: 12px;
    color: #64748B;
    margin: 0;
}

/* ============================================================
   Mon Équipe — workspace panel
   ============================================================ */

.team-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.team-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #0C2340;
    margin: 0 0 4px;
}
.team-page-title i { margin-right: 8px; }
.team-page-subtitle {
    font-size: 13px;
    color: #64748B;
    margin: 0;
}
.team-seats-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #EFF6FF;
    border: 1.5px solid #BFDBFE;
    color: #1E40AF;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.team-seats-badge.seats-full {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}

/* Liste des membres */
.team-members-list {
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}
.team-member-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.15s;
}
.team-member-row:last-child { border-bottom: none; }
.team-member-row:hover { background: #F8FAFC; }
.team-member-avatar {
    font-size: 32px;
    color: #CBD5E1;
    flex-shrink: 0;
    line-height: 1;
}
.team-member-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.team-member-name {
    font-weight: 600;
    font-size: 14px;
    color: #1E293B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-member-active {
    font-size: 12px;
    color: #16A34A;
}
.team-member-active i { font-size: 8px; margin-right: 4px; }
.team-member-pending {
    font-size: 12px;
    color: #D97706;
}
.team-member-pending i { margin-right: 4px; }
.team-member-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.team-member-badge.role-owner {
    background: #EFF6FF;
    color: #1D4ED8;
}
.team-member-badge.role-member {
    background: #F0FDF4;
    color: #15803D;
}

/* Section invitation */
.team-invite-section {
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}
.team-invite-title {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 16px;
}
.team-invite-title i { margin-right: 8px; color: #0C2340; }
.team-invite-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.team-invite-name-row {
    display: flex;
    gap: 10px;
}
.team-invite-email-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.team-invite-input {
    flex: 1;
    min-width: 200px;
    height: 40px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    color: #1E293B;
    outline: none;
    transition: border-color 0.2s;
}
.team-invite-input:focus { border-color: #0C2340; }
.team-invite-hint {
    font-size: 12px;
    color: #64748B;
    margin: 10px 0 0;
}

/* Sièges pleins */
.team-seats-full-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #FEF3C7;
    border: 1.5px solid #FCD34D;
    border-radius: 12px;
    padding: 20px;
    color: #92400E;
    font-size: 14px;
    line-height: 1.5;
}
.team-seats-full-banner i { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.team-seats-full-banner p { margin: 0; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    color: #0C2340;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}
.btn-ghost:hover {
    border-color: #DC2626;
    color: #DC2626;
    background: #FEF2F2;
}

/* ========================================
   Modale d'upgrade
   ======================================== */
.upgrade-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 35, 64, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.upgrade-modal {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 60px rgba(12, 35, 64, 0.18);
    padding: 40px;
    max-width: 820px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.upgrade-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted, #94A3B8);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
}
.upgrade-modal-close:hover { background: #F1F5F9; color: var(--text-main, #1E293B); }
.upgrade-modal-header {
    text-align: center;
    margin-bottom: 32px;
}
.upgrade-modal-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 22px;
    color: #D97706;
}
.upgrade-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary, #0C2340);
    margin: 0 0 8px;
}
.upgrade-modal-reason {
    font-size: 14px;
    color: var(--text-muted, #64748B);
    margin: 0;
}
.upgrade-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.upgrade-plan {
    border: 1.5px solid var(--border-light, #E2E8F0);
    border-radius: 16px;
    padding: 24px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.upgrade-plan:hover {
    border-color: var(--color-secondary, #00B4D8);
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.1);
}
.upgrade-plan-featured {
    border-color: var(--color-primary, #0C2340);
    box-shadow: 0 4px 20px rgba(12, 35, 64, 0.1);
}
.upgrade-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary, #0C2340);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
}
.upgrade-plan-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary, #0C2340);
}
.upgrade-plan-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary, #0C2340);
    line-height: 1;
}
.upgrade-plan-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted, #64748B);
}
.upgrade-plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.upgrade-plan-features li {
    font-size: 13px;
    color: var(--text-main, #1E293B);
    display: flex;
    align-items: center;
    gap: 8px;
}
.upgrade-plan-features li i {
    color: #10B981;
    font-size: 12px;
    flex-shrink: 0;
}
@media (max-width: 680px) {
    .upgrade-plans { grid-template-columns: 1fr; }
    .upgrade-modal  { padding: 24px 16px; }
}
