/* =========================================================
   wassla.ma — mise en page commune
   En-tête, méga-menu, pied de page, références, cookies.
   Le contenu des pages utilise products.css (design validé).
   ========================================================= */

/* ---------- Police Karla (auto-hébergée) ---------- */
@font-face { font-family: "Karla"; src: url("../fonts/Karla-Regular.woff2") format("woff2"), url("../fonts/Karla-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Karla"; src: url("../fonts/Karla-SemiBold.woff2") format("woff2"), url("../fonts/Karla-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Karla"; src: url("../fonts/Karla-Bold.woff2") format("woff2"), url("../fonts/Karla-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Karla"; src: url("../fonts/Karla-ExtraBold.woff2") format("woff2"), url("../fonts/Karla-ExtraBold.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- Jetons de la charte ---------- */
:root {
    --w-blue: #194ba1;          /* bleu WASSLA */
    --w-blue-dark: #123f6b;
    --w-navy: #0b2c4a;
    --w-sky: #08a9e7;
    --w-orange: #ffab00;
    --w-text: #333;
    --w-muted: #62718a;
    --w-border: #dde4ea;
    --w-soft: #eef3f8;
    --w-radius: 14px;
    --w-wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.site {
    margin: 0;
    font-family: "Karla", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--w-text);
    background: #fff;
}
img { max-width: 100%; height: auto; }
a { color: var(--w-blue); }
.wrap { width: min(var(--w-wrap), calc(100% - 30px)); margin: 0 auto; }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 1000;
    padding: 10px 14px; border-radius: 8px; background: #fff; color: var(--w-blue); font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 20px; border: 2px solid transparent; border-radius: 10px;
    font: 700 15px/1.2 "Karla", Arial, sans-serif; text-decoration: none; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--w-blue); color: #fff; }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--w-blue-dark); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { border-color: #fff; }

/* ---------- Avertissements de préproduction ---------- */
.dev-warnings {
    display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 8px 16px;
    background: #fff4d6; color: #6b4a00; font-size: 13px; border-bottom: 1px solid #f0d58a;
}

/* ---------- Bandeau supérieur ---------- */
.topbar { background: var(--w-navy); color: #fff; font-size: 13px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar__contacts { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.topbar a { color: #fff; text-decoration: none; opacity: .92; }
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar__social { display: flex; gap: 8px; }

/* ---------- Icônes sociales ---------- */
.social {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    font: 800 11px/1 "Karla", Arial, sans-serif; color: #fff !important; text-decoration: none !important;
}
.social::before { content: ""; }
.social--facebook  { background: #3b5998; } .social--facebook::before  { content: "f"; font-size: 14px; }
.social--linkedin  { background: #0a66c2; } .social--linkedin::before  { content: "in"; }
.social--instagram { background: #d6249f; } .social--instagram::before { content: "IG"; }
.social--youtube   { background: #e10600; } .social--youtube::before   { content: "▶"; font-size: 10px; }

/* ---------- En-tête ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: #fff; border-bottom: 1px solid var(--w-border);
    box-shadow: 0 6px 18px rgba(18, 63, 107, .06);
}
.site-header__inner { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.site-logo { display: flex; flex-shrink: 0; }
.site-logo img { width: 180px; height: auto; }
.site-nav { flex: 1; }
.nav { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link {
    padding: 26px 12px; color: #2c3e57; font-weight: 700; font-size: 15.5px; text-decoration: none;
}
.nav__item--mega > .nav__link { padding-right: 4px; }
.nav__item.is-active > .nav__link, .nav__link:hover { color: var(--w-blue); }
.nav__toggle {
    width: 22px; height: 22px; margin-right: 6px; padding: 0; border: 0; background: transparent; cursor: pointer;
    position: relative;
}
.nav__toggle::after {
    content: ""; position: absolute; left: 6px; top: 5px; width: 7px; height: 7px;
    border-right: 2px solid #6b7a90; border-bottom: 2px solid #6b7a90; transform: rotate(45deg);
}
.site-header__cta { flex-shrink: 0; }
.site-header__cta--mobile { display: none; }

/* Méga-menu */
.mega {
    position: absolute; top: 100%; left: -16px; z-index: 60;
    min-width: 520px; padding: 22px 26px; border: 1px solid var(--w-border); border-radius: 0 0 var(--w-radius) var(--w-radius);
    background: #fff; box-shadow: 0 18px 40px rgba(18, 63, 107, .14);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.nav__item--mega:hover > .mega,
.nav__item--mega:focus-within > .mega,
.nav__item.is-open > .mega { opacity: 1; visibility: visible; transform: none; }
.mega__inner { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 28px; }
.mega__title { margin: 0 0 10px; color: var(--w-blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.mega ul { margin: 0; padding: 0; list-style: none; }
.mega li a { display: block; padding: 6px 0; color: #2c3e57; font-size: 15px; text-decoration: none; }
.mega li a:hover { color: var(--w-blue); }

.nav-burger { display: none; }

/* ---------- Références clients ---------- */
.refs { padding: 34px 0 60px; }
.refs__card { padding: 44px 40px; border-radius: 22px; background: var(--w-soft); text-align: center; }
.refs__title { margin: 0 0 10px; color: #333; font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.02em; }
.refs__intro { max-width: 680px; margin: 0 auto 30px; color: #555; font-size: 17px; }
.refs__grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
    margin: 0 0 30px; padding: 0; list-style: none;
}
.refs__item {
    display: flex; align-items: center; justify-content: center; min-height: 92px; padding: 12px;
    border-radius: 12px; background: #fff; box-shadow: 0 8px 22px rgba(18, 63, 107, .07);
    font-size: 13px; font-weight: 700; color: var(--w-muted);
}
.refs__item img { max-height: 64px; width: auto; object-fit: contain; }

/* ---------- Pied de page ---------- */
.site-footer { background: #eef2f8; color: #3c4a5c; font-size: 15px; }
.site-footer__grid {
    display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr; gap: 32px; padding: 54px 0 40px;
}
.site-footer__brand img { width: 160px; border-radius: 12px; }
.site-footer__brand p { margin: 12px 0 0; color: var(--w-muted); }
.site-footer__title { margin: 0 0 14px; color: #1f2d3d; font-size: 17px; font-weight: 800; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 0 0 9px; }
.site-footer a { color: #3c4a5c; text-decoration: none; }
.site-footer a:hover { color: var(--w-blue); text-decoration: underline; }
.site-footer address { font-style: normal; margin-bottom: 10px; }
.site-footer__map { display: inline-block; margin-bottom: 16px; font-weight: 700; color: var(--w-blue) !important; }
.site-footer__social { display: flex; gap: 8px; }
.site-footer__bottom { border-top: 1px solid #d6dee9; font-size: 13px; color: var(--w-muted); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 16px 0; }

/* ---------- Bandeau cookies ---------- */
.cookie {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
    max-width: 980px; margin: 0 auto; padding: 18px 22px; border-radius: var(--w-radius);
    background: var(--w-navy); color: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.25);
}
.cookie[hidden] { display: none; }
.cookie__inner { display: flex; align-items: center; gap: 20px; }
.cookie p { margin: 0; font-size: 14px; }
.cookie a { color: #9fd8ff; }
.cookie__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- Tablette ---------- */
@media (max-width: 1100px) {
    .site-header__inner { gap: 16px; }
    .nav__link { padding-left: 8px; padding-right: 8px; font-size: 15px; }
    .site-footer__grid { grid-template-columns: repeat(3, 1fr); }
    .refs__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Mobile ---------- */
@media (max-width: 920px) {
    .topbar__social { display: none; }
    .topbar__contacts a:last-child { display: none; }
    .site-header__inner { min-height: 64px; justify-content: space-between; }
    .site-logo img { width: 150px; }
    .site-header__cta { display: none; }
    .site-header__cta--mobile { display: flex; margin: 18px 0 8px; }

    .nav-burger {
        display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
        width: 44px; height: 44px; padding: 10px; border: 1px solid var(--w-border); border-radius: 10px;
        background: #fff; cursor: pointer; order: 2;
    }
    .nav-burger span:not(.visually-hidden) { display: block; height: 2px; background: #2c3e57; border-radius: 2px; }

    .site-header__inner { position: relative; }
    .site-nav {
        position: absolute; top: 100%; left: -15px; right: -15px; z-index: 70;
        max-height: calc(100vh - 64px); overflow-y: auto;
        padding: 10px 18px 30px; background: #fff; border-top: 1px solid var(--w-border);
        box-shadow: 0 18px 30px rgba(18, 63, 107, .12);
        display: none;
    }
    body.nav-open { overflow: hidden; }
    body.nav-open .site-nav { display: block; }
    .nav { flex-direction: column; align-items: stretch; gap: 0; }
    .nav__item { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid var(--w-border); }
    .nav__link { flex: 1; padding: 16px 4px; font-size: 17px; }
    .nav__toggle { width: 44px; height: 44px; margin: 0; }
    .nav__toggle::after { left: 17px; top: 15px; }
    .nav__item.is-open .nav__toggle::after { transform: rotate(-135deg); top: 20px; }
    .mega {
        position: static; flex-basis: 100%; min-width: 0; padding: 0 4px 14px; border: 0; box-shadow: none;
        display: none; opacity: 1; visibility: visible; transform: none;
    }
    .nav__item--mega:hover > .mega, .nav__item--mega:focus-within > .mega { display: none; }
    .nav__item.is-open > .mega { display: block; }
    .mega__inner { grid-auto-flow: row; gap: 14px; }

    .refs__card { padding: 30px 18px; }
    .refs__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 26px; padding-top: 40px; }
    .site-footer__brand { grid-column: 1 / -1; }
    .cookie__inner { flex-direction: column; align-items: stretch; }
    .cookie__actions { justify-content: flex-end; }
}
@media (max-width: 520px) {
    .site-footer__grid { grid-template-columns: 1fr; }
}
