/* ============================================
   ACADEMICA - Formulaire d'inscription v2.1
   Correction alignement indicatifs téléphoniques
   ============================================ */

:root {
    --primary-color: #1a3c6c;
    --primary-light: #2a5a9a;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --gray-light: #f8f9fa;
    --gray-medium: #e0e0e0;
    --gray-dark: #6c757d;
    --border-color: #ccc;
    --text-color: #333;
    --bg-highlight: #e8f0fe;
}

body {
    font-family: "Roboto", Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f4f8;
    color: var(--text-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   HEADER
   ============================================ */

header {
    text-align: center;
    margin-bottom: 25px;
}

header img {
    max-width: 280px;
    margin-bottom: 16px;
}

h1 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin: 0 0 4px 0;
    font-weight: 700;
}

h2 {
    font-size: 1.3em;
    color: var(--primary-light);
    margin-bottom: 15px;
    font-weight: 500;
}

h3 {
    font-size: 1.15em;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 600;
}

h4 {
    font-size: 1em;
    color: var(--primary-color);
    margin: 0 0 10px 0;
    font-weight: 600;
}

/* ============================================
   INTRO & PROGRESS
   ============================================ */

.intro {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 18px 22px;
    border-radius: 10px;
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 0.92em;
    color: #475569;
}

.intro p {
    margin: 0 0 8px 0;
}

.intro p:last-child {
    margin-bottom: 0;
}

.intro strong {
    color: #1e293b;
}

.step-intro {
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 0.92em;
    color: #1e40af;
}

.step-intro p {
    margin: 0;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 8px;
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 0.8em;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.progress-step.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 60, 108, 0.25);
}

/* ============================================
   STEPS
   ============================================ */

.step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step.active {
    display: block;
}

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

/* ============================================
   FORM LAYOUT
   ============================================ */

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

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
    min-width: 0;
}

.tutor-header-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.tutor-title {
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.92em;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95em;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
    color: #1f2937;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 60, 108, 0.1);
}

/* ============================================
   PHONE GROUP - CORRECTION ALIGNEMENT
   ============================================ */

.phone-group {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.phone-group .phone-prefix {
    width: 140px;
    flex-shrink: 0;
    padding: 12px 8px;
}

.phone-group .phone-number {
    flex: 1;
    min-width: 0;
}

.phone-group .phone-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 12px 16px;
    margin: 0;
    height: auto;
    align-self: stretch;
}

/* Assurer que tous les éléments du phone-group ont la même hauteur */
.phone-group > * {
    margin: 0;
}

/* ============================================
   DATE BIRTH GROUP
   ============================================ */

.date-birth-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.date-birth-group select {
    flex: 1;
    min-width: 80px;
}

/* ============================================
   VALIDATION STATES
   ============================================ */

.field-valid {
    border-color: var(--success-color) !important;
    background-color: rgba(40, 167, 69, 0.05);
}

.field-error {
    border-color: var(--error-color) !important;
    background-color: rgba(220, 53, 69, 0.05);
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error {
    color: var(--error-color);
    font-size: 0.85em;
    margin-top: 6px;
    display: none;
    padding: 6px 10px;
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 3px solid var(--error-color);
    border-radius: 0 4px 4px 0;
}

.warning {
    color: #856404;
    font-size: 0.85em;
    margin-top: 6px;
    padding: 8px 12px;
    background-color: #fff3cd;
    border-left: 3px solid var(--warning-color);
    border-radius: 0 4px 4px 0;
}

.warning .suggestion-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.warning .suggestion-link:hover {
    color: var(--primary-light);
}

/* ============================================
   EMAIL CONFIRMATION
   ============================================ */

.email-confirm {
    position: relative;
}

.match-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(25%);
    font-size: 1.3em;
    pointer-events: none;
    font-weight: bold;
}

.match-indicator.ok {
    color: var(--success-color);
}

.match-indicator.ko {
    color: var(--error-color);
}

/* ============================================
   CODE VERIFICATION
   ============================================ */

.code-sent {
    color: var(--success-color);
    font-weight: 500;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
}

/* ============================================
   BUTTONS
   ============================================ */

.buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-prev {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-prev:hover:not(:disabled) {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

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

.btn-next:hover:not(:disabled),
.btn-submit:hover:not(:disabled) {
    background-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(26, 60, 108, 0.25);
}

.add-btn {
    background-color: #eff6ff;
    color: var(--primary-color);
    padding: 10px 18px;
    margin-top: 10px;
    display: inline-block;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #bfdbfe;
    font-weight: 500;
    font-size: 0.9em;
}

.add-btn:hover {
    background-color: #dbeafe;
    border-color: #93c5fd;
}

/* ============================================
   CHECKBOXES
   ============================================ */

.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: normal;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

/* ============================================
   ACTION CARDS (Étape 0 - Choix initial)
   Style moderne inspiré de l'image de référence
   ============================================ */

.welcome-header {
    text-align: center;
    margin-bottom: 28px;
}

.welcome-header h2 {
    margin: 0 0 4px 0;
    color: var(--primary-color);
    font-size: 1.5em;
    font-weight: 600;
}

.welcome-subtitle {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95em;
    font-weight: 500;
}

.action-cards {
    display: flex;
    gap: 16px;
}

.action-card {
    flex: 1;
    background-color: #fafbfc;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 28px 20px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.action-card:hover {
    background-color: #ffffff;
    border-color: #d0d5dd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.action-card.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.action-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

.coming-soon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #fef3c7;
    color: #92400e;
    font-size: 0.7em;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.action-card .action-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icône personnalisée pour Nueva inscripción */
#action-new .action-icon::before {
    content: '';
    width: 44px;
    height: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2316a34a' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.331 0-4.512-.645-6.374-1.766z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Icône personnalisée pour Modificar */
#action-modify .action-icon::before {
    content: '';
    width: 44px;
    height: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563eb' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.action-card h4 {
    color: #1f2937;
    font-size: 1.05em;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.action-card p {
    color: #6b7280;
    font-size: 0.85em;
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   SECTION HEADER (Retour)
   ============================================ */

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8eaed;
}

.section-header h3 {
    margin: 0;
    flex: 1;
    color: #1f2937;
    font-size: 1.2em;
    font-weight: 600;
}

.back-to-choice {
    background: none;
    border: 1px solid #e8eaed;
    color: #6b7280;
    font-size: 0.9em;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.back-to-choice:hover {
    background-color: #f3f4f6;
    border-color: #d0d5dd;
    color: #374151;
}

/* ============================================
   VERIFICATION METHOD TABS
   ============================================ */

.verification-method-tabs {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.method-tab {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid #e8eaed;
    background-color: #fafbfc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6b7280;
    font-weight: 500;
}

.method-tab:hover {
    background-color: #ffffff;
    border-color: #d0d5dd;
}

.method-tab.active {
    border-color: var(--primary-color);
    background-color: #eff6ff;
    color: var(--primary-color);
}

.method-tab .method-icon {
    font-size: 1.3em;
}

.method-tab .method-icon-svg {
    flex-shrink: 0;
}

/* ============================================
   EMAIL GROUP
   ============================================ */

.email-group {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.email-group .email-input {
    flex: 1;
    min-width: 0;
}

.email-group .email-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 12px 16px;
    margin: 0;
    height: auto;
    align-self: stretch;
}

/* ============================================
   MODIFY INSCRIPTION SECTION
   ============================================ */

.modify-search-box {
    background-color: #fafbfc;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
}

.search-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-tab {
    flex: 1;
    padding: 20px 15px;
    border: 1px solid #e8eaed;
    background-color: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.search-tab .tab-icon {
    font-size: 1.8em;
    opacity: 0.7;
}

.search-tab .tab-text {
    font-size: 0.9em;
    color: #6b7280;
    font-weight: 500;
}

.search-tab:hover {
    background-color: #f9fafb;
    border-color: #d0d5dd;
}

.search-tab:hover .tab-icon {
    opacity: 1;
}

.search-tab.active {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.search-tab.active .tab-text {
    color: var(--primary-color);
}

.search-tab.active .tab-icon {
    opacity: 1;
}

.search-field {
    margin-bottom: 20px;
}

.search-field label {
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
    color: #374151;
}

.search-field input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1em;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    background-color: #ffffff;
}

.search-field input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 60, 108, 0.1);
}

.field-hint {
    margin: 8px 0 0 0;
    font-size: 0.85em;
    color: #9ca3af;
}

.btn-search {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-search:hover {
    background-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(26, 60, 108, 0.25);
}

.btn-icon {
    font-size: 1.1em;
}

/* ============================================
   RESULT CARD
   ============================================ */

.modify-result {
    margin-top: 25px;
    animation: slideUp 0.3s ease;
}

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

.result-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.result-header {
    background-color: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    color: #166534;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-icon {
    font-size: 1.3em;
}

.result-header h4 {
    margin: 0;
    color: #166534;
    font-size: 1em;
    font-weight: 600;
}

.result-details {
    padding: 20px;
}

.result-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    width: 100px;
    font-weight: 500;
    color: #6b7280;
    flex-shrink: 0;
    font-size: 0.9em;
}

.result-value {
    flex: 1;
    color: #1f2937;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-pending {
    background-color: #fef9c3;
    color: #854d0e;
}

.result-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background-color: #f9fafb;
    border-top: 1px solid #f3f4f6;
}

.btn-action {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #ffffff;
    color: #374151;
}

.btn-action:hover {
    background-color: #f3f4f6;
    border-color: #d0d5dd;
}

.btn-view {
    color: #2563eb;
    border-color: #bfdbfe;
    background-color: #eff6ff;
}

.btn-view:hover {
    background-color: #dbeafe;
}

.btn-edit {
    color: #d97706;
    border-color: #fde68a;
    background-color: #fffbeb;
}

.btn-edit:hover {
    background-color: #fef3c7;
}

.btn-download {
    color: #6b7280;
}

/* ============================================
   NO RESULT
   ============================================ */

.no-result {
    margin-top: 25px;
    text-align: center;
    padding: 40px 20px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 16px;
    animation: slideUp 0.3s ease;
}

.no-result-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    opacity: 0.8;
}

.no-result h4 {
    color: #991b1b;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.no-result p {
    color: #6b7280;
    margin: 0;
    font-size: 0.95em;
}

.no-result a {
    color: var(--primary-color);
    font-weight: 500;
}

/* ============================================
   RADIO CARDS
   ============================================ */

.radio-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 25px;
}

.radio-card {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #fafbfc;
}

.radio-card:hover {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

.radio-card.active {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.radio-card h4 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 1em;
}

.radio-card p {
    margin: 0;
    color: #6b7280;
    font-size: 0.85em;
    line-height: 1.4;
}

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

/* ============================================
   STUDENT SECTION
   ============================================ */

.student-section {
    border: 1px solid #e2e8f0;
    padding: 22px;
    border-radius: 12px;
    margin-bottom: 20px;
    background-color: #fafbfc;
}

.student-section h4 {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.remove-student {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    display: inline-block;
    border: 1px solid #fecaca;
    font-size: 0.9em;
    font-weight: 500;
}

.remove-student:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
}

/* ============================================
   CONDITIONS
   ============================================ */

.conditions-section {
    margin-top: 20px;
}

.condition-item {
    background-color: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 18px;
}

.condition-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.condition-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 0.95em;
}

.condition-item:last-child {
    margin-bottom: 0;
}

/* ============================================
   FACTURACION SECTION
   ============================================ */

#facturacion-fields {
    background-color: #fff8e1;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

.facturacion-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ffe082;
}

.facturacion-header h3 {
    color: #e65100;
    margin: 0 0 10px 0;
}

.facturacion-intro {
    color: #6d4c00;
    font-size: 0.95em;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 80%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.close-modal-recap,
.close-modal-add {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-modal-recap:hover,
.close-modal-add:hover {
    color: var(--text-color);
}

/* ============================================
   RECAP TABLE
   ============================================ */

.recap-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.recap-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.recap-table td:first-child {
    font-weight: 600;
    width: 35%;
    color: #555;
}

.recap-table h4 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin: 0;
}

/* ============================================
   ADD ANOTHER MODAL
   ============================================ */

#add-another-modal .modal-content {
    text-align: center;
    max-width: 500px;
}

#add-another-modal .success-icon {
    display: inline-block;
    font-size: 4em;
    color: var(--success-color);
    margin: 10px 0 20px 0;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

#add-another-modal .modal-title {
    color: var(--primary-color);
    font-size: 1.6em;
    margin: 0 0 15px 0;
    font-weight: 700;
}

#add-another-modal .modal-description {
    font-size: 1.1em;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

#add-another-modal .buttons {
    justify-content: center;
    gap: 15px;
}

#add-another-modal .btn-primary {
    background-color: var(--success-color);
    min-width: 150px;
}

#add-another-modal .btn-secondary {
    background-color: var(--gray-dark);
    min-width: 150px;
}

/* ============================================
   THANK YOU
   ============================================ */

.thank-you {
    display: none;
    text-align: center;
    padding: 40px 30px;
    background-color: var(--bg-highlight);
    border-radius: 12px;
    margin-top: 20px;
}

.thank-you h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.thank-you p {
    line-height: 1.7;
    color: #555;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
    max-width: 350px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 40px 50px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-medium);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content p {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1em;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.25em;
    }

    /* Progress bar améliorée pour tablettes */
    .progress-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .progress-step {
        flex: none;
        width: calc(50% - 4px);
        font-size: 0.75em;
        padding: 10px 8px;
        min-width: auto;
    }

    .radio-cards {
        flex-direction: column;
    }

    /* Action cards responsive */
    .action-cards {
        flex-direction: column;
    }

    .action-card {
        padding: 25px 20px;
    }

    .verification-method-tabs {
        flex-direction: column;
    }

    .search-tabs {
        flex-direction: column;
    }

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

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

    .email-group .email-btn {
        width: 100%;
    }

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

    .result-row {
        flex-direction: column;
        gap: 5px;
    }

    .result-label {
        width: auto;
    }

    /* Phone group responsive - stack verticalement */
    .phone-group {
        flex-direction: column;
    }

    .phone-group .phone-prefix {
        width: 100%;
    }

    .phone-group .phone-btn {
        width: 100%;
    }

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

    .form-col {
        margin-bottom: 15px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .tutor-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .buttons {
        flex-direction: column;
    }

    .buttons button {
        width: 100%;
    }

    #add-another-modal .buttons {
        flex-direction: column;
        gap: 10px;
    }

    #add-another-modal .btn-primary,
    #add-another-modal .btn-secondary {
        width: 100%;
        min-width: auto;
    }

    .toast {
        left: 15px;
        right: 15px;
        bottom: 15px;
        max-width: none;
    }

    header img {
        max-width: 200px;
    }

    /* Facturation section responsive */
    #facturacion-fields {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 15px;
        border-radius: 8px;
    }

    header {
        margin-bottom: 15px;
    }

    header img {
        max-width: 180px;
    }

    h1 {
        font-size: 1.2em;
        margin-bottom: 5px;
    }

    header h2 {
        font-size: 1em;
    }

    /* ========== PROGRESS BAR COMPACTE - CERCLES ========== */
    .progress-bar {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 0;
        margin-bottom: 20px;
        padding: 15px 10px;
        background-color: var(--gray-light);
        border-radius: 10px;
    }

    .progress-step {
        width: 36px;
        height: 36px;
        padding: 0;
        font-size: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        background-color: var(--gray-medium);
        color: #666;
        flex-shrink: 0;
    }

    /* Numéros dans les cercles */
    .progress-step::after {
        font-size: 14px;
        font-weight: 600;
    }

    .progress-step:nth-child(1)::after { content: '0'; }
    .progress-step:nth-child(2)::after { content: '1'; }
    .progress-step:nth-child(3)::after { content: '2'; }
    .progress-step:nth-child(4)::after { content: '3'; }
    .progress-step:nth-child(5)::after { content: '4'; }

    .progress-step.active {
        background-color: var(--primary-color);
        color: white;
        transform: scale(1.15);
        box-shadow: 0 2px 8px rgba(26, 60, 108, 0.4);
    }

    .progress-step.active::after {
        color: white;
    }

    /* Lignes entre les cercles */
    .progress-step:not(:last-child)::before {
        content: '';
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 3px;
        background-color: var(--gray-medium);
        z-index: -1;
    }

    /* Ajuster l'espacement pour les lignes */
    .progress-step {
        margin-right: 20px;
    }

    .progress-step:last-child {
        margin-right: 0;
    }

    .progress-step:last-child::before {
        display: none;
    }

    /* ========== FIN PROGRESS BAR ========== */

    /* Intro sections */
    .intro,
    .step-intro {
        padding: 15px;
        font-size: 0.9em;
        margin-bottom: 20px;
    }

    /* Date selects en colonne */
    .date-birth-group {
        flex-direction: column;
        gap: 10px;
    }

    .date-birth-group select {
        width: 100%;
    }

    /* Student section */
    .student-section {
        padding: 15px;
    }

    .student-section h4 {
        font-size: 1em;
    }

    /* Conditions */
    .condition-item {
        padding: 15px;
    }

    .checkbox-group label {
        font-size: 0.9em;
        line-height: 1.4;
    }

    /* Buttons */
    button {
        padding: 14px 20px;
        font-size: 1em;
    }

    /* Modal */
    .modal-content {
        margin: 5% auto;
        padding: 20px 15px;
    }

    #add-another-modal .success-icon {
        font-size: 3em;
    }

    #add-another-modal .modal-title {
        font-size: 1.3em;
    }

    /* Recap table */
    .recap-table td {
        padding: 10px;
        font-size: 0.9em;
    }

    .recap-table td:first-child {
        width: 40%;
    }

    /* Facturacion */
    #facturacion-fields {
        padding: 12px;
        margin-bottom: 20px;
    }

    .facturacion-header h3 {
        font-size: 1.1em;
    }

    .facturacion-intro {
        font-size: 0.85em;
    }

    /* Radio cards */
    .radio-card {
        padding: 18px 15px;
    }

    .radio-card h4 {
        font-size: 1em;
    }

    .radio-card p {
        font-size: 0.85em;
    }

    /* Form elements */
    input,
    select,
    textarea {
        padding: 12px 10px;
        font-size: 16px; /* Évite le zoom sur iOS */
    }

    label {
        font-size: 0.95em;
        margin-bottom: 6px;
    }

    /* Match indicator repositionné */
    .match-indicator {
        top: 45%;
    }
}

/* Très petits écrans (iPhone SE, etc.) */
@media (max-width: 360px) {
    .container {
        padding: 12px;
    }

    h1 {
        font-size: 1.1em;
    }

    header img {
        max-width: 150px;
    }

    /* Cercles plus petits */
    .progress-step {
        width: 32px;
        height: 32px;
        margin-right: 15px;
    }

    .progress-step::after {
        font-size: 12px;
    }

    .progress-step:not(:last-child)::before {
        width: 15px;
    }

    button {
        padding: 12px 16px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

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

*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .field-error {
        border-width: 2px;
    }
    
    .field-valid {
        border-width: 2px;
    }
    
    button {
        border: 2px solid transparent;
    }
}

/* ============================================
   PRINT
   ============================================ */

@media print {
    .buttons,
    .progress-bar,
    .modal {
        display: none !important;
    }
    
    .container {
        box-shadow: none;
        max-width: 100%;
    }
}
