* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 2rem;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

header nav a:hover {
    background: rgba(255,255,255,0.2);
}

/* Main */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Alertes */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert.error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert.info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Grille de CD */
.cd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.cd-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.cd-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.cd-info {
    padding: 15px;
}

.cd-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #667eea;
}

.cd-info .auteur {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.cd-info .genre {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 10px;
    font-style: italic;
}

.cd-info .annee_sortie {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 10px;
    font-style: italic;
}

.cd-info .prix {
    font-size: 1.3rem;
    font-weight: bold;
    color: #764ba2;
    margin-bottom: 15px;
}

.cd-info .actions {
    display: flex;
    gap: 10px;
}

/* Détail CD */
.cd-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.cd-image-large img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.cd-details-info h2 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.detail-row strong {
    color: #555;
}

.prix-large {
    font-size: 1.8rem;
    font-weight: bold;
    color: #764ba2;
}

.actions-detail {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* Panier */
.panier-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.panier-table th,
.panier-table td {
    padding: 15px;
    text-align: left;
}

.panier-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.panier-table tbody tr {
    border-bottom: 1px solid #eee;
}

.panier-table tbody tr:hover {
    background: #f9f9f9;
}

.panier-table tfoot {
    background: #f4f4f4;
    font-size: 1.2rem;
}

.panier-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.panier-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Paiement */
.paiement-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 20px;
}

.resume-commande,
.formulaire-paiement {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.resume-commande h3,
.formulaire-paiement h3 {
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.resume-table {
    width: 100%;
}

.resume-table td {
    padding: 10px 0;
}

.resume-table .total-row {
    border-top: 2px solid #667eea;
    margin-top: 10px;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.info-test {
    background: #fff3cd;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #ffc107;
}

.info-test h4 {
    color: #856404;
    margin-bottom: 10px;
}

.info-test ul {
    margin-left: 20px;
    color: #856404;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .cd-detail,
    .paiement-container {
        grid-template-columns: 1fr;
    }

    .cd-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    header .container {
        flex-direction: column;
        gap: 15px;
    }

    .panier-table {
        font-size: 0.85rem;
    }

    .panier-actions,
    .actions-detail,
    .form-actions {
        flex-direction: column;
    }
}