/* Variables de couleurs */
:root {
    --orange-primary: #f89c2b;
    --orange-light: #fdc969;
    --orange-dark: #fc8e0f;
    --green-primary: #123F31;
    --green-light: #123F31;
    --beige-light: #EFEBD2;
    --white: #FFFFFF;
    --gray-light: #F8F9FA;
    --gray-medium: #6C757D;
    --gray-dark: #343A40;
    --shadow: rgba(0, 0, 0, 0.1);
    --light-green: #E4EEE1;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, var(--orange-primary) 0%, var(--beige-light) 48%, var(--green-primary) 99%);
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
}

/* Page principale */
.register-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1100px;
    margin: 0 auto;
 
}

/* Drapeau de la Côte d'Ivoire */
.flag-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.flag {
    display: flex;
    width: 100%;
    height: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
}

.flag-stripe {
    flex: 1;
    position: relative;
}

.flag-stripe.orange {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.3) 0%, 
        var(--orange-primary) 20%, 
        var(--orange-primary) 80%, 
        rgba(255, 255, 255, 0.3) 100%);
}

.flag-stripe.white {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.8) 0%, 
        var(--white) 20%, 
        var(--white) 80%, 
        rgba(255, 255, 255, 0.8) 100%);
}

.flag-stripe.green {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.3) 0%, 
        var(--green-primary) 20%, 
        var(--green-primary) 80%, 
        rgba(255, 255, 255, 0.3) 100%);
}

/* En-tête national */
.national-header {
    text-align: center;
    margin-bottom: 10px;
    color: var(--white);
}

.globe-icon {
    width: 40px;
    height: 40px;
    background: var(--orange-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 16px;
    color: var(--white);
    box-shadow: 0 2px 4px var(--shadow);
}

.country-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 3px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.motto {
    font-size: 11px;
    opacity: 0.9;
    margin: 0;
}

/* Bannière de l'application */
.app-banner {
    background: var(--green-primary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px var(--shadow);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-icon {
    width: 25px;
    height: 25px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--gray-dark);
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
}

.app-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 3px;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.app-subtitle {
    font-size: 10px;
    color: var(--white);
    opacity: 0.9;
    margin: 0;
    line-height: 1.3;
}

/* Carte principale */
.main-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow);
    padding: 20px;
    flex: 1;
    margin-bottom: 15px;
}

/* Stepper */
.stepper-container {
    margin-bottom: 30px;
}

.stepper-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E9ECEF;
    color: var(--gray-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-medium);
    text-align: center;
    transition: all 0.3s ease;
}

.stepper-step.active .step-number {
    background: var(--orange-primary);
    color: var(--white);
}

.stepper-step.active .step-title {
    color: var(--orange-primary);
}

.stepper-line {
    width: 60px;
    height: 2px;
    background: #E9ECEF;
    margin: 0 20px;
    margin-top: -20px;
}

.stepper-step.active + .stepper-line {
    background: var(--orange-primary);
}

/* Contenu des étapes */
.step-content {
    display: none !important;
    min-height: 400px; /* Hauteur minimale pour maintenir la cohérence */
}

.step-content.active {
    display: block !important;
}

/* Ajustement pour la deuxième étape */
#step2.active {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
}

#step2 .form-section {
    flex: 1;
}

#step2 .post-registration-info {
    margin-top: 20px;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 6px;
    border-left: 4px solid var(--orange-primary);
}

/* Actions des étapes */
.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.btn-next {
    background: var(--orange-primary);
    color: var(--white);
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    height: 40px;
}

.btn-next:hover {
    background: var(--orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(252, 139, 0, 0.3);
}

/* Layout du formulaire */
.form-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Sections du formulaire */
.form-section {
   
    overflow: hidden;
    flex: 1;
}

.section-header {
    background: var(--white);
    color: var(--orange-primary);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 2px solid var(--orange-primary);
}

.section-header i {
    font-size: 14px;
    color: var(--orange-primary);
}

.section-content {
    padding: 12px;
    background: var(--white);
    height: 100%;
}

/* Groupes de formulaire */
.form-group {
    margin-bottom: 10px;
}

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

.form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 11px;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #E9ECEF;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 2px rgba(252, 139, 0, 0.1);
}

/* Champs de sélection avec icône */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 30px;
    cursor: pointer;
}

select.form-control:hover {
    border-color: var(--orange-primary);
}

select.form-control:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FC8B00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

.form-control:invalid {
    border-color: #DC3545;
}

/* Messages d'erreur */
.error-message {
    color: #DC3545;
    font-size: 9px;
    margin-top: 2px;
    display: block;
}

/* Instructions après inscription */
.post-registration-info {
    background: var(--light-green);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.post-registration-info h4 {
    color: var(--green-primary);
    font-size: 11px;
    margin-bottom: 8px;
    font-weight: 600;
}

.post-registration-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-registration-info li {
    color: var(--gray-dark);
    font-size: 10px;
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.post-registration-info li:before {
    content: "•";
    color: var(--green-primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Boutons d'action */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.form-actions .row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.form-actions .col-6 {
    flex: 1;
}

.btn-back {
    background: var(--white);
    color: var(--gray-medium);
    border: 1px solid #E9ECEF;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    flex: 1;
    height: 40px;
}

.btn-back:hover {
    background: var(--gray-light);
    border-color: var(--gray-medium);
    color: var(--gray-dark);
    text-decoration: none;
}

.btn-register {
    background: var(--orange-primary);
    color: var(--white);
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    flex: 1;
    height: 40px;
}

.btn-register:hover {
    background: var(--orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(252, 139, 0, 0.3);
}

/* Pied de page */
.footer {
    text-align: center;
    color: var(--white);
    font-size: 9px;
    opacity: 0.8;
    margin-top: auto;
}

/* Section d'information sur les restrictions d'accès */
.access-info {
    background: #E3F2FD;
    border: 1px solid #2196F3;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.info-header i {
    color: #2196F3;
    font-size: 12px;
}

.info-header h6 {
    color: #1976D2;
    font-size: 10px;
    font-weight: 600;
    margin: 0;
}

.info-content p {
    color: #424242;
    font-size: 8px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.info-content ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.info-content li {
    color: #424242;
    font-size: 11px;
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.info-content li:before {
    content: "✓";
    color: #4CAF50;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Alertes */
.alert {
    border-radius: 4px;
    border: none;
    margin-bottom: 8px;
    font-size: 10px;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
}

.alert-error, .alert-danger {
    background: #F8D7DA;
    color: #721C24;
}

.alert-info {
    background: #D1ECF1;
    color: #0C5460;
}

/* Responsive */
@media (max-width: 1024px) {
    .form-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .app-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .register-page {
        padding: 10px;
    }
    
    .main-card {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .app-title {
        font-size: 20px;
    }
    
    .app-subtitle {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-card {
        padding: 15px;
    }
    
    .section-content {
        padding: 15px;
    }
    
    .post-registration-info {
        padding: 12px;
    }
}