/* Site EasyDoor : jetons (clair / sombre), mise en page, composants. Aucune dépendance. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f3f7fa;
  --surface: #ffffff;
  --text: #0f1a2a;
  --text-2: #41506a;
  --muted: #6b7890;
  --line: #e1e8ef;
  --brand-1: #50bcba;
  --brand-2: #3a80b4;
  --accent: #2a76a0;
  --accent-hover: #21658a;
  --accent-ink: #ffffff;
  --good: #19a35b;
  --info: #2a76a0;
  --warn: #c27a00;
  --bad: #c43c3c;
  --dark: #0e1828;
  --dark-2: #16233a;
  --shadow: 0 1px 2px rgba(15, 26, 42, .06), 0 8px 24px rgba(15, 26, 42, .06);
  --shadow-lg: 0 24px 60px rgba(15, 26, 42, .18);
  --radius: 16px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b111a;
    --bg-alt: #101824;
    --surface: #141d2a;
    --text: #e8eef6;
    --text-2: #b4c0d0;
    --muted: #8593a8;
    --line: #233044;
    --accent: #4fb3c2;
    --accent-hover: #6cc4cf;
    --accent-ink: #08151c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
html[lang="ar"] { --font: "Noto Sans Arabic", "Montserrat", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand-1); outline-offset: 2px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 24px; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(42, 118, 160, .3); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-light { background: #fff; color: #0f3550; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
.btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .24); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Barre du haut */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo img { height: 30px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .logo-light { display: none; } .logo-dark { display: block; } }
.menu { display: flex; gap: 22px; margin-inline-start: auto; }
.menu a { color: var(--text-2); font-weight: 500; font-size: 15px; }
.menu a:hover { color: var(--accent); text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.langs { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.langs button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; padding: 10px 9px; flex-direction: column; justify-content: space-between; }
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

/* Accueil */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 600px at 85% -10%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(135deg, #2aa7a8 0%, #2a76a0 52%, #23497a 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 -1px 0; height: 80px; background: var(--bg); clip-path: ellipse(75% 100% at 50% 100%); }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; padding: 72px 0 120px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .85); margin-bottom: 14px; }
.eyebrow.dark { color: var(--accent); }
html[lang="ar"] .eyebrow { text-transform: none; letter-spacing: 0; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; }
.hero .lead { margin-top: 18px; font-size: 18px; color: rgba(255, 255, 255, .9); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.store { display: inline-flex; align-items: center; gap: 10px; color: #fff; background: rgba(9, 22, 38, .55); border: 1px solid rgba(255, 255, 255, .25); padding: 8px 16px 8px 12px; border-radius: 12px; font-weight: 700; font-size: 16px; line-height: 1.1; }
.store:hover { background: rgba(9, 22, 38, .75); text-decoration: none; }
.store svg { width: 24px; height: 24px; fill: currentColor; }
.store small { display: block; font-weight: 500; font-size: 11px; opacity: .8; }
.hero-visual { position: relative; height: 520px; }
.phone { position: absolute; width: 230px; border-radius: 34px; padding: 8px; background: #0b1420; box-shadow: var(--shadow-lg); }
.phone img { border-radius: 27px; }
.phone-front { inset-inline-start: 38%; top: 10px; transform: rotate(4deg); }
.phone-back { inset-inline-start: 6%; top: 60px; transform: rotate(-7deg); opacity: .95; }
.float-card { position: absolute; display: flex; align-items: center; gap: 10px; background: #fff; color: #0f1a2a; padding: 10px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: float 6s ease-in-out infinite; }
.fc-1 { inset-inline-start: 0; top: 18px; }
.fc-2 { inset-inline-end: 0; bottom: 60px; animation-delay: -3s; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.good { background: var(--good); }
.dot.info { background: var(--brand-1); }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .float-card { animation: none; } html { scroll-behavior: auto; } }

/* Sections */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: linear-gradient(160deg, var(--dark) 0%, #123049 70%, #1c4f6b 100%); color: #dbe4f3; }
.section.dark h2 { color: #fff; }
.head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.head h2, .split-text h2, .contact-info h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; }
.head p { margin-top: 14px; color: var(--text-2); font-size: 17px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.why { padding: 32px 28px; text-align: center; }
.why h3 { font-size: 19px; margin: 20px 0 10px; }
.why p { color: var(--text-2); }
.ico { width: 64px; height: 64px; border-radius: 18px; display: inline-grid; place-items: center; color: #fff; }
.ico svg, .mi svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.grad-1 { background: linear-gradient(135deg, #50bcba, #2a76a0); }
.grad-2 { background: linear-gradient(135deg, #f5a623, #e2632d); }
.grad-3 { background: linear-gradient(135deg, #7b6cf6, #3a80b4); }
.grid-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.module { padding: 24px; transition: transform .2s, box-shadow .2s; }
.module:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.mi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); margin-bottom: 16px; }
.mi svg { width: 24px; height: 24px; }
.module h3 { font-size: 17px; margin-bottom: 8px; }
.module p { color: var(--text-2); font-size: 15px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split-visual img { max-height: 620px; margin-inline: auto; width: auto; }
.checks { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; gap: 14px; }
.checks li { position: relative; padding-inline-start: 34px; color: var(--text-2); }
.checks li::before { content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)) center / 100% no-repeat; }
.checks li::after { content: ""; position: absolute; inset-inline-start: 7px; top: 8px; width: 8px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.checks.light li { color: #c9d5e6; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); position: relative; }
.num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); margin-bottom: 16px; }
.steps h3 { font-size: 17px; margin-bottom: 8px; }
.steps p { color: var(--text-2); font-size: 15px; }

/* Maquette de la console */
.console-mock { display: grid; grid-template-columns: 64px 1fr; height: 360px; border-radius: 18px; overflow: hidden; background: #f4f6f9; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .1); }
.cm-side { background: #0a1220; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; }
.cm-side span { height: 10px; border-radius: 5px; background: #233149; }
.cm-side .cm-logo { height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); margin-bottom: 8px; }
.cm-side .on { background: #5cc0c9; }
.cm-main { padding: 20px; display: grid; gap: 16px; grid-template-rows: auto 1fr auto; color: #0f1a2a; }
.cm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cm-kpis div { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }
.cm-kpis b { display: block; font-size: 24px; }
.cm-kpis i { font-style: normal; font-size: 12px; color: #6b7486; }
.cm-chart { background: #fff; border-radius: 12px; padding: 16px; display: flex; align-items: flex-end; gap: 10px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }
.cm-chart span { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #50bcba, #3a80b4); }
.cm-chart span:nth-child(1) { height: 40%; } .cm-chart span:nth-child(2) { height: 65%; } .cm-chart span:nth-child(3) { height: 52%; }
.cm-chart span:nth-child(4) { height: 80%; } .cm-chart span:nth-child(5) { height: 72%; } .cm-chart span:nth-child(6) { height: 92%; } .cm-chart span:nth-child(7) { height: 60%; }
.cm-rows { display: grid; gap: 8px; }
.cm-rows span { height: 12px; border-radius: 6px; background: #e2e6ec; }
.cm-rows span:nth-child(2) { width: 80%; } .cm-rows span:nth-child(3) { width: 60%; }

/* Galerie */
.gallery { position: relative; }
.gal-track { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 4px 24px; scrollbar-width: thin; }
.gal-track img { flex: none; width: 220px; border-radius: 26px; border: 7px solid #0b1420; scroll-snap-align: center; box-shadow: var(--shadow); }
.gal-btn { position: absolute; top: 45%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.gal-btn.prev { inset-inline-start: -8px; }
.gal-btn.next { inset-inline-end: -8px; }
html[dir="rtl"] .gal-btn { transform: scaleX(-1); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
.contact-info p { margin-top: 14px; color: var(--text-2); font-size: 17px; }
.offices { margin: 28px 0 0; display: grid; gap: 16px; }
.offices dt { font-weight: 700; font-size: 14px; }
.offices dd { margin: 2px 0 0; color: var(--text-2); }
.form { padding: 28px; display: grid; gap: 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-alt); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: none; border-radius: 9px; padding: 10px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 11px 13px; font-weight: 400; color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.form [data-only][hidden] { display: none; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.form-msg { font-weight: 600; min-height: 1.4em; }
.form-msg.ok { color: var(--good); }
.form-msg.err { color: var(--bad); }
.form .btn { justify-self: start; }

/* Pied de page */
.footer { background: var(--dark); color: #b9c4d6; padding: 64px 0 24px; }
.footer-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 30px; width: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 380px; font-size: 15px; }
.footer h3 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer nav { display: grid; gap: 10px; align-content: start; }
.footer nav a { color: #b9c4d6; font-size: 15px; }
.footer nav a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 44px; padding-top: 20px; border-top: 1px solid #1d2a42; font-size: 13px; }

/* Fenêtre de téléchargement */
.download { border: 0; border-radius: 20px; padding: 32px; width: min(380px, 100% - 32px); text-align: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.download::backdrop { background: rgba(8, 16, 28, .6); backdrop-filter: blur(3px); }
.download h2 { font-size: 22px; margin-bottom: 16px; }
.download img { margin: 0 auto 16px; border-radius: 12px; background: #fff; padding: 6px; }
.download p { color: var(--text-2); font-size: 15px; }
.dl-stores { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.dl-close { position: absolute; top: 10px; inset-inline-end: 12px; border: 0; background: none; font-size: 28px; color: var(--muted); cursor: pointer; }

/* Pages de texte (confidentialité, conditions, suppression de compte, 404) */
.page-hero { background: linear-gradient(135deg, #2aa7a8 0%, #2a76a0 52%, #23497a 100%); color: #fff; padding: 56px 0 64px; }
.page-hero h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
.page-hero p { margin-top: 10px; color: rgba(255, 255, 255, .88); }
.doc { width: min(820px, 100% - 32px); margin: -32px auto 72px; position: relative; padding: 40px; }
.doc h2 { font-size: 21px; margin: 32px 0 10px; }
.doc h3 { font-size: 17px; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-inline-start: 22px; display: grid; gap: 6px; margin: 10px 0; }
.doc .meta { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.doc .callout { background: var(--bg-alt); border-inline-start: 4px solid var(--brand-1); padding: 14px 18px; border-radius: 10px; margin: 18px 0; }
.doc .loading { display: grid; gap: 10px; }
.doc .loading span { height: 14px; border-radius: 7px; background: var(--bg-alt); }
.doc .loading span:nth-child(2) { width: 85%; } .doc .loading span:nth-child(3) { width: 70%; }
.doc .form { padding: 0; box-shadow: none; border: 0; margin-top: 18px; }

/* Petits écrans */
@media (max-width: 1000px) {
  .grid-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu { position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; box-shadow: var(--shadow); }
  .menu.open { display: flex; }
  .menu a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .burger { display: flex; }
  .topbar-actions { margin-inline-start: auto; }
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; padding: 48px 0 100px; }
  .hero-visual { height: 420px; max-width: 460px; width: 100%; margin-inline: auto; }
  .phone { width: 190px; }
  .grid-3, .split, .contact, .footer-in { grid-template-columns: 1fr; }
  .split { gap: 36px; }
  .split-visual { order: 2; }
  .section { padding: 64px 0; }
  .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .grid-modules, .steps, .fields { grid-template-columns: 1fr; }
  .hero .lead { font-size: 16px; }
  .gal-track img { width: 180px; }
  .gal-btn { display: none; }
  .doc { padding: 24px 20px; }
  .float-card { font-size: 12px; padding: 8px 12px; }
  .langs button { padding: 4px 7px; }
}
