/* Styles spécifiques pour la page d'inscription */

/* Hero Section Enrollment */
.enrollment-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01729 100%);
    color: var(--white);
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.enrollment-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../assets/bg.jpg') center/cover;
    opacity: 0.1;
    z-index: -1;
}

.enrollment-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.enrollment-hero-content p {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Form Section */
.enrollment-form-section {
    padding: 4rem 0;
    background: var(--accent-color);
}

.enrollment-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

@media screen and (max-width: 1024px) {
    .enrollment-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .enrollment-info {
        position: static;
        top: auto;
    }
}

@media screen and (max-width: 768px) {
    .enrollment-hero h1 {
        font-size: 2.5rem;
    }

    .enrollment-hero p {
        font-size: 1.1rem;
    }

    .enrollment-form-section {
        padding: 2rem 0;
    }

    .enrollment-info h2,
    .enrollment-form h2 {
        font-size: 1.8rem;
    }

    .form-section {
        padding: 1.5rem;
    }

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

    .enrollment-form {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .enrollment-hero h1 {
        font-size: 2rem;
    }

    .enrollment-hero p {
        font-size: 1rem;
    }

    .enrollment-info h2,
    .enrollment-form h2 {
        font-size: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .form-section legend {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
}

.alert {
    box-sizing: border-box;
    width: 100%;
    max-width: 600px; /* Adjust as needed to match form width or desired layout */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.contact-form-container {
    box-sizing: border-box;
}

.contact-form {
    box-sizing: border-box;
    max-width: 600px; /* Ensure consistent width with the alert message */
    margin: 0 auto; /* Center the form */
}

/* Info Section */
.enrollment-info {
    position: sticky;
    top: 100px;
}

.contact-info-section {
    padding: 4rem 0;
    background: var(--accent-color);
}

.contact-info-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.contact-info-card h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-info-card .contact-details p {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.contact-info-card .contact-details p i {
    margin-right: 0.8rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.enrollment-info h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.info-item h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-item p {
    color: #666;
    line-height: 1.6;
}

.contact-info {
    background: none; /* Removed white background */
    padding: 2rem;
    border-radius: 10px;
    box-shadow: none; /* Removed box shadow as well for consistency */
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Form Styles */
.enrollment-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}

.enrollment-form h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.form-section {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    background: #fafafa;
}

.form-section legend {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.1rem;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

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

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

.form-group select {
    cursor: pointer;
}

/* Checkbox Styles */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 3px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-weight: bold;
    font-size: 12px;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Submit Button */
.form-submit {
    text-align: center;
    margin-top: 2rem;
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 300px;
}

/* Message Styles */
.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Required Field Indicator */
label:has(+ input[required])::after,
label:has(+ select[required])::after {
    content: ' *';
    color: var(--primary-color);
    font-weight: bold;
}

/* Form Validation */
.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.form-group input:valid:not(:placeholder-shown),
.form-group select:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .enrollment-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .enrollment-info {
        position: static;
        order: 2;
    }
    
    .enrollment-form {
        order: 1;
    }
}

@media screen and (max-width: 768px) {
    .enrollment-hero {
        padding: 6rem 0 3rem;
    }
    
    .enrollment-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .enrollment-hero-content p {
        font-size: 1.1rem;
    }
    
    .enrollment-form {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .info-items {
        gap: 1rem;
    }
    
    .info-item {
        padding: 1rem;
    }
    
    .btn-large {
        width: 100%;
        min-width: auto;
    }
}

@media screen and (max-width: 480px) {
    .enrollment-hero-content h1 {
        font-size: 2rem;
    }
    
    .enrollment-form {
        padding: 1rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .enrollment-form h2 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .enrollment-hero,
    .info-items,
    .contact-info {
        display: none;
    }
    
    .enrollment-content {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .form-submit {
        display: none;
    }
}