:root {
    --noir: #0d0d0d;
    --noir-clair: #1a1a1a;
    --noir-carte: #161616;
    --or: #d4af37;
    --or-clair: #f0d878;
    --or-fonce: #a8862a;
    --blanc: #f5f5f0;
    --gris: #8a8a85;
    --rouge: #c0392b;
    --vert: #27ae60;
    --bordure: #2b2b28;
    --ombre: 0 4px 16px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--noir);
    color: var(--blanc);
}

a { color: var(--or); }

/* ---------- Écran de connexion ---------- */
.ecran-connexion {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1a1a15, #000 70%);
}

.carte-connexion {
    background: var(--noir-carte);
    border: 1px solid var(--bordure);
    border-radius: 14px;
    padding: 40px 36px;
    width: 340px;
    box-shadow: var(--ombre);
    text-align: center;
}

.carte-connexion h3 {
    color: var(--or);
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-decoration: underline;
}

.carte-connexion .sous-titre {
    color: var(--gris);
    font-size: 13px;
    margin-bottom: 24px;
}

/* ---------- Champs & boutons ---------- */
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 8px;
    border: 1px solid var(--bordure);
    background: var(--noir-clair);
    color: var(--blanc);
    font-size: 14px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--or);
}

button, .btn {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.15s ease;
}

.btn-or {
    background: linear-gradient(135deg, var(--or-clair), var(--or-fonce));
    color: #1a1200;
    width: 100%;
}
.btn-or:hover { filter: brightness(1.08); }

.btn-contour {
    background: transparent;
    border: 1px solid var(--or);
    color: var(--or);
}
.btn-contour:hover { background: rgba(212, 175, 55, 0.1); }

.btn-danger { background: var(--rouge); color: #fff; }
.btn-vert { background: var(--vert); color: #fff; }
.btn-petit { padding: 6px 10px; font-size: 12px; }

.message-erreur { color: #ff6b6b; font-size: 13px; margin-bottom: 10px; min-height: 16px; }
.message-succes { color: var(--vert); font-size: 13px; margin-bottom: 10px; min-height: 16px; }

/* ---------- Layout application ---------- */
.app-shell { display: flex; min-height: 100vh; }

.barre-laterale {
    width: 230px;
    background: var(--noir-carte);
    border-right: 1px solid var(--bordure);
    padding: 20px 0;
    flex-shrink: 0;
}

.logo-app {
    text-align: center;
    color: var(--or);
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0 16px 20px;
    border-bottom: 1px solid var(--bordure);
    margin-bottom: 12px;
}
.logo-app span { display: block; font-size: 11px; color: var(--gris); font-weight: 400; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--blanc);
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(212, 175, 55, 0.07); }
.nav-item.actif { border-left-color: var(--or); color: var(--or); background: rgba(212, 175, 55, 0.08); }

.contenu-principal { flex: 1; min-width: 0; padding: 24px 32px; max-width: 1200px; }

.entete-page {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}
.entete-page h2 { color: var(--or); margin: 0; font-size: 20px; }

.zone-utilisateur { display: flex; align-items: center; gap: 14px; }

.cloche-notif { position: relative; cursor: pointer; font-size: 20px; }
.badge-notif {
    position: absolute; top: -6px; right: -8px;
    background: var(--rouge); color: #fff; font-size: 10px;
    border-radius: 50%; padding: 1px 5px;
}

/* ---------- Cartes / grille produits ---------- */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

.carte-produit {
    background: var(--noir-carte);
    border: 1px solid var(--bordure);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--ombre);
}
.carte-produit img { width: 100%; height: 130px; object-fit: cover; background: #000; }
.carte-produit .contenu { padding: 12px 14px; }
.carte-produit h4 { margin: 0 0 4px; font-size: 15px; }
.carte-produit .ref { color: var(--gris); font-size: 11px; }
.carte-produit .quantite { color: var(--or); font-weight: 700; margin-top: 6px; }
.carte-produit .quantite.alerte { color: var(--rouge); }
.carte-produit .actions { display: flex; gap: 6px; margin-top: 10px; }

/* ---------- Tableaux ---------- */
.tableau-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}
table { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--noir-carte); border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--bordure); }
th { color: var(--or); text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
tr:hover { background: rgba(212, 175, 55, 0.04); }
.ligne-cliquable { cursor: pointer; }
.ligne-cliquable:hover { background: rgba(212, 175, 55, 0.08); }

.etiquette { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.etiquette-vert { background: rgba(39, 174, 96, 0.15); color: var(--vert); }
.etiquette-rouge { background: rgba(192, 57, 43, 0.15); color: #ff6b6b; }
.etiquette-or { background: rgba(212, 175, 55, 0.15); color: var(--or); }

/* ---------- Modale ---------- */
.fond-modale {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.65);
    align-items: center; justify-content: center; z-index: 1000;
}
.fond-modale.visible { display: flex; }
.boite-modale {
    background: var(--noir-carte);
    border: 1px solid var(--bordure);
    border-radius: 12px;
    padding: 24px;
    width: 420px;
    max-height: 85vh;
    overflow-y: auto;
}
.boite-modale h3 { color: var(--or); margin-top: 0; }

/* ---------- Panneau notifications ---------- */
.panneau-notifs {
    display: none;
    position: absolute; right: 32px; top: 60px;
    width: 320px; max-height: 400px; overflow-y: auto;
    background: var(--noir-carte); border: 1px solid var(--bordure);
    border-radius: 10px; box-shadow: var(--ombre); z-index: 900;
}
.panneau-notifs.visible { display: block; }
.item-notif { padding: 12px 14px; border-bottom: 1px solid var(--bordure); font-size: 13px; }
.item-notif .type { color: var(--or); font-size: 11px; text-transform: uppercase; }
.item-notif .date { color: var(--gris); font-size: 11px; margin-top: 4px; }

.otp-affiche {
    font-size: 26px; letter-spacing: 6px; color: var(--or);
    text-align: center; margin: 10px 0; font-weight: 700;
}

@media (max-width: 800px) {
    .app-shell { flex-direction: column; }
    .barre-laterale { width: 100%; display: flex; overflow-x: auto; padding: 8px; }
    .nav-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
    .nav-item.actif { border-bottom-color: var(--or); border-left-color: transparent; }
    .contenu-principal { padding: 16px; max-width: 100vw; }
    .boite-modale { width: 90vw; padding: 18px; }
    .panneau-notifs { right: 12px; left: 12px; width: auto; }
}
.logo{
    width: 100%;
    border-radius: 5%;
}