/* =====================================================================
   AE Architectes — design system v2 ("glass")
   Loaded by every migrated page (<body class="v2">) as /css/ae.css?v=N.
   >>> After editing this file, bump ?v=N in the pages' <link> so visitors
       don't get the old cached copy from Cloudflare. <<<

   1. SETTINGS (edit these first — they drive the whole site)
   2. Base           3. Glass material     4. Buttons
   5. Nav + menu     6. Hero + figures     7. Sections + headings
   8. Projects       9. Approach / services / prose
   10. Method       11. Reviews + FAQ     12. Call to action
   12b. Project pages (/villa-agr-rafai …)   12c. Inner pages (projets, atelier, services, contact)
   12d. Documents (guides, articles, a-propos, mentions légales)
   13. Footer       14. Motion            15. Responsive
   ===================================================================== */

/* ---------- 1. SETTINGS ------------------------------------------------
   Dark is the default. A light palette is ready below: set
   <html data-theme="light"> on a page to use it. */
:root {
  /* brand */
  --accent: #E8551A;              /* AE orange */
  --accent-hi: #FF9161;           /* top of orange gradients */
  --accent-lo: #DE4C11;           /* bottom of orange gradients */
  --accent-text: #FF8A55;         /* orange used for text on dark */

  /* page */
  --bg: #0D0C0B;
  --text: #F5F2ED;
  --text-2: #A8A29A;              /* secondary text */
  --text-3: #77716A;              /* tertiary text, muted headline halves */
  --line: rgba(255, 255, 255, .08); /* hairline dividers inside panels */

  /* ambient colour behind the glass */
  --glow-a: rgba(232, 85, 26, .28);
  --glow-b: rgba(64, 96, 176, .32);
  --glow-c: rgba(140, 70, 30, .28);

  /* glass */
  --glass: rgba(40, 37, 34, .44);           /* normal panel tint */
  --glass-strong: rgba(46, 42, 39, .66);    /* nav, figures, CTA */
  --blur: 30px;                             /* frost strength */
  --sheen: rgba(255, 255, 255, .07);        /* light in the top 40% */
  --spec: rgba(255, 255, 255, .22);         /* 1px light line on the top edge */
  --inner-shade: rgba(0, 0, 0, .25);
  --rim-hi: rgba(255, 255, 255, .32);
  --rim-lo: rgba(255, 255, 255, .05);
  --edge: rgba(255, 255, 255, .06);
  --shadow: rgba(0, 0, 0, .60);
  --shadow-near: rgba(0, 0, 0, .35);

  /* shape */
  --r-card: 22px;                 /* glass cards */
  --r-photo: 14px;                /* photos inside cards (= card radius − 8px padding) */
  --r-hero: 28px;
  --max: 1240px;                  /* content width */

  /* type */
  --display: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --accent-text: #C2410C;
  --bg: #ECE8E2; --text: #171513; --text-2: #5C5751; --text-3: #8A847C; --line: rgba(30, 22, 14, .10);
  --glow-a: rgba(232, 85, 26, .24); --glow-b: rgba(96, 128, 196, .28); --glow-c: rgba(255, 196, 150, .42);
  --glass: rgba(255, 255, 255, .50); --glass-strong: rgba(255, 255, 255, .76); --sheen: rgba(255, 255, 255, .50); --spec: #fff;
  --inner-shade: rgba(60, 40, 20, .05); --rim-hi: rgba(255, 255, 255, .95); --rim-lo: rgba(255, 255, 255, .22); --edge: rgba(30, 22, 14, .08);
  --shadow: rgba(48, 34, 22, .22); --shadow-near: rgba(48, 34, 22, .10);
  color-scheme: light;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.v2 { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.v2 h1, .v2 h2, .v2 h3, .v2 .num { font-family: var(--display); letter-spacing: -.035em; }
.v2 a { color: inherit; }
.v2 img { max-width: 100%; }
.v2 svg { display: block; }
.v2 [id] { scroll-margin-top: calc(88px + env(safe-area-inset-top, 0px)); }
.v2 :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ico { width: 16px; height: 16px; flex: none; }

.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(90px); }
.ambient i:nth-child(1) { width: 48vmax; height: 48vmax; left: -14vmax; top: 28vh; background: var(--glow-b); }
.ambient i:nth-child(2) { width: 42vmax; height: 42vmax; right: -12vmax; top: 58vh; background: var(--glow-a); }
.ambient i:nth-child(3) { width: 36vmax; height: 36vmax; left: 32vw; bottom: -16vmax; background: var(--glow-c); }
.ambient::after { content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>"); }

/* ---------- 3. Glass material ----------
   .glass            normal panel
   .glass.strong     more opaque (nav, figures, CTA)
   .glass.on-photo   clear tint with white text, for use on top of photos (.dim = darker) */
.glass { position: relative; isolation: isolate; border-radius: var(--r-card);
  background: linear-gradient(180deg, var(--sheen), transparent 40%), var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(190%); backdrop-filter: blur(var(--blur)) saturate(190%);
  box-shadow: inset 0 1px 0 var(--spec), inset 0 -10px 20px -14px var(--inner-shade), inset 0 0 0 1px var(--edge),
    0 1px 1px var(--shadow-near), 0 8px 20px -10px var(--shadow-near), 0 32px 64px -32px var(--shadow); }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, var(--rim-hi), var(--rim-lo) 28%, transparent 52%, var(--rim-lo) 82%, var(--rim-hi));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.glass.strong { background: linear-gradient(180deg, var(--sheen), transparent 40%), var(--glass-strong); }
.glass.on-photo { --glass: rgba(255, 255, 255, .14); --sheen: rgba(255, 255, 255, .18); --spec: rgba(255, 255, 255, .55); --inner-shade: rgba(0, 0, 0, .12); --rim-hi: rgba(255, 255, 255, .75); --rim-lo: rgba(255, 255, 255, .12); --edge: rgba(255, 255, 255, .06); --shadow: rgba(0, 0, 0, .35); --shadow-near: rgba(0, 0, 0, .18); color: #fff; }
.glass.on-photo.dim { --glass: rgba(18, 16, 14, .32); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
  .glass.on-photo { background: rgba(20, 18, 16, .6); }
}

/* ---------- 4. Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: 500 15px/1 var(--sans); letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .25s var(--ease), filter .2s, box-shadow .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.96); }
.btn .ico { transition: transform .25s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn-accent { color: #fff; text-shadow: 0 1px 1px rgba(120, 30, 0, .3);
  background: linear-gradient(180deg, var(--accent-hi) 0%, #F2662A 46%, var(--accent-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 3px rgba(130, 30, 0, .28), inset 0 0 0 1px rgba(160, 50, 0, .25), 0 1px 2px rgba(150, 40, 0, .3), 0 10px 24px -10px rgba(232, 85, 26, .8); }
.btn-accent:hover { filter: brightness(1.06) saturate(1.05); }
.btn-accent:active { box-shadow: inset 0 2px 5px rgba(120, 30, 0, .45), inset 0 0 0 1px rgba(160, 50, 0, .3), 0 1px 2px rgba(150, 40, 0, .25); }
.btn.glass { border-radius: 999px; }
.btn.glass:hover { --glass: var(--glass-strong); }
.btn.glass:active { box-shadow: inset 0 2px 6px var(--shadow-near), inset 0 0 0 1px var(--edge); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- 5. Nav + mobile menu ---------- */
.nav-ph, .site-nav { height: 52px; margin-top: 12px; }
.site-nav { position: sticky; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 50; }
#main-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; padding: 6px 6px 6px 7px; border-radius: 999px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 15px/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 12px/1 var(--display); letter-spacing: .02em; text-shadow: 0 1px 1px rgba(120, 30, 0, .35);
  background: radial-gradient(120% 90% at 50% 0%, #FFA172 0%, #F0612A 50%, #C94210 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 3px rgba(120, 30, 0, .3), 0 2px 6px -2px rgba(200, 60, 10, .7); }
#main-nav .nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
#main-nav .nav-links a { display: block; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--text); padding: 9px 15px; border-radius: 999px; transition: background .2s, box-shadow .2s; }
#main-nav .nav-links a:hover, #main-nav .nav-links a.active { background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--spec), 0 1px 3px var(--shadow-near); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; padding: 3px; border-radius: 999px; background: var(--edge); box-shadow: inset 0 1px 2px var(--shadow-near); }
.lang > * { font-size: 12px; font-weight: 500; color: var(--text-2); padding: 7px 10px; border-radius: 999px; text-decoration: none; cursor: pointer; transition: color .2s; }
.lang > *:hover { color: var(--text); }
.lang [aria-current] { color: var(--text); background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--spec), 0 1px 3px var(--shadow-near); }
.nav-burger { display: none; flex-direction: column; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; padding: 0; border-radius: 50%; cursor: pointer; background: var(--edge); box-shadow: inset 0 1px 0 var(--spec); }
.nav-burger span { display: block; flex: none; width: 16px; height: 1.6px; border-radius: 2px; background: var(--text); transition: transform .3s var(--ease), opacity .2s; }
.nav-burger span + span { margin-top: 5px; }
.nav-burger.open span:nth-child(1) { transform: translateY(3.3px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { transform: translateY(-3.3px) rotate(-45deg); }
.nav-mobile { position: fixed; inset: 0; z-index: 49; display: none; flex-direction: column; justify-content: center; gap: 6px; padding: 96px max(24px, env(safe-area-inset-left, 0px)) 48px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  background: rgba(13, 12, 11, .72); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); }
.nav-mobile.open { opacity: 1; visibility: visible; }
.nav-mobile > a:not(.btn) { font: 600 clamp(32px, 9vw, 44px)/1.2 var(--display); letter-spacing: -.035em; text-decoration: none; color: var(--text); padding: 6px 0; }
.nav-mobile .btn { margin-top: 24px; align-self: flex-start; height: 52px; padding: 0 26px; font-size: 16px; }
.nav-mobile .lang { align-self: flex-start; margin-top: 16px; }

/* ---------- 6. Hero + key figures ---------- */
.hero { position: relative; margin-top: -64px; }
.hero-media { position: relative; overflow: hidden; border-radius: var(--r-hero); min-height: 560px; height: min(86vh, 800px); color: #fff; box-shadow: 0 40px 80px -40px var(--shadow); }
.hero-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); background:
  linear-gradient(90deg, rgba(10, 9, 8, .62) 0%, rgba(10, 9, 8, .25) 45%, rgba(10, 9, 8, 0) 70%),
  linear-gradient(180deg, rgba(8, 12, 24, .38) 0%, rgba(8, 12, 24, 0) 24%, rgba(10, 10, 12, 0) 45%, rgba(10, 9, 8, .72) 100%); }
.hero-copy { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 0 clamp(20px, 4vw, 56px) clamp(100px, 11vw, 136px); max-width: 880px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; margin: 0; padding: 0 14px 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #FF8A55; box-shadow: 0 0 0 3px rgba(255, 138, 85, .22), 0 0 10px rgba(255, 138, 85, .8); }
.hero h1 { margin: 18px 0 16px; font-size: clamp(38px, 4.4vw, 62px); line-height: 1.02; font-weight: 600; text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.hero h1 span { color: rgba(255, 255, 255, .6); }
.hero .lede { margin: 0 0 28px; max-width: 54ch; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.55; color: rgba(255, 255, 255, .84); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-tag { position: absolute; z-index: 1; top: 96px; right: clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 18px; font-size: 13px; line-height: 1.35; text-decoration: none; transition: transform .3s var(--ease); }
.hero-tag:hover { transform: translateY(-2px); }
.hero-tag img { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 4px 10px -4px rgba(0, 0, 0, .5); }
.hero-tag b { display: block; font-weight: 600; }
.hero-tag small { display: block; color: rgba(255, 255, 255, .72); font-size: 12px; }

.stats { position: relative; z-index: 2; margin: -64px clamp(12px, 3vw, 40px) 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 6px; border-radius: 24px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px 20px; min-width: 0; }
.stat + .stat { box-shadow: -1px 0 0 var(--edge), inset 1px 0 0 var(--rim-lo); }
.sico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-text); background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 1px var(--edge), 0 2px 6px -2px var(--shadow-near); }
.sico svg { width: 20px; height: 20px; }
.num { font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.num em { font-style: normal; color: var(--accent-text); }
.stat p { margin: 5px 0 0; font-size: 13px; line-height: 1.3; color: var(--text-2); }

/* ---------- 7. Sections + headings ---------- */
.sec { padding-top: clamp(72px, 10vw, 128px); }
.head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; height: 30px; margin: 0 0 16px; padding: 0 13px 0 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.kicker .dot { width: 6px; height: 6px; background: var(--accent); box-shadow: 0 0 0 3px rgba(232, 85, 26, .15); }
.h2 { margin: 0; font-size: clamp(27px, 2.7vw, 38px); line-height: 1.1; font-weight: 600; text-wrap: balance; }
.h2 span { color: var(--text-3); }

/* ---------- 8. Projects ----------
   Glass card holding the photo at its true 3:2 ratio, caption below.
   Concentric corners: --r-card = --r-photo + 8px padding. */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.proj { display: block; padding: 8px; text-decoration: none; color: var(--text); transition: transform .4s var(--ease); }
.proj:hover { transform: translateY(-6px); }
.ph { position: relative; overflow: hidden; border-radius: var(--r-photo); aspect-ratio: 3 / 2; }
.ph::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 -30px 40px -30px rgba(0, 0, 0, .35); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.proj:hover .ph img { transform: scale(1.045); }
.ph .tag { position: absolute; z-index: 1; top: 10px; left: 10px; height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 6px 6px 10px; }
.cap h3, .cap h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.cap p { margin: 3px 0 0; font-size: 13px; color: var(--text-2); }
.arrow { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 1px var(--edge), 0 2px 6px -2px var(--shadow-near); transition: background .25s, color .25s, transform .35s var(--ease); }
.arrow svg { width: 16px; height: 16px; }
.proj:hover .arrow, .svc:hover .arrow { color: #fff; transform: rotate(-45deg); background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 10px -4px rgba(232, 85, 26, .8); }

/* ---------- 9. Approach / services / prose ---------- */
.approach { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 64px); align-items: end; padding: clamp(28px, 4.5vw, 56px); }
.statement { margin: 0; font: 500 clamp(22px, 2.3vw, 31px)/1.22 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.statement span { color: var(--text-3); }
.approach p:not(.statement):not(.kicker) { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.7; }

.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.svc { display: flex; flex-direction: column; padding: 24px 22px 22px; text-decoration: none; color: var(--text); transition: transform .4s var(--ease); }
.svc:hover { transform: translateY(-4px); }
.svc h3 { margin: 22px 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.svc p { margin: 0 0 20px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.svc .arrow { margin-top: auto; }

.prose { padding: clamp(28px, 4.5vw, 56px); }
.prose .h2 { max-width: 22ch; margin-bottom: 24px; }
.prose-body { columns: 2 320px; column-gap: clamp(24px, 4vw, 56px); }
.prose-body p { margin: 0 0 16px; color: var(--text-2); font-size: 16px; line-height: 1.75; break-inside: avoid; }
.prose a, .faq-a a { color: var(--text); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; padding-bottom: 1px; transition: color .2s, background-size .2s; }
.prose a:hover, .faq-a a:hover { color: var(--accent-text); background-size: 100% 2px; }

/* ---------- 10. Method ---------- */
.method { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step { padding: 24px 24px 28px; }
.tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 100% at 50% 0%, #FFA172 0%, #F0612A 48%, #C94210 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 5px rgba(120, 30, 0, .3), 0 1px 2px rgba(150, 40, 0, .35), 0 10px 20px -10px rgba(232, 85, 26, .9); }
.tile svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(120, 30, 0, .35)); }
.step .no { display: block; margin: 22px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--text-3); font-variant-numeric: tabular-nums; }
.step h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.step p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }

/* ---------- 11. Reviews + FAQ ---------- */
.reviews { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.score-card { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.score { display: flex; align-items: center; gap: 16px; }
.score .num { font-size: 50px; }
.stars { display: flex; gap: 2px; color: #F7B32B; }
.stars svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(160, 90, 0, .35)); }
.score small, .score-card > p { display: block; margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.quote-card { padding: 26px 26px 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; margin: 0; }
.quote-card blockquote { margin: 0; font: 500 24px/1.3 var(--display); letter-spacing: -.02em; }
.quote-card .stars svg { width: 14px; height: 14px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--display); color: #fff; background: linear-gradient(160deg, #8FA8D8, #4E6CA8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 5px -2px rgba(40, 60, 110, .6); }
.avatar.alt { background: linear-gradient(160deg, #D8B08F, #A8744E); }
.who small { display: block; color: var(--text-2); font-size: 12px; }

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.faq-item { padding: 24px 26px 26px; }
.faq-q { margin: 0 0 10px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.faq-a { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-2); }

/* ---------- 12. Call to action ---------- */
.cta { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(28px, 4.5vw, 56px); overflow: hidden; }
.cta::after { content: ""; position: absolute; z-index: -1; width: 60%; aspect-ratio: 1; right: -16%; top: -50%; border-radius: 50%; background: radial-gradient(circle, rgba(232, 85, 26, .34), transparent 65%); pointer-events: none; }
.cta .h2 { margin-bottom: 14px; }
.cta p { margin: 0; color: var(--text-2); max-width: 46ch; }
.cta-side { display: grid; gap: 14px; }
.rows { display: grid; gap: 10px; margin-top: 6px; }
.row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); min-width: 0; text-decoration: none; }
.row .sico { width: 34px; height: 34px; border-radius: 10px; }
.row .sico svg { width: 16px; height: 16px; }
.row span:last-child { min-width: 0; overflow-wrap: anywhere; }
a.row:hover { color: var(--text); }

/* ---------- 12b. Project pages ----------
   Title, photo at its native 3:2 in a glass frame, text + glass "fiche projet",
   optional gallery, previous/next project, related reading. */
.pj-head, .page-head { max-width: 880px; padding: clamp(40px, 6vw, 88px) 0 clamp(24px, 3vw, 40px); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 13px; font-weight: 500; color: var(--text-3); }
.crumbs a { color: var(--accent-text); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pj-title, .page-title { margin: 0 0 18px; font-size: clamp(36px, 4.2vw, 58px); line-height: 1.02; font-weight: 600; text-wrap: balance; }
.pj-lede, .page-lede { margin: 0; max-width: 62ch; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; color: var(--text-2); }
.pj-photo { margin: 0; padding: 8px; }
.pj-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; padding-top: clamp(40px, 5vw, 72px); }
.pj-text p { margin: 0 0 18px; max-width: 66ch; font-size: 16.5px; line-height: 1.8; color: var(--text-2); }
.pj-text p:last-child { margin-bottom: 0; }
.pj-specs { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); padding: clamp(22px, 2.5vw, 30px); }
.pj-specs dl { margin: 0; }
.pj-specs dl > div, .spec-list > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.pj-specs dt, .spec-list dt { font-size: 13px; color: var(--text-3); }
.pj-specs dd, .spec-list dd { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.pj-specs .btn { width: 100%; margin-top: 18px; }
.pj-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: clamp(40px, 5vw, 72px); }
.pj-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: clamp(56px, 7vw, 96px); }
.pj-nav a, .rel { display: flex; align-items: center; gap: 16px; padding: 20px 22px; text-decoration: none; color: var(--text); transition: transform .35s var(--ease); }
.pj-nav a:hover, .rel:hover { transform: translateY(-3px); }
.pj-nav .next, .rel { justify-content: space-between; }
.pj-nav .next span:first-child { text-align: right; flex: 1; }
.pj-nav small, .rel small { display: block; margin-bottom: 4px; font-size: 13px; color: var(--text-3); }
.pj-nav strong, .rel strong { display: block; font: 600 19px/1.2 var(--display); letter-spacing: -.02em; }
.rel strong { font-size: 17px; }
.rel small { margin: 4px 0 0; color: var(--text-2); }
.arrow.back svg { transform: rotate(180deg); }
.pj-nav a:hover .arrow, .rel:hover .arrow { color: #fff; background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 10px -4px rgba(232, 85, 26, .8); }
.rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) {
  .pj-body { grid-template-columns: 1fr; }
  .pj-specs { position: static; }
  .rel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pj-photo { padding: 6px; }
  .pj-gallery, .pj-nav { grid-template-columns: 1fr; gap: 14px; }
  .pj-specs dl > div { grid-template-columns: 92px minmax(0, 1fr); }
  .rel-grid { gap: 14px; }
}

/* ---------- 12c. Inner pages ----------
   Blocks used by /projets, /atelier, /services, /contact. Page headers reuse
   .page-head / .page-title / .page-lede (= the project-page header, §12b). */
.spec-list { margin: 0; }
.spec-list > div:first-child { border-top: 0; padding-top: 0; }

/* /projets — category filter + full grid (no card hidden on tablets) */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.filters .btn[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px -8px rgba(232, 85, 26, .9); }
.filters .btn[aria-pressed="true"]::before { display: none; }
.projects.all .proj:nth-child(3) { display: block; }
.projects .proj[hidden] { display: none; }

/* /atelier — founder */
.founder { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: stretch; }
.founder .pj-photo .ph { aspect-ratio: auto; height: 100%; min-height: 360px; }
.founder-card { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(26px, 4vw, 48px); }
.founder-card .h2 { margin-bottom: 6px; }
.founder-card .role { margin: 0 0 22px; font-size: 14px; color: var(--text-3); }
.founder-card blockquote { margin: 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.7; color: var(--text-2); }
.prose .statement { max-width: 30ch; margin: 0 0 28px; }
.method.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 64px); padding: clamp(28px, 4.5vw, 56px); align-items: start; }
.split .spec-list dt { color: var(--accent-text); font-weight: 600; }
.split .spec-list dd { font-size: 15.5px; }
.note { margin: 8px 0 0; padding: 14px 16px; border-radius: 14px; font-size: 14px; color: var(--text-2); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }

/* /services — offers */
.offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.offer { padding: clamp(24px, 3vw, 36px); }
.offer .no { display: block; margin: 22px 0 6px; font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.offer h2 { margin: 0 0 10px; font-size: clamp(22px, 2vw, 27px); font-weight: 600; line-height: 1.15; }
.offer > p { margin: 0 0 20px; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 11px 0 11px 28px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg); }
.intro-line { margin: -12px 0 28px; max-width: 60ch; color: var(--text-2); }

/* /contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-top: clamp(40px, 6vw, 88px); }
.contact .page-head { padding: 0 0 28px; }
.qs { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.qs li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; font-weight: 500; }
.qs .no { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); }
.details { padding: 22px 24px; }
.details .rows { margin: 0; }
.details .fine { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-3); }
.form-card { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); padding: clamp(24px, 3.5vw, 40px); }
.form-card .foot-h { margin-bottom: 22px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; padding: 13px 15px; border: 0; border-radius: 12px; font: 400 15px/1.4 var(--sans); color: var(--text);
  background: var(--glass); box-shadow: inset 0 1px 2px var(--shadow-near), inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.field textarea { min-height: 150px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; background-color: var(--glass); }
.field select option { color: #171513; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 1px 2px var(--shadow-near), inset 0 0 0 1.5px var(--accent); }
.submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.submit p { margin: 0; font-size: 13.5px; color: var(--text-3); }
.sent { text-align: center; padding: 24px 0; }
.sent .tile { margin: 0 auto 18px; }
.sent .h2 { margin-bottom: 10px; }
.sent p { margin: 0; color: var(--text-2); }
.map { padding: 8px; }
.map iframe { display: block; width: 100%; height: 420px; border: 0; border-radius: var(--r-photo); }

@media (max-width: 1060px) {
  .method.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .founder, .split, .offers, .contact { grid-template-columns: 1fr; }
  .method.three { grid-template-columns: 1fr; }
  .form-card { position: static; }
}
@media (max-width: 640px) {
  .fields { grid-template-columns: 1fr; }
  .founder .pj-photo .ph { min-height: 0; aspect-ratio: 1; }
  .map iframe { height: 320px; }
}

/* landing pages (cabinet, riad): hero without the side tag, 4-up projects,
   timeline, data tables, before/after photos, note boxes */
.chip .stars { gap: 1px; }
.chip .stars svg { width: 13px; height: 13px; }
.projects.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.projects.four .proj:nth-child(3) { display: block; }
.reviews.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.step .more { margin: 16px 0 0; font-size: 14px; font-weight: 500; }
.step .more a { color: var(--accent-text); text-decoration: none; }
.step .more a:hover { text-decoration: underline; text-underline-offset: 3px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .no { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.timeline h3 { margin: 4px 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.timeline p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.timeline .when { display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--accent-text); background: rgba(232, 85, 26, .12); }
.split-side { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); }
.doc-col > h3 { margin: 40px 0 8px; font-size: 21px; font-weight: 600; }
.doc-col > h3:first-child { margin-top: 0; }
.doc-col > p { margin: 0 0 18px; font-size: 15.5px; line-height: 1.75; color: var(--text-2); }
.doc-col .small-caps, .doc-col .source { font-size: 13px; color: var(--text-3); }
.doc-col .source { font-style: italic; }
.note-box { margin-top: 24px; padding: 18px 20px; border-radius: 16px; background: rgba(232, 85, 26, .08); box-shadow: inset 0 0 0 1px rgba(232, 85, 26, .22); }
.note-box .foot-h { margin-bottom: 10px; color: var(--accent-text); }
.note-box p:not(.foot-h) { margin: 0 0 10px; font-size: 14.5px; line-height: 1.7; color: var(--text-2); }
.note-box p:last-child { margin-bottom: 0; }
.note-box strong { color: var(--text); }
.table-wrap { overflow-x: auto; margin: 0 0 8px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
table.data th { text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--text-3); background: var(--glass); }
table.data td { padding: 12px 16px; vertical-align: top; color: var(--text-2); border-top: 1px solid var(--line); }
table.data td:first-child { color: var(--text); font-weight: 500; min-width: 140px; }
table.data strong { color: var(--text); }
.ba { margin-top: 28px; }
.ba-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 4px; font: 600 20px/1.3 var(--display); letter-spacing: -.02em; }
.ba-title span { font: 600 13px/1 var(--sans); letter-spacing: 0; color: var(--accent-text); }
.ba .pj-gallery { padding-top: 14px; }
.ph-43 { aspect-ratio: 4 / 3; }
.ba-cap { padding: 14px 8px 8px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.ba-cap strong { display: block; margin-bottom: 4px; font-size: 13px; color: var(--text); }
@media (max-width: 1060px) {
  .projects.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .split-side { position: static; }
  .reviews.two { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .projects.four { grid-template-columns: 1fr; }
}

/* /carrieres + /404 */
.job-meta { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 10px; }
.job-meta li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-2); }
.job-meta svg { width: 16px; height: 16px; flex: none; color: var(--accent-text); }
.doc-col .ticks { margin-bottom: 28px; }
fieldset.field { margin: 0; padding: 0; border: 0; }
fieldset.field legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: 14px; cursor: pointer; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.check:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--accent); }
.hint { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.nf { min-height: 62vh; display: grid; place-items: center; padding-top: clamp(40px, 8vw, 96px); }
.nf-card { max-width: 680px; padding: clamp(28px, 5vw, 56px); text-align: center; }
.nf-card .page-lede { margin: 0 auto 26px; }
.nf-card .actions { justify-content: center; }
.nf-num { margin: 0 0 8px; font: 700 clamp(72px, 12vw, 128px)/1 var(--display); letter-spacing: -.05em; background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 12d. Documents ----------
   Guides and articles keep their original markup inside <article class="doc glass">;
   these rules style it (headings, lists, tables, cards, FAQ, CTA, VNA form). */
.doc { max-width: 880px; margin: clamp(28px, 5vw, 64px) auto 0; padding: clamp(22px, 5vw, 64px); }
.doc > :first-child { margin-top: 0; }
.doc h1, .doc .article-title { margin: 0 0 16px; font-size: clamp(32px, 4vw, 50px); line-height: 1.06; font-weight: 600; text-wrap: balance; }
.doc .subtitle, .doc .meta, .doc .article-subtitle { margin: 0 0 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.6; color: var(--text-2); }
.doc .article-meta, .doc .updated, .doc .dl-kicker { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.doc .updated { font-weight: 500; color: var(--text-3); }
.doc .article-hero img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-photo); margin-bottom: 28px; }
.doc .article-intro { font-size: 18px; line-height: 1.7; color: var(--text); }
.doc h2 { margin: 52px 0 14px; font-size: clamp(23px, 2.2vw, 28px); line-height: 1.15; font-weight: 600; text-wrap: balance; }
.doc h3 { margin: 32px 0 10px; font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.doc p, .doc li { font-size: 16px; line-height: 1.75; color: var(--text-2); }
.doc p { margin: 0 0 18px; }
.doc ul, .doc ol { margin: 0 0 22px; padding-left: 22px; }
.doc li { margin-bottom: 8px; padding-left: 4px; }
.doc li::marker { color: var(--accent-text); }
.doc strong { color: var(--text); font-weight: 600; }
.doc a:not(.btn):not(.proj-card):not(.related-card):not(.proj-link) { color: var(--text); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; padding-bottom: 1px; transition: color .2s, background-size .2s; }
.doc a:not(.btn):not(.proj-card):not(.related-card):not(.proj-link):hover { color: var(--accent-text); background-size: 100% 2px; }
.doc .highlight, .doc .warning, .doc .author-box, .doc .toc { margin: 28px 0; padding: 18px 22px; border-radius: 16px; font-size: 15.5px; line-height: 1.7; color: var(--text-2); }
.doc .highlight { background: rgba(232, 85, 26, .08); box-shadow: inset 0 0 0 1px rgba(232, 85, 26, .22); }
.doc .warning { background: rgba(247, 179, 43, .08); box-shadow: inset 0 0 0 1px rgba(247, 179, 43, .28); }
.doc .author-box, .doc .toc { background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.doc .author-box p { margin: 0; }
.doc .author-box .author-name { margin-bottom: 6px; font-weight: 600; color: var(--text); }
.doc .author-bio { font-size: 15px; }
.doc .toc > p { margin: 0 0 8px; font-weight: 600; color: var(--text); }
.doc .toc ol { margin: 0; }
.doc .toc li { margin: 0 0 4px; font-size: 15px; }
.doc .steps { list-style: none; padding: 0; counter-reset: step; }
.doc .steps li { position: relative; padding: 4px 0 12px 46px; counter-increment: step; }
.doc .steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); }
.doc .table-wrap { margin: 0 0 24px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.doc th { text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--text-3); background: var(--glass); }
.doc td { padding: 12px 16px; vertical-align: top; color: var(--text-2); border-top: 1px solid var(--line); }
.doc td:first-child { color: var(--text); font-weight: 500; }
.doc .projects-grid, .doc .related-grid, .doc .related-links-auto > div, .doc .grid2, .doc .element-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 28px; }
.doc .grid2, .doc .element-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc .proj-card, .doc .related-card, .doc .proj-link, .doc .card, .doc .element-card { display: block; padding: 16px 18px; border-radius: 14px; text-decoration: none; background: var(--glass); box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .2s; }
.doc a.proj-card:hover, .doc a.related-card:hover, .doc a.proj-link:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 1.5px var(--accent); }
.doc .proj-link { margin: 0 0 10px; }
.doc .proj-card p, .doc .related-card p, .doc .proj-link p, .doc .card p, .doc .element-card p { margin: 0; }
.doc .proj-card-title, .doc .related-card-title, .doc .proj-link-title, .doc .card-title, .doc .element-name { font: 600 16px/1.3 var(--display); letter-spacing: -.015em; color: var(--text); }
.doc .proj-card .proj-card-meta, .doc .related-card .related-card-meta, .doc .proj-link .proj-link-meta { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--text-3); }
.doc .card .card-text, .doc .element-card .element-text { margin-top: 6px; font-size: 14.5px; line-height: 1.6; }
.doc .related, .doc .related-links-auto { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc .related-title, .doc .related-links-auto > p { margin: 0; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.doc .related + .related-links-auto { margin-top: 28px; }
.doc .faq-item { padding: 18px 0; border-top: 1px solid var(--line); }
.doc .faq-q { margin: 0 0 8px; font: 600 17px/1.35 var(--display); letter-spacing: -.015em; color: var(--text); }
.doc .faq-a { margin: 0; font-size: 15.5px; }
.doc .cta-box { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 40px 0; padding: 22px 24px; border-radius: 18px; background: linear-gradient(135deg, rgba(232, 85, 26, .16), rgba(232, 85, 26, .04)); box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 1px rgba(232, 85, 26, .28); }
.doc .cta-box p { flex: 1 1 280px; margin: 0; font-weight: 500; color: var(--text); }
.doc .sources, .doc .sources li { font-size: 14px; color: var(--text-3); }
.doc .dl-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin: 40px 0; padding: clamp(20px, 3vw, 30px); border-radius: 18px; background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 1px var(--line), 0 20px 40px -24px var(--shadow); }
.doc .dl-title { font: 600 21px/1.25 var(--display); letter-spacing: -.02em; color: var(--text); }
.doc .dl-form { display: grid; gap: 8px; }
.doc .dl-form label { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.doc .dl-form input, .doc .dl-form select { width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; font: 400 15px/1.4 var(--sans); color: var(--text); background: var(--glass); box-shadow: inset 0 1px 2px var(--shadow-near), inset 0 0 0 1px var(--line); }
.doc .dl-form select option { color: #171513; }
.doc .dl-form input:focus, .doc .dl-form select:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); }
.doc .dl-form .btn { margin-top: 12px; justify-self: start; }
.doc .dl-note { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-3); }
.doc .dl-success { display: grid; gap: 14px; align-content: start; }
.doc .dl-success[hidden] { display: none; }
@media (max-width: 760px) {
  .doc .projects-grid, .doc .related-grid, .doc .related-links-auto > div, .doc .grid2, .doc .element-grid, .doc .dl-box { grid-template-columns: 1fr; }
  .doc .cta-box .btn { width: 100%; white-space: normal; }
  .doc { padding: 22px 18px; }
  .doc table:has(tr > :nth-child(3)) { min-width: 560px; }
}

/* ---------- 13. Footer ---------- */
.site-foot { padding: clamp(72px, 10vw, 120px) 0 calc(28px + env(safe-area-inset-bottom, 0px)); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 32px; padding: clamp(24px, 4vw, 40px); }
.foot-h { margin: 0 0 14px; font: 600 13px/1 var(--sans); letter-spacing: 0; color: var(--text-3); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-grid a { text-decoration: none; color: var(--text-2); font-size: 14px; transition: color .2s; }
.foot-grid a:hover { color: var(--text); }
.foot-brand p { margin: 14px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.6; max-width: 30ch; }
.foot-brand .tagline { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.foot-grid address { font-style: normal; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 20px 4px 0; font-size: 13px; color: var(--text-3); }
.foot-bottom nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-bottom a { color: var(--text-3); text-decoration: none; }
.foot-bottom a:hover { color: var(--text); }
.foot-bottom [lang="ar"] { font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; letter-spacing: 0; }

/* ---------- 14. Motion ----------
   components.js adds .rv to <html> and .in to each .reveal as it scrolls into view.
   Without JS nothing is hidden. */
.rv .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv .reveal.in { opacity: 1; transform: none; }
.rv .proj.reveal.in:hover { transform: translateY(-6px); }
.rv .svc.reveal.in:hover { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) {
  .v2 *, .v2 *::before, .v2 *::after { transition: none !important; scroll-behavior: auto !important; }
  .rv .reveal { opacity: 1; transform: none; }
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1060px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-card { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  #main-nav .nav-links, #main-nav .lang { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile { display: flex; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects .proj:nth-child(3) { display: none; }
  .method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approach, .cta, .faq { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { box-shadow: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--edge); }
}
@media (max-width: 640px) {
  .brand-name { display: none; }
  /* phone hero: photo at 4:3, copy below it on the page instead of over a tall crop */
  .hero { margin-top: 16px; }
  .hero-media { height: auto; min-height: 0; overflow: visible; border-radius: 0; color: var(--text); box-shadow: none; }
  .hero-media::after { display: none; }
  .hero-media > img { position: static; display: block; height: auto; aspect-ratio: 4 / 3; border-radius: 18px; box-shadow: 0 24px 48px -24px var(--shadow); }
  .hero-tag { top: 10px; left: 10px; right: auto; padding: 6px 12px 6px 6px; border-radius: 14px; }
  .hero-tag img { width: 34px; height: 34px; border-radius: 9px; }
  .hero-copy { position: static; padding: 24px 0 0; }
  .hero h1 { font-size: clamp(32px, 9vw, 42px); text-shadow: none; margin-top: 16px; }
  .hero h1 span { color: var(--text-3); }
  .hero .lede { color: var(--text-2); }
  .hero-copy .glass.on-photo { --glass: inherit; --sheen: inherit; --spec: inherit; --inner-shade: inherit; --rim-hi: inherit; --rim-lo: inherit; --edge: inherit; --shadow: inherit; --shadow-near: inherit; color: var(--text); }
  .actions .btn { flex: 1 1 auto; }
  .stats { margin: 28px 0 0; }
  .stat { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .projects, .services, .method, .reviews, .foot-grid { grid-template-columns: 1fr; }
  .projects .proj:nth-child(3) { display: block; }
  .score-card { flex-direction: column; align-items: flex-start; }
  .faq-item { padding: 20px 20px 22px; }
}

/* ---------- 16. Arabic (right-to-left) ----------
   Only /ar/ (<html lang="ar" dir="rtl">). Grids and flex rows mirror on their own;
   these rules handle the rest:
   - Arabic letters are never letter-spaced: spacing breaks the joining between letters.
   - Inter has no Arabic glyphs, so IBM Plex Sans Arabic draws the Arabic text
     (Latin words such as project names stay in Inter).
   - Arabic needs taller lines than Latin display type.
   - Anything that points or sits on one side (arrows, photo tags, hero shading) is flipped. */
html[dir="rtl"] {
  --display: 'Inter Tight', 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', 'IBM Plex Sans Arabic', system-ui, sans-serif;
}
html[dir="rtl"] .v2 *, html[dir="rtl"] .v2 *::before, html[dir="rtl"] .v2 *::after { letter-spacing: 0 !important; }
html[dir="rtl"] .v2 h1, html[dir="rtl"] .v2 h2, html[dir="rtl"] .v2 h3 { line-height: 1.35; }
html[dir="rtl"] .hero h1 { line-height: 1.3; }
html[dir="rtl"] .v2 p, html[dir="rtl"] .v2 li { line-height: 1.85; }
html[dir="rtl"] .hero-media::after { background:
  linear-gradient(270deg, rgba(10, 9, 8, .62) 0%, rgba(10, 9, 8, .25) 45%, rgba(10, 9, 8, 0) 70%),
  linear-gradient(180deg, rgba(8, 12, 24, .38) 0%, rgba(8, 12, 24, 0) 24%, rgba(10, 10, 12, 0) 45%, rgba(10, 9, 8, .72) 100%); }
html[dir="rtl"] .hero-tag { right: auto; left: clamp(16px, 3vw, 32px); padding: 8px 8px 8px 16px; }
html[dir="rtl"] .ph .tag { left: auto; right: 10px; }
html[dir="rtl"] .cta::after { right: auto; left: -16%; }
html[dir="rtl"] .ico, html[dir="rtl"] .arrow svg { transform: scaleX(-1); }
html[dir="rtl"] .arrow.back svg { transform: none; }
html[dir="rtl"] .btn:hover .ico { transform: scaleX(-1) translateX(3px); }
html[dir="rtl"] .proj:hover .arrow, html[dir="rtl"] .svc:hover .arrow { transform: rotate(45deg); }
html[dir="rtl"] .pj-nav .next span:first-child { text-align: left; }
html[dir="rtl"] .ticks li { padding: 11px 28px 11px 0; }
html[dir="rtl"] .ticks li::before { left: auto; right: 2px; }
html[dir="rtl"] table.data th, html[dir="rtl"] .doc th { text-align: right; }
@media (max-width: 640px) {
  html[dir="rtl"] .hero-tag { left: auto; right: 10px; padding: 6px 6px 6px 12px; }
}
