/* Persomy — feuille de style publique. Propriétés logiques utilisées pour le RTL (arabe). */
:root {
  --ink: #130a1f;
  --muted: #58476f;
  --black: #08040e;
  --navy: #10081c;
  --navy-2: #23123c;
  --blue: #402371;
  --blue-dark: #2b1850;
  --blue-light: #b39ddb;
  --soft: #f7f4fc;
  --line: #e5ddf1;
  --line-dark: rgba(255, 255, 255, .12);
  --white: #fff;
  --ok: #0a6b3d;
  --err: #b3261e;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(16, 8, 28, .04), 0 10px 30px rgba(16, 8, 28, .06);
  --shadow-lg: 0 24px 60px rgba(16, 8, 28, .16);
  --glow: 0 10px 30px rgba(64, 35, 113, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.025em; font-weight: 750; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
/* L'arabe est cursif : aucun espacement de lettres, aucune casse forcée. */
[dir="rtl"] :is(h1, h2, h3, .eyebrow, .footer-title, .btn, .chip, .tag) { letter-spacing: normal; text-transform: none; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

.container { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--white); color: var(--ink); padding: .6rem 1rem; z-index: 100; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); color: var(--ink); transition: box-shadow .3s; }
.site-header.is-scrolled { box-shadow: 0 8px 28px rgba(16, 8, 28, .08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-mark { flex: none; display: block; }
.brand img { display: block; height: 46px; width: auto; max-width: 240px; object-fit: contain; }
@media (max-width: 480px) { .brand img { height: 38px; } }
.brand-text { font-weight: 800; letter-spacing: .2em; font-size: 1.05rem; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-nav a { display: block; padding: .5rem .9rem; border-radius: 999px; text-decoration: none; color: #45335f; font-weight: 500; font-size: .96rem; transition: background-color .2s, color .2s; }
.site-nav a:hover { background: var(--soft); color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--blue-dark); background: #f1ecf9; box-shadow: inset 0 0 0 1px rgba(64, 35, 113, .22); }
.lang-menu { position: relative; border-inline-start: 1px solid var(--line); padding-inline-start: .75rem; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--navy); font-size: .85rem; font-weight: 600; cursor: pointer; user-select: none; transition: border-color .2s, background-color .2s; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; width: .4rem; height: .4rem; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--ease); }
.lang-menu[open] summary::after { transform: translateY(1px) rotate(225deg); }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--blue); background: var(--soft); }
.lang-menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + .5rem); z-index: 60; min-width: 9.5rem; flex-direction: column; align-items: stretch; gap: .1rem; padding: .35rem; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.lang-menu ul a { font-size: .9rem; padding: .45rem .8rem; border-radius: 10px; }
.lang-menu ul a[aria-current="true"] { background: var(--soft); color: var(--blue-dark); font-weight: 700; box-shadow: none; }
.nav-toggle { display: none; background: var(--white); border: 1px solid var(--line); border-radius: 12px; width: 46px; height: 46px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--navy); content: ""; position: relative; transition: transform .25s var(--ease), background-color .2s; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.is-open .nav-toggle-bars { background: transparent; }
.is-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.is-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  /* Le menu n'est replié que si le JavaScript est actif (classe ajoutée par app.js). */
  .site-header.js-nav .nav-toggle { display: inline-flex; }
  .site-header.js-nav .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 1rem; }
  .site-header.js-nav.is-open .site-nav { display: flex; }
  .site-header.js-nav .site-nav ul { flex-direction: column; align-items: stretch; }
  .lang-menu { border: 0; padding: 0; }
  .lang-menu ul { position: static; margin-top: .5rem; box-shadow: none; }
}

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .9rem 1.6rem; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, color .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: var(--white); box-shadow: 0 10px 26px rgba(64, 35, 113, .28); }
.btn-primary:hover { color: var(--white); box-shadow: 0 14px 34px rgba(64, 35, 113, .42); }
.btn-ghost { border-color: #d0bceb; background: var(--white); color: var(--navy); }
.btn-ghost:hover { background: #f6f2fb; border-color: var(--blue); color: var(--blue-dark); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-arrow::after { content: "→"; content: "→" / ""; transition: transform .25s var(--ease); }
.btn-arrow:hover::after { transform: translateX(4px); }
[dir="rtl"] .btn-arrow::after { content: "←"; content: "←" / ""; }
[dir="rtl"] .btn-arrow:hover::after { transform: translateX(-4px); }

/* Bandeaux */
/* Bandeaux clairs : halos bleus pastel + grille discrète (CSS pur, compatible CSP). */
.hero, .page-hero { position: relative; isolation: isolate; overflow: hidden; background: #faf8fd; color: var(--ink); }
.hero::before, .page-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(55% 65% at 92% 0%, rgba(64, 35, 113, .17), transparent 70%), radial-gradient(45% 55% at 0% 100%, rgba(194, 168, 230, .3), transparent 70%), linear-gradient(180deg, #fff 0%, #f5f1fb 100%); }
.hero::after, .page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(64, 35, 113, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(64, 35, 113, .07) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(75% 80% at 65% 20%, #000 15%, transparent 75%); mask-image: radial-gradient(75% 80% at 65% 20%, #000 15%, transparent 75%); }
[dir="rtl"] :is(.hero, .page-hero)::before, [dir="rtl"] :is(.hero, .page-hero)::after { transform: scaleX(-1); }

.hero { padding-block: clamp(4rem, 10vw, 8rem); }
.hero-grid { display: grid; gap: 3rem; align-items: center; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.hero-inner { max-width: 760px; }
.hero-inner > * { animation: rise .9s var(--ease) both; }
.hero-inner > :nth-child(2) { animation-delay: .08s; }
.hero-inner > :nth-child(3) { animation-delay: .16s; }
.hero-inner > :nth-child(4) { animation-delay: .24s; }
.hero-inner > :nth-child(5) { animation-delay: .32s; }
.hero h1, .page-hero h1 { color: var(--navy); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1, .page-hero h1 { background: linear-gradient(180deg, var(--navy) 30%, var(--blue-dark) 120%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}
.hero h1 { font-size: clamp(2.5rem, 5.8vw, 4.5rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 800; margin-bottom: .45em; }
[dir="rtl"] .hero h1 { line-height: 1.25; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; padding: .4rem .95rem; margin-bottom: 1.5rem; border: 1px solid rgba(64, 35, 113, .22); border-radius: 999px; background: var(--white); text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--blue-dark); }
.eyebrow::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(64, 35, 113, .16); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 2.5rem 0 0; font-size: .9rem; color: var(--muted); }
.hero-meta-label { margin-inline-end: .35rem; }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--navy); font-weight: 600; }
.pill::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: var(--blue); }

.hero-visual { justify-self: center; width: min(100%, 460px); }
.hero-visual svg { display: block; width: 100%; height: auto; overflow: visible; }
.orbit { transform-box: view-box; transform-origin: 240px 240px; animation: spin 90s linear infinite; }
.orbit-rev { animation-duration: 60s; animation-direction: reverse; }
.node { transform-box: fill-box; transform-origin: center; animation: pulse 3.6s ease-in-out infinite; }
.node:nth-of-type(2n) { animation-delay: -1.2s; }
.node:nth-of-type(3n) { animation-delay: -2.4s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

.page-hero { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.page-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); letter-spacing: -.035em; font-weight: 800; margin-bottom: .4em; }
.page-hero .lead { margin: 0; }
.page-hero a { color: var(--blue-dark); }
.link-back { font-size: .95rem; }
.cta-band { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(120deg, #f1ecf9, #faf8fd); color: var(--ink); border-block: 1px solid #e5daf4; padding-block: clamp(3rem, 6vw, 4.75rem); }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(45% 140% at 95% 0%, rgba(64, 35, 113, .14), transparent 70%); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.75rem; flex-wrap: wrap; }
.cta-inner h2 { margin-bottom: .3em; color: var(--navy); font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.cta-inner p { margin: 0; color: var(--muted); max-width: 56ch; }

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-soft { background: var(--soft); }
.section:not(.section-soft) + .section:not(.section-soft) { border-top: 1px solid var(--line); }
.section-head { max-width: 700px; margin-bottom: 3rem; }
.section-head h2 { position: relative; padding-top: 1.15rem; }
.section-head h2::before { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 44px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--blue-light)); }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-more { margin-top: 2.5rem; }
.grid { display: grid; gap: 1.5rem; counter-reset: svc; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
/* Les cartes de la dernière ligne s'élargissent pour remplir l'espace. */
.grid-fill { display: flex; flex-wrap: wrap; gap: 1.5rem; counter-reset: svc; }
.grid-fill > * { flex: 1 1 300px; }

.card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d6c4ee; }
.card-body { padding: 1.4rem 1.5rem 1.6rem; }
.service-card { isolation: isolate; padding: 2rem 1.8rem 2.1rem; counter-increment: svc; }
.service-card::before { content: counter(svc, decimal-leading-zero); content: counter(svc, decimal-leading-zero) / ""; position: absolute; inset-block-start: 1.3rem; inset-inline-end: 1.5rem; font-weight: 800; font-size: .85rem; letter-spacing: .08em; color: #bdaad8; }
.service-card::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(64, 35, 113, .11), transparent 65%); }
.service-card:hover::after { opacity: 1; }
.service-card p { color: var(--muted); margin: 0; }
.card-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: var(--white); box-shadow: 0 8px 20px rgba(64, 35, 113, .3); margin-bottom: 1.3rem; transition: transform .35s var(--ease); }
.card:hover .card-icon { transform: rotate(-6deg) scale(1.06); }
.card-title { margin-bottom: .45em; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--blue-dark); }
.project-media { display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #eee6f8, #dccdf1); }
.project-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.project-card:hover .project-media img { transform: scale(1.05); }
.project-placeholder { display: grid; place-items: center; height: 100%; color: var(--blue-dark); font-size: 3.5rem; font-weight: 800; background-image: linear-gradient(rgba(64, 35, 113, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(64, 35, 113, .1) 1px, transparent 1px); background-size: 32px 32px; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; content: " →" / ""; display: inline-block; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
[dir="rtl"] .link-arrow::after { content: " ←"; content: " ←" / ""; }
[dir="rtl"] .link-arrow:hover::after { transform: translateX(-4px); }
.meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; background: var(--soft); color: var(--blue-dark); border: 1px solid var(--line); }
.tag-demo { background: #fff4d6; color: #6b4a00; border-color: #f0d98a; }
.tag-lang { background: var(--navy); color: var(--white); border-color: var(--navy); }

.steps { list-style: none; display: grid; gap: 2rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 600px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; position: relative; padding-top: 4.4rem; }
.step::before { content: counter(step, decimal-leading-zero); position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 1; width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: var(--white); background: linear-gradient(135deg, var(--blue), var(--blue-dark)); box-shadow: 0 0 0 6px rgba(64, 35, 113, .2); }
.step p { color: var(--muted); margin: 0; }
@media (min-width: 960px) {
  .step::after { content: ""; position: absolute; inset-block-start: 1.5rem; inset-inline-start: 3.9rem; inset-inline-end: -1.6rem; height: 2px; background: linear-gradient(90deg, rgba(64, 35, 113, .4), rgba(64, 35, 113, .04)); }
  [dir="rtl"] .step::after { background: linear-gradient(270deg, rgba(64, 35, 113, .4), rgba(64, 35, 113, .04)); }
  .step:last-child::after { display: none; }
}

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.chip { padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .95rem; background: var(--white); transition: border-color .2s, background-color .2s, color .2s; }
.chip:hover { border-color: var(--blue); color: var(--blue-dark); }
.chip[aria-current="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.empty { color: var(--muted); font-size: 1.1rem; }
.empty-state { display: grid; justify-items: center; text-align: center; gap: .5rem; max-width: 720px; margin-inline: auto; padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; border: 1.5px dashed #c5b6db; border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--white), var(--soft)); }
.empty-state .card-icon { margin-bottom: 1rem; }
.empty-state p { color: var(--muted); font-size: 1.1rem; max-width: 46ch; margin-bottom: 1rem; }

.prose { max-width: 760px; font-size: 1.08rem; }
.prose-after { margin-top: 3rem; }
.prose h2 { margin-top: 1.8em; }
.prose ul { padding-inline-start: 1.3rem; margin-bottom: 1em; }
.prose li { margin-bottom: .35em; }
.project-figure { margin: 0 0 2.5rem; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); max-width: 960px; }
.project-figure img { display: block; width: 100%; height: auto; }

.notice { background: #f6f2fb; border: 1px solid #e2d5f3; border-inline-start: 4px solid var(--blue); padding: .75rem 1rem; border-radius: 8px; font-size: .95rem; color: var(--ink); }
.hero .notice { margin-top: 1.5rem; }
.notice-demo { background: #fff8e1; border-color: #f0d98a; }

/* Contact */
.contact-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 2.5rem); }
.form { display: grid; gap: 1.25rem; max-width: 640px; }
.form-note { color: var(--muted); font-size: .92rem; margin: 0; }
.field label { display: block; font-weight: 600; margin-bottom: .4rem; }
.optional { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; color: var(--ink); background: var(--white);
  border: 1.5px solid #c5b6db; border-radius: 12px; transition: border-color .2s, box-shadow .2s;
}
input:hover, select:hover, textarea:hover { border-color: #a78fc8; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px rgba(64, 35, 113, .18); }
[aria-invalid="true"] { border-color: var(--err); }
.field-error { color: var(--err); font-size: .92rem; margin: .35rem 0 0; font-weight: 500; }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; }
.field-check input { margin-top: .4rem; width: 1.15rem; height: 1.15rem; }
.field-check label { font-weight: 400; margin: 0; }
.field-check .field-error { grid-column: 1 / -1; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; max-width: 640px; }
.alert h2 { font-size: 1.3rem; margin-bottom: .3em; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert-success { background: #e8f6ee; border: 1px solid #9fd5b5; color: #06331c; }
.alert-error { background: #fdeceb; border: 1px solid #f1b3ae; color: #5f130e; }
.alert-error a { color: inherit; }
.alert ul { padding-inline-start: 1.2rem; }
.contact-aside { position: sticky; inset-block-start: 6rem; background: linear-gradient(160deg, #f3eefa, var(--white)); color: var(--ink); border: 1px solid #e0d4f2; border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }
.contact-aside h2 { font-size: 1.25rem; color: var(--navy); }
.contact-aside p { color: var(--muted); margin: 0; }
.details dt { font-weight: 700; margin-top: 1.1rem; }
.details dd { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .contact-aside { position: static; } }

/* Pied de page */
.site-footer { position: relative; background: var(--soft); color: var(--muted); border-top: 1px solid var(--line); padding-top: 4rem; }
.site-footer::before { content: ""; position: absolute; inset-block-start: -1px; inset-inline: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--blue), transparent); }
.site-footer a { color: #45335f; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--blue-dark); text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 2fr 1fr 1.4fr; padding-bottom: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { color: var(--navy); font-weight: 800; letter-spacing: .18em; font-size: 1.1rem; margin-bottom: .75rem; }
.footer-text { max-width: 38ch; font-size: .95rem; }
.footer-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--navy); margin-bottom: .8rem; }
.footer-list { list-style: none; display: grid; gap: .45rem; font-size: .95rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: 1.25rem; font-size: .88rem; }
.footer-bottom p { margin: 0; }
.footer-legal { list-style: none; display: flex; gap: 1.25rem; }

.error-page { min-height: 70vh; display: grid; align-items: center; }

/* Bandeau de consentement (cookies de mesure d'audience) */
.consent { position: fixed; inset-inline: 1rem; inset-block-end: 1rem; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; flex-wrap: wrap; max-width: 960px; margin-inline: auto; padding: 1.25rem 1.5rem; background: rgba(255, 255, 255, .98); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(16, 8, 28, .22); }
.consent[hidden] { display: none; }
.consent-body { flex: 1 1 320px; }
.consent-title { font-size: 1.05rem; color: var(--navy); margin: 0 0 .25rem; letter-spacing: normal; }
.consent p { margin: 0; font-size: .95rem; color: var(--muted); }
.consent a { color: var(--blue-dark); }
.consent-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.consent .btn { padding: .7rem 1.4rem; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: #45335f; cursor: pointer; }
.link-button:hover { color: var(--blue-dark); text-decoration: underline; }
.link-button[hidden] { display: none; }
.debug { background: #111; color: #9f9; padding: 1rem; overflow: auto; font-size: .85rem; direction: ltr; text-align: left; }

/* Apparition au défilement (classe ajoutée par app.js uniquement) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.grid > .reveal:nth-child(3n + 2), .grid-fill > .reveal:nth-child(3n + 2) { transition-delay: .08s; }
.grid > .reveal:nth-child(3n), .grid-fill > .reveal:nth-child(3n), .steps > .reveal:nth-child(3) { transition-delay: .16s; }
.steps > .reveal:nth-child(2n) { transition-delay: .08s; }
.steps > .reveal:nth-child(4) { transition-delay: .24s; }

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

/* --- Blog --- */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .25rem 0 1rem; color: var(--muted); font-size: .9rem; }
.page-hero .post-meta { margin-top: 1.25rem; }
a.tag { text-decoration: none; transition: border-color .2s, background-color .2s; }
a.tag:hover { border-color: var(--blue); background: var(--white); }
.article { max-width: 820px; }
.article .prose { max-width: none; }
.article .prose a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.article .prose a:hover { color: var(--blue); }
.article .prose h3 { margin-top: 1.5em; }
.article .project-figure { max-width: none; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; margin-top: 3rem; }
.pagination-info { color: var(--muted); font-size: .95rem; }

/* --- Carrousel de logos clients (défilement automatique, CSS seul) --- */
.logos { padding-block: clamp(2rem, 4vw, 3rem); border-block: 1px solid var(--line); background: var(--white); }
.logos-title { margin: 0 0 1.5rem; text-align: center; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .logos-title { letter-spacing: normal; text-transform: none; }
.logo-marquee { --logo-gap: 3.5rem; display: flex; overflow: hidden; direction: ltr; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.logo-group { display: flex; flex-shrink: 0; align-items: center; justify-content: space-around; gap: var(--logo-gap); min-width: 100%; padding-inline-end: var(--logo-gap); list-style: none; animation: logos-scroll 40s linear infinite; }
.logo-marquee.is-long .logo-group { animation-duration: 80s; }
.logo-marquee:hover .logo-group { animation-play-state: paused; }
.logo-item { flex: 0 0 auto; display: grid; place-items: center; }
.logo-item img { display: block; height: 48px; width: auto; max-width: 170px; object-fit: contain; filter: grayscale(1); opacity: .65; transition: filter .3s, opacity .3s; }
.logo-item img:hover { filter: none; opacity: 1; }
@keyframes logos-scroll { to { transform: translateX(-100%); } }
@media (max-width: 600px) {
  .logo-marquee { --logo-gap: 2.25rem; }
  .logo-item img { height: 36px; max-width: 120px; }
}

/* Mouvement réduit : logos statiques, sur plusieurs lignes, sans doublons */
@media (prefers-reduced-motion: reduce) {
  .logo-marquee { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .logo-group { flex-wrap: wrap; justify-content: center; min-width: 0; padding-inline: 1.25rem; }
  .logo-item.logo-dup, .logo-group[aria-hidden="true"] { display: none; }
}

/* --- Page À propos --- */
.about-hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(180deg, #f7f4fc, var(--white)); }
.about-hero::before { content: ""; position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-end: -10%; width: 55%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(64, 35, 113, .14), transparent); }
.about-hero .lead { font-size: 1.35rem; color: var(--navy); font-weight: 500; max-width: 40ch; }
.about-hero .hero-meta { margin-top: 2rem; }

.story { display: grid; gap: 2.5rem 4rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.story-lead { padding-inline-start: 1.5rem; border-inline-start: 4px solid var(--blue); }
.story-lead p { margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.5; font-weight: 600; color: var(--navy); }
.story-more p { color: var(--muted); font-size: 1.08rem; }
.story-more p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } }

.mission { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-start; gap: clamp(1.25rem, 3vw, 2.5rem); padding: clamp(1.75rem, 5vw, 3.5rem); border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--blue-dark), var(--navy)); color: #f1ebfa; box-shadow: var(--shadow-lg); }
.mission::before { content: ""; position: absolute; z-index: -1; inset-block-start: -45%; inset-inline-end: -8%; width: 50%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(179, 157, 219, .35), transparent); }
.mission-icon { flex: 0 0 auto; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: var(--white); }
.mission-icon .icon { width: 36px; height: 36px; }
.mission-label { margin: 0 0 .9rem; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-light); }
[dir="rtl"] .mission-label { letter-spacing: normal; text-transform: none; }
.mission-text { margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.7rem); line-height: 1.5; font-weight: 600; color: var(--white); }
.mission .note { color: #c9b9e4; border-color: rgba(255, 255, 255, .28); }
@media (max-width: 600px) { .mission { flex-direction: column; } }

.note { margin: 1.5rem 0 0; padding-inline-start: .9rem; border-inline-start: 3px solid var(--line); font-size: .9rem; font-style: italic; color: var(--muted); }

.value-list { list-style: none; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.value-list > .value:last-child:nth-child(odd) { grid-column: 1 / -1; }
.value { display: flex; align-items: flex-start; gap: 1.1rem; padding: 1.4rem 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .3s var(--ease), border-color .3s; }
.value:hover { transform: translateY(-3px); border-color: #cdb8ea; }
.value-icon { flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); color: var(--blue); }
.value h3 { margin: 0 0 .25rem; font-size: 1.1rem; color: var(--navy); }
.value p { margin: 0; color: var(--muted); }

.presence { display: grid; gap: 2.5rem 4rem; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; }
.presence-text p { color: var(--muted); font-size: 1.08rem; }
.presence-text p:last-child { margin-bottom: 0; }
.presence-label { margin: 0 0 1rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .presence-label { letter-spacing: normal; text-transform: none; }
.city-list { list-style: none; display: grid; gap: 1rem; }
.city-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.city-pin { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: var(--white); }
.city-name { font-size: 1.35rem; font-weight: 800; color: var(--navy); }
@media (max-width: 860px) { .presence { grid-template-columns: 1fr; } }

.cta-inner p + p { margin-top: .6rem; }
.cta-inner .cta-strong { color: var(--navy); font-weight: 700; }
