/* ===========================
   GLOBAL BODY
=========================== */
body {
    font-family: Arial, sans-serif;
    margin:0;
    padding:0;
    background:#0f172a; /* fond sombre */
    color:white;
}

/* ===========================
   HEADER / NAVIGATION
=========================== */
.main-header, header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#1e293b;
    color:white;
    padding:10px 20px;
}

.main-header .logo {
    font-weight:bold;
    font-size:1.5em;
}

.main-header nav a {
    color:white;
    margin-left:15px;
    text-decoration:none;
    padding:5px 10px;
    border-radius:5px;
}
.main-header nav a:hover {
    background:#3b82f6;
}

/* ===========================
   CONTAINER & GRID
=========================== */
.container {
    max-width:1200px;
    margin:20px auto;
    padding:20px;
}

.dashboard {
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap:20px;
}

/* ===========================
   CARDS
=========================== */
.card {
    background:#1e293b;
    padding:20px;
    border-radius:10px;
    box-shadow:0 0 10px rgba(0,0,0,0.3);
}

.card h3 {
    margin-top:0;
    color:#f8fafc;
}

/* ===========================
   BOUTONS
=========================== */
.btn {
    display:inline-block;
    margin-top:10px;
    padding:8px 15px;
    background:#3b82f6;
    color:white;
    border-radius:5px;
    text-decoration:none;
    cursor:pointer;
    border:none;
}

.btn:hover {
    background:#2563eb;
}

.btn.delete {
    background:#ef4444;
}

/* ===========================
   FORMULAIRES
=========================== */
input, textarea {
    width:100%;
    padding:10px;
    border-radius:5px;
    border:none;
    margin-top:10px;
}

/* ===========================
   STAT / PRODUIT
=========================== */
.stat {
    font-size:28px;
    font-weight:bold;
    margin-top:10px;
}

.product {
    display:flex;
    justify-content:space-between;
    margin:5px 0;
}

/* ===========================
   TABLES ADMIN
=========================== */
table {
    width:100%;
    border-collapse:collapse;
    margin-top:10px;
}
table th, table td {
    border:1px solid #ccc;
    padding:8px;
    text-align:left;
}
table th {
    background:#3b82f6;
    color:white;
}

/* ===========================
   SUPPORT MESSAGES
=========================== */
.pending { border-left:5px solid #ef4444; }
.resolved { border-left:5px solid #22c55e; padding-left:10px; }

/* Boutons petits pour tableau admin */
.btn.small {
    padding: 5px 10px;
    font-size: 0.85em;
    margin: 2px;
}

.btn.blue { background:#2563eb; }
.btn.blue:hover { background:#1e40af; }

.btn.orange { background:#f97316; }
.btn.orange:hover { background:#c2410c; }

.btn.delete { background:#ef4444; }
.btn.delete:hover { background:#b91c1c; }

/* Tableau amélioré */
table th, table td {
    border:1px solid #ccc;
    padding:8px;
    text-align:left;
}

table th {
    background:#3b82f6;
    color:white;
}

table tr:nth-child(even) {
    background:#1f2937;
}

table tr:nth-child(odd) {
    background:#111827;
}

.btn.small.red {
    background: #ef4444;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    text-decoration: none;
}

.btn.small.red:hover {
    background: #dc2626;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background:#1e293b;
    color:white;
}

table th, table td {
    border: 1px solid #334155;
    padding: 8px 10px;
    text-align: center;
}

table th {
    background: #3b82f6;
}

.btn.small {
    display:inline-block;
    padding: 3px 8px;
    margin: 2px;
    border-radius: 4px;
    text-decoration:none;
    font-size:0.85em;
    color:white;
}

.btn.small.blue { background:#2563eb; }
.btn.small.blue:hover { background:#1d4ed8; }

.btn.small.green { background:#22c55e; }
.btn.small.green:hover { background:#16a34a; }

.btn.small.orange { background:#f97316; }
.btn.small.orange:hover { background:#ea580c; }

.btn.small.red { background:#ef4444; }
.btn.small.red:hover { background:#dc2626; }

.btn.small.delete { background:#b91c1c; }
.btn.small.delete:hover { background:#991b1b; }


/* ===========================
   PRODUITS GRID
=========================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* ===========================
   CARTE PRODUIT
=========================== */

.card {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.card:hover img {
    transform: scale(1.05);
}

.card h3 {
    font-size: 1em;
    margin: 10px 0 5px 0;
    color: #f8fafc;
}

.card b {
    font-size: 1em;
    display: block;
    margin-bottom: 10px;
    color: #22c55e;
}

/* ===========================
   NOTE PRODUIT
=========================== */
.rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #3b82f6;
    color: #fff;
    padding: 4px 8px;
    font-size: 0.75em;
    border-radius: 6px;
    font-weight: 600;
}

@media screen and (max-width: 480px) {
    .product-buttons {
        gap: 8px;
    }
}
/* ===========================
   BOUTONS
=========================== */

.product-buttons {
    display: flex;
    flex-direction: column; /* empile les boutons verticalement */
    gap: 10px;             /* espace entre les boutons */
    margin-top: 10px;
}

.btn {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.green { background:#22c55e; }
.btn.green:hover { background:#16a34a; }

.btn.blue { background:#3b82f6; }
.btn.blue:hover { background:#2563eb; }

.cart{
display:flex;
flex-direction:column;
gap:20px;
margin-top:20px;
}

.cart-item{
display:flex;
align-items:center;
gap:20px;
background:#1e293b;
padding:15px;
border-radius:10px;
}

.cart-image img{
width:80px;
height:80px;
object-fit:contain;
}

.cart-info{
flex:1;
}

.cart-actions{
display:flex;
gap:10px;
margin-top:10px;
}

.cart-total{
margin-top:30px;
background:#1e293b;
padding:20px;
border-radius:10px;
text-align:center;
}

/* ===========================
   PANIER
=========================== */

.cart-summary{
margin-top:30px;
padding:20px;
background:#1e293b;
border-radius:10px;
text-align:center;
max-width:400px;
}

.btn.green{
background:#22c55e;
}

.btn.green:hover{
background:#16a34a;
}

/* MESSAGE COMMANDE */

.order-message{
margin:80px auto;
max-width:500px;
background:#1e293b;
padding:40px;
border-radius:10px;
text-align:center;
}

.order-message.success{
border-left:5px solid #22c55e;
}

.order-message.error{
border-left:5px solid #ef4444;
}