* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

.header {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    color: #4a5568;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.admin-status {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
}

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

.admin-status.guest {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-status.guest a {
    color: #721c24;
    text-decoration: underline;
}

.admin-login {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.nav-btn.active {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.nav-btn.admin-only {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.content {
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid #28a745;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.btn-danger {
    background: linear-gradient(45deg, #e53e3e, #c53030);
}

.btn-success {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.table th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.table tr:hover {
    background: #f7fafc;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.card_button {
    margin: 25px 0px 25px 0px;
}

.agenda {
    display: grid;
    gap: 20px;
}

.agenda-day {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #4CAF50;
}

.agenda-day h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.commande-item {
    background: #f7fafc;
    padding: 10px;
    margin: 5px 0;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.encart-jour {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.encart-jour h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.encart-jour p {
    color: white;
}

.encart-jour .lot-commandes {
    color: #333;
}

.encart-jour .lot-commandes .lot-header {
    color: #333;
}

.encart-jour .commande-item {
    color: #333;
}

.lot-commandes {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.lot-commandes.valide {
    border-color: #4CAF50;
    background: #f8fff8;
}

.lot-commandes.non-valide {
    border-color: #ff9800;
    background: #fff8e1;
}

.lot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.statut-lot {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.statut-lot.valide {
    background: #4CAF50;
    color: white;
}

.statut-lot.non-valide {
    background: #ff9800;
    color: white;
}

.btn-valider {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-valider:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-completer {
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
}

.btn-completer:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

.btn-devalider {
    background: linear-gradient(45deg, #ffc107, #e0a800);
    color: #212529;
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 12px;
}

.btn-devalider:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-supprimer {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    padding: 4px 8px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 10px;
    margin-left: 10px;
}

.btn-supprimer:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
}

@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        align-items: center;
    }

    .nav-btn {
        width: 100%;
        text-align: center;
    }

    .container {
        padding: 10px;
    }

    .content {
        padding: 20px;
    }

    /* Tableaux larges : défilement horizontal plutôt que débordement de page */
    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .lot-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
