/* --- VARIABLES DE DESIGN V3 --- */
:root {
    --primary: #e67e22;
    --primary-hover: #d35400;
    --secondary: #2c3e50;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --white: #ffffff;
    --success: #27ae60;
    --error: #e74c3c;
    --border: #e2e8f0;
    --text: #334155;
    --text-muted: #64748b;
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* --- RESET & BASES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden; /* Empêche la page de scroller horizontalement sur mobile */
}

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

/* --- IMAGE RESPONSIVE (Global) --- */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- LAYOUT & CONTENEURS --- */
.auth-container {
    max-width: 450px;
    margin: 60px auto;
    padding: 0 20px;
}

.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

/* --- LOGO BULL V3 --- */
.brand-logo-wrapper {
    width: 90px;
    height: 90px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.brand-logo-img {
    height: 55px;
    width: auto;
}

/* --- TYPOGRAPHIE --- */
h2 {
    color: var(--secondary);
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 700;
}
.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95em;
}

/* --- FORMULAIRES MODERNES --- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--white);
    color: var(--text);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

/* --- BOUTONS V3 --- */
.btn-block {
    width: 100%;
}
.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--radius);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.25);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(230, 126, 34, 0.35);
}
.btn-primary:active {
    transform: translateY(0);
}

/* --- MOCKUP ACCUEIL --- */
.phone-mockup img {
    margin: 0 auto;
}

/* --- ALERTES --- */
.alert {
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.95em;
    font-weight: 500;
    text-align: left;
}
.alert-error {
    background-color: #fde8e8;
    color: var(--error);
    border: 1px solid #f8b4b4;
}
.alert-success {
    background-color: #def7ec;
    color: var(--success);
    border: 1px solid #bcf0da;
}

/* --- UTILS --- */
.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.text-muted { color: var(--text-muted); font-size: 0.9em; }

/* 📱 AJUSTEMENTS SPÉCIFIQUES POUR L'ACCUEIL (Tablettes et Mobiles) */
@media (max-width: 768px) {
    .hero {
        padding: 20px 15px;
        text-align: center;
    }
    .hero-mockup-container {
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
        margin-top: 30px;
        margin-bottom: 30px;
    }
    .phone-mockup img {
        max-width: 85%; /* L'image respire, elle ne colle pas aux bords de l'écran */
        filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
    }
    .cta-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    .btn-cta-primary, .btn-cta-demo {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* 📱 AJUSTEMENTS SPÉCIFIQUES POUR L'APPLICATION (Mobiles) */
@media (max-width: 600px) {
    .page-header {
        padding: 10px 15px !important;
    }
    
    .page-header span {
        font-size: 1em !important;
    }

    .container, .stats-container {
        padding: 0 10px 30px 10px !important;
    }

    .stock-card {
        padding: 20px !important;
    }

    .stock-number {
        font-size: 3em !important;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
        padding: 12px 20px !important;
        font-size: 1.1em !important;
    }

    .kpi-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .chart-card {
        padding: 15px !important;
    }
    
    .filter-card {
        padding: 15px !important;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .filter-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-input {
        width: 65%;
    }
    
    .filter-btn {
        width: 100%;
    }
}