/* ========================================================= */
/* BASE ET UTILITAIRES GLOBALES (Depuis style.css et header.php) */
/* ========================================================= */

/* Reset et base */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #f8f9fa; 
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Généralités Formulaires */
.form-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #764ba2;
}

/* Boutons Action Tableau */
.btn-modifier, .btn-supprimer, .btn-bloquer {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin: 0 2px;
}

.btn-modifier { background: #4CAF50; color: white; }
.btn-supprimer { background: #f44336; color: white; }
.btn-bloquer { background: #ff9800; color: white; }

/* Alertes */
.alert {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

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

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

.alert-info-gains {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
}

/* Empty State */
.empty-state-alert {
    text-align: center; 
    padding: 40px; 
    background: #f8d7da; 
    color: #721c24; 
    border-radius: 10px;
}

.empty-state-alert-light {
    background: #f8f9fa;
    color: #666;
    padding: 30px;
}

.empty-state-icon {
    font-size: 3rem; 
    margin-bottom: 10px;
}


/* ========================================================= */
/* HEADER & NAVIGATION (Depuis header.php) */
/* ========================================================= */

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: -2px 0 15px rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.nav {
    height: 100%;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
}

.nav h3 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

/* Bouton hamburger : caché sur desktop, flottant sur mobile/tablette */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    z-index: 1100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(-3px);
}

.nav-links a.active {
    background: rgba(255,255,255,0.2);
    font-weight: 600;
}

/* Info utilisateur en bas de la sidebar */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 8px 10px;
    border-radius: 12px;
    margin-top: 15px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.8;
}

.btn-deconnexion {
    background: rgba(255,255,255,0.12) !important;
    text-align: center;
    margin-top: 8px;
}

/* Pousse le contenu principal à gauche de la sidebar */
.container {
    margin-right: 260px;
    max-width: none;
}


/* ========================================================= */
/* PAGE LOGIN (Depuis login.php) */
/* ========================================================= */

body.login-page { 
    /* Style pour centrer le contenu de la page de connexion */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.login-container { 
    background: white; 
    padding: 40px; 
    border-radius: 10px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
    width: 100%; 
    max-width: 400px;
}

.logo { 
    text-align: center; 
    margin-bottom: 30px; 
    color: #333; 
}

.form-group label { 
    color: #555; 
    font-weight: 600;
}

.login-container input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    font-size: 16px;
}

.login-container button { 
    width: 100%; 
    padding: 12px; 
    background: #667eea; 
    color: white; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer; 
    font-size: 16px;
    font-weight: 600;
}

.login-container button:hover { 
    background: #764ba2; 
}

.error { 
    color: red; 
    text-align: center; 
    margin-top: 10px; 
    padding: 10px;
    background: #ffe6e6;
    border-radius: 5px;
}

/* ========================================================= */
/* PAGE DASHBOARD (Depuis dashboard.php) */
/* ========================================================= */

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.dashboard-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.welcome-message {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    display: inline-block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stats-grid-two-cols {
    grid-template-columns: 1fr 1fr;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 5px solid #667eea;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stat-card-danger {
    border-left: 5px solid #dc3545 !important;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.stat-label {
    color: #666;
    font-size: 1rem;
    font-weight: 600;
}

.stat-trend {
    font-size: 0.9rem;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
}

.trend-up { background: #d4edda; color: #155724; }
.trend-down { background: #f8d7da; color: #721c24; }

/* Sections */
.dashboard-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Lots Gagnants */
.winners-grid {
    display: grid;
    gap: 15px;
}

.winner-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.3s;
}

.winner-card:hover {
    background: #e9ecef;
}

.winner-boules {
    display: flex;
    gap: 10px;
    margin-right: 20px;
}

.boule {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.winner-info {
    flex: 1;
}

.winner-tirage {
    font-weight: 600;
    color: #333;
}

.winner-date {
    color: #666;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s;
    display: block; /* S'assurer que le lien est un bloc */
}

.action-card:hover {
    transform: translateY(-3px);
    text-decoration: none;
    color: white;
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.action-text {
    font-weight: 600;
}


/* ========================================================= */
/* PAGE VENTES (Depuis ventes.php) */
/* ========================================================= */

.ventes-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
}

.vendeur-info {
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #333;
    background: #e9ecef;
    border-radius: 8px;
}

.vendeur-info strong {
    color: #28a745;
}

/* Navigation par onglets */
.ventes-tabs {
    display: flex;
    justify-content: space-around;
    background: white;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px 10px;
    text-align: center;
    color: #6c757d;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 600;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85rem; 
    min-width: 0; 
}

.tab-btn.active {
    background: #28a745;
    color: white;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
}

/* Contenu des onglets */
.tab-content {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Formulaire de création de fiche */
.selection-tirage {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

/* Ligne de vente */
.ligne-vente {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1fr 40px; 
    gap: 5px; 
    margin-bottom: 5px; 
    align-items: center;
    padding: 5px 0; 
    background: #fff;
    border-bottom: 1px dashed #eee;
}

.ligne-vente select, .ligne-vente input {
     padding: 8px !important;
     font-size: 0.85rem !important; 
     height: 38px; 
     width: 100%; 
}

.btn-supprimer {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0; 
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    height: 38px; 
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    width: 100%; 
}

/* Bouton d'ajout de ligne compact */
.add-line-button-compact {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1fr 40px; 
    gap: 5px;
    width: 100%;
    margin-top: 5px; 
    padding: 5px 0;
    margin-bottom: 15px;
}

.add-line-button-compact .empty-col {
    visibility: hidden; 
    height: 1px;
}

.add-line-button-compact button {
    grid-column: 3 / span 2; 
    width: 100%; 
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    height: 38px;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Actions Rapides Grappe */
.actions-rapides {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 10px;
    margin: 15px 0;
}

.btn-action-rapide { 
    background: #17a2b8 !important; 
    color: white;
    border: none;
    padding: 12px 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem; 
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.btn-vider {
    background: #dc3545 !important;
}

/* Prix Auto Section */
.prix-auto-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 10px;
    align-items: center;
}

.prix-auto-section .form-group {
    grid-column: span 2; 
    margin-bottom: 0;
}

.prix-actions-group {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-prix-auto, .btn-mariage-auto {
    padding: 12px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none; 
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s;
    cursor: pointer; 
}

.btn-prix-auto {
    background: #28a745 !important;
    color: white !important;
}

.btn-mariage-auto {
    background: #667eea !important;
    color: white !important;
}

/* Total Section */
.total-section {
    background: #eaf8ed;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    border-left: 5px solid #28a745;
}

.montant-total {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
    margin: 10px 0;
}

.btn-enregistrer {
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    padding: 12px 25px; 
    border-radius: 8px;
    border: none;
    color: white;
    transition: all 0.3s;
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.btn-enregistrer:disabled {
    background: #adb5bd !important;
    cursor: not-allowed;
    box-shadow: none;
}


/* Historique des ventes et Rapports - Tableau */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 20px 0;
}

.data-table th, .data-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.statut-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.statut-active { background: #d4edda; color: #155724; }
.statut-gagnante { background: #fff3cd; color: #856404; }
.statut-paye { background: #d1ecf1; color: #0c5460; }


.btn-action-icon {
    background: #6c757d; 
    color: white; 
    padding: 4px 8px; 
    border-radius: 4px; 
    text-decoration: none; 
    font-size: 0.8rem;
    margin-left: 5px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; 
    height: 25px;
}

.btn-action-view {
    background: #6c757d; 
}

.btn-rejouer {
    background: #007bff; 
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    margin-left: 5px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; 
    height: 25px;
}

/* Rapports & Historique - Contrôles */
.rapport-header-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #f8f9fa;
}

.rapport-header-controls label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.rapport-header-controls .date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-rapport-action {
    padding: 10px;
    border-radius: 6px;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.btn-rapport-action-success {
    background: #28a745 !important;
}

.btn-imprimer-rapport {
    background: #17a2b8;
}

.historique-date-range {
    font-size: 0.9rem; 
    color: #6c757d; 
    text-align: center; 
    margin-top: 5px;
}


/* Lots Gagnants */
.gagnants-info-text {
    text-align: center; 
    color: #666; 
    font-size: 0.9rem;
}

.lots-gagnants-section {
    background: #fff3cd; 
    border: 1px solid #ffeeba;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.lots-gagnants-white {
    background: white !important; 
    border: none !important; 
    padding: 0 !important;
}

.lots-gagnants-section h3 {
    font-size: 1.1rem;
    color: #856404;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px dashed #ffd866;
    padding-bottom: 5px;
}

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

.lot-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 5px 0;
    margin-top: 10px;
    border-bottom: 1px dashed #ffeeba;
}

.lot-item-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px dashed #f0f0f0;
}

.lot-result {
    font-size: 1.1rem;
    font-weight: bold;
    color: #dc3545; 
    text-align: right;
}

.lot-info {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
}

.lot-info-left {
    text-align: left !important;
}

/* Rapports Vendeur */
.rapport-stats-header {
    color: #28a745; 
    margin-top: 0; 
    font-size: 1.3rem;
}

.rapport-stats-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-bottom: 20px;
}

.stat-card-blue {
    background: #f1f7fe; 
    border-left: 5px solid #667eea;
}

.stat-card-success {
    background: #eaf8ed; 
    border-left: 5px solid #28a745;
}

.stat-card-warning {
    background: white; 
    border-left: 5px solid #ffc107;
}

.stat-card-danger-border {
    background: #f8f9fa; 
    border: 2px solid #dc3545; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-icon-large {
    font-size: 2rem; 
    margin-bottom: 5px;
}

.stat-number-large {
    font-size: 1.2rem; 
    font-weight: bold; 
    color: #333;
}

.stat-number-medium {
    font-size: 1.5rem; 
    font-weight: bold; 
    color: #333;
}

.stat-label-small {
    color: #666; 
    font-size: 0.85rem;
}

.stat-label-bold {
    font-weight: bold;
    color: #333;
}

.rapport-card-full-width {
    grid-column: span 2;
    padding: 20px !important;
}

.btn-detail-gagnantes {
    background: #ffc107; 
    color: #333; 
    padding: 8px 15px; 
    border: none; 
    border-radius: 5px; 
    margin-top: 10px; 
    cursor: pointer;
    font-weight: 600;
}

.rapport-complementaire-info {
    background: #f8f9fa; 
    padding: 15px; 
    border-radius: 8px;
}

.rapport-complementaire-info h3 {
    margin-top: 0;
    border-bottom: 1px dashed #eee;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.info-line {
    font-size: 0.9rem; 
    margin-bottom: 5px;
}

.info-line-highlight {
    font-size: 0.9rem; 
    font-weight: bold; 
    color: #28a745;
}


/* ========================================================= */
/* MODE SOMBRE PERMANENT */
/* ========================================================= */

body {
    background: #16181d;
    color: #e8e9ec;
}

.container {
    color: #e8e9ec;
}

/* --- Boutons génériques --- */
button {
    background: linear-gradient(135deg, #4c52b0, #3d3480);
    color: #f1f1f5;
}

button:hover {
    background: linear-gradient(135deg, #444ba0, #362e72);
}

/* --- Sidebar / Header --- */
.header {
    background: linear-gradient(165deg, #23263a 0%, #181a26 100%);
    box-shadow: -2px 0 20px rgba(0,0,0,0.5);
    border-left: 1px solid #2c2f3d;
}

.nav h3 {
    border-bottom: 1px solid #2c2f3d;
}

.menu-toggle {
    background: linear-gradient(135deg, #4c52b0, #3d3480);
}

.nav-links a {
    color: #d3d5db;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.06);
    color: #ffffff;
}

.nav-links a.active {
    background: rgba(124,132,240,0.18);
    color: #ffffff;
}

.user-info {
    background: rgba(255,255,255,0.05);
}

.user-role {
    color: #9aa0ac;
}

.btn-deconnexion {
    background: rgba(255,255,255,0.06) !important;
}

.btn-deconnexion:hover {
    background: rgba(255,255,255,0.12) !important;
}

/* Formulaires */
.form-section {
    background: #1e2129;
    box-shadow: 0 5px 15px rgba(0,0,0,0.45);
}

label {
    color: #c3c6cd;
}

input, select, textarea {
    background: #262a34;
    border: 1px solid #383d4a;
    color: #e8e9ec;
}

input::placeholder, textarea::placeholder {
    color: #767c88;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #7c84f0;
}

/* Boutons d'action tableau */
.btn-modifier { background: #2f9e58; color: white; }
.btn-supprimer { background: #cf4646; color: white; }
.btn-bloquer { background: #cc8a26; color: white; }

.btn-modifier:hover { background: #278049; }
.btn-supprimer:hover { background: #b53a3a; }
.btn-bloquer:hover { background: #ad741f; }

/* Alertes */
.alert-success {
    background: #16311f;
    color: #7ee6a0;
    border: 1px solid #1f4a2c;
}

.alert-error {
    background: #3a1a1e;
    color: #ff9aa5;
    border: 1px solid #5c2029;
}

.alert-info-gains {
    background: #142a33;
    color: #7fd4ec;
    border: 1px solid #1c3f4b;
}

.empty-state-alert {
    background: #3a1a1e;
    color: #ff9aa5;
}

.empty-state-alert-light {
    background: #1e2129;
    color: #9aa0ac;
}

/* Dashboard */
.dashboard-container {
    color: #e8e9ec;
}

.dashboard-header {
    background: linear-gradient(135deg, #383f9e, #2b2465);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.welcome-message {
    background: rgba(255,255,255,0.08);
}

.stat-card {
    background: #1e2129;
    box-shadow: 0 5px 15px rgba(0,0,0,0.45);
    border-left: 5px solid #7c84f0;
}

.stat-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.55);
}

.stat-card-success {
    background: #182a1e;
}

.stat-card-danger {
    background: #2c1a1e;
}

.stat-number {
    color: #9aa1f7;
}

.stat-label {
    color: #9aa0ac;
}

.trend-up { background: #16311f; color: #7ee6a0; }
.trend-down { background: #3a1a1e; color: #ff9aa5; }

.dashboard-section {
    background: #1e2129;
    box-shadow: 0 5px 15px rgba(0,0,0,0.45);
}

.section-header {
    border-bottom: 2px solid #2f333f;
}

.section-header h2 {
    color: #e8e9ec;
}

/* Lots gagnants */
.winner-card {
    background: #262a34;
}

.winner-card:hover {
    background: #2e3340;
}

.winner-tirage {
    color: #e8e9ec;
}

.winner-date {
    color: #9aa0ac;
}

.boule {
    background: linear-gradient(135deg, #218b48, #17a37a);
}

/* Actions rapides */
.action-card {
    background: linear-gradient(135deg, #4c52b0, #3d3480);
}

.action-card:hover {
    color: white;
}

/* Empty state générique du dashboard */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #9aa0ac;
}

/* Ventes */
.vendeur-info {
    background: #1e2129;
    color: #e8e9ec;
}

.ventes-tabs {
    background: #1e2129;
    box-shadow: 0 2px 5px rgba(0,0,0,0.45);
}

.tab-btn {
    color: #9aa0ac;
}

.tab-btn.active {
    background: #2f9e58;
}

.tab-content {
    background: #1e2129;
    box-shadow: 0 5px 15px rgba(0,0,0,0.45);
}

.tab-content h2 {
    color: #e8e9ec;
    border-bottom: 2px solid #2f333f;
}

.selection-tirage {
    background: #262a34;
}

.ligne-vente {
    background: #1e2129;
    border-bottom: 1px dashed #2f333f;
}

.add-line-button-compact button {
    background: #1f7a91;
}

.add-line-button-compact button:hover {
    background: #196175;
}

.actions-rapides .btn-action-rapide {
    background: #1f7a91 !important;
}

.btn-vider {
    background: #b5372f !important;
}

.btn-prix-auto {
    background: #2f9e58 !important;
}

.btn-mariage-auto {
    background: #4c52b0 !important;
}

.total-section {
    background: #182a1e;
    border-left: 5px solid #2f9e58;
}

.montant-total {
    color: #6fdb92;
}

.btn-enregistrer {
    background: linear-gradient(135deg, #2f9e58, #17a37a) !important;
}

/* Tableaux */
.data-table th, .data-table td {
    border-bottom: 1px solid #2f333f;
}

.data-table th {
    background: #262a34;
    color: #e8e9ec;
}

.statut-active { background: #16311f; color: #7ee6a0; }
.statut-gagnante { background: #332a10; color: #f0d264; }
.statut-paye { background: #142a33; color: #7fd4ec; }

.btn-action-icon {
    background: #3b4150;
}

.btn-action-view {
    background: #3b4150;
}

.btn-rejouer {
    background: #2b5fa8;
}

/* Rapports & historique */
.rapport-header-controls {
    background: #1e2129;
    border: 1px solid #2f333f;
}

.rapport-header-controls label {
    color: #c3c6cd;
}

.btn-rapport-action-success {
    background: #2f9e58 !important;
}

.btn-imprimer-rapport {
    background: #1f7a91;
}

.historique-date-range {
    color: #9aa0ac;
}

.gagnants-info-text {
    color: #9aa0ac;
}

.lots-gagnants-section {
    background: #2b2412;
    border: 1px solid #453a17;
}

.lots-gagnants-white {
    background: transparent !important;
}

.lots-gagnants-section h3 {
    color: #f0d264;
    border-bottom: 1px dashed #453a17;
}

.lot-header {
    border-bottom: 1px dashed #453a17;
}

.lot-item-line {
    border-bottom: 1px dashed #2f333f;
}

.lot-info {
    color: #9aa0ac;
}

.rapport-stats-header {
    color: #6fdb92;
}

.stat-card-blue {
    background: #182236;
}

.stat-card-warning {
    background: #1e2129;
}

.stat-card-danger-border {
    background: #1e2129;
    border: 2px solid #cf4646;
}

.stat-number-large, .stat-number-medium {
    color: #e8e9ec;
}

.stat-label-small {
    color: #9aa0ac;
}

.stat-label-bold {
    color: #e8e9ec;
}

.btn-detail-gagnantes {
    background: #cc8a26;
    color: #16181d;
}

.rapport-complementaire-info {
    background: #262a34;
}

.rapport-complementaire-info h3 {
    border-bottom: 1px dashed #2f333f;
}

.info-line {
    color: #c3c6cd;
}


/* ========================================================= */
/* RESPONSIVE (Configuration du Menu Hamburger) */
/* ========================================================= */

@media (max-width: 1024px) {
    .header {
        transform: translateX(100%);
    }

    .header.show {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .container {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    /* Global */
    .form-row {
        flex-direction: column;
    }
    
    /* Dashboard */
    .dashboard-container {
        padding: 15px;
    }

    .dashboard-header {
        padding: 20px;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .winner-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .winner-boules {
        margin-right: 0;
        justify-content: center;
    }
    
    /* Ventes */
    .rapport-header-controls {
        flex-direction: column;
        justify-content: space-between;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .nav h3 {
        font-size: 1.2rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .dashboard-section {
        padding: 20px;
    }
    
    .ventes-container {
        padding: 5px;
    }
}

.statut-annuler {
    background-color: #e74c3c !important; /* Rouge pour les fiches annulées */
    color: white !important;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}