/* =========================================================
   LAYOUT — barre d'infos, header, navigation, footer, toasts, WhatsApp
   ========================================================= */

/* ---------- Barre d'infos ---------- */
.topbar {
  display: none;
  background: var(--c-primary-deep);
  color: var(--c-on-dark-muted);
  font-size: var(--fs-xs);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.topbar__info, .topbar__social { display: flex; align-items: center; gap: var(--space-3); }
.topbar__info li, .topbar__info a { display: inline-flex; align-items: center; gap: .45rem; }
.topbar a { text-decoration: none; transition: color var(--dur) var(--ease); }
.topbar a:hover { color: #fff; }
.topbar .icon { width: 14px; height: 14px; color: var(--c-accent); }
.topbar__social { gap: var(--space-2); }
.topbar__social .icon { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), top var(--dur) var(--ease);
}
/* Fond flouté porté par un pseudo-élément : un backdrop-filter sur le header
   piégerait le menu mobile (position: fixed) à l'intérieur du header */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--c-bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  transition: opacity var(--dur) var(--ease);
}
.site-header.is-scrolled { border-color: var(--c-line); box-shadow: var(--shadow-1); }
.site-header__inner { display: flex; align-items: center; gap: var(--space-3); min-height: var(--header-h); }

/* Header transparent superposé au hero (page d'accueil) */
.has-hero .site-header { position: fixed; inset: 0 0 auto; color: #fff; }
.has-hero .site-header::before { opacity: 0; }
.has-hero .site-header.is-scrolled { color: var(--c-text); }
.has-hero .site-header.is-scrolled::before { opacity: 1; }

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; gap: .8rem; min-width: 0; text-decoration: none; color: inherit; margin-right: auto; }
.brand__mark { flex: none; width: 52px; height: 52px; color: currentColor; transition: transform var(--dur) var(--ease), width var(--dur) var(--ease), height var(--dur) var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg); }
/* Logo envoyé : affiché tel quel (PNG transparent sans fond) ; pastille blanche en option dans les paramètres */
.brand__badge {
  flex: none; display: flex; align-items: center; justify-content: center; height: 56px;
  transition: transform var(--dur) var(--ease), height var(--dur) var(--ease);
}
.brand--plate .brand__badge {
  padding: .3rem .6rem; background: #fff; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(8, 20, 38, .06), 0 10px 24px -12px rgba(8, 20, 38, .55);
}
/* Sans pastille, sur la photo du haut de page : légère ombre portée pour détacher le logo */
.has-hero .site-header:not(.is-scrolled) .brand:not(.brand--plate) .brand__logo { filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35)); }
.brand:hover .brand__badge { transform: translateY(-1px); }
.brand__logo { display: block; height: 100%; max-height: 100%; width: auto; max-width: 150px; object-fit: contain; }
.brand__text { display: grid; gap: .25rem; min-width: 0; line-height: 1; }
.brand__name { font-family: var(--font-title); font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__tag { white-space: nowrap; font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--c-accent); }
.site-header .brand__tag { opacity: .9; }
.site-header__inner { transition: min-height var(--dur) var(--ease); }
/* Petit écran : pastille compacte pour laisser la place au nom */
@media (max-width: 767px) {
  .brand--logo { gap: .6rem; }
  .brand--logo .brand__badge { height: 52px; }
  .brand--plate .brand__badge { padding: .3rem .5rem; border-radius: 13px; }
  .brand--logo .brand__logo { max-width: 120px; }
  .brand--logo .brand__name { font-size: 1.15rem; }
  .brand--logo .brand__tag { font-size: .55rem; letter-spacing: .16em; }
  .site-header__inner { gap: .75rem; }
}
/* Petit téléphone : langue en abrégé (FR / ع) pour laisser la place au logo */
.lang-switch__short { display: none; }
@media (max-width: 479px) {
  .lang-switch__long { display: none; }
  .lang-switch__short { display: inline; }
  .brand--logo .brand__badge { height: 48px; }
  .brand--logo .brand__logo { max-width: 90px; }
  .brand--logo .brand__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: 1.05rem; line-height: 1.05; }
  .brand--logo .brand__tag { display: none; }
}
@media (min-width: 768px) {
  :root { --header-h: 96px; }
  .brand { gap: 1rem; }
  .brand__mark { width: 62px; height: 62px; }
  .brand__badge { height: 74px; }
  .brand--plate .brand__badge { padding: .4rem .8rem; border-radius: 18px; }
  .brand__logo { max-width: 220px; }
  .brand__name { font-size: 1.9rem; }
  .brand__tag { font-size: .7rem; }
  /* Au défilement, l'en-tête s'affine */
  .site-header.is-scrolled .site-header__inner { min-height: 76px; }
  .site-header.is-scrolled .brand__badge { height: 58px; }
  .site-header.is-scrolled .brand__mark { width: 50px; height: 50px; }
}
@media (min-width: 1180px) {
  :root { --header-h: 104px; }
  .brand__mark { width: 66px; height: 66px; }
  .brand__badge { height: 82px; }
  .brand__logo { max-width: 250px; }
  .brand__name { font-size: 2.1rem; }
}

/* ---------- Écran de chargement (page d'accueil, une fois par session) ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 2rem;
  color: #fff; text-align: center;
  background: radial-gradient(ellipse at 50% 38%, var(--c-primary) 0%, var(--c-primary-deep) 72%);
  transition: opacity .6s var(--ease), visibility .6s;
  animation: loader-out .6s var(--ease) 5s forwards; /* sécurité si le script ne répond pas */
}
.js.loader-seen .loader { display: none; }
.loader.is-done { opacity: 0; visibility: hidden; }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
.loader__inner { display: grid; justify-items: center; gap: .85rem; animation: loader-in .9s var(--ease) both; }
@keyframes loader-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.loader__badge { display: flex; align-items: center; justify-content: center; height: clamp(120px, 24vw, 200px); margin-bottom: .4rem; }
.loader__badge--plate {
  padding: clamp(.8rem, 2vw, 1.3rem) clamp(1rem, 3vw, 1.8rem);
  background: #fff; border-radius: 24px; box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .65);
}
.loader__badge img { display: block; height: 100%; max-height: 100%; width: auto; max-width: min(520px, 78vw); object-fit: contain; }
.loader__mark { width: clamp(120px, 24vw, 170px); height: auto; margin-bottom: .4rem; }
.loader__trail { animation: loader-trail 1.1s linear infinite; }
@keyframes loader-trail { to { stroke-dashoffset: -11; } }
.loader__name { margin: 0; font-family: var(--font-title); font-size: clamp(2.3rem, 1.5rem + 4vw, 4.2rem); font-weight: 600; line-height: 1.05; letter-spacing: -.025em; }
.loader__tag { margin: 0; max-width: 40ch; font-size: .78rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--c-accent); }
.loader__bar { position: relative; width: 150px; height: 2px; margin-top: 1rem; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.loader__bar::after { content: ""; position: absolute; inset: 0; background: var(--c-accent); animation: loader-bar 1.3s var(--ease) infinite; }
@keyframes loader-bar { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .loader__inner, .loader__trail, .loader__bar::after { animation: none; }
}

/* ---------- Navigation (mobile d'abord : panneau latéral) ---------- */
.main-nav {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 110;
  width: min(380px, 88vw);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: calc(var(--header-h) + var(--space-2)) var(--space-3) var(--space-4);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow-3);
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .4s var(--ease), visibility .4s;
}
.main-nav.is-open { transform: none; visibility: visible; }
body.nav-open { overflow: hidden; }
body.nav-open::after {
  content: ""; position: fixed; inset: 0; z-index: 99;
  background: rgba(11, 21, 36, .45);
  animation: fade-in .3s var(--ease);
}
@keyframes fade-in { from { opacity: 0; } }

.nav-list { display: grid; gap: .25rem; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: .35rem;
  width: 100%;
  padding: .8rem .25rem;
  font-weight: 500;
  font-size: var(--fs-base);
  text-decoration: none;
  border-bottom: 1px solid var(--c-line);
  transition: color var(--dur) var(--ease);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--c-accent-strong); }
.nav-link--btn .icon { transition: transform var(--dur) var(--ease); }
.has-sub.is-open .nav-link--btn .icon { transform: rotate(180deg); }

.sub-menu { display: none; padding: .5rem 0 .75rem; }
.has-sub.is-open .sub-menu { display: grid; gap: .25rem; }
.sub-menu a {
  display: flex; align-items: center; gap: .85rem;
  padding: .6rem .5rem;
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease);
}
.sub-menu a:hover, .sub-menu a[aria-current="page"] { background: var(--c-sand); }
.sub-menu strong { display: block; font-size: var(--fs-sm); font-weight: 600; }
.sub-menu small { display: block; font-size: var(--fs-xs); color: var(--c-muted); line-height: 1.4; }
.sub-menu__icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--c-accent-soft);
  color: var(--c-accent-strong);
}

.main-nav__mobile { display: grid; gap: .75rem; margin-top: auto; }
.main-nav__hours { display: flex; align-items: center; justify-content: center; gap: .5rem; font-size: var(--fs-sm); color: var(--c-muted); }

/* ---------- Actions du header ---------- */
.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-actions__cta { display: none; }
.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease);
}
.icon-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.icon-btn--user { background: var(--c-primary); color: var(--c-accent); font-family: var(--font-title); font-size: 1.05rem; text-decoration: none; }
.icon-btn--user:hover { background: var(--c-primary-deep); }

.burger { position: relative; z-index: 120; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.burger__bar, .burger__bar::before, .burger__bar::after {
  display: block; width: 22px; height: 1.75px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .35s var(--ease), background-color .2s;
}
.burger__bar { position: relative; }
.burger__bar::before, .burger__bar::after { content: ""; position: absolute; left: 0; }
.burger__bar::before { transform: translateY(-7px); }
.burger__bar::after { transform: translateY(7px); }
.burger[aria-expanded="true"] { color: var(--c-text); }
.burger[aria-expanded="true"] .burger__bar { background: transparent; }
.burger[aria-expanded="true"] .burger__bar::before { transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar::after { transform: rotate(-45deg); }

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  .header-actions__cta { display: inline-flex; }
}

@media (min-width: 1180px) {
  .topbar { display: block; }
  .has-hero .topbar { position: absolute; inset: 0 0 auto; z-index: 101; background: transparent; border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .has-hero .site-header { top: 40px; }
  .has-hero .site-header.is-scrolled { top: 0; }

  .burger, .main-nav__mobile { display: none; }
  .brand { margin-right: 0; }

  .main-nav {
    position: static;
    width: auto;
    padding: 0;
    margin-inline: auto;
    background: none;
    color: inherit;
    box-shadow: none;
    overflow: visible;
    transform: none;
    visibility: visible;
    flex-direction: row;
  }
  .nav-list { display: flex; align-items: center; gap: .15rem; }
  .nav-link {
    position: relative;
    width: auto;
    padding: .6rem .7rem;
    font-size: var(--fs-sm);
    white-space: nowrap;
    border: 0;
  }
  .nav-link::after {
    content: "";
    position: absolute; left: .7rem; right: .7rem; bottom: .25rem;
    border-top: 1.5px dashed var(--c-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease);
  }
  .nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
  .nav-link:hover, .nav-link[aria-current="page"] { color: inherit; }
  .nav-link--btn::after { right: 2rem; }

  .has-sub { position: relative; }
  .sub-menu {
    position: absolute;
    top: calc(100% + .5rem);
    left: 50%;
    display: grid !important;
    gap: .15rem;
    width: 330px;
    padding: .6rem;
    background: var(--c-surface);
    color: var(--c-text);
    border-radius: var(--radius);
    box-shadow: var(--shadow-3);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  }
  .sub-menu::before { content: ""; position: absolute; inset: -.6rem 0 auto; height: .6rem; }
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu, .has-sub.is-open .sub-menu {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-primary);
  color: var(--c-on-dark-muted);
  font-size: var(--fs-sm);
  padding-top: var(--space-5);
}
.site-footer a { text-decoration: none; transition: color var(--dur) var(--ease); }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; margin-bottom: var(--space-2); }
.site-footer .brand__name { white-space: normal; overflow: visible; font-size: 1.8rem; }
.site-footer .brand__badge { height: 88px; }
.site-footer .brand__logo { max-width: 260px; }
.site-footer .brand__mark { width: 64px; height: 64px; }

.footer-newsletter {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  border-radius: var(--radius-l);
  background: color-mix(in srgb, var(--c-primary) 70%, #fff 6%);
  border: 1px solid rgba(255, 255, 255, .08);
}
.footer-newsletter__title { color: #fff; font-size: var(--fs-h3); margin-bottom: .35rem; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: .6rem; align-self: center; }
.newsletter-form input {
  flex: 1 1 220px;
  border-color: rgba(255, 255, 255, .18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  padding-inline: 1.25rem;
}
.newsletter-form input::placeholder { color: var(--c-on-dark-muted); }
.newsletter-form input:focus { border-color: var(--c-accent); box-shadow: none; }
.newsletter-form .btn { flex: 0 0 auto; }

.footer-grid { display: grid; gap: var(--space-4); padding-bottom: var(--space-5); }
.footer-brand p { max-width: 42ch; }
.footer-badge { display: flex; gap: .5rem; align-items: flex-start; margin-top: var(--space-2); font-size: var(--fs-xs); color: var(--c-on-dark-muted); }
.footer-badge .icon { color: var(--c-accent); }
.footer-title {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-2);
}
.footer-links { display: grid; gap: .55rem; }
.footer-contact { display: grid; gap: .7rem; }
.footer-contact li { display: flex; gap: .65rem; align-items: flex-start; }
.footer-contact .icon { color: var(--c-accent); margin-top: .15rem; width: 1.1em; height: 1.1em; }
.footer-social { display: flex; gap: .5rem; margin-top: var(--space-3); }
.footer-social a {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-social a:hover { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-primary-deep); }
.footer-social .icon { width: 1.05em; height: 1.05em; }

.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding-block: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: var(--fs-xs);
}
.footer-pay { display: inline-flex; align-items: center; gap: .5rem; }
.footer-pay .icon { color: var(--c-accent); }
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--space-3); }

@media (min-width: 768px) {
  .footer-newsletter { grid-template-columns: 1fr 1fr; align-items: center; padding: var(--space-4) var(--space-5); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr) 1.4fr; }
}

/* ---------- Toasts ---------- */
/* ---------- Bouton WhatsApp flottant ---------- */
.wa-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  height: 56px;
  padding: 0 1rem;
  border-radius: var(--radius-pill);
  background: #25D366;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
  box-shadow: 0 12px 30px -10px rgba(37, 211, 102, .65);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.wa-float .icon { width: 26px; height: 26px; }
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -10px rgba(37, 211, 102, .8); }
.wa-float__label { display: none; }
@media (min-width: 768px) {
  .wa-float { right: 1.5rem; bottom: 1.5rem; padding: 0 1.25rem 0 1rem; }
  .wa-float__label { display: inline; }
}

/* Desktop : en-tête plus large que le contenu pour loger logo, nom et menu */
@media (min-width: 1180px) {
  .topbar .container, .site-header .container { width: min(1560px, 100% - 3rem); }
  .brand { flex: none; }
}
/* Desktop étroit : on libère de la place pour le logo et le menu */
@media (min-width: 1180px) and (max-width: 1599px) {
  .header-actions__cta { display: none; }
  .brand__logo { max-width: 210px; }
  .brand__name { font-size: 1.85rem; }
}
@media (min-width: 1180px) and (max-width: 1339px) {
  .nav-link { padding-inline: .45rem; font-size: .92rem; }
  .brand { gap: .75rem; }
  .brand__badge { height: 70px; }
  .brand__logo { max-width: 170px; }
  .brand__name { font-size: 1.5rem; }
}

/* ---------- Fil d'Ariane (toutes les pages intérieures) ---------- */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; font-size: var(--fs-xs); color: var(--c-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* =========================================================
   PAGES INTÉRIEURES
   ========================================================= */
/* ---------- En-tête de page ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--space-5) var(--space-4);
  background: var(--c-sand);
}
.page-hero::after {
  content: ""; position: absolute; right: -8%; bottom: -70%; z-index: -1;
  width: 45%; aspect-ratio: 1; border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--c-accent) 70%, transparent);
}
.page-hero__inner { display: grid; gap: var(--space-2); }
.page-hero h1 { font-size: var(--fs-h2); max-width: 22ch; }
.page-hero--image { color: #fff; padding-block: var(--space-6) var(--space-5); background: var(--c-primary-deep); }
.page-hero--image::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 20, 38, .75), rgba(8, 20, 38, .25)); }
.page-hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-hero--image h1 { color: #fff; font-size: var(--fs-h1); }
.page-hero--image .lead { color: rgba(255, 255, 255, .88); }
.page-hero--image .breadcrumbs { color: rgba(255, 255, 255, .8); }

.section--tight { padding-block: var(--space-4) var(--space-6); }

.page-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }

/* ---------- État vide (catalogue, espace client) ---------- */
.empty-state {
  display: grid; justify-items: center; gap: var(--space-2);
  padding: var(--space-5) var(--space-3);
  text-align: center;
  background: var(--c-surface);
  border: 1.5px dashed var(--c-line);
  border-radius: var(--radius-l);
}
.empty-state > .icon { color: var(--c-accent-strong); }
.empty-state p { color: var(--c-muted); max-width: 48ch; }
.empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-1); }

