/* =========================
   style.css complet
   ========================= */

/* RESET & BASE */
* { box-sizing: border-box; }
html,body { height: 100%; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

/* Titre (exemple) */
h1 {
    color: white;
    background-color: #663F37;
    padding: 5px 25px;
    border-radius: 10px;
    display: inline-block;
}

/* =========================
   SIDEBAR
   ========================= */
.sidebar {
    width: 250px;
    background-color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    z-index: 1100;
    transition: left 0.3s ease;
}

.sidebar .logo img {
    width: 100%;
    display: block;
    margin-bottom: 10px;
}

.sidebar nav ul {
    list-style: none;
    padding-top: 10px;
    margin: 10px 0 0 0;
}

.sidebar nav ul li {
    margin: 14px 0;
    padding-top: 10px;
}

.sidebar nav ul li a {
    text-decoration: none;
    color: #663F37;
    font-weight: 700;
    font-size: 0.98rem;
}

/* Contact en bas */
.sidebar .sidebar-contact {
    margin-top: auto;
    padding-bottom: 30px;
}

.sidebar .sidebar-contact h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.sidebar .sidebar-contact p,
.sidebar .sidebar-contact a {
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    margin: 4px 0;
}
.sidebar .sidebar-contact a { color: #663F37; }
.sidebar .sidebar-contact a:hover { color: #000; }

/* =========================
   HAMBURGER (mobile)
   ========================= */
.hamburger {
    display: none;
    position: fixed;
    top: 18px;
    left: 18px;
    font-size: 24px;
    background: #663F37;
    color: #fff;
    border: none;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1300;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

/* =========================
   MAIN & HERO
   ========================= */
main {
    margin-left: 240px; /* laisse de la place pour la sidebar */
    flex: 1;
    padding: 20px;
    transition: margin-left 0.3s ease;
}
.heroA {
    min-height: 100vh;
    background: url('images/boutique/Maison Habiba.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    padding: 40px 20px;
}
/* Hero full-screen avec image fixe */
.hero {
    min-height: 100vh;
    background: url('images/boutique/Maison Habiba.jpg') no-repeat center center fixed;
    background-size: cover;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    padding: 40px 20px;
}

/* voile sombre pour lisibilité */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    padding: 20px;
}

/* =========================
   PRODUITS SUR LE HERO
   ========================= */
.products-container-hero {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.products-container-hero .product-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    width: 220px;
    text-align: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.products-container-hero .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

.products-container-hero .product-card img {
    width: 100%;
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
}

.products-container-hero .product-card h3 {
    margin: 6px 0;
    font-size: 1.02rem;
    color: #333;
}

.products-container-hero .price {
    font-weight: 700;
    margin: 8px 0;
    color: #663F37;
}

.products-container-hero label, .products-container-hero select {
    display: block;
    margin: 6px auto;
}

.products-container-hero button {
    background-color: #663F37;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 8px;
}

.products-container-hero button:hover {
    background-color: #402822;
}

/* =========================
   PANIER SLIDE
   ========================= */
.cart-slide {
    position: fixed;
    top: 0;
    right: -360px; /* caché complètement */
    width: 360px;
    max-width: 90%;
    height: 100%;
    background-color: #f9f9f9;
    box-shadow: -6px 0 20px rgba(0,0,0,0.18);
    padding: 22px;
    transition: right 0.28s ease;
    overflow-y: auto;
    z-index: 1400;
}

.cart-slide.open {
    right: 0;
}

.cart-slide h2 {
    margin: 0 0 12px 0;
    color: #663F37;
}

.cart-slide ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 12px 0;
}

.cart-slide li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 0.95rem;
}

.cart-slide .item-left {
    max-width: 70%;
    word-wrap: break-word;
}

/* bouton supprimer */
.remove-btn {
    margin-left: 10px;
    background-color: #ff4d4d;
    border: none;
    color: white;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
}

.remove-btn:hover {
    background-color: #cc0000;
}

/* bouton commander WhatsApp dans le panier */
.cart-slide .whatsapp-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    background-color: #25D366;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}

/* =========================
   OVERLAY (fond quand panier ouvert)
   ========================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1350; /* entre page (lower) and cart (higher) */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =========================
   BOUTON PANIER + TOTAL
   ========================= */
.cart-toggle-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1500;
}

.cart-toggle {
    background-color: #663F37;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.14);
    font-weight: 800;
}

.cart-toggle:hover {
    background-color: #402822;
}

.cart-total-display {
    background-color: #663F37;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 800;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* =========================
   FOOTER
   ========================= */
.footer {
    background-color: #3f3f3f;
    color: #f1f1f1;
    padding: 12px 20px;
    text-align: center;
    width: 100%;
    margin-top: auto;
}

/* =========================
   RESPONSIVE
   ========================= */

/* Large tablets / small desktops adjustments */
@media (max-width: 1200px) {
    main { margin-left: 220px; padding: 18px; }
    .products-container-hero .product-card { width: 200px; }
    .cart-slide { width: 320px; right: -320px; }
}

/* Tablet */
@media (max-width: 992px) {
    .sidebar { width: 200px; }
    main { margin-left: 210px; }
    .products-container-hero .product-card { width: 190px; }
}

/* Mobile: transform sidebar into hamburger menu */
@media (max-width: 768px) {

    /* hide sidebar off-canvas by default */
    .sidebar {
        left: -260px;
        width: 240px;
        height: 100%;
        box-shadow: 6px 0 18px rgba(0,0,0,0.14);
    }
    .sidebar.open { left: 0; }

    /* show hamburger */
    .hamburger { display: block; }

    /* main content full width */
    main { margin-left: 0; padding: 16px; }

    /* make hero content comfortable on small screen */
    .hero { background-attachment: scroll; padding: 28px 12px; min-height: 60vh; }

    /* products stack vertically */
    .products-container-hero {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        margin-top: 18px;
    }

    .products-container-hero .product-card {
        width: 92%;
        max-width: 420px;
    }

    /* cart slide smaller on mobile - slide from right */
    .cart-slide { right: -100%; width: 92%; max-width: 420px; }
    .cart-slide.open { right: 4%; } /* small inset */

    /* position cart toggle moved left a bit so hamburger not overlapped */
    .cart-toggle-wrapper { right: 16px; bottom: 14px; }
}

/* Very small phones */
@media (max-width: 480px) {
    h1 { font-size: 1.1rem; padding: 6px 12px; }
    .hamburger { top: 12px; left: 12px; padding: 8px 10px; }
    .cart-toggle { padding: 10px 14px; }
    .cart-total-display { padding: 6px 10px; min-width: 56px; font-size: 0.9rem; }
    .products-container-hero .product-card { padding: 12px; }
}

/* small accessibility focus rings */
a:focus, button:focus { outline: 3px solid rgba(102,63,55,0.18); outline-offset: 2px; }

/* --- Override h1 pour sidebar (titre de la boutique dans la barre de gauche) --- */
.sidebar .logo h1,
.sidebar .logo p { /* règle pour titre et sous-texte si nécessaire */
  font-family: Arial, Helvetica, sans-serif; /* police sans-serif pour la sidebar */
  font-size: 18px;
  line-height: 1.1;
  color: #663F37;        /* couleur marron */
  background: transparent; /* pas de fond coloré ici */
  padding: 0;
  margin: 6px 0 0 0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
}

/* si tu veux un style différent pour le petit slogan sous le titre */
.sidebar .logo p {
  font-size: 13px;
  font-weight: 500;
  color: #8b5b50;
  margin-top: 6px;
  text-transform: none;
}

/* --- Style du h1 du HERO (page d'accueil) --- */
.hero-content h1 {
  /* si tu as ajouté Playfair Display, utilise-la sinon la police système */
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 5rem;     /* grand titre sur desktop */
  line-height: 1.02;
  margin: 0 0 10px 0;
  color: #fff;           /* blanc, car overlay sombre */
  text-transform: none;  /* pas forcément tout en majuscule */
  letter-spacing: 0.2px;
  text-shadow: 0 4px 18px rgba(0,0,0,0.45); /* léger effet pour lisibilité */
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(0,0,0,0.18); /* léger fond si tu veux contraste */
  display: inline-block;
}

/* petit texte sous le titre (slogan) */
.hero-content p {
  font-size: 1.05rem;
  margin: 8px 0 18px 0;
  color: #f3e9e6;
  opacity: 0.95;
}

/* --- Responsive: ajuster la taille du hero h1 --- */
@media (max-width: 992px) {
  .hero-content h1 { font-size: 2.6rem; }
}
@media (max-width: 768px) {
  .hero-content h1 { font-size: 2.0rem; padding: 4px 10px; }
  .sidebar .logo h1 { font-size: 16px; }
}
@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.6rem; }
  .hero-content p { font-size: 0.98rem; }
}
