/* ==========================================================================
   Qualiopi - Design System v2.0
   Site professionnel de suivi de certification Qualiopi
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES - Design Tokens
   ========================================================================== */

:root {
    /* ----- Colors: Primary (Trust & Authority) ----- */
    --primary-900: #0f1d30;
    --primary-800: #152847;
    --primary-700: #1e3a5f;
    --primary-600: #2d5a87;
    --primary-500: #3d7ab0;
    --primary-400: #5a96c7;
    --primary-300: #89b5d9;
    --primary-200: #b8d4eb;
    --primary-100: #e8f1f8;
    --primary-50: #f4f8fc;

    /* ----- Colors: Accent (Action & CTA) ----- */
    --accent-600: #0284c7;
    --accent-500: #0ea5e9;
    --accent-400: #38bdf8;
    --accent-300: #7dd3fc;
    --accent-100: #e0f2fe;

    /* ----- Colors: Success ----- */
    --success-700: #15803d;
    --success-600: #16a34a;
    --success-500: #22c55e;
    --success-400: #4ade80;
    --success-100: #dcfce7;
    --success-50: #f0fdf4;

    /* ----- Colors: Warning ----- */
    --warning-700: #a16207;
    --warning-600: #ca8a04;
    --warning-500: #f59e0b;
    --warning-400: #fbbf24;
    --warning-100: #fef3c7;
    --warning-50: #fffbeb;

    /* ----- Colors: Danger ----- */
    --danger-700: #b91c1c;
    --danger-600: #dc2626;
    --danger-500: #ef4444;
    --danger-400: #f87171;
    --danger-100: #fee2e2;
    --danger-50: #fef2f2;

    /* ----- Colors: Neutral (Gray Scale) ----- */
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;

    /* ----- Colors: Semantic Aliases ----- */
    --color-text: var(--gray-800);
    --color-text-muted: var(--gray-600);
    --color-text-light: var(--gray-500);
    --color-bg: #f5f7fa;
    --color-bg-elevated: #ffffff;
    --color-border: var(--gray-200);
    --color-border-hover: var(--gray-300);

    /* ----- Typography ----- */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* ----- Spacing Scale ----- */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* ----- Border Radius ----- */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* ----- Shadows ----- */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

    /* ----- Transitions ----- */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ----- Z-Index Scale ----- */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-toast: 600;

    /* ----- Focus Ring ----- */
    --focus-ring-color: var(--accent-500);
    --focus-ring-width: 2px;
    --focus-ring-offset: 2px;
}

/* ==========================================================================
   2. CSS RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background: var(--color-bg);
    padding-top: 64px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus visible for accessibility */
:focus {
    outline: none;
}

:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

/* ==========================================================================
   3. ACCESSIBILITY
   ========================================================================== */

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: 9999;
    padding: var(--space-3) var(--space-5);
    background: var(--primary-700);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   4. ANIMATIONS & KEYFRAMES
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(30, 58, 95, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(30, 58, 95, 0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Animation utility classes */
.animate-fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-slow) ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown var(--transition-slow) ease-out;
}

.animate-slide-in {
    animation: slideInRight var(--transition-slow) ease-out;
}

.animate-scale-in {
    animation: scaleIn var(--transition-base) ease-out;
}

/* Hover effects */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

/* ==========================================================================
   5. NAVIGATION
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--primary-700);
    color: white;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-fixed);
}

.navbar-brand {
    font-weight: var(--font-bold);
    font-size: var(--text-xl);
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: opacity var(--transition-fast);
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-brand svg,
.navbar-brand img {
    height: 32px;
    width: auto;
}

.navbar-nav {
    display: flex;
    gap: var(--space-1);
    list-style: none;
}

.navbar-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
    min-height: 44px;
    display: flex;
    align-items: center;
}

.navbar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.navbar-nav a:focus-visible {
    outline-color: white;
}

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

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: var(--text-2xl);
    cursor: pointer;
    padding: var(--space-2);
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile close button */
.navbar-close {
    display: none;
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: white;
    font-size: var(--text-2xl);
    cursor: pointer;
    border-radius: var(--radius-md);
}

/* ==========================================================================
   6. LAYOUT
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-5) var(--space-4);
}

.page-header {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 100%);
    color: white;
    padding: var(--space-8) var(--space-6);
    margin-bottom: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: fadeInDown var(--transition-slow) ease-out;
}

.page-header h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
    line-height: var(--leading-tight);
}

.page-header p {
    font-size: var(--text-base);
    opacity: 0.95;
    max-width: 600px;
}

/* Grid system */
.grid {
    display: grid;
    gap: var(--space-5);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================================================================
   7. CARDS
   ========================================================================== */

.card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--primary-700);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    background: var(--gray-50);
    border-top: 1px solid var(--color-border);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

/* ==========================================================================
   8. BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    line-height: 1;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    min-height: 44px;
    min-width: 44px;
}

.btn:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary button */
.btn-primary {
    background: var(--primary-700);
    color: white;
}

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

.btn-primary:active:not(:disabled) {
    background: var(--primary-800);
    transform: translateY(0);
}

/* Secondary button */
.btn-secondary {
    background: white;
    color: var(--primary-700);
    border: 2px solid var(--primary-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-50);
    border-color: var(--primary-600);
}

/* Success button */
.btn-success {
    background: var(--success-500);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: var(--success-600);
}

/* Danger button */
.btn-danger {
    background: var(--danger-500);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger-600);
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    color: var(--primary-700);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--gray-100);
}

/* Button sizes */
.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    min-height: 36px;
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    min-height: 52px;
}

/* Button group */
.btn-group {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* Install PWA button */
.btn-install {
    background: var(--accent-500);
    color: white;
}

.btn-install:hover:not(:disabled) {
    background: var(--accent-600);
}

/* ==========================================================================
   9. FORMS
   ========================================================================== */

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

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-family);
    font-size: var(--text-base);
    color: var(--color-text);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 44px;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--color-border-hover);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-input.is-error,
.form-select.is-error,
.form-textarea.is-error {
    border-color: var(--danger-500);
}

.form-input.is-error:focus,
.form-select.is-error:focus,
.form-textarea.is-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.form-error {
    display: block;
    font-size: var(--text-sm);
    color: var(--danger-600);
    margin-top: var(--space-1);
}

/* ==========================================================================
   10. BADGES
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-success {
    background: var(--success-100);
    color: var(--success-700);
}

.badge-warning {
    background: var(--warning-100);
    color: var(--warning-700);
}

.badge-danger {
    background: var(--danger-100);
    color: var(--danger-700);
}

.badge-gray,
.badge-neutral {
    background: var(--gray-100);
    color: var(--gray-700);
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-700);
}

/* ==========================================================================
   11. PROGRESS
   ========================================================================== */

.progress-section {
    background: var(--color-bg-elevated);
    padding: var(--space-5) var(--space-6);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 64px;
    z-index: var(--z-sticky);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.progress-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--primary-700);
}

.progress-stats {
    display: flex;
    gap: var(--space-5);
    font-size: var(--text-sm);
}

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

.stat-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.stat-dot.conforme { background: var(--success-500); }
.stat-dot.en-cours { background: var(--warning-500); }
.stat-dot.non-conforme { background: var(--danger-500); }
.stat-dot.non-evalue { background: var(--gray-300); }

.progress-bar-container {
    background: var(--gray-200);
    border-radius: var(--radius-full);
    height: 24px;
    overflow: hidden;
    display: flex;
}

.progress-bar-segment {
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-segment.conforme { background: var(--success-500); }
.progress-bar-segment.en-cours { background: var(--warning-500); }
.progress-bar-segment.non-conforme { background: var(--danger-500); }

/* ==========================================================================
   12. FILTERS
   ========================================================================== */

.filters {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-2) var(--space-4);
    min-height: 44px;
    border: 2px solid var(--color-border);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    font-family: var(--font-family);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-700);
}

.filter-btn:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.filter-btn.active {
    background: var(--primary-700);
    color: white;
    border-color: var(--primary-700);
}

/* ==========================================================================
   13. STATUS BUTTONS (Indicateurs)
   ========================================================================== */

.status-selector {
    display: flex;
    gap: var(--space-2);
}

.status-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    font-weight: var(--font-bold);
}

.status-btn:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
    z-index: 1;
}

.status-btn.conforme {
    background: var(--success-100);
    color: var(--success-700);
}

.status-btn.conforme:hover,
.status-btn.conforme.active {
    background: var(--success-500);
    color: white;
    transform: scale(1.05);
}

.status-btn.en-cours {
    background: var(--warning-100);
    color: var(--warning-700);
}

.status-btn.en-cours:hover,
.status-btn.en-cours.active {
    background: var(--warning-500);
    color: white;
    transform: scale(1.05);
}

.status-btn.non-conforme {
    background: var(--danger-100);
    color: var(--danger-700);
}

.status-btn.non-conforme:hover,
.status-btn.non-conforme.active {
    background: var(--danger-500);
    color: white;
    transform: scale(1.05);
}

/* ==========================================================================
   14. CRITÈRES & INDICATEURS
   ========================================================================== */

.critere {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    animation: fadeInUp var(--transition-slow) ease-out;
    animation-fill-mode: both;
}

.critere:nth-child(1) { animation-delay: 0ms; }
.critere:nth-child(2) { animation-delay: 50ms; }
.critere:nth-child(3) { animation-delay: 100ms; }
.critere:nth-child(4) { animation-delay: 150ms; }
.critere:nth-child(5) { animation-delay: 200ms; }
.critere:nth-child(6) { animation-delay: 250ms; }
.critere:nth-child(7) { animation-delay: 300ms; }

.critere-header {
    background: var(--primary-700);
    color: white;
    padding: var(--space-4) var(--space-5);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    min-height: 56px;
    transition: background var(--transition-fast);
}

.critere-header:hover {
    background: var(--primary-600);
}

.critere-header:focus-visible {
    outline: var(--focus-ring-width) solid white;
    outline-offset: -4px;
}

.critere-title {
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
}

.critere-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.critere-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.critere.open .critere-content {
    max-height: 5000px;
    padding: var(--space-5);
}

.indicateur {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
    background: white;
}

.indicateur:last-child {
    margin-bottom: 0;
}

.indicateur:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.indicateur-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}

.indicateur-num {
    background: var(--primary-100);
    color: var(--primary-700);
    font-weight: var(--font-bold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

.indicateur-title {
    flex: 1;
    font-weight: var(--font-medium);
    color: var(--gray-700);
    line-height: var(--leading-relaxed);
}

.indicateur-details {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.detail-section {
    margin-bottom: var(--space-4);
}

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

.detail-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.detail-content {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   15. TIMELINE (Parcours)
   ========================================================================== */

.timeline {
    position: relative;
    padding-left: 35px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-8);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -29px;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--gray-300);
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.timeline-item.completed .timeline-marker {
    background: var(--success-500);
}

.timeline-item.active .timeline-marker {
    background: var(--primary-700);
    animation: pulse 2s infinite;
}

.timeline-content {
    background: var(--color-bg-elevated);
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-base);
}

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
}

.timeline-title {
    font-weight: var(--font-semibold);
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
    color: var(--primary-700);
}

.timeline-description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   16. TOAST NOTIFICATIONS
   ========================================================================== */

.toast {
    position: fixed;
    bottom: var(--space-5);
    right: var(--space-5);
    background: var(--primary-700);
    color: white;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: transform var(--transition-spring), opacity var(--transition-base);
    z-index: var(--z-toast);
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.toast-success {
    background: var(--success-600);
}

.toast.toast-error {
    background: var(--danger-600);
}

/* ==========================================================================
   17. MODAL
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(-20px) scale(0.95);
    transition: transform var(--transition-spring);
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

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

.modal-title {
    font-weight: var(--font-semibold);
    font-size: var(--text-lg);
    color: var(--primary-700);
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--text-2xl);
    cursor: pointer;
    color: var(--gray-400);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

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

.modal-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* ==========================================================================
   18. TABLES
   ========================================================================== */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-elevated);
}

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

.table th {
    background: var(--gray-50);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* ==========================================================================
   19. DASHBOARD
   ========================================================================== */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--primary-700);
    line-height: 1;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-2);
}

.stat-card.success .stat-value { color: var(--success-500); }
.stat-card.warning .stat-value { color: var(--warning-500); }
.stat-card.danger .stat-value { color: var(--danger-500); }

/* ==========================================================================
   20. EMPTY STATE
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.empty-state-text {
    font-size: var(--text-base);
    margin-bottom: var(--space-5);
}

/* ==========================================================================
   21. ETAPE CARDS (Parcours)
   ========================================================================== */

.etape-card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: var(--space-5);
    transition: box-shadow var(--transition-base);
}

.etape-card:hover {
    box-shadow: var(--shadow-lg);
}

.etape-header {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 100%);
    color: white;
    padding: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.etape-numero {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    flex-shrink: 0;
}

.etape-titre {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

.etape-description {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin-top: var(--space-1);
}

.etape-body {
    padding: var(--space-5);
}

.etape-meta {
    display: flex;
    gap: var(--space-6);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}

.etape-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.etape-details {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.etape-checklist {
    list-style: none;
}

.etape-checklist li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.etape-checklist li:last-child {
    border-bottom: none;
}

.etape-checklist input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-700);
}

.etape-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
}

.etape-card.completed .etape-header {
    background: linear-gradient(135deg, var(--success-600) 0%, var(--success-500) 100%);
}

.etape-card.active .etape-header {
    background: linear-gradient(135deg, var(--accent-600) 0%, var(--accent-500) 100%);
}

/* Etape titre (nested h3 and p) */
.etape-titre h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin: 0;
}

.etape-titre p {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin: var(--space-1) 0 0 0;
}

/* Etape actions */
.etape-actions {
    margin-left: auto;
    display: flex;
    gap: var(--space-2);
}

/* Checklist */
.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-sm);
    color: var(--gray-700);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist-checkbox {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: transparent;
    font-size: var(--text-sm);
}

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

.checklist-checkbox.checked {
    background: var(--success-500);
    border-color: var(--success-500);
    color: white;
}

/* Date input group */
.date-input-group {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
}

.date-field {
    max-width: 300px;
}

/* Meta items */
.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.meta-icon {
    font-size: var(--text-base);
}

/* OC Section (Organismes Certificateurs) */
.oc-section {
    margin-top: var(--space-8);
}

.oc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.oc-item {
    background: var(--gray-50);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.oc-item:hover {
    background: var(--primary-50);
}

.oc-item a {
    color: var(--primary-600);
    text-decoration: none;
    font-size: var(--text-sm);
}

.oc-item a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   22. GUIDE CARDS
   ========================================================================== */

.guide-nav {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: calc(64px + var(--space-4));
    z-index: var(--z-sticky);
}

.guide-nav-list {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.guide-nav-item {
    padding: var(--space-2) var(--space-3);
    min-height: 36px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
}

.guide-nav-item:hover {
    background: var(--primary-700);
    color: white;
}

.guide-nav-item.active {
    background: var(--primary-700);
    color: white;
}

.guide-nav-btn {
    padding: var(--space-2) var(--space-3);
    min-height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    font-family: var(--font-family);
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.guide-nav-btn:hover {
    background: var(--primary-100);
    color: var(--primary-700);
}

.guide-nav-btn.active {
    background: var(--primary-700);
    color: white;
}

.guide-card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-5);
    overflow: hidden;
    scroll-margin-top: 180px;
}

.guide-header {
    background: var(--primary-700);
    color: white;
    padding: var(--space-5);
}

.guide-header-top {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
}

.guide-num {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: var(--font-bold);
    font-size: var(--text-sm);
}

.guide-critere {
    font-size: var(--text-sm);
    opacity: 0.8;
}

.guide-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    line-height: var(--leading-relaxed);
}

.guide-body {
    padding: var(--space-6);
}

.guide-section {
    margin-bottom: var(--space-6);
}

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

.guide-section-title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--primary-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--primary-100);
}

.guide-section-content {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: var(--leading-relaxed);
}

.guide-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.guide-list li {
    position: relative;
    padding-left: var(--space-5);
    margin-bottom: var(--space-2);
}

.guide-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--primary-500);
    border-radius: var(--radius-full);
}

.guide-list.warning-list li::before,
.guide-list.warning li::before {
    background: var(--danger-500);
}

.guide-list.success-list li::before,
.guide-list.check li::before {
    background: var(--success-500);
}

.guide-list.tip li::before {
    background: var(--accent-500);
}

/* Guide status badge */
.guide-status {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    white-space: nowrap;
}

.guide-status.conforme {
    background: var(--success-100);
    color: var(--success-700);
}

.guide-status.en-cours {
    background: var(--warning-100);
    color: var(--warning-700);
}

.guide-status.non-conforme {
    background: var(--danger-100);
    color: var(--danger-700);
}

.guide-status.non-evalue {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Guide content padding */
.guide-content {
    padding: var(--space-6);
}

/* Guide actions */
.guide-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
}

/* ==========================================================================
   23. DOCUMENT MANAGEMENT
   ========================================================================== */

.doc-stats {
    display: flex;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.doc-stat {
    background: var(--color-bg-elevated);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    min-width: 120px;
}

.doc-stat-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--primary-700);
}

.doc-stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.doc-item {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.doc-item:hover {
    box-shadow: var(--shadow-md);
}

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

.doc-name {
    font-weight: var(--font-medium);
    margin-bottom: var(--space-1);
    color: var(--color-text);
}

.doc-meta {
    display: flex;
    gap: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    flex-wrap: wrap;
}

.doc-indicateurs {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
    margin-top: var(--space-2);
}

.doc-indicateurs .badge {
    font-size: 0.7rem;
}

.doc-actions {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

.doc-actions button {
    padding: var(--space-2) var(--space-3);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-sm);
    min-width: 40px;
    min-height: 40px;
    transition: all var(--transition-fast);
}

.doc-actions .btn-link {
    background: var(--primary-700);
    color: white;
}

.doc-actions .btn-link:hover {
    background: var(--primary-600);
}

.doc-actions .btn-edit {
    background: var(--gray-100);
    color: var(--gray-600);
}

.doc-actions .btn-edit:hover {
    background: var(--gray-200);
}

.doc-actions .btn-delete {
    background: var(--danger-100);
    color: var(--danger-600);
}

.doc-actions .btn-delete:hover {
    background: var(--danger-200);
}

.add-doc-form {
    background: var(--color-bg-elevated);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-6);
}

.add-doc-form h3 {
    margin-bottom: var(--space-5);
    color: var(--primary-700);
    font-size: var(--text-lg);
}

.form-row {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.indicateur-selector {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    max-height: 150px;
    overflow-y: auto;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
}

.indicateur-chip {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: white;
}

.indicateur-chip:hover {
    border-color: var(--primary-500);
    color: var(--primary-700);
}

.indicateur-chip.selected {
    background: var(--primary-700);
    color: white;
    border-color: var(--primary-700);
}

.status-select {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.status-option {
    padding: var(--space-3) var(--space-5);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
    min-height: 44px;
    display: flex;
    align-items: center;
}

.status-option:hover {
    border-color: var(--primary-500);
}

.status-option.selected {
    border-color: var(--primary-700);
    background: var(--primary-700);
    color: white;
}

/* ==========================================================================
   24. SEARCH
   ========================================================================== */

.search-container {
    margin-bottom: var(--space-6);
}

.search-input {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    padding-left: var(--space-12);
    font-size: var(--text-base);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-bg-elevated);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: var(--shadow-md);
}

/* Search box variant */
.search-box {
    margin-bottom: var(--space-6);
}

.search-box .form-input {
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
}

/* ==========================================================================
   25. UTILITY CLASSES
   ========================================================================== */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-success {
    color: var(--success-600);
}

.text-warning {
    color: var(--warning-600);
}

.text-danger {
    color: var(--danger-600);
}

/* Margins */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-6); }
.mb-4 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-2); }
.mt-2 { margin-top: var(--space-4); }
.mt-3 { margin-top: var(--space-6); }
.mt-4 { margin-top: var(--space-8); }

/* Padding */
.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

/* Flex utilities */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

/* ==========================================================================
   26. RESPONSIVE - Mobile First
   ========================================================================== */

/* Small devices (landscape phones, 640px and up) */
@media (min-width: 640px) {
    .container {
        padding: var(--space-6);
    }

    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .page-header h1 {
        font-size: var(--text-4xl);
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile styles (below 768px) */
@media (max-width: 767px) {
    body {
        padding-top: 64px;
    }

    .navbar {
        padding: 0 var(--space-4);
    }

    .navbar-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--primary-800);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-2);
        z-index: var(--z-modal);
        padding: var(--space-6);
    }

    .navbar-nav.show {
        display: flex;
        animation: fadeIn var(--transition-base) ease-out;
    }

    .navbar-nav a {
        font-size: var(--text-xl);
        padding: var(--space-4) var(--space-8);
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .navbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar-close {
        display: flex;
    }

    .page-header {
        padding: var(--space-6) var(--space-4);
        margin-bottom: var(--space-6);
    }

    .page-header h1 {
        font-size: var(--text-2xl);
    }

    .progress-section {
        padding: var(--space-4);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .progress-stats {
        gap: var(--space-3);
        font-size: var(--text-xs);
    }

    .indicateur-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-selector {
        width: 100%;
    }

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

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .stat-card {
        padding: var(--space-4);
    }

    .stat-value {
        font-size: var(--text-2xl);
    }

    .timeline {
        padding-left: 28px;
    }

    .timeline-marker {
        left: -22px;
        width: 18px;
        height: 18px;
    }

    .filters {
        gap: var(--space-2);
    }

    .filter-btn {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }

    .guide-nav {
        position: static;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: var(--space-3);
        -webkit-overflow-scrolling: touch;
    }

    .guide-nav-btn {
        flex-shrink: 0;
    }

    .etape-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .etape-meta {
        flex-direction: column;
        gap: var(--space-2);
    }

    .doc-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .doc-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        min-width: 100%;
    }

    .modal {
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .toast {
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
        max-width: none;
    }
}

/* ==========================================================================
   27. PRINT STYLES
   ========================================================================== */

@media print {
    .navbar,
    .navbar-toggle,
    .btn,
    .filters,
    .toast {
        display: none !important;
    }

    body {
        padding-top: 0;
        background: white;
    }

    .page-header {
        background: var(--primary-700) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .card,
    .critere,
    .indicateur {
        break-inside: avoid;
    }
}
