/* ========================================= */
/* === FICHIER : styles/products.css === */
/* ========================================= */

/* --- 1. HERO SECTION --- */
.products-hero {
    background: linear-gradient(135deg, rgba(249, 149, 149, 0.9) 0%, rgba(44, 164, 212, 0.8) 100%), url('../images/poissonrouge.jpg') center/cover no-repeat;
}

/* --- 2. TABLEAU DES TARIFS --- */
.tarifs-table-container {
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    background: #fff;
}

.tarifs-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-white);
    text-align: left;
}

.tarifs-table th, .tarifs-table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.tarifs-table thead {
    background-color: var(--primary);
    color: var(--text-light);
}

.tarifs-table th {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.tarifs-table tbody tr:nth-child(even) {
    background-color: var(--bg-light);
}

.tarifs-table tbody tr:hover {
    background-color: #eef8ff;
}

@media (max-width: 600px) {
    .tarifs-table thead { display: none; }
    .tarifs-table tr { display: block; margin-bottom: 1rem; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
    .tarifs-table td { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding: 10px 15px; }
    .tarifs-table td:last-child { border-bottom: none; }
    .tarifs-table td::before { content: attr(data-label); font-weight: 600; color: var(--text-medium); margin-right: 1rem; }
}

/* --- 3. BOUTIQUE (GRILLE PRODUITS) --- */
.products-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background-color: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    color: var(--text-medium);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary);
}

.product-description {
    color: var(--text-medium);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    flex-grow: 1;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.price {
    font-weight: 700;
    color: var(--accent-red);
    font-size: 1.2rem;
}

.product-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn-cart {
    background-color: var(--primary);
    color: var(--text-light);
}

.btn-cart:hover {
    background-color: var(--accent-red);
    transform: scale(1.1);
}

/* --- 4. PANIER (SIDEBAR) --- */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1002;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active { right: 0; }

.cart-header, .cart-footer {
    padding: 1.5rem;
    background: var(--bg-light);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-medium);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0 10px;
}

.cart-footer { border-top: 1px solid var(--border-light); }

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1001;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.cart-overlay.active { display: block; }

/* --- 5. MODAL DE COMMANDE (DESIGN MODERNE WAVE) --- */

.order-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.order-modal.active { display: flex; }

.order-modal .modal-content {
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #ffffff;
    overflow: hidden;
    max-width: 480px;
    width: 95%;
    border: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    background: #fff;
    padding: 1.5rem 2rem 1rem;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0A1841;
    margin: 0;
}

.close-modal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.close-modal:hover {
    background: #e5e7eb;
    color: #111827;
    transform: rotate(90deg);
}

.modal-scroll-content {
    padding: 0 2rem 2rem;
    overflow-y: auto;
}

/* Carte de Paiement Wave */
.wave-payment-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 2px solid #1DC0F1;
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 2rem;
    position: relative;
    cursor: default;
    transition: transform 0.2s;
}

.wave-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.wave-logo {
    height: 35px;
    width: auto;
}

.check-icon {
    color: #1DC0F1;
    font-size: 1.5rem;
    background: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wave-card-text {
    color: #003F63;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

/* Champs de formulaire modernes (Floating Labels) */
.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.form-group.floating-label {
    position: relative;
    margin-bottom: 1.2rem;
}

.modern-input {
    width: 100%;
    padding: 16px 16px 6px;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background-color: #f9fafb;
    transition: all 0.3s ease;
    color: #1f2937;
    font-weight: 500;
    height: 56px;
    box-sizing: border-box;
}

.modern-input:focus {
    border-color: #1DC0F1;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(29, 192, 241, 0.1);
    outline: none;
}

.modern-input:not(:placeholder-shown) + label,
.modern-input:focus + label {
    top: 8px;
    left: 16px;
    font-size: 0.75rem;
    color: #1DC0F1;
    font-weight: 600;
}

.floating-label label {
    position: absolute;
    top: 18px;
    left: 16px;
    color: #6b7280;
    font-size: 1rem;
    transition: all 0.2s ease;
    pointer-events: none;
}

/* Bouton d'action Wave */
.btn-wave-action {
    width: 100%;
    background: #1DC0F1;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(29, 192, 241, 0.4);
    margin-top: 1rem;
}

.btn-wave-action:hover {
    background: #0ba5d6;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(29, 192, 241, 0.5);
}

.btn-wave-action:active {
    transform: translateY(0);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-wave-action:hover .btn-icon {
    transform: translateX(5px);
}

/* Pied de formulaire */
.secure-note {
    text-align: center;
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Résumé de commande */
.order-summary {
    background-color: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    max-height: 150px;
    overflow-y: auto;
}

/* Scrollbar */
.modal-scroll-content::-webkit-scrollbar { width: 6px; }
.modal-scroll-content::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 3px; }

/* Animation Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }