/* ==========================================================================
   El Mehdi Khalid — Photographe à Tanger
   Design system : "chambre noire" (dark, image-first) + "papier" (lecture)
   ========================================================================== */

:root {
  --ink: #0e0d0b;
  --ink-2: #161412;
  --ink-3: #201d1a;
  --paper: #f4f0e8;
  --paper-2: #ebe5da;
  --text: #f2ede4;
  --text-dark: #1b1815;
  --muted: #a69d90;
  --muted-dark: #5f574d;
  --accent: #d6a75c;          /* lumière dorée */
  --accent-strong: #e8bc72;
  --accent-ink: #8a5f1d;      /* accent lisible sur papier */
  --line: rgba(242, 237, 228, .12);
  --line-dark: rgba(27, 24, 21, .12);

  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(.82rem, .8rem + .1vw, .88rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + .4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + .9vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.2vw, 4.6rem);
  --step-5: clamp(3rem, 2rem + 4.8vw, 6.2rem);

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --radius: 4px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font-family: var(--f-sans); font-size: var(--step-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--ink); }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1000; background: var(--accent); color: var(--ink); padding: .7em 1.1em; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }
.paper { background: var(--paper); color: var(--text-dark); }
.paper a { color: var(--text-dark); }
.ink-2 { background: var(--ink-2); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.08; letter-spacing: -.01em; }
.display, h1, h2 { font-family: var(--f-display); }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-family: var(--f-sans); font-size: var(--step-1); font-weight: 700; letter-spacing: -.005em; line-height: 1.3; }
.display em, h1 em, h2 em { font-style: italic; color: var(--accent); }
.paper h1 em, .paper h2 em { color: var(--accent-ink); }
p { margin: 0 0 1em; }
.lead { font-size: var(--step-1); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.paper .lead { color: var(--muted-dark); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .75em; margin-bottom: 1.4rem;
  font-size: var(--step--1); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.paper .eyebrow { color: var(--accent-ink); }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(32px, 5vw, 64px); max-width: 780px; }
.section-head--row { max-width: none; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; }
@media (max-width: 720px) { .section-head--row { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .8em 1.5em; border: 1px solid var(--b); border-radius: 999px;
  background: var(--b); color: var(--ink); font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  text-decoration: none; transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--text); color: var(--ink); border-color: var(--text); }
.paper .btn--ghost { color: var(--text-dark); border-color: var(--line-dark); }
.paper .btn--ghost:hover { background: var(--text-dark); color: var(--paper); }
.paper .btn:not(.btn--ghost) { color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid, body:not(.has-hero) .site-header { background: rgba(14, 13, 11, .9); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.05; }
.brand__name { font-family: var(--f-display); font-size: 1.55rem; letter-spacing: .005em; }
.brand__tag { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; background: none;
  font-size: .92rem; font-weight: 600; text-decoration: none; color: var(--text); opacity: .86; border-radius: 999px;
}
.nav__link:hover, .nav__link[aria-current="page"], .nav__item.is-open > .nav__link { opacity: 1; color: var(--accent); }
.nav__link svg { width: 12px; height: 12px; transition: transform .2s; }
.nav__item.is-open > .nav__link svg { transform: rotate(180deg); }
.nav__cta { margin-left: 10px; min-height: 42px; padding: .55em 1.2em; }

.mega {
  position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--ink-2); border-bottom: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: none; }
.mega .wrap { height: auto; display: grid; grid-template-columns: 1.1fr 3fr; gap: 48px; padding-block: 36px 40px; align-items: start; }
.mega__intro p { color: var(--muted); font-size: .95rem; margin-top: .8rem; }
.mega__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 24px; }
.mega__grid a { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: var(--radius); text-decoration: none; transition: background .2s; }
.mega__grid a:hover { background: var(--ink-3); }
.mega__grid img { width: 52px; height: 52px; object-fit: cover; border-radius: 3px; flex: none; }
.mega__grid strong { display: block; font-size: .92rem; }
.mega__grid small { display: block; font-size: .78rem; color: var(--muted); line-height: 1.35; }

.menu-toggle { display: none; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: transparent; align-items: center; justify-content: center; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .3s var(--ease), background .3s; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; } .menu-toggle span::after { top: 6px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--ink); flex-direction: column; align-items: stretch;
    padding: 16px var(--gutter) 40px; overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .menu-open { overflow: hidden; }
  .menu-open .site-header { background: var(--ink); }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__link { width: 100%; justify-content: space-between; padding: 16px 0; font-family: var(--f-display); font-size: 1.9rem; font-weight: 400; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link svg { width: 16px; height: 16px; }
  .mega { position: static; opacity: 1; visibility: visible; transform: none; display: none; background: none; border: 0; }
  .nav__item.is-open .mega { display: block; }
  .mega .wrap { display: block; padding: 8px 0 16px; }
  .mega__intro { display: none; }
  .mega__grid { grid-template-columns: 1fr 1fr; }
  .mega__grid small { display: none; }
  .mega__grid img { width: 40px; height: 40px; }
  .nav__cta { margin: 28px 0 0; }
}
@media (max-width: 520px) { .mega__grid { grid-template-columns: 1fr; } }

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s linear; }
.hero__slide.is-active img { transform: scale(1); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,13,11,.55) 0%, rgba(14,13,11,.15) 35%, rgba(14,13,11,.55) 65%, rgba(14,13,11,.95) 100%); }
.hero__content { padding-block: calc(var(--header-h) + 40px) clamp(48px, 8vw, 96px); }
.hero h1 { font-size: var(--step-5); max-width: 15ch; }
.hero .lead { color: rgba(242, 237, 228, .82); margin-top: 1.4rem; }
.hero__meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.hero__dots { display: flex; gap: 8px; }
.hero__dots button { width: 32px; height: 32px; border: 0; background: none; padding: 0; position: relative; }
.hero__dots button::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: rgba(242,237,228,.3); transition: background .3s; }
.hero__dots button[aria-current="true"]::before { background: var(--accent); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px)); padding-bottom: clamp(48px, 7vw, 96px); }
.page-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.page-hero h1 { font-size: var(--step-4); }
.page-hero__text .lead + .lead { margin-top: 1rem; }
.page-hero__media { position: relative; }
.page-hero__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.page-hero__media::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--line); border-radius: var(--radius); z-index: -1; }
.page-hero--simple .page-hero__grid { grid-template-columns: 1fr; }
@media (max-width: 860px) {
  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__media { order: -1; }
  .page-hero__media img { aspect-ratio: 4 / 3; }
  .page-hero__media::before { display: none; }
}

.breadcrumb { margin-bottom: 1.6rem; font-size: var(--step--1); color: var(--muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4em; }
.breadcrumb li + li::before { content: "/"; margin-right: .4em; opacity: .5; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Trust bar ---------- */
.trust { border-block: 1px solid var(--line); padding-block: 28px; }
.trust .wrap { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.trust__stats { display: flex; gap: 36px; }
.stat strong { display: block; font-family: var(--f-display); font-size: 2.2rem; font-weight: 400; line-height: 1; color: var(--accent); }
.stat span { font-size: .78rem; color: var(--muted); letter-spacing: .04em; }
.logos { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 18px 36px; list-style: none; margin: 0; padding: 0; }
.logos img { height: 34px; width: auto; max-width: 110px; object-fit: contain; filter: grayscale(1) brightness(0) invert(1); opacity: .62; transition: opacity .25s; }
.logos img:hover { opacity: 1; }
@media (max-width: 960px) { .trust .wrap { grid-template-columns: 1fr; gap: 28px; } .logos { justify-content: flex-start; } }
.paper .logos img { filter: grayscale(1); opacity: .8; }

/* ---------- Service tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.tile { position: relative; grid-column: span 3; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); text-decoration: none; background: var(--ink-3); }
.tile:nth-child(1), .tile:nth-child(2) { grid-column: span 6; aspect-ratio: 16 / 10; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .5s; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(14,13,11,.85)); }
.tile__label { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.tile__label strong { font-family: var(--f-display); font-weight: 400; font-size: var(--step-2); line-height: 1; }

.tile__arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(242,237,228,.35); display: grid; place-items: center; flex: none; transition: background .3s, color .3s, border-color .3s; }
.tile:hover img { transform: scale(1.05); }
.tile:hover .tile__arrow { background: var(--accent); border-color: var(--accent); color: var(--ink); }
@media (max-width: 960px) { .tile { grid-column: span 6; } .tile:nth-child(1), .tile:nth-child(2) { grid-column: span 12; } }
@media (max-width: 520px) { .tiles { gap: 8px; } .tile, .tile:nth-child(1), .tile:nth-child(2) { grid-column: span 12; aspect-ratio: 4 / 3; } }

/* Services hub cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(20px, 3vw, 36px); }
.card { display: flex; flex-direction: column; text-decoration: none; }
.card__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--ink-3); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding-top: 18px; }
.card__body h2, .card__body h3 { font-family: var(--f-display); font-weight: 400; font-size: var(--step-2); margin-bottom: .35rem; }
.card__body p { color: var(--muted); margin: 0 0 .8rem; font-size: .96rem; }
.paper .card__body p { color: var(--muted-dark); }
.card__more { font-size: .85rem; font-weight: 700; color: var(--accent); }
.paper .card__more { color: var(--accent-ink); }

/* ---------- Expertise list ---------- */
.expertise { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.expertise__aside { position: sticky; top: calc(var(--header-h) + 32px); }
.expertise__list { list-style: none; margin: 0; padding: 0; counter-reset: exp; border-top: 1px solid var(--line-dark); }
.expertise__list li { counter-increment: exp; border-bottom: 1px solid var(--line-dark); }
.expertise__list a { display: grid; grid-template-columns: 48px 1fr 24px; gap: 16px; padding: 22px 0; text-decoration: none; align-items: baseline; }
.expertise__list a::before { content: counter(exp, decimal-leading-zero); font-size: .8rem; font-weight: 700; color: var(--accent-ink); }
.expertise__list a::after { content: "→"; opacity: .35; transition: transform .25s, opacity .25s; }
.expertise__list a:hover::after { transform: translateX(4px); opacity: 1; }
.expertise__list strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: var(--step-2); line-height: 1.1; margin-bottom: 4px; }
.expertise__list span { color: var(--muted-dark); font-size: .96rem; }
@media (max-width: 860px) { .expertise { grid-template-columns: 1fr; } .expertise__aside { position: static; } }

/* ---------- Split (about) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--rev > :first-child { order: 2; }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } .split__media img { aspect-ratio: 4 / 3; } }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2.4rem; }
.facts > div { background: var(--ink); padding: 22px; }
.facts strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 2.2rem; line-height: 1; color: var(--accent); margin-bottom: 6px; }
.facts span { font-size: .85rem; color: var(--muted); }
.paper .facts { background: var(--line-dark); border-color: var(--line-dark); }
.paper .facts > div { background: var(--paper); }
.paper .facts strong { color: var(--accent-ink); }
.paper .facts span { color: var(--muted-dark); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery { columns: 3 300px; column-gap: 12px; }
.gallery__item { break-inside: avoid; margin: 0 0 12px; position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--ink-3); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.gallery__item img { width: 100%; transition: transform .8s var(--ease), opacity .4s; }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__item::after { content: ""; position: absolute; inset: 0; background: rgba(14,13,11,0); transition: background .3s; }
.gallery__item:hover::after { background: rgba(14,13,11,.12); }
.gallery--white .gallery__item { background: #fff; }
.gallery-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.gallery-head p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 500; background: rgba(8,7,6,.97); display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: min(92vw, 1600px); max-height: 84vh; width: auto; height: auto; object-fit: contain; user-select: none; }
.lightbox__cap { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: .85rem; color: var(--muted); padding-inline: 80px; }
.lightbox button { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: rgba(14,13,11,.6); display: grid; place-items: center; font-size: 1.3rem; }
.lightbox button:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; top: 30px; left: 24px; font-size: .8rem; letter-spacing: .1em; color: var(--muted); }
@media (max-width: 640px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 14px; transform: none; } .lightbox__cap { bottom: 80px; padding-inline: 20px; } }

/* ---------- Prose ---------- */
.prose { max-width: 72ch; font-size: 1.06rem; line-height: 1.78; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2 { font-size: var(--step-3); margin-top: 2.2em; }
.prose h3 { margin-top: 2em; font-size: var(--step-1); }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: .45em 0; padding-left: .3em; }
.prose li::marker { color: var(--accent-ink); }
.prose a { color: var(--accent-ink); font-weight: 600; }
.prose strong { font-weight: 700; }
.prose figure { margin: 2.2em 0; }
.prose figure img { width: 100%; border-radius: var(--radius); }
.prose figcaption { font-size: .85rem; color: var(--muted-dark); margin-top: .6em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; margin: 1.6em 0; }
.prose th, .prose td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line-dark); vertical-align: top; }
.prose th { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); }
.prose td:first-child { font-weight: 700; width: 42%; }
.prose blockquote { margin: 1.6em 0; padding-left: 1.2em; border-left: 2px solid var(--accent-ink); font-family: var(--f-display); font-size: var(--step-2); line-height: 1.25; }
.prose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 6vw, 96px); align-items: start; }
.prose-layout__aside { position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 1000px) { .prose-layout { grid-template-columns: 1fr; } .prose-layout__aside { position: static; } }
@media (max-width: 600px) { .prose table, .prose thead, .prose tbody, .prose tr, .prose td, .prose th { display: block; } .prose thead { display: none; } .prose tr { border-bottom: 1px solid var(--line-dark); padding: 10px 0; } .prose td { border: 0; padding: 4px 0; width: auto !important; } }

.aside-card { background: var(--ink); color: var(--text); border-radius: var(--radius); padding: 28px; }
.aside-card .aside-card__title, .aside-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.8rem; margin-bottom: .6rem; }
.aside-card p { color: var(--muted); font-size: .94rem; }
.aside-card .btn { width: 100%; margin-top: 8px; }
.aside-card .btn--ghost { color: var(--text); border-color: var(--line); }
.aside-card .btn--ghost:hover { background: var(--text); color: var(--ink); }
.aside-card ul { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); }
.aside-card li a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: .92rem; color: var(--text); }
.aside-card li a:hover { color: var(--accent); }

/* ---------- Features (numbered) ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.features > div { background: var(--paper); padding: 28px; }
.features b { display: block; font-size: .8rem; color: var(--accent-ink); margin-bottom: 14px; letter-spacing: .08em; }

/* ---------- Blog ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.post-card { display: flex; flex-direction: column; text-decoration: none; }
.post-card__media { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--ink-3); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__meta { display: flex; gap: 12px; font-size: .78rem; color: var(--muted); margin: 16px 0 8px; letter-spacing: .04em; text-transform: uppercase; }
.paper .post-card__meta { color: var(--muted-dark); }
.post-card h2, .post-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; line-height: 1.15; }
.post-card p { margin-top: .6rem; font-size: .94rem; color: var(--muted-dark); }
.post-card--feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.post-card--feature .post-card__media { aspect-ratio: 16 / 10; }
.post-card--feature h2 { font-size: var(--step-3); }
@media (max-width: 960px) { .posts { grid-template-columns: 1fr 1fr; } .post-card--feature { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .posts { grid-template-columns: 1fr; } }

.article-hero { padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px)); padding-bottom: clamp(32px, 5vw, 56px); }
.article-hero h1 { font-size: var(--step-4); max-width: 22ch; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 1.6rem; font-size: .88rem; color: var(--muted); }
.article-meta img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.article-meta .author { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.article-cover img { width: 100%; max-height: 78vh; object-fit: cover; border-radius: var(--radius); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line-dark); }
.faq details { border-bottom: 1px solid var(--line-dark); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; font-family: var(--f-display); font-size: var(--step-2); line-height: 1.2; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-dark); display: grid; place-items: center; font-family: var(--f-sans); font-size: 1.2rem; transition: transform .3s var(--ease), background .3s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--text-dark); color: var(--paper); }
.faq__answer { padding: 0 64px 28px 0; color: var(--muted-dark); }
.faq__answer ul { padding-left: 1.2em; }
.faq__answer li { margin: .35em 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.contact-list li { border-bottom: 1px solid var(--line); }
.contact-list a, .contact-list div { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 18px 0; text-decoration: none; }
.contact-list small { display: block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-list strong { font-weight: 600; font-size: 1.05rem; }
.contact-list a:hover strong { color: var(--accent); }
.icon-circle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.icon-circle svg { width: 18px; height: 18px; }
.socials { display: flex; gap: 10px; margin-top: 24px; }
.socials a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .25s, color .25s, border-color .25s; }
.socials a:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.socials svg { width: 18px; height: 18px; }

.form { background: var(--paper); color: var(--text-dark); border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); }
.form h2 { font-size: var(--step-3); margin-bottom: .4rem; }
.form > p { color: var(--muted-dark); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.form__full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form__grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text-dark); background: #fff; border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 14px 16px; min-height: 52px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px rgba(214,167,92,.25); }
.form .btn { margin-top: 24px; }
.form__note { font-size: .82rem; color: var(--muted-dark); margin: 14px 0 0; }
.form__status { margin-top: 16px; font-weight: 600; }

.map { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink-3); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }

/* ---------- Video ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(20px, 3vw, 36px); }
.video h2, .video h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; margin-top: 16px; }
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .3s, transform .8s var(--ease); }
.yt button { position: absolute; inset: 0; width: 100%; border: 0; background: none; display: grid; place-items: center; }
.yt button span { width: 76px; height: 76px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid; place-items: center; transition: transform .3s var(--ease); }
.yt button span svg { width: 26px; height: 26px; margin-left: 4px; }
.yt:hover img { opacity: 1; transform: scale(1.03); }
.yt:hover button span { transform: scale(1.08); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; text-align: center; }
.cta-band__bg { position: absolute; inset: 0; z-index: -2; }
.cta-band__bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(14,13,11,.78); }
.cta-band h2 { font-size: var(--step-4); max-width: 18ch; margin-inline: auto; }
.cta-band .lead { margin: 1.2rem auto 0; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Related ---------- */
.related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.related a { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; text-decoration: none; }
.related img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.related a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(14,13,11,.85)); }
.related span { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; font-family: var(--f-display); font-size: 1.5rem; line-height: 1.05; }
.related a:hover img { transform: scale(1.06); }
@media (max-width: 860px) { .related { grid-template-columns: 1fr 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); border-top: 1px solid var(--line); padding-top: clamp(56px, 8vw, 96px); font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid .footer-title { font-family: var(--f-sans); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0 0 10px; }
.footer-grid a { text-decoration: none; color: var(--text); opacity: .85; }
.footer-grid a:hover { opacity: 1; color: var(--accent); }
.footer-brand p { color: var(--muted); max-width: 36ch; margin-top: 16px; }
.footer-big { font-family: var(--f-display); font-size: clamp(3rem, 12vw, 11rem); line-height: .9; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px rgba(242,237,228,.16); margin: clamp(48px, 8vw, 96px) 0 0; white-space: nowrap; overflow: hidden; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Floating WhatsApp ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; align-items: center; gap: 10px; padding: 0 20px 0 14px; height: 54px; border-radius: 999px; background: #25d366; color: #06290f; font-weight: 700; font-size: .92rem; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .25s var(--ease); }
.wa-float svg { width: 26px; height: 26px; }
.wa-float:hover { transform: translateY(-2px); }
@media (max-width: 600px) { .wa-float { padding: 0; width: 56px; justify-content: center; } .wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Misc ---------- */
.signature { width: 180px; margin-top: 1.6rem; filter: invert(1); opacity: .9; }
.paper .signature { filter: none; }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.mega__intro .eyebrow { display: flex; }
body.menu-open .site-header { background: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; }

/* ---------- Sélecteur de langue ---------- */
.lang-switch { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; order: 3; flex: none; }
.lang-switch a { min-width: 34px; height: 30px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-decoration: none; color: var(--muted); transition: background .2s, color .2s; }
.lang-switch a[lang="ar"] { font-family: "Noto Naskh Arabic", serif; font-size: 1rem; letter-spacing: 0; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current="true"] { background: var(--text); color: var(--ink); }
.site-header .wrap > .nav { order: 2; margin-left: auto; }
.site-header .wrap > .menu-toggle { order: 4; }
@media (max-width: 1080px) { .site-header .wrap > .lang-switch { margin-left: auto; } }
@media (max-width: 380px) { .lang-switch a { min-width: 28px; padding: 0 5px; } .brand__tag { display: none; } }

/* ---------- Arabe (RTL) ---------- */
:root[lang="ar"] { --f-display: "Noto Naskh Arabic", "Instrument Serif", serif; --f-sans: "IBM Plex Sans Arabic", "Manrope", system-ui, sans-serif; }
[lang="ar"] body { line-height: 1.85; }
[lang="ar"] *, [lang="ar"] *::before, [lang="ar"] *::after { letter-spacing: 0 !important; }
[lang="ar"] .eyebrow, [lang="ar"] .footer-grid .footer-title, [lang="ar"] .prose th, [lang="ar"] .post-card__meta, [lang="ar"] .contact-list small, [lang="ar"] .brand__tag { text-transform: none; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] .display, [lang="ar"] .tile__label strong, [lang="ar"] .faq summary { line-height: 1.35; }
[lang="ar"] .hero h1 { font-size: clamp(2.4rem, 1.7rem + 3.6vw, 5rem); }
[lang="ar"] .brand__name, [lang="ar"] .footer-big { font-family: "Instrument Serif", serif; }
[dir="rtl"] .link-arrow::after { content: "←"; }
[dir="rtl"] .link-arrow:hover::after { transform: translateX(-4px); }
[dir="rtl"] .btn svg, [dir="rtl"] .tile__arrow svg { transform: scaleX(-1); }
[dir="rtl"] .expertise__list a::after { content: "←"; }
[dir="rtl"] .expertise__list a:hover::after { transform: translateX(-4px); }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol, [dir="rtl"] .faq__answer ul { padding-left: 0; padding-right: 1.2em; }
[dir="rtl"] .prose li { padding-left: 0; padding-right: .3em; }
[dir="rtl"] .prose blockquote { padding-left: 0; padding-right: 1.2em; border-left: 0; border-right: 2px solid var(--accent-ink); }
[dir="rtl"] .prose th, [dir="rtl"] .prose td { text-align: right; }
[dir="rtl"] .faq__answer { padding: 0 0 28px 64px; }
[dir="rtl"] .nav__cta { margin-left: 0; margin-right: 10px; }
[dir="rtl"] .site-header .wrap > .nav { margin-left: 0; margin-right: auto; }
@media (max-width: 1080px) { [dir="rtl"] .site-header .wrap > .lang-switch { margin-left: 0; margin-right: auto; } [dir="rtl"] .nav__cta { margin: 28px 0 0; } }
[dir="rtl"] .page-hero__media::before { inset: 18px 18px -18px -18px; }
[dir="rtl"] .eyebrow::before { order: 0; }
[dir="rtl"] .wa-float { right: auto; left: 18px; }
[dir="rtl"] .lightbox__prev { left: auto; right: 18px; }
[dir="rtl"] .lightbox__next { right: auto; left: 18px; }
[dir="rtl"] .lightbox__close { right: auto; left: 18px; }
[dir="rtl"] .lightbox__count { left: auto; right: 24px; }
[dir="rtl"] .contact-list a, [dir="rtl"] .contact-list div { direction: rtl; }
[dir="rtl"] .contact-list strong, [dir="rtl"] .footer-grid a[href^="tel:"], [dir="rtl"] .footer-grid a[href^="mailto:"] { unicode-bidi: plaintext; }
[dir="rtl"] a[href^="tel:"], [dir="rtl"] .contact-list a[href^="tel:"] strong, [dir="rtl"] [dir="ltr"] { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .aside-card a[href^="tel:"] { flex-direction: row; }

/* ---------- Contraste (WCAG AA) sur fond clair ---------- */
.paper .stat strong { color: var(--accent-ink); }
.paper .stat span, .paper .stat a { color: var(--muted-dark); }
.paper .muted { color: var(--muted-dark); }
.footer-big::before { content: attr(data-text); }
.post-card p { color: var(--muted); }
.paper .post-card p { color: var(--muted-dark); }
.post-card p.post-card__meta { color: var(--muted); }
.paper .post-card p.post-card__meta { color: var(--muted-dark); }
