/* VARIABLES CSS - Charte graphique conforme au cahier des charges */
:root {
    --color-primary: #0D4A87;
    --color-secondary: #D9534F;
    --color-tertiary: #5CB85C;
    --color-dark: #212529;
    --color-light: #F8F9FA;
    --color-white: #FFFFFF;
    --color-gray: #6C757D;
    --color-gray-light: #E9ECEF;
    
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* RESET ET BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */
.header {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 700;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--color-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: var(--color-white);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 24px;
    cursor: pointer;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #c9302c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-tertiary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: #4cae4c;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* HERO SECTION */
.hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0a3a6b 100%);
    color: var(--color-white);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 36px;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
}

/* SECTIONS */
main {
    padding-top: 80px;
}

section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-primary);
}

/* STATS SECTION */
.stats-section {
    background-color: var(--color-white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background-color: var(--color-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

.stat-icon.blue { color: var(--color-primary); }
.stat-icon.orange { color: #FF9800; }
.stat-icon.green { color: var(--color-tertiary); }
.stat-icon.red { color: var(--color-secondary); }

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 14px;
    color: var(--color-gray);
    font-weight: 600;
}

/* HOW IT WORKS */
.how-it-works {
    background-color: var(--color-light);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* DISEASES SECTION */
.diseases-section {
    background-color: var(--color-white);
}

.diseases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.disease-card {
    background-color: var(--color-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.disease-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.disease-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

.disease-card h3 {
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.disease-card p {
    font-size: 13px;
    color: var(--color-gray);
}

/* CTA SECTION */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0a3a6b 100%);
    color: var(--color-white);
    text-align: center;
}

.cta-section h2 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* FOOTER */
.footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--color-white);
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

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

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-gray-light);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
}

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

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

/* ALERTS */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

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

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--color-primary);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-mobile-toggle {
        display: block;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-image {
        display: none;
    }
    
    .stats-grid,
    .steps-grid,
    .diseases-grid {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
    }


    /* Styles pour la géolocalisation */
.btn-locate {
    background: linear-gradient(135deg, #0D4A87, #1a73e8);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin: 5px 0;
}

.btn-locate:hover {
    background: linear-gradient(135deg, #1a73e8, #0D4A87);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-locate:active {
    transform: translateY(0);
}

.btn-locate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Styles pour les messages de statut de géolocalisation */
.geolocation-status {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 14px;
}

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

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

.geolocation-loading {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Position des boutons de géolocalisation dans les formulaires */
.form-group .btn-locate {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
}

/* Badges pour la gravité */
.badge-critique {
    background-color: #D9534F;
    color: white;
}

.badge-elevee {
    background-color: #FF9800;
    color: white;
}

.badge-moyenne {
    background-color: #FFC107;
    color: #333;
}

.badge-faible {
    background-color: #2196F3;
    color: white;
}

/* Badges pour le statut */
.badge-en_attente {
    background-color: #6c757d;
    color: white;
}

.badge-validee {
    background-color: #5CB85C;
    color: white;
}

.badge-rejetee {
    background-color: #D9534F;
    color: white;
}

.badge-traitee {
    background-color: #17a2b8;
    color: white;
}

/* Styles responsifs pour mobile */
@media (max-width: 768px) {
    .btn-locate {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 16px;
    }
    
    .form-group .btn-locate {
        margin-top: 10px;
    }
}

}
