/* ==========================================================================
   Mogador — design tokens partagés (site public + Espace Dar Souiri)
   Univers : chaux des façades, bleu des barques et des portes, ocre des
   remparts au couchant, bois de thuya, écume des alizés.
   ========================================================================== */
/* Polices chargées par functions.php (wp_enqueue_style aem-polices). */

:root {
  /* Matières */
  --chaux: #F7F3EA;        /* mur chaulé, fond */
  --chaux-2: #EFE8DA;      /* chaux ombrée */
  --papier: #FFFDF8;       /* surfaces */
  --encre: #14212E;        /* nuit atlantique, texte */
  --encre-2: #4A5563;      /* texte secondaire */
  --barque: #1D5B9B;       /* bleu des barques — identité */
  --barque-fonce: #123E6B;
  --barque-vif: #2C7BC4;   /* actions */
  --ecume: #E3EDF4;        /* écume / surfaces bleutées */
  --ocre: #B9783F;         /* remparts au couchant */
  --ocre-clair: #E8C9A0;
  --thuya: #5A3521;        /* marqueterie de thuya */
  --sable: #D9C4A0;
  --ligne: #E2D9C8;        /* filets */
  --ok: #2F7A4F;
  --alerte: #A8461F;

  /* Typo */
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --arabe: "Amiri", "Readex Pro", serif;
  --arabe-ui: "Readex Pro", system-ui, sans-serif;

  /* Rythme */
  --r-s: 6px;
  --r-m: 12px;
  --r-arche: 999px 999px 0 0; /* porte en arc de la médina */
  --ombre: 0 1px 2px rgba(20, 33, 46, .06), 0 8px 24px -12px rgba(20, 33, 46, .18);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--encre); background: var(--chaux); line-height: 1.6; font-variant-numeric: lining-nums; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--barque-vif); outline-offset: 3px; border-radius: 4px; }
[lang="ar"], .ar { font-family: var(--arabe); direction: rtl; }

/* Créneaux de la Skala — filet décoratif récurrent */
.skala {
  height: 12px;
  background: linear-gradient(to right, currentColor 0 58%, transparent 58%) 0 0 / 26px 100% repeat-x;
  color: var(--ocre);
  opacity: .9;
}
.skala--bleu { color: var(--barque); }
.skala--chaux { color: var(--chaux); }

/* Étoile de marqueterie (khatam) en filigrane */
.marqueterie {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23B9783F' stroke-opacity='.22' stroke-width='1'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3Ccircle cx='28' cy='28' r='4'/%3E%3C/g%3E%3C/svg%3E");
}

/* Cormorant (Google Fonts) n'a que des chiffres elzéviriens : les nombres passent en Manrope */
.chiffre { font-family: var(--sans) !important; font-weight: 700 !important; letter-spacing: -.02em; }

.eyebrow { font: 600 .75rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ocre); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font: 600 .95rem/1 var(--sans); text-decoration: none; cursor: pointer;
  padding: .9rem 1.4rem; border-radius: var(--r-s); border: 1.5px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn--plein { background: var(--barque); color: #fff; }
.btn--plein:hover { background: var(--barque-fonce); }
.btn--ligne { border-color: currentColor; color: var(--barque); background: transparent; }
.btn--ligne:hover { background: var(--ecume); }
.btn--chaux { background: var(--chaux); color: var(--barque-fonce); }
.btn--chaux:hover { background: #fff; }

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