/* Raso Flag (hub) — styles de la page d'accueil. Couleurs : uniquement les variables des thèmes (/themes.css,
   généré depuis themes.mjs) ; la barre du haut a ses propres couleurs de marque (raso-nav.css). */
@font-face { font-family: 'League Spartan'; src: url('/league-spartan.woff2') format('woff2'), url('/league-spartan.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --brand: 'League Spartan', 'Noto Kufi Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Arabic', Tahoma, sans-serif;
  --radius: 18px;
  --glow: color-mix(in srgb, var(--accent) 16%, transparent);
  --soft: color-mix(in srgb, var(--accent) 9%, var(--card));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body); overflow-x: hidden; }
h1, h2, h3, h4, .wordmark, .r { font-family: var(--brand); }
h1, h2, h3, h4 { line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent-text); }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
[id] { scroll-margin-top: calc(var(--rf-nav-h, 40px) + 16px); }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
.site-head { position: sticky; top: 0; z-index: 30; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .15s ease, background-color .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent-text); color: var(--accent-text); }
.arr { width: 18px; height: 18px; flex: none; }
[dir='rtl'] .arr { transform: scaleX(-1); }

/* Accueil : bandeau */
.hero { position: relative; overflow: hidden; padding: 48px 0 40px; background: radial-gradient(900px 420px at 85% 0%, var(--glow), transparent 70%), linear-gradient(180deg, var(--bg-2), var(--bg)); border-bottom: 1px solid var(--line); }
[dir='rtl'] .hero { background: radial-gradient(900px 420px at 15% 0%, var(--glow), transparent 70%), linear-gradient(180deg, var(--bg-2), var(--bg)); }
.hero-in { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 72px 0 64px; } .hero-in { grid-template-columns: 1.15fr .85fr; gap: 48px; } }
.kicker { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--accent-text); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.wordmark { font-size: clamp(46px, 11vw, 92px); font-weight: 800; letter-spacing: -0.03em; line-height: .95; color: var(--ink); }
.wordmark .r { color: var(--accent-text); }
.lead { margin-top: 18px; max-width: 34em; font-size: clamp(17px, 2.4vw, 21px); line-height: 1.5; color: var(--ink); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.badges li { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 600; }
.badges li::before { content: '✓'; margin-inline-end: 6px; color: var(--accent-text); font-weight: 800; }
.hero-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; max-width: 520px; }
.tool-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 10px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font: 800 18px/1.1 var(--brand); text-decoration: none; transition: border-color .15s ease, transform .15s ease, background-color .15s ease; }
.tool-chip .arr { color: var(--accent-text); }
.tool-chip:hover { border-color: var(--accent-text); transform: translateY(-2px); background: var(--soft); }
.hero-visual { display: flex; justify-content: center; }
.hero-art { width: 100%; max-width: 440px; filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .28)); }
@media (max-width: 899px) { .hero-visual { display: none; } }

/* Sections */
.band { padding: 56px 0; }
.band-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.band h2 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; }
.section-lead { margin-top: 10px; max-width: 42em; color: var(--muted); font-size: 17px; }

/* Cartes des outils */
.tool-grid { display: grid; gap: 18px; margin-top: 28px; }
@media (min-width: 760px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
.tool-card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.tool-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent-text) 55%, var(--line)); box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }
.tool-art { background: var(--card-2); border-bottom: 1px solid var(--line); padding: 14px 18px 8px; display: flex; justify-content: center; }
.tool-art .art { width: 100%; max-width: 300px; height: auto; }
.tool-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.tool-tag { color: var(--accent-text); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tool-body h3 { font-size: 28px; font-weight: 800; }
.tool-pitch { color: var(--ink); }
.tool-feats { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 8px; }
.tool-feats li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; line-height: 1.45; }
.chk { flex: none; width: 20px; height: 20px; margin-top: 1px; padding: 3px; border-radius: 50%; background: var(--soft); color: var(--accent-text); }
.tool-body .btn { align-self: flex-start; margin-top: auto; }

/* Illustrations (SVG inline, couleurs du thème) */
.a-field { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.a-yard { stroke: var(--line); stroke-width: 1.2; fill: none; }
.a-los { stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 5 5; fill: none; opacity: .7; }
.a-route { fill: none; stroke: var(--accent-text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.a-route-hot { opacity: 1; stroke-width: 3.6; }
.a-head { fill: var(--accent-text); }
.a-o { fill: var(--bg); stroke: var(--ink); stroke-width: 2.2; }
.a-x { stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.a-card { fill: var(--card-2); }
.a-edge { stroke: var(--line); stroke-width: 1.5; }
.a-ring { fill: none; stroke: var(--accent-text); stroke-width: 4; stroke-linecap: round; }
.a-accent { fill: var(--accent-text); }
.a-tick { stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.a-hand { stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; fill: none; }
.a-pole { stroke: var(--muted); stroke-width: 3; stroke-linecap: round; }
.a-flag { fill: var(--warn); }
.a-score { fill: var(--ink); font: 800 20px/1 var(--brand); }
.a-line { stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; fill: none; opacity: .75; }
.a-glass { fill: var(--card); stroke: var(--accent-text); stroke-width: 4; }
.a-bline { fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linejoin: round; }
.a-bline.a-hot { stroke: var(--accent-text); stroke-width: 3; }

/* Schéma « Comment tout est relié » */
.diagram-box { margin: 28px 0 0; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: grid; gap: 22px; }
.diagram { width: 100%; height: auto; display: block; }
.diagram-tall { display: none; max-width: 360px; margin: 0 auto; }
@media (max-width: 680px) { .diagram-wide { display: none; } .diagram-tall { display: block; } .diagram-box { padding: 16px; } }
.d-node rect { fill: var(--card-2); stroke: var(--line); stroke-width: 1.5; }
.d-node text { fill: var(--ink); font: 800 19px/1 var(--brand); }
.d-hot rect { stroke: var(--accent-text); stroke-width: 2.2; }
.d-edge { fill: none; stroke: var(--accent-text); stroke-width: 2.6; stroke-linecap: round; }
.d-label { fill: var(--ink); font: 600 13px/1 var(--body); paint-order: stroke; stroke: var(--card); stroke-width: 6px; stroke-linejoin: round; }
.d-cap { fill: var(--muted); font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.d-sep { stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 4 6; }
.diagram-box figcaption { border-top: 1px solid var(--line); padding-top: 18px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; } }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 800 15px/1 var(--brand); }

/* Points forts */
.hl-grid { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.hl { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.hl-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--soft); color: var(--accent-text); margin-bottom: 12px; }
.hl-ico .ico { width: 24px; height: 24px; }
.hl h3 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.hl p { color: var(--muted); font-size: 15px; }

/* Gratuit & participatif */
.free-grid { display: grid; gap: 18px; margin-top: 24px; align-items: stretch; }
@media (min-width: 760px) { .free-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.free-grid .rf-donate-card, .lib-card { margin: 0; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.free-grid .rf-donate-card h3, .lib-card h3 { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 800; margin: 0 0 8px; }
.free-grid .rf-donate-card h3 svg { color: #e0457b; width: 20px; height: 20px; }
.lib-card h3 .ico { width: 22px; height: 22px; color: var(--accent-text); }
.lib-card p { color: var(--muted); margin-bottom: 14px; }
.lib-card p:last-child { margin: 0; }
.rf-donate-btn { min-height: 44px; }

/* Pages de texte (C'est quoi ?, confidentialité, 404) */
.page { padding-top: 32px; padding-bottom: 56px; }
.page h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 800; margin-bottom: 12px; }
.page h2 { font-size: 23px; font-weight: 800; margin: 26px 0 8px; }
.page p { margin: 10px 0; }
article.rf-about-page { padding: 0; }
article.rf-about-page h1 { font-family: var(--brand); }
article.rf-about-page h2 { font-family: var(--brand); }
.legal { max-width: 760px; margin: 0 auto; }
.legal p { color: var(--ink); overflow-wrap: anywhere; }
.legal-updated { color: var(--muted); }
.notfound { text-align: center; }

/* Pied de page */
.site-foot { padding: 36px 0 44px; background: var(--bg-2); border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.foot-in { display: grid; gap: 12px; }
.foot-brand { color: var(--ink); font: 800 22px/1 var(--brand); }
.foot-brand .r { color: var(--accent-text); }
.foot-links { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--ink); text-underline-offset: 3px; }
.foot-links a:hover { color: var(--accent-text); }
.foot-copy { font-size: 14px; }

/* Guide d'installation */
.install-dialog { width: min(440px, calc(100vw - 24px)); padding: 0; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.install-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
.dlg-head h2 { flex: 1; font-size: 21px; font-weight: 800; }
.app-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #07110d; color: #d7ff3f; font: 800 22px/1 var(--brand); flex: none; }
.dlg-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 400 24px/1 system-ui, sans-serif; cursor: pointer; }
.dlg-body { padding: 4px 18px 20px; }
.dlg-body p { margin: 8px 0; }
.dlg-body .muted { color: var(--muted); font-size: 14px; }
.steps-ios { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.steps-ios li { display: flex; align-items: center; gap: 12px; }
.step-ico { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 12px; background: var(--card-2); color: var(--accent-text); flex: none; }
.step-ico .ico { width: 22px; height: 22px; }

@media print { .hero-visual, .site-head, .skip { display: none !important; } body { background: #fff; color: #000; } }
