/* ==========================================================
   Moussa Marbre — Design System
   Palette: Vert sauge profond · Pierre · Ivoire
   Type: Fraunces (display) + Inter (body)
   ========================================================== */

:root {
  /* Couleurs — defaults: Bleu nuit profond */
  --ivoire: #F4F1EA;
  --ivoire-2: #FAF8F2;
  --pierre: #ECE7DC;
  --pierre-2: #C9CDC4;
  --sauge: #1F3B4D;       /* nom historique conservé pour compat — couleur d'accent principale */
  --sauge-dark: #142935;
  --encre: #14181C;
  --encre-soft: #2A2D2A;
  --texte: #2A2D2A;
  --texte-mute: #6B6F72;
  --texte-light: #9A9D9F;
  --bronze: #A89968; /* accent très subtil */
  --line: rgba(20, 24, 28, 0.08);
  --line-strong: rgba(20, 24, 28, 0.16);

  /* Type */
  --ff-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --ff-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Container */
  --maxw: 1320px;
  --maxw-narrow: 980px;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivoire);
  color: var(--texte);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--encre);
  font-variation-settings: 'SOFT' 50, 'WONK' 0;
}

h1 { font-size: clamp(48px, 7vw, 96px); }
h2 { font-size: clamp(36px, 4.5vw, 64px); letter-spacing: -0.025em; }
h3 { font-size: clamp(22px, 2vw, 32px); letter-spacing: -0.015em; }

p { margin: 0; }

.eyebrow {
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sauge);
}

.eyebrow-mute {
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--texte-mute);
}

.lede {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--texte-mute);
  max-width: 64ch;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 32px; }

@media (max-width: 700px) {
  .container, .container-narrow { padding: 0 20px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .35s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn .arrow {
  display: inline-block;
  transition: transform .4s var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--sauge);
  color: var(--ivoire-2);
  border-color: var(--sauge);
}
.btn-primary:hover { background: var(--sauge-dark); border-color: var(--sauge-dark); }

.btn-ghost {
  background: transparent;
  color: var(--encre);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--encre); color: var(--ivoire-2); border-color: var(--encre); }

.btn-light {
  background: rgba(255,255,255,0.85);
  color: var(--encre);
  border-color: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
}
.btn-light:hover { background: var(--ivoire-2); }

.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-lg { padding: 18px 30px; font-size: 15px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #FBFAF6;
  background: var(--ivoire-2);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  height: 48px;
  width: auto;
  display: block;
  background: transparent;
  box-shadow: none;
  border: none;
  filter: none;
  mix-blend-mode: normal;
  opacity: 1;
  object-fit: contain;
}
.brand-logo-footer {
  height: 56px;
  margin-bottom: 20px;
  filter: none;
  mix-blend-mode: normal;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--sauge);
  color: var(--ivoire-2);
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 500;
  border-radius: 6px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}
.brand-word-1 {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--encre);
}
.brand-word-2 {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: var(--sauge);
  letter-spacing: 0.01em;
}
.brand-footer .brand-word-1 { color: var(--ivoire-2); }
.brand-footer .brand-word-2 { color: var(--ivoire-2); opacity: 0.75; }
.brand-footer .brand-mark { background: var(--ivoire-2); color: var(--encre); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--encre);
  position: relative;
  padding: 6px 0;
  text-decoration: none;
  transition: color .25s var(--ease);
}
.nav-links a:hover { color: var(--sauge); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--sauge);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lang-switcher {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--texte-mute);
  letter-spacing: 0.05em;
  gap: 8px;
}
.lang-switcher button {
  background: none;
  border: none;
  color: var(--texte-mute);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  font-family: inherit;
  letter-spacing: 0.05em;
}
.lang-switcher button.active { color: var(--encre); }
.lang-switcher .sep { color: var(--texte-light); }

.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px;
  width: 40px; height: 40px;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--encre);
  transition: transform .3s var(--ease);
}

/* Breakpoint raised from 860 → 1000 because the FR/AR toggle pushed the
   desktop nav over the available width on tablets. Below 1000 the drawer
   takes over and primary CTAs / lang toggle live inside it. */
@media (max-width: 1000px) {
  .nav-links, .lang-switcher { display: none; }
  .menu-toggle { display: flex; }
  .nav-actions .btn-primary,
  .nav-actions .btn-ghost { display: none; }
  .nav-actions .btn-mobile { display: inline-flex; }
  /* The lang toggle is rendered twice — once in the desktop bar, once in
     the drawer. Hide the desktop instance on mobile/tablet. */
  .nav-actions .lang-toggle { display: none; }
}

/* Mobile menu drawer */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ivoire);
  z-index: 99;
  padding: 32px 24px;
  transform: translateY(-110%);
  transition: transform .4s var(--ease);
  overflow-y: auto;
}
@media (max-width: 860px) {
  .mobile-menu { display: block; }
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu a {
  display: block;
  padding: 18px 0;
  font-family: var(--ff-display);
  font-size: 28px;
  color: var(--encre);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--encre);
  color: rgba(246,244,239,0.7);
  padding: 96px 0 32px;
  margin-top: 0;
}
.site-footer h4 {
  font-family: var(--ff-body);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ivoire-2);
  margin: 0 0 20px;
}
.site-footer a { color: rgba(246,244,239,0.7); transition: color .2s ease; }
.site-footer a:hover { color: var(--ivoire-2); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(246,244,239,0.12);
}
.footer-grid p { line-height: 1.7; font-size: 14px; max-width: 36ch; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: 6px 0; font-size: 14px; }
.footer-brand .brand { margin-bottom: 20px; }
.footer-bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(246,244,239,0.5);
  flex-wrap: wrap;
  gap: 16px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Floating actions ---------- */
.float-actions {
  position: fixed;
  right: 24px; bottom: 24px;
  display: flex; flex-direction: column; gap: 12px;
  z-index: 90;
}
.float-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--sauge);
  color: var(--ivoire-2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 40px rgba(26,29,26,0.18), 0 4px 12px rgba(26,29,26,0.08);
  transition: transform .3s var(--ease), background .3s var(--ease);
  border: none; cursor: pointer;
}
.float-btn:hover { transform: translateY(-3px); background: var(--sauge-dark); }
.float-btn.whatsapp { background: #1FAB59; }
.float-btn.whatsapp:hover { background: #178d49; }
.float-btn.top { background: var(--encre); width: 44px; height: 44px; }
.float-btn svg { width: 22px; height: 22px; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .4s; }

/* ---------- Generic page hero ---------- */
.page-hero {
  padding: 160px 0 100px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: var(--ivoire);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('hero-produits.png?v=6');
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  z-index: 0;
}
.page-hero.hero-realisations::before { background-image: url('hero-realisations.png?v=6'); }
.page-hero.hero-about::before {
  background-image: url('hero-marble.png?v=6');
  background-position: right center;
}
.page-hero.hero-contact::before { display: none; }
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--ivoire) 0%, rgba(246,244,239,0.92) 30%, rgba(246,244,239,0.55) 55%, rgba(246,244,239,0.15) 80%, transparent 100%),
    linear-gradient(180deg, transparent 60%, rgba(246,244,239,0.6) 100%);
  z-index: 1;
}
.page-hero > .container,
.page-hero > .veining { position: relative; z-index: 2; }
.page-hero > .container { max-width: 1280px; }
.page-hero .eyebrow { margin-bottom: 24px; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lede { margin-top: 28px; max-width: 52ch; }
.page-hero .veining {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background:
    radial-gradient(60% 40% at 80% 20%, rgba(62,92,74,0.10), transparent 60%),
    radial-gradient(50% 50% at 10% 80%, rgba(168,153,104,0.10), transparent 60%);
}
@media (max-width: 900px) {
  .page-hero { min-height: auto; padding: 130px 0 70px; }
  .page-hero::before { opacity: 0.45; background-position: center; }
  .page-hero::after {
    background: linear-gradient(180deg, var(--ivoire) 0%, rgba(246,244,239,0.85) 50%, var(--ivoire) 100%);
  }
}

/* ---------- Section utilities ---------- */
section { position: relative; }
.section { padding: 120px 0; }
.section-tight { padding: 80px 0; }
.section-bg-pierre { background: var(--pierre); }
.section-bg-ivoire2 { background: var(--ivoire-2); }
.section-bg-sauge { background: var(--sauge); color: var(--ivoire-2); }
.section-bg-sauge h2, .section-bg-sauge h3 { color: var(--ivoire-2); }
.section-bg-sauge .eyebrow { color: var(--bronze); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head .right p {
  color: var(--texte-mute);
  max-width: 48ch;
}
@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Marble placeholder ---------- */
.marble {
  position: relative;
  overflow: hidden;
  background-color: #d6d2c5;
  background-image:
    radial-gradient(ellipse 70% 40% at 30% 30%, rgba(255,255,255,0.5), transparent 70%),
    radial-gradient(ellipse 60% 30% at 70% 70%, rgba(255,255,255,0.35), transparent 60%),
    linear-gradient(135deg, transparent 30%, rgba(140,130,110,0.2) 50%, transparent 70%);
  isolation: isolate;
}
.marble::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    repeating-linear-gradient(115deg,
      transparent 0px,
      transparent 12px,
      rgba(255,255,255,0.08) 12px,
      rgba(255,255,255,0.08) 13px,
      transparent 13px,
      transparent 28px,
      rgba(70,60,50,0.05) 28px,
      rgba(70,60,50,0.05) 29px);
  mix-blend-mode: overlay;
}
.marble::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(2px 80px at 25% 20%, rgba(60,50,40,0.18) 50%, transparent 80%),
    radial-gradient(2px 60px at 60% 60%, rgba(60,50,40,0.15) 50%, transparent 80%),
    radial-gradient(1px 100px at 80% 30%, rgba(60,50,40,0.12) 50%, transparent 80%);
  transform: rotate(15deg);
  filter: blur(0.4px);
}
.marble.dark { background-color: #3e4540; }
.marble.dark::before { mix-blend-mode: screen; opacity: 0.4; }
.marble.warm { background-color: #d4c2a8; }
.marble.green { background-color: #4d6b58; }
.marble.green::before { mix-blend-mode: screen; opacity: 0.5; }
.marble.cool { background-color: #c8c4b8; }

.marble .label {
  position: absolute;
  bottom: 14px; left: 14px;
  font-family: var(--ff-body);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.25);
  padding: 5px 9px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  z-index: 2;
}
.marble.cool .label, .marble.warm .label { color: rgba(40,35,30,0.9); background: rgba(255,255,255,0.5); }

/* ---------- Generic Card ---------- */
.card {
  background: var(--ivoire-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -20px rgba(26,29,26,0.18);
  border-color: var(--line-strong);
}

/* ---------- Tweaks panel slot ---------- */
.tweaks-panel-host { font-family: var(--ff-body); }

/* ---------- Tape (marquee) ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--ivoire-2);
  position: relative;
}
.marquee::before, .marquee::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 120px;
  z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--ivoire-2), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--ivoire-2), transparent); }
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 60s linear infinite;
  gap: 36px;
}
.marquee-track span {
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--texte);
  white-space: nowrap;
  text-transform: uppercase;
}
.marquee-track i {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--sauge);
  border-radius: 50%;
  opacity: 0.5;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Form base ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--texte-mute);
}
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 15px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 0;
  color: var(--encre);
  border-radius: 0;
  transition: border-color .3s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sauge);
}
.field textarea { resize: vertical; min-height: 100px; }

/* ---------- Utilities ---------- */
.divider { height: 1px; background: var(--line); margin: 0; border: 0; }
.text-center { text-align: center; }
.muted { color: var(--texte-mute); }
.uppercase-tag {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--texte-mute); font-weight: 500;
}

/* small print elements */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sauge);
  font-weight: 500;
}
.kicker::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--sauge);
  display: inline-block;
}

/* ============================================================
   RTL — overrides activated when dir="rtl" is applied to the
   landing wrapper (set by the i18n provider when locale = "ar").
   Scoped to descendants of [dir="rtl"] so admin pages and the
   /login screen stay LTR regardless of cookie state.
   ============================================================ */
[dir="rtl"] {
  font-family: "Noto Naskh Arabic", "Inter", system-ui, sans-serif;
}
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] .quote,
[dir="rtl"] .lede,
[dir="rtl"] .kicker {
  font-family: "Noto Naskh Arabic", "Fraunces", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
}
/* Italic accents (Fraunces italic) — Arabic doesn't have italics, fall
   back to a slightly heavier weight + bronze color to keep the visual
   accent the original design intends. */
[dir="rtl"] em {
  font-style: normal;
  font-weight: 600;
}
/* Arrow glyphs ("→") flip horizontally to mirror reading direction.
   Hover translate is also reversed so the motion still feels "forward"
   in the reader's flow. */
[dir="rtl"] .arrow {
  transform: scaleX(-1);
}
[dir="rtl"] .btn:hover .arrow {
  transform: scaleX(-1) translateX(4px);
}
/* The `.kicker` decorative line sits before the text in LTR; in RTL it
   should sit after, on the new "reading start" side. */
[dir="rtl"] .kicker::before {
  margin-right: 0;
  margin-left: 8px;
}
/* Email/phone runs read LTR even within an RTL block */
[dir="rtl"] [dir="ltr"] {
  unicode-bidi: isolate;
}
