/* Minjam — site vitrine. Palette du logo : bleu ardoise et ocre, sur fond sable.
   --ochre ne sert qu'aux fonds décoratifs, barres, bordures et focus ; le texte ocre et les boutons
   pleins prennent --ochre-dark (5,2:1 sur papier, blanc dessus 5,3:1). */
:root {
  --ink: #1d2733;
  --ink-soft: #3d4a59;
  --muted: #66727f;
  --line: #e3ddd2;
  --sand: #f6f1e8;
  --paper: #fffdf9;
  --ochre: #b8742f;
  --ochre-dark: #9a5d22;
  --ochre-deep: #7f4c1b;
  --slate: #1f3a4b;
  --ok: #2f8f5b;
  --radius: 14px;
  --shadow: 0 18px 40px -22px rgba(29, 39, 51, .45);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--ochre-dark); margin-bottom: .8em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 253, 249, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.brand-mark { height: 36px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
/* Le bouton de l'en-tête garde son texte blanc (sinon « .nav a » le passe en gris, illisible sur l'ocre). */
.nav .btn-primary, .nav .btn-primary:hover { color: #fff; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-size: .85rem; }
.lang a { padding: 4px 10px; text-decoration: none; color: var(--muted); }
.lang a[aria-current="true"] { background: var(--slate); color: #fff; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }
/* Téléphone : logo, nom et les quatre langues tiennent sur une ligne ; le bouton de démo reste juste dessous, dans le bandeau d'accueil. */
@media (max-width: 560px) { .brand { flex-shrink: 0; } .nav .btn-sm { display: none; } }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn-primary { background: var(--ochre-dark); color: #fff; }
.btn-primary:hover { background: var(--ochre-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: .9rem; }

/* Bandeau d'accueil */
.hero { background: linear-gradient(180deg, var(--sand), var(--paper)); padding: 72px 0 56px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; padding: 0; list-style: none; color: var(--ink-soft); font-size: .95rem; }
.facts li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-inline-end: 8px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 48px; } }

/* Illustration d'écran (maquette, pas une capture) */
.mock { position: relative; }
.window { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--slate); color: #cfd8e3; font-size: .78rem; }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #5d6b7a; display: inline-block; }
.window-bar span { margin-inline-start: 8px; }
.window-body { padding: 18px; display: grid; gap: 12px; }
.row { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; padding: 9px 12px; border-radius: 8px; background: var(--sand); }
.row b { font-variant-numeric: tabular-nums; }
.weigh { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.weigh div { background: var(--sand); border-radius: 10px; padding: 10px; font-size: .78rem; color: var(--muted); }
.weigh strong { display: block; font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e6f4ec; color: var(--ok); }
.mock-card { position: absolute; inset-inline-end: -14px; bottom: -26px; width: 56%; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; font-size: .82rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 8px; }
.bars span { flex: 1; background: var(--ochre); border-radius: 4px 4px 0 0; opacity: .85; }
.mock-note { font-size: .74rem; color: var(--muted); margin-top: 38px; text-align: end; }
@media (max-width: 900px) { .mock-card { position: static; width: auto; margin-top: 12px; } .mock-note { margin-top: 10px; } }

/* Sections */
section { padding: 80px 0; }
.alt { background: var(--sand); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Comment ça marche */
.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; margin-top: 40px; }
.flow-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.flow-card ul { margin: 12px 0 0; padding-inline-start: 20px; color: var(--ink-soft); }
.flow-sync { display: grid; place-items: center; text-align: center; color: var(--ochre-dark); font-weight: 700; font-size: .9rem; max-width: 170px; }
.flow-sync svg { width: 56px; height: 56px; margin: 0 auto 8px; }
@media (max-width: 860px) { .flow { grid-template-columns: 1fr; } .flow-sync { max-width: none; } .flow-sync svg { transform: rotate(90deg); } }

/* Modules */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 36px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card .ico { width: 40px; height: 40px; border-radius: 10px; background: #fbeedf; color: var(--ochre-dark); display: grid; place-items: center; margin-bottom: 12px; }
.card .ico svg { width: 22px; height: 22px; }
.card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.offers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 900px) { .offers { grid-template-columns: 1fr; } }
.offer { padding: 28px; }
.offer h3 { font-size: 1.25rem; margin-bottom: .4em; }
.offer > p { font-size: 1.02rem; }
.offer details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.offer summary { cursor: pointer; list-style: none; font-weight: 700; color: var(--ochre-dark); display: inline-flex; align-items: center; gap: 8px; }
.offer summary::-webkit-details-marker { display: none; }
.offer summary::after { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font-size: .95rem; line-height: 1; transition: transform .2s; }
.offer details[open] summary::after { transform: rotate(45deg); }
.offer details ul { margin: 12px 0 0; padding-inline-start: 20px; color: var(--ink-soft); font-size: .95rem; }
.offer details li + li { margin-top: 4px; }
.more-cta { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--ink); }
.tag { display: inline-block; margin-top: 10px; font-size: .74rem; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }

/* Fonctionnement allégé */
section.compact { padding: 64px 0; }
.flow-light { max-width: 860px; margin-top: 28px; }
.flow-light .flow-card { text-align: center; padding: 22px; }
.flow-light .flow-card p { margin: 0; color: var(--ink-soft); }

/* Film de présentation : lancé seulement au clic (preload="none", l'image d'attente seule est chargée) ;
   l'ancre #film passe sous l'en-tête collant. */
.film { scroll-margin-top: 72px; }
.film-cadre { max-width: 960px; margin: 28px auto 0; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: var(--slate); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.film-lien { align-self: center; font-weight: 700; color: var(--ochre-dark); text-underline-offset: 3px; }

/* Le constat */
.pain { background: var(--slate); color: #eef2f6; }
.pain .eyebrow { color: #f0b072; }
.pains { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .pains { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pains { grid-template-columns: 1fr; } }
.pains li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 20px; }
.pains b { display: block; color: #fff; margin-bottom: 6px; font-size: 1.05rem; }
.pains b::before { content: "✕"; color: #f0b072; margin-inline-end: 8px; }
.pains span { color: #c7d1dc; font-size: .95rem; }

/* Modules mis en avant */
.features { padding-bottom: 40px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 40px 0 56px; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .feature-art { order: -1; }
@media (max-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr); gap: 28px; } .feature.flip .feature-art { order: 0; } }
.feature h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.feature-tag { font-weight: 800; color: var(--ochre-dark); margin-bottom: .5em; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.badge { font-size: .74rem; font-weight: 700; color: var(--ok); background: #eef5f0; border-radius: 999px; padding: 3px 10px; }
.ticks { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.ticks li { padding-inline-start: 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 800; }
.feature details { margin: 0 0 22px; }
.feature summary, .offer summary { cursor: pointer; list-style: none; font-weight: 700; color: var(--ochre-dark); display: inline-flex; align-items: center; gap: 8px; }
.feature summary::-webkit-details-marker { display: none; }
.feature summary::after { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font-size: .95rem; line-height: 1; transition: transform .2s; }
.feature details[open] summary::after { transform: rotate(45deg); }
.feature details ul { margin: 10px 0 0; padding-inline-start: 20px; color: var(--ink-soft); }
.feature-art svg { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); }

/* Pour qui */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
@media (max-width: 860px) { .roles { grid-template-columns: 1fr; } }
.role { border-inline-start: 4px solid var(--ochre); background: #fff; border-radius: 0; border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); padding: 22px 24px; }
.role p { color: var(--ink-soft); margin: 0; }

/* Contrôle */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.checks b { display: block; margin-bottom: 2px; }
.checks span { color: var(--ink-soft); font-size: .95rem; }

/* Démo */
.demo { background: var(--slate); color: #eef2f6; }
.demo .lead { color: #c7d1dc; }
.demo .eyebrow { color: #f0b072; }
.demo-box { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .demo-box { grid-template-columns: 1fr; } }
form { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 26px; display: grid; gap: 14px; }
label { font-size: .88rem; font-weight: 600; display: grid; gap: 6px; }
input, select, textarea { font: inherit; padding: 11px 13px; border: 1px solid #cfc7b9; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid #f4c79a; border-color: var(--ochre); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-note { font-size: .8rem; color: var(--muted); margin: 0; }
.req { color: var(--ochre-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
/* Champ piège contre les robots : invisible et hors du clavier, rogné sur place (un décalage à gauche ferait
   défiler la page arabe en rtl). */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.demo-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.demo-list li::before { content: "→"; color: #f0b072; margin-inline-end: 10px; font-weight: 800; }

/* Pied */
.foot { background: #151d26; color: #9aa7b5; padding: 36px 0; font-size: .9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.foot a { color: #cfd8e3; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; }
/* Le pictogramme est ardoise sur fond transparent : posé sur le pied sombre, il lui faut une pastille claire. */
.foot-mark { width: 26px; height: 24px; box-sizing: content-box; padding: 5px; background: var(--paper); border-radius: 8px; }

/* Arabe (dir="rtl") : la mise en page suit les propriétés logiques ci-dessus ; restent les flèches, les
   illustrations SVG (coordonnées fixes, gardées de gauche à droite), l'espacement des lettres qui casse la
   liaison de l'écriture arabe, et une police système qui a l'arabe (aucune police externe : CSP). */
[dir="rtl"] .demo-list li::before { content: "←"; }
[dir="rtl"] .feature-art svg { direction: ltr; }
[dir="rtl"] .eyebrow, [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; text-transform: none; }
[dir="rtl"] input[dir="ltr"] { text-align: right; }
[lang="ar"] body { font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif; line-height: 1.8; }

/* Accessibilité */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
