/* Variables de couleurs */
:root {
    --orange-primary: #D9662B;
    --orange-light: #FFA500;
    --orange-dark: #E67A00;
    --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);
}

/* 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;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container principal */
.auth-container {
    width: 100%;
    max-width: 500px;
    position: relative;
}

/* Drapeau de la Côte d'Ivoire */
.flag-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.flag {
    display: flex;
    width: 300px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px 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: 20px;
    color: var(--white);
}

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

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

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

/* Carte principale */
.main-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow);
    overflow: hidden;
}

/* Bannière de l'application */
.app-banner {
    background: var(--green-primary);
    padding: 20px;
    text-align: center;
    color: var(--white);
}

.chart-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 18px;
}

.app-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.app-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

/* Container du formulaire */
.form-container {
    padding: 30px;
}

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

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

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

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

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

/* 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 15px center;
    background-size: 18px;
    padding-right: 45px;
    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");
}

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

/* Boutons */
.btn-login {
    width: 100%;
    background: var(--orange-primary);
    color: var(--white);
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-login:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

.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;
    flex: 1;
    height: 40px;
    text-decoration: none;
}

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

/* Liens d'inscription/connexion */
.register-link, .login-link {
    text-align: center;
    margin-top: 20px;
}

.register-link p, .login-link p {
    color: var(--gray-medium);
    margin-bottom: 15px;
    font-size: 14px;
}

/* Section des fonctionnalités */
.features-section {
    background: var(--gray-light);
    padding: 20px 30px;
    border-top: 1px solid #E9ECEF;
}

.features-section h4 {
    color: var(--orange-primary);
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    color: var(--orange-primary);
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list i {
    font-size: 12px;
}

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

/* Alertes */
.alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 20px;
}

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

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

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

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    background: var(--gray-light);
}

.navbar-brand {
    font-weight: bold;
    font-size: 20px;
}

.bg-primary {
    background: linear-gradient(90deg, var(--orange-primary) 0%, var(--green-primary) 100%) !important;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow);
}

.card-header {
    background: linear-gradient(90deg, var(--orange-primary) 0%, var(--green-primary) 100%);
    color: var(--white);
    border: none;
    font-weight: 600;
}

.list-group-item {
    border: 1px solid #E9ECEF;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: var(--gray-light);
    border-color: var(--orange-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        max-width: 100%;
        margin: 10px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .app-subtitle {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .form-container {
        padding: 15px;
    }
    
    .features-section {
        padding: 15px 20px;
    }
}
