        :root {
            --primary: #1a4d7a;
            --primary-dark: #0f3558;
            --primary-light: #e8f1f7;
            --accent: #d97706;
            --accent-hover: #b45309;
            --text: #1f2937;
            --text-light: #6b7280;
            --bg: #fafafa;
            --card-bg: #ffffff;
            --border: #e5e7eb;
            --success: #059669;
            --error: #dc2626;
            --shadow: rgba(0, 0, 0, 0.08);
            --shadow-hover: rgba(0, 0, 0, 0.12);
        }

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

        body {
            font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg) 50%, #fef3e2 100%);
            color: var(--text);
            line-height: 1.6;
            min-height: 100vh;
            padding: 1rem;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

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

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(30px);
            }

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

        @keyframes slideOutLeft {
            from {
                opacity: 1;
                transform: translateX(0);
            }

            to {
                opacity: 0;
                transform: translateX(-30px);
            }
        }

        .skip-link {
            position: absolute;
            top: -40px;
            left: 0;
            background: var(--primary);
            color: white;
            padding: 0.5rem 1rem;
            text-decoration: none;
            border-radius: 0 0 4px 0;
            z-index: 100;
        }

        .skip-link:focus {
            top: 0;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
            animation: fadeIn 0.5s ease;
        }

        header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .logos {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 2rem;
            margin-bottom: 2rem;
            flex-wrap: wrap;
        }

        .logo-placeholder {
            background-color: white;
            width: 220px;
            height: 100px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            color: var(--text-light);
            box-shadow: 0 2px 8px var(--shadow);
            font-weight: 500;
        }

        .logo-placeholder img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        h1 {
            font-family: 'Crimson Pro', Georgia, serif;
            font-size: clamp(1.75rem, 5vw, 2.5rem);
            color: var(--primary);
            font-weight: 700;
            margin-bottom: 0.5rem;
            letter-spacing: -0.02em;
        }

        .subtitle {
            font-size: clamp(1rem, 3vw, 1.25rem);
            color: var(--accent);
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .card {
            background: var(--card-bg);
            border-radius: 16px;
            padding: clamp(1.5rem, 4vw, 3rem);
            box-shadow: 0 4px 20px var(--shadow);
            margin-bottom: 2rem;
            border: 1px solid var(--border);
            animation: slideInRight 0.4s ease;
        }

        .card.slide-out {
            animation: slideOutLeft 0.3s ease forwards;
        }

        .progress-container {
            margin-bottom: 2rem;
        }

        .progress-label {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
            font-size: 0.875rem;
            color: var(--text-light);
        }

        .progress-time {
            font-weight: 500;
            color: var(--primary);
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: var(--primary-light);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

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

        .step-title {
            font-family: 'Crimson Pro', Georgia, serif;
            font-size: clamp(1.5rem, 4vw, 2rem);
            font-weight: 700;
            color: var(--text);
            margin-bottom: 2rem;
        }

        .form-group {
            margin-bottom: 2rem;
        }

        .form-label {
            display: block;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 0.75rem;
            font-size: 1rem;
        }

        .form-label.required::after {
            content: '*';
            color: var(--error);
            margin-left: 0.25rem;
        }

        .form-input,
        .form-select,
        .form-textarea {
            width: 100%;
            padding: 0.875rem 1rem;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-family: inherit;
            font-size: 1rem;
            transition: all 0.3s ease;
            background: var(--card-bg);
        }

        .form-input:focus,
        .form-select:focus,
        .form-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-light);
        }

        .form-input:invalid:not(:placeholder-shown),
        .form-select:invalid:not(:placeholder-shown),
        .form-textarea:invalid:not(:placeholder-shown) {
            border-color: var(--error);
        }

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

        .radio-group,
        .checkbox-group {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .radio-option,
        .checkbox-option {
            position: relative;
            display: flex;
            align-items: center;
            padding: 1rem;
            background: var(--card-bg);
            border: 2px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

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

        .radio-option input[type="radio"],
        .checkbox-option input[type="checkbox"] {
            width: 20px;
            height: 20px;
            margin-right: 0.75rem;
            cursor: pointer;
            flex-shrink: 0;
        }

        .radio-option input[type="radio"]:checked,
        .checkbox-option input[type="checkbox"]:checked {
            accent-color: var(--primary);
        }

        .radio-option:has(input:checked),
        .checkbox-option:has(input:checked) {
            border-color: var(--primary);
            background: var(--primary-light);
        }

        .radio-option:focus-within,
        .checkbox-option:focus-within {
            outline: 3px solid var(--primary);
            outline-offset: 2px;
        }

        .departments-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1rem;
        }

        .department-card {
            position: relative;
            background: var(--card-bg);
            border: 2px solid var(--border);
            border-radius: 12px;
            padding: 1.5rem;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .department-card:hover {
            border-color: var(--primary);
            transform: translateY(-4px);
            box-shadow: 0 8px 24px var(--shadow-hover);
        }

        .department-card:focus-within {
            outline: 3px solid var(--primary);
            outline-offset: 2px;
            border-color: var(--primary);
        }

        .department-card input[type="radio"],
        .department-card input[type="checkbox"] {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
        }

        .department-card:has(input:checked) {
            border-color: var(--primary);
            background: var(--primary-light);
        }

        .department-content {
            position: relative;
            padding-left: 2.5rem;
            display: block;
        }

        .department-content::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 24px;
            height: 24px;
            border: 2px solid var(--border);
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .department-card:has(input[type="radio"]:checked) .department-content::before {
            border-color: var(--primary);
            background: var(--primary);
        }

        .department-card:has(input[type="checkbox"]) .department-content::before {
            border-radius: 4px;
        }

        .department-card:has(input[type="checkbox"]:checked) .department-content::before {
            border-color: var(--primary);
            background: var(--primary);
            content: '✓';
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 14px;
            font-weight: bold;
        }

        .department-content::after {
            content: '';
            position: absolute;
            left: 8px;
            top: 50%;
            transform: translateY(-50%);
            width: 8px;
            height: 8px;
            background: white;
            border-radius: 50%;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .department-card:has(input[type="radio"]:checked) .department-content::after {
            opacity: 1;
        }

        .department-title {
            font-weight: 600;
            font-size: 1rem;
            color: var(--text);
            display: block;
            margin-bottom: 0.25rem;
        }

        .department-code {
            font-size: 0.875rem;
            color: var(--text-light);
            font-weight: 500;
        }

        .warning-box,
        .info-box {
            border-radius: 12px;
            padding: 1.25rem;
            margin: 1.5rem 0;
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
        }

        .warning-box {
            background: #fef3c7;
            border: 1px solid #f59e0b;
        }

        .info-box {
            background: var(--primary-light);
            border: 1px solid var(--primary);
        }

        .warning-icon,
        .info-icon {
            flex-shrink: 0;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 0.875rem;
            color: white;
        }

        .warning-icon {
            background: #f59e0b;
        }

        .info-icon {
            background: var(--primary);
        }

        .warning-text,
        .info-text {
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .warning-text {
            color: #92400e;
        }

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

        .error-message {
            color: var(--error);
            font-size: 0.875rem;
            margin-top: 0.5rem;
            display: none;
        }

        .form-group.error .error-message {
            display: block;
        }

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

        .button-container {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            margin-top: 2rem;
        }

        .btn {
            padding: 0.875rem 2rem;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn:focus {
            outline: 3px solid var(--primary);
            outline-offset: 2px;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover:not(:disabled) {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px var(--shadow-hover);
        }

        .btn-secondary {
            background: transparent;
            color: var(--primary);
            border: 2px solid var(--primary);
        }

        .btn-secondary:hover {
            background: var(--primary-light);
        }

        .btn:disabled {
            background: var(--border);
            color: var(--text-light);
            cursor: not-allowed;
        }

        .subsection {
            background: var(--primary-light);
            padding: 1.5rem;
            border-radius: 12px;
            margin: 2rem 0;
            border-left: 4px solid var(--primary);
        }

        .subsection-title {
            font-family: 'Crimson Pro', Georgia, serif;
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 1.5rem;
        }

        .conditional-field {
            display: none;
            margin-top: 1rem;
            padding: 1rem;
            background: var(--card-bg);
            border-radius: 8px;
            border: 1px solid var(--border);
        }

        .conditional-field.show {
            display: block;
            animation: slideUp 0.3s ease;
        }

        footer {
            text-align: center;
            padding: 2rem 0;
            color: var(--text-light);
            font-size: 0.875rem;
        }

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

        .step {
            display: none;
        }

        .step.active {
            display: block;
        }

        @media (max-width: 640px) {
            body {
                padding: 0.5rem;
            }

            .card {
                padding: 1.5rem;
                border-radius: 12px;
            }

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

            .logos {
                gap: 1rem;
            }

            .logo-placeholder {
                width: 100px;
                height: 50px;
            }

            .button-container {
                flex-direction: column;
            }

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

        @media (prefers-reduced-motion: reduce) {
            * {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

        @media (prefers-contrast: high) {

            .department-card,
            .radio-option,
            .checkbox-option {
                border-width: 3px;
            }

            .btn {
                border: 2px solid currentColor;
            }
        }

        /* Autocomplétion des villes */
        .autocomplete-wrapper {
            position: relative;
            width: 100%;
        }

        .autocomplete-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--card-bg);
            border: 2px solid var(--primary);
            border-top: none;
            border-radius: 0 0 8px 8px;
            box-shadow: 0 8px 24px var(--shadow-hover);
            list-style: none;
            margin: 0;
            padding: 0;
            max-height: 280px;
            overflow-y: auto;
            z-index: 100;
            display: none;
        }

        .autocomplete-dropdown.show {
            display: block;
            animation: slideUp 0.2s ease;
        }

        .autocomplete-item {
            padding: 0.875rem 1rem;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border);
            transition: background 0.15s ease;
        }

        .autocomplete-item:last-child {
            border-bottom: none;
        }

        .autocomplete-item:hover,
        .autocomplete-item.selected {
            background: var(--primary-light);
        }

        .autocomplete-item .city-name {
            font-weight: 500;
            color: var(--text);
        }

        .autocomplete-item .city-info {
            font-size: 0.875rem;
            color: var(--text-light);
        }

        .autocomplete-no-result {
            padding: 1rem;
            text-align: center;
            color: var(--text-light);
            font-style: italic;
        }

        .autocomplete-wrapper .form-input:focus {
            border-radius: 8px 8px 0 0;
        }

        .autocomplete-wrapper .form-input:not(:focus) + .autocomplete-dropdown {
            display: none;
        }