/* Site vitrine MAWIDI (scripts/premium-home.mjs, scripts/official-pages.mjs), 19 nov. 2026 : plusieurs pages, une mise en page.
   Identité de l'application iPhone. Polices sous licence OFL (fonts/OFL-*.txt). Propriétés logiques pour l'arabe (RTL). */
@font-face { font-family: "Inter"; src: url("fonts/Inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2"); font-weight: 500 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/IBMPlexSansArabic-Bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

:root {
  --ground: #FAF8F3;   /* sol de l'application */
  --ground-2: #F3EFE6;
  --tray: #FFFFFF;
  --ink: #0F1B2D;
  --muted: #5A6A80;
  --line: #E7E2D8;
  --blue: #1463D6;
  --blue-strong: #0E4FAF;
  --blue-soft: #EAF1FD;
  --ochre: #8C571F;
  --green: #0F7A41;
  --green-soft: #E6F4EC;
  --font: "Inter", "Plex Arabic", -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
html[lang="ar"] { --font: "Plex Arabic", "Inter", Tahoma, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: 88px; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
html[lang="ar"] body { line-height: 1.8; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.wrap { inline-size: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 16px; inset-block-start: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 30; }
.skip:focus { inset-block-start: 12px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 48px; padding: 0 22px; border-radius: 14px; font-weight: 700; font-size: 16px; line-height: 1.2; text-align: center; text-decoration: none; border: 1.5px solid transparent; transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.btn:active { transform: scale(.98); }
.btn-sm { min-block-size: 42px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.btn-lg { min-block-size: 56px; padding: 0 28px; font-size: 17px; }
.btn-main { background: var(--blue); color: #fff; box-shadow: 0 8px 22px -12px rgb(20 99 214 / .8); }
.btn-main:hover { background: var(--blue-strong); }
.btn-outline { background: var(--tray); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-quiet { min-block-size: 42px; padding: 0 14px; font-size: 15px; color: var(--ink); border-radius: 12px; }
.btn-quiet:hover { background: var(--ground-2); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #E9EEF6; }
.btn-outline-light { color: #fff; border-color: rgb(255 255 255 / .35); }
.btn-outline-light:hover { border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; min-block-size: 56px; padding: 0 22px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; }

/* ---------- Barre du haut : logo, menu, langue, deux boutons ---------- */
.top { position: sticky; inset-block-start: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-block-end: 1px solid transparent; transition: border-color .18s ease; }
.top-in { display: flex; align-items: center; gap: 16px; min-block-size: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; font-size: 18px; line-height: 1.1; flex: none; }
.brand small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.nav-links { display: none; }
.nav-links a, .menu-panel > a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); padding: 8px 10px; border-radius: 10px; }
.nav-links a:hover, .menu-panel > a:hover { color: var(--ink); background: var(--ground-2); }
.nav-links a[aria-current="page"], .menu-panel > a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--blue); border-radius: 0; }
.top-act { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.lang { text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 10px; border-radius: 10px; color: var(--muted); }
.lang:hover { color: var(--ink); background: var(--ground-2); }
.top-btns { display: none; align-items: center; gap: 6px; }

.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; inline-size: 44px; block-size: 44px; border-radius: 12px; display: grid; place-content: center; gap: 4px; border: 1px solid var(--line); background: var(--tray); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; inline-size: 18px; block-size: 2px; border-radius: 2px; background: var(--ink); transition: transform .18s ease, opacity .18s ease; }
.menu[open] summary span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu[open] summary span:nth-child(2) { opacity: 0; }
.menu[open] summary span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-panel { position: fixed; inset-inline: 12px; inset-block-start: 76px; background: var(--tray); border: 1px solid var(--line); border-radius: 20px; padding: 10px; display: grid; gap: 2px; box-shadow: 0 24px 60px -24px rgb(15 27 45 / .35); }
.menu-panel > a { font-size: 17px; padding: 12px 14px; color: var(--ink); }
.menu-act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block-start: 8px; padding-block-start: 10px; border-block-start: 1px solid var(--line); }
.menu-act .btn-quiet { border: 1.5px solid var(--line); }

/* ---------- Frise mauritanienne (décor) ---------- */
.frieze { position: absolute; inline-size: 280px; block-size: auto; inset-inline-end: -60px; inset-block-end: 30px; fill: none; stroke: color-mix(in srgb, var(--ochre) 30%, transparent); stroke-width: 1; pointer-events: none; }
[dir="rtl"] .frieze { transform: scaleX(-1); }

/* ---------- Accueil : ouverture ---------- */
.hero { position: relative; overflow: hidden; padding-block: 40px 56px;
  background: radial-gradient(circle at 78% 30%, #A8CDF9AA 0, transparent 40%), radial-gradient(circle at 8% 70%, #EDCCA066 0, transparent 34%), var(--ground); }
[dir="rtl"] .hero { background: radial-gradient(circle at 22% 30%, #A8CDF9AA 0, transparent 40%), radial-gradient(circle at 92% 70%, #EDCCA066 0, transparent 34%), var(--ground); }
.hero-in { position: relative; display: grid; gap: 40px; }
.hero-copy { max-inline-size: 620px; }
h1 { font-size: clamp(38px, 9vw, 64px); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
html[lang="ar"] h1 { letter-spacing: 0; line-height: 1.3; font-weight: 700; }
.lead { margin-block: 20px 28px; font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-inline-size: 34em; text-wrap: pretty; }
.who { margin-block-start: 16px; font-size: 14px; color: var(--muted); }
.hero-art { margin: 0; justify-self: center; display: grid; justify-items: center; gap: 14px; }
.hero-art figcaption { font-size: 13px; color: var(--muted); }

/* iPhone dessiné (illustration) : cadre, île, écran de l'accueil médecin. */
.phone { inline-size: 300px; aspect-ratio: 300 / 620; border-radius: 52px; padding: 11px; background: #1B1F27;
  box-shadow: 0 0 0 1.5px #3A404C inset, 0 40px 80px -30px rgb(15 27 45 / .45), 0 18px 30px -18px rgb(15 27 45 / .35); }
.phone-screen { position: relative; block-size: 100%; border-radius: 42px; overflow: hidden; background: var(--ground); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.phone-screen p { color: var(--ink); }
.phone-screen::before { content: ""; position: absolute; inset-block-start: 10px; inset-inline-start: 50%; translate: -50% 0; inline-size: 92px; block-size: 26px; border-radius: 20px; background: #0A0C10; }
[dir="rtl"] .phone-screen::before { translate: 50% 0; }
.ph-status { display: flex; justify-content: space-between; align-items: center; padding-inline: 10px; block-size: 26px; font-size: 13px; }
.ph-icons { display: flex; gap: 4px; }
.ph-icons i { inline-size: 14px; block-size: 8px; border-radius: 3px; background: var(--ink); opacity: .8; }
.ph-bar { display: flex; align-items: center; gap: 7px; margin-block-start: 6px; }
.ph-bar b { font-size: 14px; }
.ph-bar span { margin-inline-start: auto; font-size: 11px; font-weight: 700; color: var(--blue); background: var(--blue-soft); padding: 3px 9px; border-radius: 99px; }
.ph-hello { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-block-start: 6px; line-height: 1.2; }
html[lang="ar"] .ph-hello { letter-spacing: 0; }
.phone-screen .ph-today { color: var(--muted); font-size: 12.5px; margin-block-start: -6px; }
.ph-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ph-stats div { background: var(--tray); border-radius: 14px; padding: 9px 11px; border: 1px solid #EFEAE1; }
.ph-stats b { display: block; font-size: 20px; line-height: 1.1; }
.ph-stats span { font-size: 11.5px; color: var(--muted); }
.ph-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ph-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; background: var(--tray); border: 1px solid #EFEAE1; border-radius: 13px; padding: 9px 10px; border-inline-start: 3px solid var(--blue); }
.ph-list time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ph-list span { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-list em { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; color: var(--blue); background: var(--blue-soft); }
.ph-list .walkin { border-inline-start-color: var(--green); }
.ph-list .walkin em { color: var(--green); background: var(--green-soft); }
.ph-list .free { background: transparent; border-style: dashed; border-color: #D9D2C4; border-inline-start: 3px solid #D9D2C4; }
.ph-list .free span, .ph-list .free time { color: var(--muted); font-weight: 500; }
.ph-list .free em { color: var(--muted); background: #F1EDE4; }
.ph-tabs { margin-block-start: auto; display: flex; justify-content: space-around; padding-block: 10px 6px; border-block-start: 1px solid #EFEAE1; }
.ph-tabs i { inline-size: 20px; block-size: 20px; border-radius: 6px; background: #D9D2C4; }
.ph-tabs i.on { background: var(--blue); }

/* Trois repères sous l'ouverture. */
.facts { display: grid; gap: 12px; padding-block: 24px; border-block: 1px solid var(--line); }
.facts div { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.facts .ico { margin: 0; }

/* ---------- Pages intérieures : en-tête ---------- */
.page-hero { position: relative; overflow: hidden; padding-block: 56px 48px; border-block-end: 1px solid var(--line);
  background: radial-gradient(circle at 85% 20%, #A8CDF977 0, transparent 38%), var(--ground); }
[dir="rtl"] .page-hero { background: radial-gradient(circle at 15% 20%, #A8CDF977 0, transparent 38%), var(--ground); }
.page-hero h1 { font-size: clamp(34px, 7vw, 56px); max-inline-size: 16em; }
.page-hero .lead { margin-block-end: 28px; }
.page-hero .lead:last-child, .page-hero .legal-note:last-child { margin-block-end: 0; }

/* ---------- Sections ---------- */
h2 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -.025em; font-weight: 800; max-inline-size: 20em; text-wrap: balance; }
html[lang="ar"] h2 { letter-spacing: 0; line-height: 1.4; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.35; font-weight: 700; }
main p { color: var(--muted); }
.sec { padding-block: 72px; }
.sec-tight { padding-block: 48px; }
.sec-alt { position: relative; }
.sec-alt::before { content: ""; position: absolute; inset-block: 0; inset-inline: calc(50% - 50vw); background: var(--ground-2); z-index: -1; }
main { position: relative; isolation: isolate; overflow-x: clip; }
.sec-head { display: grid; gap: 10px; margin-block-end: 36px; }
.sec-head p { font-size: 18px; max-inline-size: 36em; }
.sec-act { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 36px; }

.ico { inline-size: 28px; block-size: 28px; fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.feat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.feat-grid li { display: grid; align-content: start; gap: 8px; padding-block-start: 22px; border-block-start: 1px solid var(--line); }
.feat-grid .ico { margin-block-end: 6px; }

.steps-band { background: var(--ink); color: #fff; padding-block: 72px; }
.steps-band h2 { color: #fff; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.step-list li { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; row-gap: 4px; }
.step-list .n { grid-row: span 2; inline-size: 44px; block-size: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--blue); border: 1.5px solid #BFD3F2; background: var(--tray); }
.step-list.on-dark .n { color: #F3D9B4; border-color: #D4AE8088; background: transparent; }
.step-list.on-dark p { color: #B7C3D4; }

.paths { display: grid; gap: 16px; }
.paths article { display: grid; align-content: start; justify-items: start; gap: 10px; padding: 28px; border-radius: 22px; background: var(--tray); border: 1px solid var(--line); }
.paths article p { margin-block-end: 8px; }

.split { display: grid; gap: 40px; align-items: center; }
.split-copy { display: grid; gap: 16px; justify-items: start; }
.split-copy p { font-size: 18px; max-inline-size: 34em; }
.checks { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.checks .ico { inline-size: 24px; block-size: 24px; stroke: var(--green); }

.note-card { display: grid; gap: 18px; justify-items: start; padding: 32px; border-radius: 24px; background: var(--tray); border: 1px solid var(--line); }
.note-card h2 { font-size: clamp(24px, 4vw, 30px); }
.note-card p { margin-block-start: 8px; max-inline-size: 40em; }
.mission { display: grid; gap: 16px; max-inline-size: 760px; }
.mission p { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.5; color: var(--ink); }

.shots { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.iphone { inline-size: 220px; padding: 9px; border-radius: 40px; background: #1B1F27; box-shadow: 0 0 0 1.5px #3A404C inset, 0 30px 60px -30px rgb(15 27 45 / .45); }
.iphone img { inline-size: 100%; block-size: auto; border-radius: 31px; }
.caption { text-align: center; font-size: 13px; margin-block-start: 16px; }

/* ---------- Questions fréquentes ---------- */
.faq-list { border-block-start: 1px solid var(--line); }
.faq-list details { border-block-end: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 20px; font-weight: 700; font-size: 17px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; inline-size: 10px; block-size: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); rotate: 45deg; translate: 0 -3px; transition: rotate .18s ease, translate .18s ease; }
.faq-list details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq-list details p { padding-block-end: 20px; max-inline-size: 44em; }

/* ---------- Pages légales ---------- */
.legal-note { margin-block-start: 20px; padding: 16px 20px; border-radius: 14px; background: var(--ground-2); font-size: 15px; max-inline-size: 48em; }
.prose { max-inline-size: 820px; padding-block: 24px 72px; }
.prose section { padding-block: 24px; border-block-end: 1px solid var(--line); }
.prose h2 { font-size: 21px; letter-spacing: -.01em; margin-block-end: 8px; }
.prose .btn { margin-block-start: 28px; }

/* ---------- Appel final ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--blue); color: #fff; padding-block: 64px; }
.cta-band .frieze { stroke: rgb(255 255 255 / .18); inset-block: auto -60px; }
.cta-in { position: relative; display: grid; gap: 24px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #DCE8FB; margin-block-start: 10px; font-size: 18px; }

/* ---------- Pied de page ---------- */
.foot { padding-block: 48px 32px; border-block-start: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
.foot-brand { grid-column: 1 / -1; display: grid; gap: 10px; }
.foot-brand p { color: var(--muted); font-size: 14px; }
.foot nav { display: grid; align-content: start; gap: 10px; }
.foot nav h2 { font-size: 14px; letter-spacing: 0; font-weight: 700; color: var(--ink); }
.foot nav a { color: var(--muted); font-size: 15px; text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal { margin-block-start: 36px; padding-block-start: 20px; border-block-start: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- Écrans larges ---------- */
@media (min-width: 700px) {
  .facts { grid-template-columns: repeat(3, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .paths { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1.4fr repeat(4, 1fr); }
  .foot-brand { grid-column: auto; align-content: start; }
  .top-btns { display: flex; }
  .menu-act { display: none; }
  .note-card { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 960px) {
  .hero { padding-block: 72px 96px; }
  .hero-in { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 56px; }
  .hero-art { justify-self: end; }
  .phone { inline-size: 320px; }
  .frieze { inline-size: 420px; inset-inline-end: 0; inset-block: 20px auto; }
  .page-hero { padding-block: 88px 72px; }
  .page-hero .frieze { inline-size: 360px; inset-block: -40px auto; }
  .sec, .steps-band { padding-block: 104px; }
  .feat-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .step-list { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .step-list.four { grid-template-columns: repeat(4, 1fr); }
  .step-list li { grid-template-columns: 1fr; }
  .step-list .n { grid-row: auto; margin-block-end: 10px; }
  .split { grid-template-columns: 1.1fr .9fr; gap: 64px; }
  .split .hero-art { justify-self: end; }
  .cta-in { grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
  .cta-band { padding-block: 80px; }
  .iphone { inline-size: 260px; }
}
@media (min-width: 1180px) {
  .nav-links { display: flex; gap: 2px; margin-inline-start: 20px; }
  .menu { display: none; }
}
@media (max-width: 380px) {
  .brand small { display: none; }
  .phone { inline-size: 272px; }
  .lang { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
