/* --- VARIABLES ET RESET --- */
:root {
    --primary: #7a1212;
    --secondary: #28a745;
    --bg: #f0f2f5;
    --text: #333;
    --white: #ffffff;
    --gray: #ddd;
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    background: var(--bg); 
    color: var(--text); 
    line-height: 1.6;
}

/* --- NAVIGATION --- */
.navbar {
    background: var(--primary);
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar .logo { 
    color: white; 
    font-weight: bold; 
    font-size: 1.2rem; 
    text-decoration: none;
}

.nav-links { 
    display: flex; 
    gap: 10px; 
}

.nav-links a { 
    color: rgba(255,255,255,0.7);
    text-decoration: none; 
    font-weight: 500; 
    font-size: 0.9rem; 
    transition: 0.3s; 
    padding: 8px 12px;
}

.nav-links a:hover, 
.nav-links a.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
}

/* --- BURGER MENU --- */
.burger { 
    display: none; 
    cursor: pointer; 
    padding: 10px;
}

.burger-icon {
    width: 25px;
    height: 3px;
    background-color: white;
    position: relative;
    display: block;
}

.burger-icon::before, 
.burger-icon::after {
    content: ""; /* Obligatoire pour afficher les barres */
    width: 25px;
    height: 3px;
    background-color: white;
    position: absolute;
    left: 0;
    display: block;
    transition: 0.3s;
}

.burger-icon::before { top: -8px; }
.burger-icon::after { top: 8px; }

/* --- LAYOUT --- */
.app-container , .full-screen-wrapper {
    min-height: calc(100vh - 160px);
    display: flex; 
    padding: 20px; 
    gap: 20px; 
    max-width: 1400px; 
    margin: 0 auto; 
    box-sizing: border-box; 
}

.col-sidebar { width: 350px; flex-shrink: 0; }
.col-main { flex: 1; }

/* --- COMPOSANTS (Cards, Buttons, Tables) --- */
.card { 
    background: var(--white); 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    margin-bottom: 20px; 
}

h2 { 
    border-bottom: 2px solid var(--primary); 
    color: var(--primary); 
    margin: 0 0 15px 0; 
    padding-bottom: 8px; 
    font-size: 1.1rem; 
    text-transform: uppercase; 
}

input, select { 
    width: 100%; 
    padding: 10px; 
    margin-bottom: 15px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    box-sizing: border-box; 
    font-size: 1rem;
}

/* Style standard et suppression des flèches */
input[type=number] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    margin: 0;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 0;
  }
  
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

.btn-submit { 
    background: var(--primary); 
    color: white; 
    border: none; 
    padding: 12px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: bold; 
    width: 100%; 
    transition: 0.3s; 
}

.btn-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-cmd { background: var(--secondary); }

table { width: 100%; border-collapse: collapse; }
th { background: #f8f9fa; padding: 10px; font-size: 0.8rem; text-align: left; color: #666; }
td { padding: 10px; border-bottom: 1px solid #eee; font-size: 0.9rem; }

.qty-zero { color: #d32f2f !important; font-weight: bold; }
.btn-del { color: #dc3545; text-decoration: none; font-weight: bold; font-size: 0.8rem; }

/* --- SIDEBAR NAV & ACCORDIONS --- */
.sidebar-nav { display: flex; gap: 5px; margin-bottom: 15px; }
.sidebar-nav .nav-btn {
    flex: 1;
    padding: 12px 5px;
    border: none;
    background: var(--gray);
    border-radius: 8px 8px 0 0;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
}
.sidebar-nav .nav-btn.active { background: var(--primary); color: white; }

.mag-card { padding: 0 !important; overflow: hidden; }
.mag-header { padding: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.mag-header:hover { background: #f9f9f9; }
.mag-body { display: none; padding: 15px; border-top: 1px solid #eee; }
.mag-body.active { display: block; }
.chevron { transition: transform 0.3s; }
.rotate { transform: rotate(180deg); }

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 15px;
}

/* --- RESPONSIVE : ORDINATEUR --- */
@media (min-width: 901px) {
    .mobile-actions-container { display: none !important; }
}

/* --- RESPONSIVE : MOBILE --- */
@media (max-width: 900px) {
    .burger { display: block; } /* Affiche le burger sur mobile */

    .nav-links {
        display: none; /* Cache les liens */
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--primary);
        padding: 10px 0;
        gap: 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }

    .nav-links.active { display: flex; } /* Affiche quand JS active la classe */

    .nav-links a {
        width: 100%;
        padding: 15px 20px;
        box-sizing: border-box;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .app-container { flex-direction: column; padding: 10px; }
    .col-sidebar { width: 100%; order: 1; }
    .col-main { width: 100%; order: 2; }
    .sidebar-nav { display: none !important; }

    .mobile-actions-container {
        display: flex;
        gap: 10px;
        margin-bottom: 15px;
    }

    .mobile-btn {
        flex: 1;
        background: var(--primary);
        color: white;
        border: none;
        padding: 15px 5px;
        border-radius: 8px;
        font-weight: bold;
    }
    
    .mobile-btn.active { background: #4a0b0b; outline: 2px solid white; }
}

.footer-signature {
    padding: 10px 5px;
    margin-top: 10px;
    color: #95a5a6;
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    width: 100%;
    border-top: 1px solid #eaeaea;
    box-sizing: border-box;
}  
 