:root {
            --primary: #1a4d2e;
            --primary-light: #2d6a4f;
            --accent: #d4a574;
            --accent-dark: #b8935f;
            --bg-main: #faf8f5;
            --bg-card: #ffffff;
            --text-dark: #1e1e1e;
            --text-muted: #666666;
            --border: #e0ddd8;
            --shadow: rgba(26, 77, 46, 0.08);
            --success: #52b788;
            --error: #e63946;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Jost', 'IBM Plex Sans Arabic', sans-serif;
            background: var(--bg-main);
            color: var(--text-dark);
            line-height: 1.6;
            min-height: 100vh;
            transition: all 0.3s ease;
        }

        body[dir="rtl"] {
            font-family: 'IBM Plex Sans Arabic', 'Jost', sans-serif;
        }

        /* Header */
        .header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            color: white;
            padding: 2.5rem 2rem;
            box-shadow: 0 4px 20px var(--shadow);
            position: relative;
            overflow: hidden;
        }

        .header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -10%;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            border-radius: 50%;
        }

        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }

        .language-toggle {
            position: absolute;
            top: 1rem;
            right: 2rem;
            display: flex;
            gap: 0.5rem;
            background: rgba(255,255,255,0.15);
            padding: 0.4rem;
            border-radius: 25px;
            backdrop-filter: blur(10px);
        }

        .lang-btn {
            background: transparent;
            border: none;
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            font-weight: 500;
        }

        .lang-btn.active {
            background: white;
            color: var(--primary);
        }

        .lang-btn:hover:not(.active) {
            background: rgba(255,255,255,0.1);
        }

        h1 {
            font-family: 'Crimson Pro', 'IBM Plex Sans Arabic', serif;
            font-size: 2.2rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            letter-spacing: -0.5px;
        }

        .subtitle {
            font-size: 1rem;
            opacity: 0.9;
            font-weight: 300;
        }

        /* Progress Bar */
        .progress-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem 2rem 0;
        }

        .progress-bar-wrapper {
            background: var(--bg-card);
            border-radius: 15px;
            padding: 1.5rem;
            box-shadow: 0 2px 10px var(--shadow);
            margin-bottom: 2rem;
        }

        .progress-steps {
            display: flex;
            justify-content: space-between;
            margin-bottom: 1.5rem;
            position: relative;
        }

        .progress-line {
            position: absolute;
            top: 20px;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--border);
            z-index: 0;
        }

        .progress-line-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            transition: width 0.4s ease;
            border-radius: 3px;
        }

        .step {
            position: relative;
            z-index: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            flex: 1;
            cursor: pointer;
        }

        .step-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 3px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            transition: all 0.3s ease;
            margin-bottom: 0.5rem;
        }

        .step.active .step-circle {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            transform: scale(1.1);
        }

        .step.completed .step-circle {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
        }

        .step-label {
            font-size: 0.75rem;
            text-align: center;
            color: var(--text-muted);
            font-weight: 500;
            max-width: 100px;
        }

        .step.active .step-label {
            color: var(--primary);
            font-weight: 600;
        }

        /* Main Container */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem 3rem;
        }

        .form-section {
            background: var(--bg-card);
            border-radius: 15px;
            padding: 2.5rem;
            box-shadow: 0 2px 15px var(--shadow);
            margin-bottom: 2rem;
            animation: fadeInUp 0.5s ease;
            display: none;
        }

        .form-section.active {
            display: block;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .section-title {
            font-family: 'Crimson Pro', 'IBM Plex Sans Arabic', serif;
            font-size: 1.8rem;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 1.5rem;
            padding-bottom: 0.75rem;
            border-bottom: 2px solid var(--accent);
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-group.full-width {
            grid-column: 1 / -1;
        }

        label {
            font-weight: 500;
            margin-bottom: 0.5rem;
            color: var(--text-dark);
            font-size: 0.95rem;
        }

        /* Targets any label that immediately precedes a required input */
        label:has(+ input:required)::after, label:has(+ select:required)::after, label:has(+ textarea:required)::after{
            content: " *";
            color: red;
            font-weight: bold;
        }

        .char-count {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-left: 0.5rem;
        }

        input, textarea, select {
            padding: 0.75rem 1rem;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: 1rem;
            font-family: inherit;
            transition: all 0.3s ease;
            background: var(--bg-main);
        }

        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: var(--primary);
            background: white;
            box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.1);
        }

        textarea {
            resize: vertical;
            min-height: 120px;
        }

        /* Dynamic Member Section */
        .member-card {
            background: var(--bg-main);
            border: 2px solid var(--border);
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            position: relative;
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .member-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--border);
        }

        .member-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--primary);
        }

        .remove-btn {
            background: var(--error);
            color: white;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            font-weight: 500;
        }

        .remove-btn:hover {
            background: #c72c38;
            transform: translateY(-2px);
        }

        .add-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1rem;
            transition: all 0.3s ease;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .add-btn:hover {
            background: var(--primary-light);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px var(--shadow);
        }

        /* Table Styles */
        .table-responsive {
            overflow-x: auto;
            margin-bottom: 1.5rem;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            background: var(--bg-main);
            border-radius: 8px;
            overflow: hidden;
        }

        thead {
            background: var(--primary);
            color: white;
        }

        th, td {
            padding: 1rem;
            text-align: left;
        }

        body[dir="rtl"] th,
        body[dir="rtl"] td {
            text-align: right;
        }

        th {
            font-weight: 600;
            font-size: 0.9rem;
        }

        tbody tr {
            border-bottom: 1px solid var(--border);
        }

        tbody tr:hover {
            background: rgba(26, 77, 46, 0.03);
        }

        .table-input {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid var(--border);
            border-radius: 4px;
            font-size: 0.9rem;
        }

        .voyage-note {
            display: none;
            margin-top: 0.35rem;
            padding: 0.35rem 0.6rem;
            background: #fff8e1;
            border-left: 3px solid #f59e0b;
            border-radius: 4px;
            font-size: 0.78rem;
            color: #92400e;
            line-height: 1.4;
        }
        [dir="rtl"] .voyage-note {
            border-left: none;
            border-right: 3px solid #f59e0b;
        }

        .voiture-note {
            display: none;
            margin-top: 0.35rem;
            padding: 0.35rem 0.6rem;
            background: #fff8e1;
            border-left: 3px solid #f59e0b;
            border-radius: 4px;
            font-size: 0.78rem;
            color: #92400e;
            line-height: 1.4;
        }
        [dir="rtl"] .voiture-note {
            border-left: none;
            border-right: 3px solid #f59e0b;
        }

        /* Navigation Buttons */
        .nav-buttons {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            margin-top: 2rem;
            padding-top: 2rem;
            border-top: 2px solid var(--border);
        }

        .btn {
            padding: 0.875rem 2rem;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background: var(--primary-light);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px var(--shadow);
        }

        .btn-secondary {
            background: var(--border);
            color: var(--text-dark);
        }

        .btn-secondary:hover {
            background: #d0cdc8;
        }

        .btn-submit {
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
            color: white;
            font-size: 1.1rem;
            padding: 1rem 2.5rem;
        }

        .btn-submit:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(212, 165, 116, 0.4);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .header {
                padding: 2rem 1rem;
            }

            h1 {
                font-size: 1.6rem;
            }

            .language-toggle {
                position: static;
                margin-bottom: 1rem;
                justify-content: center;
            }

            .container {
                padding: 0 1rem 2rem;
            }

            .form-section {
                padding: 1.5rem;
            }

            .form-grid {
                grid-template-columns: 1fr;
            }

            .progress-steps {
                flex-wrap: wrap;
            }

            .step {
                flex-basis: 50%;
                margin-bottom: 1rem;
            }

            .nav-buttons {
                flex-direction: column;
            }

            .btn {
                width: 100%;
                justify-content: center;
            }
        }

        /* RTL Adjustments */
        body[dir="rtl"] .language-toggle {
            right: auto;
            left: 2rem;
        }

        body[dir="rtl"] .char-count {
            margin-left: 0;
            margin-right: 0.5rem;
        }

        /* Success Message */
        .success-message {
            display: none;
            background: var(--success);
            color: white;
            padding: 2rem;
            border-radius: 12px;
            text-align: center;
            margin-bottom: 2rem;
            animation: fadeInUp 0.5s ease;
        }

        .success-message.show {
            display: block;
        }

        .success-message h2 {
            font-size: 1.8rem;
            margin-bottom: 0.5rem;
        }