/* =========================================================
   BEYOU SHOPPING — Feuille de style principale
   ========================================================= */

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

:root {
    --bleu: #0b053b;
    --bleu-clair: #3e47b0;
    --jaune: #f0c419;
    --gris-clair: #f4f4f9;
    --gris-texte: #555;
    --ombre: 0 4px 10px rgba(0, 0, 0, 0.08);
    --ombre-hover: 0 8px 18px rgba(0, 0, 0, 0.15);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--gris-clair);
    color: #333;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* =========================================================
   HEADER
   ========================================================= */
.header {
    background-color: var(--bleu);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    background: white;
}

.logo span {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
}

/* =========================================================
   MENU DESKTOP
   ========================================================= */
.nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav > a,
.nav-item > a {
    color: white;
    font-size: 1rem;
    padding: 8px 4px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nav > a:hover,
.nav > a.active,
.nav-item > a:hover,
.nav-item > a.active {
    border-bottom-color: var(--jaune);
}

/* =========================================================
   SOUS-MENU (desktop)
   ========================================================= */
.nav-item {
    position: relative;
}

.nav-item .arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-item:hover .arrow {
    transform: rotate(180deg);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    max-height: 400px;
    overflow-y: auto;
}

.nav-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li a {
    display: block;
    padding: 10px 18px;
    color: #333;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.submenu li a:hover {
    background: var(--gris-clair);
    color: var(--bleu);
}

.mobile-only {
    display: none;
}

/* =========================================================
   HAMBURGER
   ========================================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: 0.3s;
}

/* =========================================================
   RESPONSIVE MOBILE
   ========================================================= */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bleu);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .nav.open {
        max-height: 700px;
        overflow-y: auto;
    }

    .nav > a,
    .nav-item > a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-left: 3px solid transparent;
        width: 100%;
        justify-content: space-between;
    }

    .nav > a:hover,
    .nav > a.active,
    .nav-item > a:hover,
    .nav-item > a.active {
        border-bottom-color: rgba(255, 255, 255, 0.08);
        border-left-color: var(--jaune);
    }

    /* Sous-menu mobile */
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.05);
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease;
    }

    .nav-item.open .submenu {
        max-height: 600px;
        overflow-y: auto;
    }

    .submenu li a {
        color: white;
        padding: 12px 35px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .submenu li a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--jaune);
    }

    .nav-item .arrow {
        transition: transform 0.3s ease;
    }

    .nav-item.open .arrow {
        transform: rotate(180deg);
    }

    .mobile-only {
        display: block;
    }

    .hamburger.open span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.open span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .logo span {
        font-size: 1rem;
    }
}

/* =========================================================
   CONTENU PRINCIPAL
   ========================================================= */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 60vh;
}

.hero {
    background-image: 
        linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)),
        url('<?= $hero_image ?>');
    background-size: cover;
    background-position: center;
}

.hero {
    text-align: center;
    padding: 40px 15px;
}

.hero h1 {
    font-size: 2rem;
    color: var(--bleu);
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--gris-texte);
}

.section-title {
    font-size: 1.5rem;
    color: var(--bleu);
    margin: 30px 0 20px;
    text-align: center;
}

/* =========================================================
   GRILLE PRODUITS / CATÉGORIES
   ========================================================= */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.grid-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--ombre);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    color: inherit;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--ombre-hover);
}

.grid-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.grid-item .item-info {
    padding: 12px;
    text-align: center;
}

.grid-item .item-title {
    font-weight: bold;
    color: var(--bleu);
    font-size: 0.95rem;
    margin-bottom: 5px;
    display: block;
}

.grid-item .item-price {
    color: var(--jaune);
    font-weight: bold;
    font-size: 1rem;
    display: block;
}

/* =========================================================
   BOUTONS
   ========================================================= */
.btn-primary {
    display: inline-block;
    background: var(--bleu);
    color: white;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--bleu-clair);
}

.btn-secondary {
    display: inline-block;
    background: var(--jaune);
    color: var(--bleu);
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
    font-weight: bold;
}

.btn-secondary:hover {
    background: #d4a90f;
}

.center {
    text-align: center;
    margin: 30px 0;
}

/* =========================================================
   FORMULAIRES
   ========================================================= */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--ombre);
    width: 100%;
    max-width: 450px;
    margin: 20px auto;
}

.form-container h1 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--bleu);
}

.form-container p.intro {
    font-size: 0.95rem;
    text-align: justify;
    margin-bottom: 20px;
    color: var(--gris-texte);
}

.form-container label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 15px;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--bleu-clair);
    outline: none;
    box-shadow: 0 0 5px rgba(62, 71, 176, 0.4);
}

/* =========================================================
   FICHE PRODUIT
   ========================================================= */
.produit-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--ombre);
    margin: 20px 0;
}

.produit-detail img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.produit-detail .produit-info h1 {
    color: var(--bleu);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.produit-detail .produit-categorie {
    color: var(--gris-texte);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.produit-detail .produit-prix {
    color: var(--jaune);
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.produit-detail .produit-description {
    color: #444;
    font-size: 1rem;
    margin-bottom: 25px;
    text-align: justify;
}

.produit-detail .produit-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.produit-detail .produit-actions button,
.produit-detail .produit-actions a {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

@media (max-width: 768px) {
    .produit-detail {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .produit-detail .produit-info h1 {
        font-size: 1.4rem;
    }
    .produit-detail .produit-prix {
        font-size: 1.3rem;
    }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
    background: var(--bleu);
    color: white;
    margin-top: 40px;
    padding: 30px 20px 10px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-col h4 {
    color: var(--jaune);
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.footer-col p,
.footer-col li {
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.85);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--jaune);
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* =========================================================
   RESPONSIVE GLOBAL (petits écrans)
   ========================================================= */
@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .grid-item img {
        height: 120px;
    }
    .grid-item .item-title {
        font-size: 0.85rem;
    }
    .grid-item .item-price {
        font-size: 0.9rem;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .form-container {
        padding: 20px;
    }
    .form-container h1 {
        font-size: 1.3rem;
    }
}

