/* ==========================================================
   ID Engineering – feuille de style principale
   Couleurs tirées du logo : violet #58417A
   ========================================================== */

:root {
  --brand: #58417a;
  --brand-600: #4c3869;
  --brand-700: #3f2e58;
  --brand-900: #241933;
  --brand-300: #a993cc;
  --brand-100: #ece6f5;
  --brand-50: #f7f4fb;
  --ink: #1e1a27;
  --muted: #5d566b;
  --line: #e3dcee;
  --white: #ffffff;
  --ok: #1f7a4d;
  --error: #b42318;

  --font-head: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(36, 25, 51, .06), 0 8px 24px rgba(36, 25, 51, .08);
  --shadow-lg: 0 20px 50px rgba(36, 25, 51, .18);
  --header-h: 76px;
}

html[lang="ar"] {
  --font-head: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--brand-900); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 3px; border-radius: 6px; }

.sprite { display: none; }
.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.i.back { transform: scaleX(-1); }
[dir="rtl"] .i.back { transform: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--brand); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.4em;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  transition: transform .2s, background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: var(--white); box-shadow: 0 6px 18px rgba(88, 65, 122, .3); }
.btn-primary:hover { background: var(--brand-700); }
.btn-light { background: var(--white); color: var(--brand-700); }
.btn-light:hover { background: var(--brand-100); }
.btn-ghost { border-color: rgba(255, 255, 255, .6); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--brand-700); }
.btn-outline:hover { border-color: var(--brand); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: wait; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link { font-weight: 600; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(36, 25, 51, .06); }
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand img { height: 56px; width: auto; }

.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  display: block; padding: 8px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: var(--brand); background: var(--brand-50); }
.main-nav .nav-contact a { background: var(--brand); color: var(--white); padding-inline: 16px; border-radius: 999px; margin-inline-start: 6px; }
.main-nav .nav-contact a:hover, .main-nav .nav-contact a.active { background: var(--brand-700); color: var(--white); }

.header-tools { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  padding: 4px; border: 1px solid var(--line); border-radius: 999px; color: var(--brand);
}
.lang-switch > .i { margin-inline: 6px 2px; width: 18px; height: 18px; }
.lang-switch button {
  min-width: 36px; height: 34px; padding: 0 8px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); font-weight: 700; font-size: .875rem;
}
.lang-switch button[lang="ar"] { font-family: "Cairo", sans-serif; font-size: 1rem; }
.lang-switch button:hover { background: var(--brand-50); }
.lang-switch button[aria-pressed="true"] { background: var(--brand); color: var(--white); }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); color: var(--brand-900); align-items: center; justify-content: center;
}
.nav-toggle .i { width: 24px; height: 24px; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 1240px) {
  .nav-toggle { display: inline-flex; }
  .header-tools { margin-inline-start: auto; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    background: var(--white); border-top: 1px solid var(--line); box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 4px; }
  .main-nav a { padding: 14px 16px; font-size: 1.05rem; }
  .main-nav .nav-contact a { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 520px) {
  :root { --header-h: 68px; }
  .brand img { height: 40px; }
  .lang-switch > .i { display: none; }
  .lang-switch button { min-width: 32px; padding: 0 6px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(169, 147, 204, .35), transparent 60%),
    linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 45%, var(--brand) 100%);
  padding: clamp(64px, 10vw, 120px) 0 clamp(72px, 10vw, 128px);
}
.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.hero-deco .ring {
  position: absolute; width: 720px; height: 520px; inset-inline-end: -180px; top: -120px;
  border: 14px solid rgba(255, 255, 255, .07); border-radius: 50%; transform: rotate(-12deg);
}
.hero-deco .arrow {
  position: absolute; width: 140px; inset-inline-start: 46%; bottom: -40px; fill: rgba(255, 255, 255, .06);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }
.hero h1 { color: var(--white); font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; margin-bottom: 20px; }
.hero h1 .hl { display: block; color: #d9cbf0; font-weight: 600; font-size: .62em; margin-top: .4em; }
.hero .lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: rgba(255, 255, 255, .88); max-width: 34em; margin-bottom: 32px; }
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  font-size: .9rem; font-weight: 600; margin-bottom: 20px;
}

/* Citation à droite du titre */
.hero-quote {
  position: relative; margin: 0; padding: 40px 36px 32px;
  border-radius: 22px; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .18);
  border-inline-start: 4px solid #d9cbf0;
}
.quote-mark {
  position: absolute; top: -30px; inset-inline-start: 24px;
  font-family: Georgia, serif; font-size: 7rem; line-height: 1; color: #f5c842;
}
.hero-quote blockquote { margin: 0; }
/* Handwritten yellow quote */
.hero-quote p {
  margin: 0; color: #f5c842;
  font-family: "Dancing Script", "Segoe Script", cursive; font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.3;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .25);
}
html[lang="ar"] .hero-quote p { font-family: "Aref Ruqaa", serif; font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.8; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-tint { background: var(--brand-50); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p:last-child { color: var(--muted); font-size: 1.1rem; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px;
  color: var(--brand); font-family: var(--font-head); font-weight: 700; font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase;
}
html[lang="ar"] .kicker { letter-spacing: 0; font-size: .95rem; }
.kicker::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--brand-300); }
.title { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
.text-lg { font-size: 1.2rem; color: var(--brand-900); }

.icon-box {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 54px; height: 54px; border-radius: 14px; background: var(--brand-100); color: var(--brand);
}
.icon-box .i { width: 26px; height: 26px; }
.icon-box.sm { width: 44px; height: 44px; border-radius: 12px; }
.icon-box.sm .i { width: 22px; height: 22px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.about-grid p { color: var(--muted); }
.about-grid .text-lg { color: var(--brand-900); }
.pillars { display: grid; gap: 16px; }
.pillar {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  box-shadow: var(--shadow);
}
.pillar h3 { font-size: 1.2rem; margin-bottom: 4px; }
.pillar p { margin: 0; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Expertise cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; height: 100%; width: 100%;
  padding: 26px; text-align: start; color: inherit;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-300); }
.card-btn h3 { font-size: 1.15rem; margin: 6px 0 0; }
.card-btn .clamp {
  color: var(--muted); margin: 0; font-size: .98rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; color: var(--brand); font-weight: 700; }
.card-btn:hover .more .i { transform: translateX(4px); }
[dir="rtl"] .card-btn:hover .more .i { transform: scaleX(-1) translateX(4px); }
.more .i { transition: transform .2s; }

/* Training tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.tile-btn {
  display: flex; align-items: center; gap: 16px; width: 100%; height: 100%;
  padding: 18px 20px; text-align: start; color: inherit;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tile-btn:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile-text { display: flex; flex-direction: column; flex: 1; }
.tile-text strong { font-family: var(--font-head); color: var(--brand-900); font-size: 1.05rem; }
.tile-text span { color: var(--muted); font-size: .94rem; line-height: 1.45; }
.chev { color: var(--brand); }
@media (max-width: 400px) { .tiles { grid-template-columns: 1fr; } }

/* Why us */
.section-dark { background: linear-gradient(160deg, var(--brand-900), var(--brand-700)); color: var(--white); }
.section-dark .title, .section-dark h3 { color: var(--white); }
.section-dark .kicker { color: #d9cbf0; }
.section-dark .section-head p:last-child { color: rgba(255, 255, 255, .8); }
.why-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.why-list li {
  padding: 26px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  transition: background-color .25s, transform .25s;
}
.why-list li:hover { background: rgba(255, 255, 255, .11); transform: translateY(-4px); }
.why-list .icon-box { background: rgba(255, 255, 255, .12); color: #e5dbf6; margin-bottom: 16px; }
.why-list h3 { font-size: 1.15rem; }
.why-list p { margin: 0; color: rgba(255, 255, 255, .8); }

/* Key figures */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.stat {
  text-align: center; padding: 34px 20px; border-radius: var(--radius);
  background: var(--brand-50); border: 1px solid var(--line);
}
.stat-num { font-family: "Exo 2", sans-serif; font-size: clamp(2.6rem, 5vw, 3.4rem); font-weight: 700; color: var(--brand); line-height: 1; margin-bottom: 12px; direction: ltr; }
.stat p:last-child { margin: 0; color: var(--muted); font-weight: 600; }

/* References */
.refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ref {
  display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 20px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-align: center;
  transition: box-shadow .2s, border-color .2s;
}
.ref:hover { box-shadow: var(--shadow); border-color: var(--brand-300); }
.ref img { max-height: 84px; max-width: 80%; width: auto; height: auto; object-fit: contain; }
.ref-name { font-family: "Exo 2", var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--brand-700); letter-spacing: .02em; }
.ref-name small { display: block; font-size: .7em; font-weight: 500; color: var(--muted); }
.ref-name.small { font-family: var(--font-head); font-size: 1rem; line-height: 1.35; }

/* CTA band */
.cta-band { background: var(--brand); color: var(--white); padding: 56px 0; position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; width: 420px; height: 300px; inset-inline-end: -120px; top: -100px;
  border: 12px solid rgba(255, 255, 255, .08); border-radius: 50%;
}
.cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .88); max-width: 40em; }

/* Tunisian dinar sign (Coût) */
.dinar { font-family: "Exo 2", sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1; letter-spacing: .02em; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.contact-grid > div > p { color: var(--muted); }
.contact-list { display: grid; gap: 20px; margin-top: 28px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list strong { display: block; font-family: var(--font-head); color: var(--brand-900); }
.contact-list a:not(.link) { color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.contact-list a:not(.link):hover { color: var(--brand); }
.icon-box.wa { background: #e7f8ee; color: #128c4b; }
.wa-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.contact-list a.btn-wa {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border-radius: 999px; background: #128c4b; color: #fff; font-weight: 700; font-size: 1rem;
  transition: background-color .2s, transform .2s;
}
.contact-list a.btn-wa:hover { background: #0e7a40; color: #fff; transform: translateY(-2px); }
.contact-list address { color: var(--muted); margin-bottom: 4px; }

.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--brand-900); }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; font: inherit; color: var(--ink);
  background: var(--brand-50); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
html[lang="ar"] .field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; background: var(--white); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(88, 65, 122, .15); }
.field.invalid input, .field.invalid textarea { border-color: var(--error); background: #fff7f6; }
.field.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.field.check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.field.check label { font-weight: 400; color: var(--muted); margin: 0; }
.err { color: var(--error); font-size: .9rem; margin: 6px 0 0; }
.consent-err { margin: 0 0 14px; }
.form-card .btn-block { margin-top: 12px; }
.form-note { font-size: .875rem; color: var(--muted); margin: 10px 0 0; }
.form-status { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.form-status.ok { background: #e8f6ee; color: var(--ok); }
.form-status.fail { background: #fdecea; color: var(--error); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .78); padding: 64px 0 0; font-size: .98rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1fr 1.3fr; gap: 40px; }
.footer-logo { width: 200px; margin-bottom: 14px; }
.footer-h { color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; margin: 0 0 14px; }
.footer-links li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.socials { display: flex; gap: 10px; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--white);
}
.socials a:hover { background: var(--brand); text-decoration: none; }
.newsletter { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter input {
  flex: 1 1 180px; min-height: 48px; padding: 0 16px; font: inherit; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: var(--white);
}
.newsletter input::placeholder { color: rgba(255, 255, 255, .55); }
.newsletter input:focus { outline: none; border-color: var(--brand-300); background: rgba(255, 255, 255, .14); }
.newsletter .form-status { flex-basis: 100%; margin: 4px 0 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 48px; padding: 22px 0; font-size: .9rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Back to top */
.to-top {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 40;
  display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px;
  border-radius: 50%; background: var(--brand); color: var(--white); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s, transform .25s, visibility .25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand-700); }

/* ---------- Pop-up window ---------- */
.modal {
  width: min(680px, 100% - 32px); max-height: min(88vh, 900px); padding: 0;
  border: 0; border-radius: 22px; box-shadow: var(--shadow-lg); color: var(--ink);
}
.modal::backdrop { background: rgba(36, 25, 51, .55); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .25s ease-out; }
.modal-inner { position: relative; padding: clamp(24px, 5vw, 40px); }
.modal-close {
  position: absolute; inset-inline-end: 14px; top: 14px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--brand-50); color: var(--brand-900); display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--brand-100); }
.modal-icon .icon-box { margin-bottom: 16px; }
.modal h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); padding-inline-end: 44px; }
.modal-body { color: var(--muted); margin-bottom: 24px; }
.modal-body .clamp { display: block; overflow: visible; }
.modal-body .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 0; }
.facts div { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--brand-50); }
.facts dt { font-weight: 700; color: var(--brand-900); font-family: var(--font-head); }
.facts dd { margin: 2px 0 0; font-size: .95rem; }
.modal .cta-training { display: none; }
.modal.is-training .cta-training { display: inline; }
.modal.is-training .cta-detail { display: none; }
@media (max-width: 560px) { .modal-body .facts { grid-template-columns: 1fr; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Scroll animations ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

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

/* ---------- Legal page ---------- */
.page-hero { background: linear-gradient(135deg, var(--brand-900), var(--brand)); color: var(--white); padding: 56px 0; }
.page-hero h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.legal { max-width: 820px; }
.legal section { padding: 28px 0; border-bottom: 1px solid var(--line); }
.legal section:last-child { border-bottom: 0; }
.legal h2 { font-size: 1.5rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { list-style: disc; padding-inline-start: 1.4em; margin-bottom: 1em; }
.todo { background: #fff6dc; color: #7a5600; padding: 0 4px; border-radius: 4px; }
