/* Variables et reset */
:root {
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #343a40;
    --military-green: #2E8B57;
    --military-green-dark: #267349;
    --military-green-light: #3cb371;
    --text-dark: #212529;
    --text-light: #6c757d;
    --error-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    /* Compensation pour le header fixe */
}




.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    position: relative;
    height: 90px;
}

/* Container principal */
.inscription-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 90px);
    width: 100%;
}

/* Section image */
.image-section {
    width: 100%;
    position: relative;
    background: linear-gradient(135deg, var(--military-green) 0%, var(--military-green-dark) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    min-height: 50vh;
}

.livreur-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    position: absolute;
    top: 0;
    left: 0;
}

.image-overlay {
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2;
}

.image-overlay h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    max-width: 800px;
}

.image-overlay p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 600px;
}

.benefits {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    max-width: 900px;
    justify-content: center;
    flex-wrap: wrap;
}

.benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
}

.benefit:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.benefit-icon {
    font-size: 1.8rem;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Section formulaire */
.form-section {
    width: 100%;
    background: var(--white);
    padding: 80px 0;
    margin: 0 auto;
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--white);
    border-radius: 30px 30px 0 0;
    z-index: 1;
}

.form-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.back-link {
    position: absolute;
    left: 20px;
    top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 10px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    background: var(--white);
}

.back-link:hover {
    color: var(--military-green);
    border-color: var(--military-green);
    transform: translateX(-3px);
}

.back-arrow {
    font-size: 1.1rem;
}

.form-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.form-header .logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--military-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.form-header .logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
}

.form-header .logo-text span {
    color: var(--military-green);
}

.form-header h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 700;
}

.form-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Formulaire */
.inscription-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.form-section-title {
    margin: 35px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--medium-gray);
    position: relative;
}

.form-section-title h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    font-weight: 600;
}

.form-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--military-green);
    border-radius: 2px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: var(--white);
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--military-green);
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
    transform: translateY(-1px);
}

.form-group input.error,
.form-group select.error {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 6px;
    min-height: 12px;
    font-weight: 500;
}

/* Force de mot de passe */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    width: 100%;
    height: 5px;
    background: var(--medium-gray);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
    border-radius: 3px;
}

.strength-text {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Checkbox */
.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin: 30px 0;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    border: 1px solid var(--medium-gray);
}

.checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.2);
}

.checkbox-group label {
    font-weight: normal;
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 0.9rem;
    flex: 1;
}

/* Liens */
.link {
    color: var(--military-green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.link:hover {
    color: var(--military-green-dark);
    text-decoration: underline;
}

/* Bouton de soumission */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--military-green);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 25px 0 20px 0;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
    background: var(--military-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 139, 87, 0.3);
}

.submit-btn:disabled {
    background: var(--medium-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner de chargement */
.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lien de connexion */
.login-link {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 20px;
    border-top: 1px solid var(--medium-gray);
    margin-top: 25px;
}

/* Message de succès */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.success-content {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-icon {
    width: 70px;
    height: 70px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.success-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.success-content p {
    color: var(--text-light);
    line-height: 1.5;
    font-size: 1rem;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .image-overlay h1 {
        font-size: 2.4rem;
    }
    
    .benefits {
        gap: 20px;
    }
    
    .benefit {
        min-width: 160px;
        padding: 18px;
    }
    
    .form-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    html,body {
        overflow-x: hidden;
    }
    
    .inscription-container {
        min-height: calc(100vh - 80px);
    }
    
    /* Image plus longue en mobile */
    .image-section {
        padding: 100px 0;
        min-height: 60vh;
    }
    
    .image-overlay h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .image-overlay p {
        font-size: 1.1rem;
        margin-bottom: 35px;
    }
    
    .benefits {
        flex-direction: column;
        gap: 15px;
        max-width: 350px;
    }
    
    .benefit {
        min-width: 100%;
        flex-direction: row;
        text-align: left;
        padding: 18px;
    }
    
    .benefit-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
    
    .form-section {
        padding: 60px 0;
    }
    
    .form-section::before {
        top: -20px;
        height: 40px;
        border-radius: 20px 20px 0 0;
    }
    
    .form-header h2 {
        font-size: 1.8rem;
    }
    
    .back-link {
        position: relative;
        left: 0;
        justify-content: center;
        margin-bottom: 25px;
        display: inline-flex;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-header .logo-text {
        font-size: 1.3rem;
    }
    
    .form-header .logo-icon {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 576px) {
    .image-section {
        padding: 80px 0;
        min-height: 55vh;
    }
    
    .image-overlay h1 {
        font-size: 1.8rem;
    }
    
    .image-overlay p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .benefit {
        padding: 15px;
        gap: 12px;
    }
    
    .benefit-icon {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
    }
    
    .form-section {
        padding: 50px 0;
    }
    
    .form-header h2 {
        font-size: 1.6rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 14px;
    }
    
    .checkbox-group {
        padding: 18px;
        gap: 10px;
    }
    
    .submit-btn {
        padding: 16px;
    }
    
    .success-content {
        padding: 30px 20px;
        margin: 15px;
    }
}

/* Correction pour très petits écrans */
@media (max-width: 360px) {
    .image-overlay h1 {
        font-size: 1.6rem;
    }
    
    .image-overlay p {
        font-size: 0.9rem;
    }
    
    .form-section {
        padding: 40px 0;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .inscription-form {
        padding: 0 15px;
    }
}
/* Styles pour l'upload de photo */
.photo-upload-container {
    text-align: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.photo-upload-container:hover {
    border-color: #259542;
    background: #f8f9fa;
}

.photo-upload-container.drag-over {
    border-color: #7ab88a;
    background: #e3f2fd;
}

.photo-preview {
    margin-bottom: 15px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder {
    color: #6c757d;
    text-align: center;
}

.photo-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.photo-preview-content {
    position: relative;
    display: inline-block;
}

.photo-preview-content img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #259542;
}

.remove-photo-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #259542;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 14px;
}

.photo-upload-btn:hover {
    background: #0056b3;
}

.photo-input {
    display: none;
}

.photo-info {
    margin-top: 10px;
}

.photo-info small {
    color: #6c757d;
}

.upload-icon {
    font-size: 16px;
}