/* ============================= */
/* SECTION 01 — SETUP & VARIABLES */
/* ============================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #F5A623;
    --primary-hover: #e0961d;
    --dark: #0F0F0F;
    --dark-alt: #1A1A1A;
    --dark-card: #222222;
    --light: #FFFFFF;
    --text-muted: #A0A0A0;
    --border-color: #333333;
    --radius: 8px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================= */
/* SECTION 02 — TYPOGRAPHY & UTILS */
/* ============================= */
h1, h2, h3, h4, h5, h6 {
    color: var(--light);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ============================= */
/* SECTION 03 — COMPONENTS */
/* ============================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary);
    color: var(--dark);
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--dark);
}

.btn-block {
    width: 100%;
}

.text-primary { 
    color: var(--primary); 
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

/* Grid utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
    .md-grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
    .md-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* Background utilities */
.bg-dark-alt { background-color: var(--dark-alt); }
.bg-dark-card { background-color: var(--dark-card); }

/* Typography Helpers */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 40px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 40px; }
.py-5 { padding: 60px 0; }
.p-4 { padding: 24px; }

/* ============================= */
/* SECTION 04 — HEADER & FOOTER */
/* ============================= */
.header {
    background-color: var(--dark-alt);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo { font-size: 24px; font-weight: 700; display: inline-block; }
.nav-links ul { margin: 0; }
.nav-links a { font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--primary); }

.cart-icon {
    position: relative;
    font-size: 20px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
}
.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--primary);
    color: var(--dark);
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .whatsapp-btn { display: none; }
    .mobile-menu-btn { display: block; }
}

.footer {
    border-top: 1px solid var(--border-color);
}
.footer ul { padding: 0; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* ============================= */
/* SECTION 05 — HERO */
/* ============================= */
.hero {
    min-height: 80vh;
    background: linear-gradient(to bottom, rgba(15, 15, 15, 0.7), rgba(15, 15, 15, 1));
}
.hero-content {
    padding-bottom: 100px;
}
.category-section {
    margin-top: -120px;
    position: relative;
    z-index: 10;
    margin-bottom: 60px;
}
.hero h1 { font-size: 48px; margin-bottom: 20px; line-height: 1.2; }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 700px; margin: 0 auto; }

@media (max-width: 768px) {
    .hero { min-height: 60vh; } 
    .hero-content { padding-bottom: 80px; } 
    .category-section { margin-top: -60px; } /* Ajustement crucial pour éviter l'écrasement */
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
}

/* ============================= */
/* SECTION 06 — CARDS & SECTIONS */
/* ============================= */
.section-title h2 { font-size: 32px; margin-bottom: 10px; }
.feature-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}
.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}
.feature-icon { font-size: 36px; }

/* ============================= */
/* SECTION 07 — PRODUCT CARDS */
/* ============================= */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--dark-card);
    overflow: hidden;
    transition: var(--transition);
}
.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}
.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: var(--dark-alt);
}
.product-info { padding: 20px; }
.badge { 
    display: inline-block; 
    padding: 4px 8px; 
    background: rgba(245, 166, 35, 0.1); 
    color: var(--primary); 
    border-radius: 4px; 
    font-size: 12px; 
    font-weight: 600; 
    margin-bottom: 10px; 
}
.product-title { font-size: 20px; margin-bottom: 10px; line-height: 1.3; }
.product-specs { display: flex; gap: 15px; margin-bottom: 15px; color: var(--text-muted); font-size: 14px; }
.product-specs span { display: flex; align-items: center; gap: 5px; }
.product-price { font-size: 24px; font-weight: 700; color: var(--primary); margin-bottom: 15px; }
.product-price span { font-size: 14px; color: var(--text-muted); font-weight: 400; }

/* ============================= */
/* SECTION 08 — PRODUCT DETAILS */
/* ============================= */
.product-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}
@media (max-width: 992px) {
    .product-detail-grid { grid-template-columns: 1fr; }
}
.detail-img-container img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.detail-specs-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}
.detail-specs-list li {
    background-color: var(--dark-card);
    padding: 15px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
}
@media (max-width: 768px) {
    .detail-specs-list { grid-template-columns: 1fr; }
}
.booking-card {
    background-color: var(--dark-card);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 90px;
}
.booking-card h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.form-group { margin-bottom: 15px; }
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-muted);
}
.form-control {
    width: 100%;
    padding: 12px;
    background-color: var(--dark-alt);
    border: 1px solid var(--border-color);
    color: var(--light);
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
}
.form-control:focus {
    border-color: var(--primary);
    outline: none;
}
.availability-alert {
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
    display: none;
}
.alert-success { background-color: rgba(46, 204, 113, 0.1); color: #2ecc71; border: 1px solid #2ecc71; }
.alert-danger { background-color: rgba(231, 76, 60, 0.1); color: #e74c3c; border: 1px solid #e74c3c; }
.alert-warning { background-color: rgba(241, 196, 15, 0.1); color: #f1c40f; border: 1px solid #f1c40f; }

.price-breakdown {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    display: none;
}
.price-row { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--text-muted); }
.price-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; color: var(--primary); margin-top: 10px; }

.cross-sell-section { margin-top: 50px; padding-top: 50px; border-top: 1px solid var(--border-color); }

/* ============================= */
/* SECTION 09 — CART & CHECKOUT */
/* ============================= */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}
@media (max-width: 992px) {
    .cart-layout { grid-template-columns: 1fr; }
}
.cart-items-container {
    background-color: var(--dark-card);
    border-radius: var(--radius);
    padding: 20px;
}
.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}
.cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.cart-item img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius);
}
.cart-item-details { flex: 1; }
.cart-item-title { font-size: 18px; margin-bottom: 5px; }
.cart-item-dates { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.cart-item-price { font-weight: 700; color: var(--primary); }
.remove-btn { color: #e74c3c; cursor: pointer; border: none; background: none; font-size: 14px; margin-top: 10px; padding:0; display:flex; align-items:center; gap:5px; }
.remove-btn:hover { text-decoration: underline; }

.cart-empty-state { text-align: center; padding: 40px 20px; }
.cart-empty-state i { font-size: 48px; color: var(--text-muted); margin-bottom: 20px; }

.summary-card {
    background-color: var(--dark-card);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 90px;
}

/* Form Styles Extension */
.form-container {
    background-color: var(--dark-card);
    padding: 30px;
    border-radius: var(--radius);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

/* ============================= */
/* SECTION 10 — BIG CATEGORY CARDS */
/* ============================= */
.category-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
@media (max-width: 768px) {
    .category-cards { grid-template-columns: 1fr; }
}
.big-card {
    position: relative;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 40px;
    text-decoration: none;
    transition: var(--transition);
}
.big-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Dégradé qui devient 100% transparent en haut pour voir les images */
    background: linear-gradient(to top, rgba(15, 15, 15, 0.95) 0%, rgba(15, 15, 15, 0.7) 40%, rgba(15, 15, 15, 0) 100%);
    z-index: 1;
    transition: var(--transition);
}
.big-card:hover::before {
    background: linear-gradient(to top, rgba(15, 15, 15, 0.95) 0%, rgba(245, 166, 35, 0.5) 100%);
}
.big-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--primary);
}
.big-card img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.6s ease;
}
.big-card:hover img {
    transform: scale(1.05);
}
.big-card-content {
    position: relative;
    z-index: 2;
    width: 100%;
}
.big-card-content h2 {
    font-size: 32px;
    color: var(--light);
    margin-bottom: 15px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}
.big-card-content p {
    color: var(--light); /* Changé de texte atténué vers blanc pour plus de contraste */
    font-size: 16px;
    margin-bottom: 25px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ============================= */
/* SECTION 11 — MODAL */
/* ============================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 15, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background-color: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 15px; right: 20px;
    background: none; border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover { color: var(--light); }
.modal-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
}

/* ============================= */
/* SECTION 12 — WHATSAPP FLOAT */
/* ============================= */
.whatsapp-float {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    right: 30px;
    height: 50px;
    padding: 0 20px;
    background-color: var(--dark-alt); /* Fond sombre */
    color: var(--primary); /* Texte et icône orange */
    border: 2px solid var(--primary);
    border-radius: 25px; /* Forme de pilule */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0.8; /* Légèrement transparent au repos */
    transition: all 0.3s ease;
    white-space: nowrap;
}

.whatsapp-float i {
    font-size: 24px;
}

.whatsapp-float:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.05); /* Garde le centrage pendant l'effet */
    box-shadow: 0 6px 14px rgba(245, 166, 35, 0.3);
    color: var(--dark);
    background-color: var(--primary); /* Devient orange au survol */
}

/* Cache le bouton quand on scroll (géré par app.js) */
.whatsapp-float.hidden-on-scroll {
    opacity: 0 !important;
    pointer-events: none;
    transform: translateY(-50%) scale(0.8);
}

/* Ajustements Mobile pour le bouton flottant */
@media (max-width: 768px) {
    .whatsapp-float {
        top: 62%; /* Un peu en dessous du milieu */
        bottom: auto;
        transform: translateY(-50%);
        right: 15px;
        width: auto; /* On laisse la largeur s'adapter au texte */
        height: 45px; /* Un peu moins haut que sur PC */
        padding: 0 15px;
        border-radius: 25px; /* Forme de pilule */
        opacity: 0.9;
        z-index: 9999;
    }
    .whatsapp-float .wa-text {
        display: inline; /* On réaffiche le texte "Besoin d'aide ?" */
        font-size: 14px; /* Texte réduit pour le mobile */
    }
    .whatsapp-float i {
        font-size: 20px;
        margin: 0;
    }
}
