/* ==========================================================================
   Dynas Accessoires — feuille de styles (mobile d'abord, compatible RTL)
   ========================================================================== */

:root {
  --red: #D32027;
  --red-d: #B3191F;
  --navy: #1F2A6B;
  --navy-d: #161E52;
  --ink: #181B2C;
  --muted: #5A5F73;
  --line: #E4E5EB;
  --soft: #F5F5F5;
  --white: #FFFFFF;
  --wa: #25D366;
  --wa-d: #128C4B;
  --ok: #1E8C4E;

  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --r-sm: 6px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(24, 27, 44, .06), 0 4px 14px rgba(24, 27, 44, .06);
  --shadow-lg: 0 10px 30px rgba(31, 42, 107, .14);
  --wrap: 1200px;
  --gutter: 16px;
  --header-h: 64px;

  --stripe: linear-gradient(90deg,
    #D32027 0 10%, #F26B1D 10% 20%, #F7C500 20% 30%, #9BD23C 30% 40%, #1E8C4E 40% 50%,
    #3CC8C0 50% 60%, #2451C9 60% 70%, #1F2A6B 70% 80%, #5B3A9E 80% 90%, #D6246E 90% 100%);
}

html[lang="ar"] {
  --font-head: "Amiri", "Noto Naskh Arabic", "Times New Roman", serif;
  --font-body: "Tajawal", system-ui, "Segoe UI", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ar"] body { font-size: 17px; line-height: 1.75; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; color: var(--navy); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 6.5vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
h3 { font-size: 1.15rem; }
html[lang="ar"] h1, html[lang="ar"] h2 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 8px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 20px; height: 20px; flex: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.hide-sm { display: none !important; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-d); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-d); color: #fff; }
.btn--ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--wa { background: var(--wa); color: #06361B; }
.btn--wa:hover { background: #1FBF5B; color: #06361B; }
.btn--white { background: #fff; color: var(--navy); }
.btn--block { width: 100%; }
.btn .icon { width: 22px; height: 22px; }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #DDE1F5; font-size: .82rem; }
.topbar__in { display: flex; align-items: center; gap: 18px; min-height: 36px; }
.topbar__item { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.topbar__item .icon { width: 15px; height: 15px; color: #fff; opacity: .8; }
a.topbar__item:hover { color: #fff; }
.langs { margin-inline-start: auto; display: flex; gap: 2px; }
.langs a { color: #DDE1F5; text-decoration: none; padding: 4px 9px; border-radius: 4px; font-weight: 600; min-width: 34px; text-align: center; }
.langs a[aria-current] { background: #fff; color: var(--navy); }
.langs a:hover:not([aria-current]) { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.header__in { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { flex: none; display: block; }
.logo { width: 150px; height: auto; direction: ltr; }
.logo--light text tspan[fill="#1F2A6B"] { fill: #fff; }
.logo--light path[stroke="#1F2A6B"] { stroke: #fff; }
.logo--light text[fill="#2451C9"] { fill: #AFC2FF; }

.header__tools { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.tool {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0 10px; border: 0; background: none; border-radius: 10px;
  color: var(--navy); cursor: pointer; text-decoration: none;
}
.tool:hover { background: var(--soft); color: var(--navy); }
.tool .icon { width: 24px; height: 24px; }
.badge {
  position: absolute; top: 3px; inset-inline-end: 2px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--red); color: #fff; border-radius: 99px; font-size: .72rem; font-weight: 700; line-height: 19px; text-align: center;
}
.quote-link__txt { display: none; font-weight: 600; font-size: .92rem; }

.search { display: none; position: relative; }
.search.is-open {
  display: block; position: absolute; top: 100%; inset-inline: 0; padding: 10px var(--gutter);
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.search input {
  width: 100%; height: 44px; padding-inline: 16px 48px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--soft);
}
.search input:focus { outline: none; border-color: var(--navy); background: #fff; }
.search button { position: absolute; inset-inline-end: calc(var(--gutter) + 4px); top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--navy); width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; }

/* Navigation mobile : panneau latéral */
.nav {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 60;
  width: min(86vw, 360px); padding: 76px 22px 24px; overflow-y: auto;
  background: #fff; box-shadow: -10px 0 40px rgba(0,0,0,.18);
  transform: translateX(105%); transition: transform .25s ease; visibility: hidden;
}
[dir="rtl"] .nav { transform: translateX(-105%); }
.nav.is-open { transform: none; visibility: visible; }
.nav ul a { display: block; padding: 12px 4px; font-size: 1.15rem; font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.nav ul a[aria-current] { color: var(--red); }
.nav__cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.nav__cats a { padding: 7px 12px; background: var(--soft); border-radius: 99px; font-size: .88rem; text-decoration: none; color: var(--navy); }
.nav__cta { width: 100%; }
.nav-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(15, 20, 50, .45); }
.menu-close { position: absolute; top: 14px; inset-inline-end: 14px; }
body.nav-lock { overflow: hidden; }

/* ---------- Sections ---------- */
.section { padding-block: 56px; }
.section--soft { background: var(--soft); }
.section--tight { padding-block: 36px; }
.section__head { max-width: 720px; margin-bottom: 28px; }
.section__head p { color: var(--muted); margin: 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
html[lang="ar"] .kicker { letter-spacing: 0; font-size: .95rem; }
.kicker::before { content: ""; width: 22px; height: 3px; background: var(--red); border-radius: 2px; }
.stripe { height: 6px; background: var(--stripe); }
.lead { font-size: 1.12rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(rgba(31,42,107,.045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(31,42,107,.045) 1px, transparent 1px) 0 0 / 32px 32px,
    #fff;
}
.hero__in { display: grid; gap: 32px; padding-block: 40px 48px; }
.hero h1 { margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero__text { font-size: 1.1rem; color: var(--muted); max-width: 560px; margin-bottom: 24px; }
.hero__ctas { display: flex; flex-direction: column; gap: 12px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: .92rem; font-weight: 600; color: var(--navy); }
.hero__badges li { display: inline-flex; align-items: center; gap: 6px; }
.hero__badges .icon { width: 18px; height: 18px; color: var(--ok); }
.hero__media { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; aspect-ratio: 1.15; }
.hero__media figure { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--soft); box-shadow: var(--shadow); }
.hero__media figure:first-child { grid-row: span 2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__swatches { display: flex; gap: 6px; margin-top: 26px; }
.hero__swatches span { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }

/* ---------- Catégories ---------- */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r); background: #fff; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: box-shadow .2s, transform .2s;
}
.cat:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--ink); }
.cat__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cat:hover .cat__img img { transform: scale(1.04); }
.cat__body { padding: 12px 14px 14px; }
.cat__body h3 { font-size: 1.02rem; margin-bottom: 2px; }
.cat__body p { font-size: .84rem; color: var(--muted); margin: 0; }

/* ---------- Atouts ---------- */
.advs { display: grid; gap: 12px; }
.adv { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: #fff; border-radius: var(--r); border: 1px solid var(--line); }
.adv__ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #FDECEC; color: var(--red); }
.adv:nth-child(even) .adv__ico { background: #E9ECF8; color: var(--navy); }
.adv__ico .icon { width: 24px; height: 24px; }
.adv h3 { font-family: var(--font-body); font-size: 1rem; margin-bottom: 2px; color: var(--ink); }
.adv p { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- Cartes produit ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow-lg); border-color: transparent; }
.card__media { display: block; aspect-ratio: 5 / 4; background: var(--soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 12px; }
.card__cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red); margin: 0 0 4px; }
html[lang="ar"] .card__cat { letter-spacing: 0; font-size: .8rem; }
.card__title { font-family: var(--font-body); font-size: .95rem; font-weight: 700; line-height: 1.3; margin: 0 0 4px; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card__title a:hover { color: var(--red); }
.card__short { display: none; font-size: .86rem; color: var(--muted); margin: 0 0 8px; }
.card__dots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0 10px; }
.card__dots span { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.card__dots em { font-style: normal; font-size: .75rem; color: var(--muted); margin-inline-start: 2px; }
.card__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.price { font-weight: 700; color: var(--navy); font-size: .95rem; }
.price small { font-weight: 500; color: var(--muted); }
.price--ask { color: var(--muted); font-weight: 600; font-size: .85rem; }
.stock { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; color: var(--ok); }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ---------- Secteurs ---------- */
.sectors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sector { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .92rem; color: var(--navy); }
.sector .icon { width: 26px; height: 26px; color: var(--red); }

/* ---------- Bandeau WhatsApp ---------- */
.wa-band { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 28px 22px; display: grid; gap: 18px; position: relative; overflow: hidden; }
.wa-band::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 6px; background: var(--stripe); }
.wa-band h2 { color: #fff; margin-bottom: 6px; }
.wa-band p { margin: 0; color: #CDD3F0; }

/* ---------- Fil d'Ariane ---------- */
.crumbs { font-size: .85rem; color: var(--muted); padding-block: 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.crumbs li:not(:last-child)::after { content: "/"; margin-inline-start: 6px; color: #B5B8C6; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }

.page-head { padding-block: 8px 24px; }
.page-head p { color: var(--muted); max-width: 720px; }

/* ---------- Catalogue ---------- */
.catalog { display: grid; gap: 20px; padding-bottom: 64px; }
.filters { background: var(--soft); border-radius: var(--r); }
.filters > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-weight: 700; color: var(--navy); cursor: pointer; }
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::after { content: "+"; font-size: 1.4rem; line-height: 1; }
.filters[open] > summary::after { content: "–"; }
.filters__body { padding: 0 16px 16px; display: grid; gap: 18px; }
.fgroup legend, .fgroup > label { display: block; font-weight: 700; font-size: .85rem; color: var(--ink); margin-bottom: 8px; padding: 0; }
.fgroup { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 7px 12px; border-radius: 99px; background: #fff; border: 1.5px solid var(--line); font-size: .86rem; cursor: pointer; }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.swatch-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-filter label { position: relative; }
.swatch-filter input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch-filter span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); cursor: pointer; }
.swatch-filter input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); }
.swatch-filter input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 4px; }
.swatch-filter .any span { background: conic-gradient(#D32027, #F7C500, #1E8C4E, #2451C9, #5B3A9E, #D32027); }
select.input, .input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31,42,107,.12); }
.filters__actions { display: flex; gap: 10px; }
.filters__actions .btn { flex: 1; min-height: 42px; padding: 8px 14px; }
.results-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: .92rem; }
.empty { padding: 36px 20px; text-align: center; background: var(--soft); border-radius: var(--r); color: var(--muted); }
.cat-intro { background: #fff; border-inline-start: 4px solid var(--red); padding: 4px 16px; margin-bottom: 18px; color: var(--muted); }

/* ---------- Fiche produit ---------- */
.product { display: grid; gap: 28px; padding-bottom: 56px; }
.gallery__main { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--soft); aspect-ratio: 5 / 4; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.gallery__main img.is-loading { opacity: .35; }
.gallery__tag { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(255,255,255,.92); color: var(--navy); font-weight: 700; font-size: .8rem; padding: 5px 10px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; }
.gallery__tag i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery__thumbs button { flex: none; width: 72px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--soft); cursor: pointer; }
.gallery__thumbs button[aria-pressed="true"] { border-color: var(--navy); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery__note { font-size: .8rem; color: var(--muted); margin-top: 8px; }

.pinfo h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin-bottom: 8px; }
.pinfo__short { font-size: 1.08rem; color: var(--muted); }
.pinfo__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .88rem; margin-bottom: 18px; }
.pinfo__meta span { display: inline-flex; align-items: center; gap: 6px; }
.block-label { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: .92rem; margin-bottom: 10px; }
.block-label output, .block-label span { font-weight: 500; color: var(--muted); }
.opt { margin-bottom: 20px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); transition: transform .12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--navy); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: flex; flex-direction: column; min-width: 92px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; font-size: .92rem; line-height: 1.3; }
.pill small { font-weight: 500; color: var(--muted); }
.pill input:checked + span { border-color: var(--navy); background: #EEF0FA; box-shadow: inset 0 0 0 1px var(--navy); }
.pill input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.qty { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.qty button { width: 46px; border: 0; background: var(--soft); color: var(--navy); cursor: pointer; display: grid; place-items: center; }
.qty button:hover { background: #E8E9EF; }
.qty input { width: 110px; border: 0; text-align: center; font-weight: 700; font-size: 1.05rem; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 6px; }

.pricebox { background: var(--soft); border-radius: var(--r); padding: 16px; margin-bottom: 18px; }
.pricebox__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pricebox__unit { font-size: 1.7rem; font-weight: 800; color: var(--navy); font-family: var(--font-body); }
.pricebox__total { font-weight: 700; }
.tiers { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .88rem; background: #fff; border-radius: 8px; overflow: hidden; }
.tiers caption { text-align: start; font-weight: 700; font-size: .85rem; padding-bottom: 6px; color: var(--ink); }
.tiers th, .tiers td { padding: 8px 12px; text-align: start; border-bottom: 1px solid var(--line); }
.tiers th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #FAFAFC; }
html[lang="ar"] .tiers th { letter-spacing: 0; font-size: .85rem; }
.tiers tr.is-active td { background: #EEF0FA; font-weight: 700; color: var(--navy); }
.tiers td .off { color: var(--ok); font-weight: 700; font-size: .78rem; margin-inline-start: 6px; }
.actions { display: grid; gap: 10px; }

.pdetails { display: grid; gap: 20px; margin-top: 28px; }
.pdetails h2 { font-size: 1.25rem; }
.checklist li { display: flex; gap: 10px; padding: 6px 0; }
.checklist .icon { color: var(--ok); margin-top: 3px; }
.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.specs th { color: var(--muted); font-weight: 500; width: 45%; }
.specs td { font-weight: 600; }
.uses { display: flex; flex-wrap: wrap; gap: 8px; }
.uses li { padding: 8px 14px; border-radius: 99px; background: #FDECEC; color: var(--red-d); font-weight: 600; font-size: .9rem; }

/* ---------- Formulaires / devis ---------- */
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field label .req { color: var(--red); }
.field label small { color: var(--muted); font-weight: 400; }
textarea.input { min-height: 120px; resize: vertical; }
.file-drop { display: flex; align-items: center; gap: 12px; padding: 16px; border: 2px dashed #C8CBD8; border-radius: var(--r); background: var(--soft); cursor: pointer; }
.file-drop:hover { border-color: var(--navy); }
.file-drop .icon { width: 28px; height: 28px; color: var(--navy); }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop:focus-within { outline: 3px solid var(--red); outline-offset: 2px; }
.hp { position: absolute !important; inset-inline-start: -9999px; }
.alert { padding: 14px 16px; border-radius: var(--r); margin-bottom: 18px; font-weight: 600; }
.alert--err { background: #FDECEC; color: var(--red-d); }
.qcart { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 24px; background: #fff; }
.qcart h2 { font-size: 1.2rem; }
.qcart__empty { color: var(--muted); margin: 0; font-size: .95rem; }
.qitem { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.qitem img { width: 56px; height: 46px; object-fit: cover; border-radius: 6px; background: var(--soft); }
.qitem__name { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.qitem__meta { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.qitem__meta i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); vertical-align: -1px; }
.qitem__qty { width: 90px; min-height: 36px; padding: 4px 8px; font-size: .9rem; }
.qitem__rm { border: 0; background: none; color: var(--muted); cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; }
.qitem__rm:hover { background: #FDECEC; color: var(--red); }
.success { text-align: center; max-width: 620px; margin: 0 auto; padding: 40px 0 72px; }
.success__ico { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: #E4F4EA; color: var(--ok); }
.success__ico .icon { width: 38px; height: 38px; }
.success__ref { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 1.3rem; font-weight: 700; background: var(--soft); padding: 8px 16px; border-radius: 8px; color: var(--navy); margin-bottom: 22px; }
.quote-layout { display: grid; gap: 28px; padding-bottom: 64px; }
.aside-card { background: var(--soft); border-radius: var(--r); padding: 20px; }
.aside-card h2 { font-size: 1.2rem; }
.aside-card ul li { display: flex; gap: 10px; padding: 6px 0; font-size: .95rem; }
.aside-card .icon { color: var(--ok); margin-top: 3px; }

/* ---------- À propos ---------- */
.about-hero { display: grid; gap: 24px; align-items: center; }
.about-hero img { border-radius: var(--r-lg); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--red); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }
.two-col { display: grid; gap: 28px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 14px; }
.ccard { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.ccard__ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #E9ECF8; color: var(--navy); }
.ccard__ico--wa { background: #DDF7E7; color: var(--wa-d); }
.ccard h2 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
html[lang="ar"] .ccard h2 { letter-spacing: 0; font-size: .95rem; }
.ccard p { margin: 0; font-weight: 600; }
.ccard a { text-decoration: none; }
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours td { padding: 3px 0; }
.hours td:last-child { text-align: end; font-weight: 600; }
.map { border-radius: var(--r-lg); overflow: hidden; background: var(--soft); aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.legal-ids { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; font-size: .88rem; color: var(--muted); }
.legal-ids b { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-d); color: #C5CBEA; font-size: .93rem; margin-top: 0; }
.footer__grid { display: grid; gap: 28px; padding-block: 44px 28px; }
.footer__logo .logo { width: 190px; margin-bottom: 12px; }
.footer h2 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 12px; }
html[lang="ar"] .footer h2 { letter-spacing: 0; font-size: .95rem; }
.footer a { color: #C5CBEA; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer ul li { padding: 3px 0; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact .icon { width: 18px; height: 18px; margin-top: 3px; color: #fff; opacity: .7; }
.social { display: flex; gap: 8px; margin-top: 14px; }
.social a { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.social a:hover { background: var(--red); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 18px 90px; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: #9097BF; }

/* ---------- WhatsApp flottant / toast ---------- */
.wa-float {
  position: fixed; z-index: 70; bottom: 18px; inset-inline-end: 18px;
  display: inline-flex; align-items: center; gap: 10px; height: 58px; min-width: 58px; padding: 0 16px;
  border-radius: 999px; background: var(--wa); color: #fff; text-decoration: none; font-weight: 700;
  box-shadow: 0 8px 24px rgba(18, 140, 75, .4);
}
.wa-float:hover { background: #1FBF5B; color: #fff; }
.wa-float .icon { width: 28px; height: 28px; }
.wa-float__label { display: none; }
.toast {
  position: fixed; z-index: 80; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: .92rem; display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px);
}
.toast a { color: #9FD9B4; }

/* ==========================================================================
   Tablette ≥ 640px
   ========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .hide-sm { display: inline-flex !important; }
  .hero__ctas { flex-direction: row; flex-wrap: wrap; }
  .cats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .advs { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .card__body { padding: 16px; }
  .card__short { display: block; }
  .card__title { font-size: 1.02rem; }
  .sectors { grid-template-columns: repeat(3, 1fr); }
  .wa-band { grid-template-columns: 1fr auto; align-items: center; padding: 36px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .actions { grid-template-columns: 1fr 1fr; }
  .wa-float__label { display: inline; }
  .wa-float { padding: 0 22px 0 18px; }
  [dir="rtl"] .wa-float { padding: 0 18px 0 22px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Desktop ≥ 1024px
   ========================================================================== */
@media (min-width: 1024px) {
  :root { --header-h: 78px; }
  .section { padding-block: 88px; }
  .logo { width: 190px; }

  .nav {
    position: static; transform: none; visibility: visible; width: auto; padding: 0; overflow: visible;
    background: none; box-shadow: none; display: flex; align-items: center; margin-inline-start: 28px;
  }
  [dir="rtl"] .nav { transform: none; }
  .nav ul { display: flex; gap: 4px; }
  .nav ul a { border: 0; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
  .nav ul a:hover { background: var(--soft); color: var(--navy); }
  .nav ul a[aria-current] { color: var(--red); }
  .nav__cats, .nav__cta, .menu-toggle, .menu-close, .search-toggle { display: none !important; }

  .search { display: block; width: 260px; }
  .search input { height: 42px; }
  .search button { inset-inline-end: 4px; }
  .quote-link { background: var(--red); color: #fff; padding: 0 18px; border-radius: 999px; margin-inline-start: 8px; }
  .quote-link:hover { background: var(--red-d); color: #fff; }
  .quote-link__txt { display: inline; }
  .quote-link .badge { position: static; background: #fff; color: var(--red); }

  .hero__in { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; padding-block: 72px 88px; }
  .cats { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .cat__body { padding: 16px 18px 18px; }
  .cat__body h3 { font-size: 1.2rem; }
  .advs { grid-template-columns: repeat(5, 1fr); }
  .adv { flex-direction: column; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .sectors { grid-template-columns: repeat(6, 1fr); }
  .sector { flex-direction: column; text-align: center; padding: 22px 12px; }
  .sector .icon { width: 32px; height: 32px; }

  .catalog { grid-template-columns: 270px 1fr; align-items: start; gap: 32px; }
  .filters { position: sticky; top: calc(var(--header-h) + 16px); }
  .filters > summary { pointer-events: none; }
  .filters > summary::after { content: none; }

  .product { grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
  .gallery { position: sticky; top: calc(var(--header-h) + 16px); }
  .pdetails { grid-template-columns: repeat(3, 1fr); gap: 32px; }

  .quote-layout { grid-template-columns: 1fr 340px; align-items: start; gap: 40px; }
  .aside-card { position: sticky; top: calc(var(--header-h) + 16px); }
  .about-hero, .two-col { grid-template-columns: 1fr 1fr; gap: 56px; }
  .contact-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
  .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; }
  .footer__bottom { padding-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .header, .footer, .wa-float, .actions { display: none !important; }
}
