/*
 * OG e-Commerce — layout.css
 * Header, footer, topbar, bannière pages intérieures, WhatsApp flottant
 */

/* ════════════════════════════════════════════════════════════════════════
   1. TOPBAR
   ════════════════════════════════════════════════════════════════════════ */
.og-topbar {
    background-color: var(--og-topbar-bg, var(--ci-red));
    color: var(--og-topbar-text, #fff);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
}
.og-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ci-space-md);
    min-height: 38px;
    padding-block: 0.45rem;
}
.og-topbar__left,
.og-topbar__right { display: flex; align-items: center; gap: var(--ci-space-md); flex-shrink: 0; }
.og-topbar__item {
    display: flex; align-items: center; gap: 6px;
    color: var(--og-topbar-text, #fff); opacity: 0.92;
    transition: opacity 0.2s; white-space: nowrap;
}
.og-topbar__item:hover { opacity: 1; color: var(--og-topbar-text, #fff); }
.og-topbar__item i { font-size: 0.75rem; }
.og-topbar__promo {
    display: flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,0.15);
    padding: 3px 10px; border-radius: var(--ci-radius-full); font-weight: 600;
}
.og-topbar__whatsapp {
    display: flex; align-items: center; gap: 6px;
    background: var(--ci-whatsapp); color: #fff !important;
    padding: 5px 12px; border-radius: var(--ci-radius-full); font-weight: 600;
    transition: background 0.2s; white-space: nowrap;
}
.og-topbar__whatsapp:hover { background: var(--ci-whatsapp-dark); }
.og-topbar__whatsapp i { font-size: 0.9rem; }

/* ════════════════════════════════════════════════════════════════════════
   2. HEADER PRINCIPAL
   ════════════════════════════════════════════════════════════════════════ */
.og-header {
    background: #fff;
    border-bottom: 1px solid var(--ci-gray-200);
    position: sticky; top: 0;
    z-index: var(--ci-z-sticky);
    transition: box-shadow 0.25s ease;
}
.og-header.is-scrolled { box-shadow: var(--ci-shadow-md); border-bottom-color: transparent; }
.og-header__inner { display: flex; align-items: center; gap: var(--ci-space-lg); min-height: 72px; }

/* Logo */
.og-ec-logo { display: flex; align-items: center; flex-shrink: 0; }
.og-ec-logo--header .og-ec-logo__img { height: 52px; width: auto; max-width: 180px; object-fit: contain; }
.og-ec-logo--footer .og-ec-logo__img { height: 44px; width: auto; max-width: 160px; object-fit: contain; filter: brightness(0) invert(1); }
.og-ec-logo__text { font-size: 1.25rem; font-weight: 800; color: var(--ci-text); }

/* Navigation desktop */
.og-header__nav { flex: 1; display: flex; justify-content: center; }
.og-nav__list { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.og-nav__list > li { position: relative; }
.og-nav__list > li > a {
    display: flex; align-items: center; gap: 5px;
    padding: 0.45rem 0.875rem;
    font-size: 0.9375rem; font-weight: 600; color: var(--ci-text);
    border-radius: var(--ci-radius);
    transition: background 0.18s, color 0.18s; white-space: nowrap;
}
.og-nav__list > li > a:hover,
.og-nav__list > li.current-menu-item > a,
.og-nav__list > li.current-menu-ancestor > a { background: var(--ci-red-100); color: var(--ci-red); }

/* ── DROPDOWN NIVEAU 1 ───────────────────────────────────────────────── */
.og-nav__list .sub-menu {
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 230px; background: #fff;
    border-radius: var(--ci-radius-lg); box-shadow: var(--ci-shadow-lg);
    border: 1px solid var(--ci-gray-200);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: var(--ci-z-dropdown); list-style: none; padding: 0.375rem;
}
.og-nav__list > li:hover > .sub-menu,
.og-nav__list > li:focus-within > .sub-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.og-nav__list .sub-menu > li { position: relative; }
.og-nav__list .sub-menu > li > a {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 0.5rem 0.875rem;
    font-size: 0.9rem; font-weight: 500; color: var(--ci-text);
    border-radius: var(--ci-radius);
    transition: background 0.15s, color 0.15s;
}
.og-nav__list .sub-menu > li > a:hover,
.og-nav__list .sub-menu > li:hover > a,
.og-nav__list .sub-menu > li.current-menu-item > a { background: var(--ci-gray-100); color: var(--ci-red); }

/* Flèche si sous-sous-menu */
.og-nav__list .sub-menu > li:has(> .sub-menu) > a::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free'; font-weight: 900;
    font-size: 0.6rem; color: var(--ci-text-muted); flex-shrink: 0;
}
.og-nav__list .sub-menu > li:has(> .sub-menu) > a { font-weight: 600; }

/* ── DROPDOWN NIVEAU 2 ───────────────────────────────────────────────── */
.og-nav__list .sub-menu .sub-menu {
    position: absolute; top: 0; left: calc(100% + 4px);
    min-width: 200px; background: #fff;
    border-radius: var(--ci-radius-lg); box-shadow: var(--ci-shadow-lg);
    border: 1px solid var(--ci-gray-200);
    opacity: 0; visibility: hidden; transform: translateX(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: calc(var(--ci-z-dropdown) + 1); list-style: none; padding: 0.375rem;
}
.og-nav__list .sub-menu > li:hover > .sub-menu,
.og-nav__list .sub-menu > li:focus-within > .sub-menu {
    opacity: 1; visibility: visible; transform: translateX(0);
}
.og-nav__list .sub-menu .sub-menu > li > a {
    display: flex; align-items: center; gap: 8px;
    padding: 0.45rem 0.875rem;
    font-size: 0.875rem; font-weight: 400; color: var(--ci-text-light);
    border-radius: var(--ci-radius); transition: background 0.15s, color 0.15s;
}
.og-nav__list .sub-menu .sub-menu > li > a::before {
    content: '—'; font-size: 0.65rem; color: var(--ci-red); flex-shrink: 0;
}
.og-nav__list .sub-menu .sub-menu > li > a:hover { background: var(--ci-gray-100); color: var(--ci-red); }

/* Actions header */
.og-header__actions { display: flex; align-items: center; gap: 0.375rem; flex-shrink: 0; }
.og-header__action {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--ci-radius);
    color: var(--ci-text); font-size: 1.0625rem; cursor: pointer;
    transition: background 0.18s, color 0.18s; position: relative; background: transparent;
}
.og-header__action:hover { background: var(--ci-gray-100); color: var(--ci-red); }

/* Badge panier */
.og-ec-cart-count {
    position: absolute; top: 4px; right: 4px;
    background: var(--ci-red); color: #fff;
    font-size: 0.625rem; font-weight: 700; line-height: 1;
    min-width: 16px; height: 16px; border-radius: var(--ci-radius-full);
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
    transition: transform 0.2s;
}
.og-ec-cart-count--empty { display: none; }
.og-ec-cart-count--pulse { animation: og-pulse 0.35s ease; }
@keyframes og-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.4)} }

/* Barre de recherche */
.og-search-bar {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--ci-gray-200);
    box-shadow: var(--ci-shadow-md); padding: var(--ci-space-md) 0;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.og-search-bar.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.og-search-bar .og-ec-container { display: flex; align-items: center; gap: var(--ci-space-sm); }
.og-search-bar .search-form { flex: 1; }
.og-search-bar .search-field {
    width: 100%; padding: 0.65rem 1rem;
    border: 2px solid var(--ci-gray-200); border-radius: var(--ci-radius);
    font-size: 1rem; transition: border-color 0.2s;
}
.og-search-bar .search-field:focus { border-color: var(--ci-red); outline: none; }
.og-search-bar .search-submit {
    padding: 0.65rem 1.25rem; background: var(--ci-red); color: #fff;
    border-radius: var(--ci-radius); font-weight: 600; transition: background 0.2s;
}
.og-search-bar .search-submit:hover { background: var(--ci-red-hover); }
.og-search-bar__close {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--ci-radius); color: var(--ci-text-light); font-size: 1.1rem; transition: color 0.2s;
}
.og-search-bar__close:hover { color: var(--ci-red); }

/* Hamburger */
.og-hamburger { flex-direction: column; gap: 5px; display: none; }
.og-hamburger__bar {
    display: block; width: 20px; height: 2px;
    background: var(--ci-text); border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease; transform-origin: center;
}
.og-hamburger.is-active .og-hamburger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.og-hamburger.is-active .og-hamburger__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.og-hamburger.is-active .og-hamburger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════════════════
   3. MENU MOBILE
   ════════════════════════════════════════════════════════════════════════ */
.og-mobile-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    z-index: calc(var(--ci-z-overlay) - 1);
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s;
}
.og-mobile-overlay.is-open { opacity: 1; visibility: visible; }
.og-mobile-menu {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(340px, 90vw); background: #fff;
    z-index: var(--ci-z-overlay);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto; overscroll-behavior: contain;
}
.og-mobile-menu.is-open { transform: translateX(0); }
.og-mobile-menu__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--ci-gray-200);
}
.og-mobile-menu__header .og-ec-logo--header .og-ec-logo__img { height: 40px; }
.og-mobile-menu__close {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    color: var(--ci-text); font-size: 1.25rem; border-radius: var(--ci-radius); transition: background 0.2s;
}
.og-mobile-menu__close:hover { background: var(--ci-gray-100); }
.og-mobile-menu__search { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--ci-gray-200); }
.og-mobile-menu__search .search-field {
    width: 100%; padding: 0.6rem 0.875rem;
    border: 1.5px solid var(--ci-gray-200); border-radius: var(--ci-radius); font-size: 0.9375rem;
}
.og-mobile-menu__search .search-submit { display: none; }
.og-mobile-menu__nav { flex: 1; padding: 0.5rem 0; }
.og-mobile-nav__list { list-style: none; }
.og-mobile-nav__list > li > a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.875rem 1.25rem; font-size: 1rem; font-weight: 600; color: var(--ci-text);
    border-bottom: 1px solid var(--ci-gray-100); transition: background 0.15s, color 0.15s;
}
.og-mobile-nav__list > li > a:hover { background: var(--ci-gray-100); color: var(--ci-red); }
.og-mobile-nav__list > li.current-menu-item > a { color: var(--ci-red); }
.og-mobile-nav__list .sub-menu { display: none; background: var(--ci-gray-100); list-style: none; }
.og-mobile-nav__list .sub-menu.is-open { display: block; }
.og-mobile-nav__list .sub-menu a {
    display: block; padding: 0.75rem 1.5rem;
    font-size: 0.9375rem; color: var(--ci-text-light);
    border-bottom: 1px solid var(--ci-gray-200); transition: color 0.15s;
}
.og-mobile-nav__list .sub-menu a:hover { color: var(--ci-red); }
.og-mobile-nav__list .sub-menu .sub-menu a { padding-left: 2.25rem; font-size: 0.875rem; }
.og-mobile-menu__footer { padding: 1.25rem; border-top: 1px solid var(--ci-gray-200); display: flex; flex-direction: column; gap: 0.625rem; }
.og-mobile-menu__contact-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ci-text-light); }
.og-mobile-menu__contact-item i { color: var(--ci-red); width: 16px; }
.og-mobile-menu__whatsapp {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0.75rem; background: var(--ci-whatsapp); color: #fff !important;
    border-radius: var(--ci-radius); font-weight: 700; font-size: 0.9375rem;
    margin-top: 0.5rem; transition: background 0.2s;
}
.og-mobile-menu__whatsapp:hover { background: var(--ci-whatsapp-dark); }

/* ════════════════════════════════════════════════════════════════════════
   4. FOOTER
   ════════════════════════════════════════════════════════════════════════ */
.og-footer { background-color: var(--og-footer-bg, #111); color: var(--og-footer-text, #fff); margin-top: auto; }
.og-footer__main { padding-block: var(--ci-space-3xl) var(--ci-space-2xl); }
.og-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: var(--ci-space-2xl); }
.og-footer__title {
    font-size: 0.8125rem; font-weight: 700; color: var(--og-footer-text, #fff);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: var(--ci-space-md); padding-bottom: var(--ci-space-sm);
    border-bottom: 2px solid var(--ci-red); display: inline-block;
}
.og-footer__tagline { margin-top: var(--ci-space-md); font-size: 0.9rem; color: rgba(255,255,255,0.65); line-height: 1.6; max-width: 240px; }
.og-footer__social { display: flex; gap: var(--ci-space-sm); margin-top: var(--ci-space-lg); }
.og-footer__social-link {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--ci-radius); background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8) !important; font-size: 0.9375rem; transition: background 0.2s, color 0.2s;
}
.og-footer__social-link:hover { background: var(--ci-red); color: #fff !important; }
.og-footer__social-link--wa:hover { background: var(--ci-whatsapp); }
.og-footer__list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.og-footer__list a { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: rgba(255,255,255,0.65); transition: color 0.2s, gap 0.2s; }
.og-footer__list a:hover { color: #fff; gap: 12px; }
.og-footer__list i { font-size: 0.8rem; color: var(--ci-red); flex-shrink: 0; }
.og-footer__offices { display: flex; flex-direction: column; gap: var(--ci-space-md); margin-bottom: var(--ci-space-md); }
.og-footer__office-name { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 700; color: var(--ci-red); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.og-footer__address { font-style: normal; font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.5; margin-bottom: 4px; }
.og-footer__phone { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; color: rgba(255,255,255,0.75); transition: color 0.2s; }
.og-footer__phone:hover { color: #fff; }
.og-footer__phone i { color: var(--ci-red); font-size: 0.8rem; }
.og-footer__email { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; color: rgba(255,255,255,0.65); margin-top: var(--ci-space-sm); transition: color 0.2s; }
.og-footer__email:hover { color: #fff; }
.og-footer__email i { color: var(--ci-red); }
.og-footer__bottom { background: rgba(0,0,0,0.35); border-top: 1px solid rgba(255,255,255,0.08); padding-block: 1rem; }
.og-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--ci-space-md); flex-wrap: wrap; }
.og-footer__copyright, .og-footer__credit { font-size: 0.8125rem; color: rgba(255,255,255,0.45); margin: 0; }
.og-footer__credit a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.og-footer__credit a:hover { color: #fff; }

/* ════════════════════════════════════════════════════════════════════════
   5. BOUTON WHATSAPP FLOTTANT
   ════════════════════════════════════════════════════════════════════════ */
.og-whatsapp-float {
    position: fixed; bottom: 5rem; right: 1.5rem;
    width: 56px; height: 56px;
    background: var(--ci-whatsapp); color: #fff !important;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.625rem; box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    z-index: calc(var(--ci-z-modal) - 1);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s;
}
.og-whatsapp-float:hover { background: var(--ci-whatsapp-dark); transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,0.55); }
.og-whatsapp-float__tooltip {
    position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.85); color: #fff; font-size: 0.8125rem; font-weight: 600;
    padding: 6px 12px; border-radius: var(--ci-radius); white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.og-whatsapp-float:hover .og-whatsapp-float__tooltip { opacity: 1; }

/* ════════════════════════════════════════════════════════════════════════
   6. BOUTON RETOUR EN HAUT
   ════════════════════════════════════════════════════════════════════════ */
.og-back-to-top {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    width: 44px; height: 44px;
    background: var(--ci-red); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer; border: none;
    box-shadow: 0 4px 16px rgba(204,0,0,0.35);
    z-index: calc(var(--ci-z-modal) - 2);
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s, transform 0.3s ease, background 0.2s;
}
.og-back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.og-back-to-top:hover { background: var(--ci-red-hover); transform: translateY(-3px); }

/* ════════════════════════════════════════════════════════════════════════
   7. BANNIÈRE PAGES INTÉRIEURES
   Fond : image uploadable via meta box + overlay dégradé élégant
   Fallback : dégradé sombre sobre si pas d'image
   ════════════════════════════════════════════════════════════════════════ */
.og-page-banner {
    position: relative;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Image de fond uploadée */
.og-page-banner--has-img {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Overlay élégant — dégradé sombre progressif */
.og-page-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.50) 50%,
        rgba(0, 0, 0, 0.60) 100%
    );
    z-index: 1;
}

/* Grain texture subtil pour donner du caractère */
.og-page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    z-index: 2;
    pointer-events: none;
    opacity: 0.5;
}

/* Accent rouge discret en bas */
.og-page-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--ci-red), transparent);
    z-index: 3;
}

/* Contenu */
.og-page-banner .og-ec-container {
    position: relative;
    z-index: 4;
    padding-block: 3rem;
}

.og-page-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 700px;
}

/* Titre */
.og-page-banner h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 2px 30px rgba(0,0,0,0.5);
}

/* Ligne déco rouge sous le titre */
.og-page-banner h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--ci-red);
    border-radius: var(--ci-radius-full);
    margin-top: 0.75rem;
}

/* Sous-titre */
.og-page-banner p {
    font-size: clamp(0.9375rem, 2vw, 1.0625rem);
    color: rgba(255,255,255,0.82);
    line-height: 1.65;
    margin: 0;
    max-width: 560px;
}

/* Responsive */
@media (max-width: 767px) {
    .og-page-banner { min-height: 200px; background-attachment: scroll; }
    .og-page-banner .og-ec-container { padding-block: 2rem; }
    .og-back-to-top { bottom: 5.5rem; }
}

/* ════════════════════════════════════════════════════════════════════════
   8. LAYOUT PAGE
   ════════════════════════════════════════════════════════════════════════ */
.og-main { min-height: 60vh; }

.og-nav-fallback { display: flex; gap: var(--ci-space-sm); list-style: none; }
.og-nav-fallback a { padding: 0.45rem 0.875rem; font-weight: 600; color: var(--ci-text); border-radius: var(--ci-radius); transition: background 0.18s; }
.og-nav-fallback a:hover { background: var(--ci-gray-100); color: var(--ci-red); }
