/* DevisFacture — page d'accueil. Identité : carnet de factures à souche (bord perforé), nuit indigo + papier froid, vert menthe du logo. */
@font-face { font-family: "FF Sans"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "FF Sans"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "FF Sans"; font-weight: 700; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "FF Sans"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "FF Sans"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "FF Sans"; font-weight: 700; font-display: swap; src: url(/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --night: #0e1740; --night-2: #17235a; --indigo: #3342b5; --indigo-d: #2a37a0; --indigo-soft: #e9ebfa;
  --mint: #34d399; --mint-d: #17734f; --mint-soft: #e1f6ee;
  --paper: #f5f7fa; --white: #fff; --ink: #14213d; --muted: #566177; --line: #dde2ea;
  --r: 16px; --shadow: 0 1px 2px rgba(14, 23, 64, .05), 0 12px 32px rgba(14, 23, 64, .08);
  --font: "FF Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Arabic", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--ink); background: var(--white); }
[dir=rtl] body { line-height: 1.85; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { display: block; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 40px); }
.grow { flex: 1; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--white); color: var(--ink); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 10px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 12px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.05rem; }
.btn-solid { background: var(--indigo); color: #fff; }
.btn-solid:hover { background: var(--indigo-d); }
.btn-mint { background: var(--mint); color: #062b1c; }
.btn-mint:hover { background: #4ade9f; }
.btn-line { border-color: var(--line); background: var(--white); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 50; background: var(--night); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.top-in { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.28rem; letter-spacing: -.02em; }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 6px; margin-inline-start: 14px; }
.nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: #c9d0f3; font-weight: 500; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.lang { background: transparent; border: 1px solid rgba(255, 255, 255, .28); color: #fff; border-radius: 10px; min-height: 40px; padding: 0 12px; font: inherit; font-weight: 600; cursor: pointer; }
.lang:hover { border-color: #fff; }
html[lang=fr] .lang [lang=fr], html[lang=ar] .lang [lang=ar] { display: none; } /* le bouton propose l'autre langue */
.link-login { color: #c9d0f3; text-decoration: none; font-weight: 600; padding: 8px 4px; }
.link-login:hover { color: #fff; }
.top .btn { min-height: 42px; padding: 0 18px; }

/* Hero */
.hero { background: var(--night); color: #fff; position: relative; padding: 64px 0 0; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 56px; align-items: center; padding-bottom: 76px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); line-height: 1.06; letter-spacing: -.028em; font-weight: 700; text-wrap: balance; }
[dir=rtl] .hero h1 { line-height: 1.3; letter-spacing: 0; }
.lead { margin-top: 22px; font-size: 1.16rem; color: #c9d0f3; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fine { margin-top: 16px; font-size: .92rem; color: #9aa6e0; }
.perf { position: absolute; inset-inline: 0; bottom: -1px; height: 14px; background: radial-gradient(circle at 7px 14px, var(--paper) 6px, transparent 6.5px) 0 0 / 14px 14px repeat-x; }

/* Facture du hero */
.hero-visual { position: relative; padding: 6px 0 26px; }
.sheet { position: relative; background: #fff; color: #14213d; border-radius: 6px; padding: 26px 26px 24px; box-shadow: 0 30px 60px rgba(0, 0, 0, .38); transform: rotate(1.6deg); font-size: .8rem; line-height: 1.45; text-align: start; max-width: 520px; margin-inline: auto; }
.sheet::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: var(--indigo); border-radius: 6px 6px 0 0; }
.sheet-head { display: flex; justify-content: space-between; gap: 14px; }
.sheet-head strong { display: block; font-size: .98rem; }
.sheet small { display: block; color: #566177; font-size: .72rem; }
.doc-t { text-align: right; } .doc-t b { display: block; font-size: 1.5rem; letter-spacing: -.01em; line-height: 1.1; } .doc-t span { color: var(--indigo); font-weight: 600; }
.sheet-client { margin: 16px 0 12px; padding: 10px 12px; background: #e9ebfa; border-radius: 8px; }
.sheet-client b { display: block; }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet th { text-align: right; font-size: .66rem; letter-spacing: .04em; color: var(--indigo); font-weight: 600; padding: 6px 4px; border-bottom: 1.5px solid var(--indigo); }
.sheet th:first-child, .sheet td:first-child { text-align: left; }
.sheet td { text-align: right; padding: 7px 4px; border-bottom: 1px solid #e8ebf1; font-variant-numeric: tabular-nums; }
.sheet td:first-child { font-weight: 600; }
.sheet-foot { display: grid; grid-template-columns: 1fr 190px; gap: 16px; margin-top: 14px; align-items: end; }
.sheet-foot p { font-size: .74rem; } .sheet-foot p small { margin-bottom: 2px; text-transform: none; }
.sheet-foot dl { margin: 0; } .sheet-foot dl div { display: flex; justify-content: space-between; padding: 2px 0; color: #566177; font-variant-numeric: tabular-nums; } .sheet-foot dd { margin: 0; }
.sheet-foot .ttc { background: var(--indigo); color: #fff; border-radius: 8px; padding: 8px 10px; margin-top: 6px; font-weight: 700; }
.stamp { position: absolute; inset-inline-end: 30px; top: 120px; transform: rotate(-12deg); border: 3px solid #17734f; color: #17734f; border-radius: 8px; padding: 2px 14px; font-weight: 700; font-size: 1.5rem; letter-spacing: .08em; opacity: .82; background: rgba(255, 255, 255, .6); }
.chip-read { position: absolute; inset-inline-start: -14px; bottom: -4px; display: flex; gap: 12px; align-items: flex-start; background: #fff; color: var(--ink); border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); font-size: .86rem; line-height: 1.4; }
.chip-read b { display: block; margin-bottom: 2px; } .chip-read span:not(.dot) { display: block; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip-read .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--mint); margin-top: 5px; box-shadow: 0 0 0 4px var(--mint-soft); flex: none; }

/* Bandeau Maroc */
.trust { background: var(--paper); padding: 30px 0 28px; }
.trust-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 36px; }
.trust-t { font-weight: 700; }
.trust ul { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.trust li { position: relative; padding-inline-start: 18px; }
.trust li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

/* Sections */
.sec { padding: 88px 0; }
.sec.alt { background: var(--paper); }
.sec-t { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; max-width: 22em; text-wrap: balance; }
[dir=rtl] .sec-t { letter-spacing: 0; line-height: 1.4; }
.sec-s { margin-top: 12px; color: var(--muted); font-size: 1.1rem; }

/* Fonctionnalités : grille irrégulière */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; margin-top: 44px; }
.cell { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.cell h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.01em; } [dir=rtl] .cell h3 { letter-spacing: 0; line-height: 1.5; }
.cell p { color: var(--muted); }
.cell.tint { background: var(--indigo-soft); border-color: #cfd4f3; }
.cell.plain { background: var(--white); }
.c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; }
.chain { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; font-variant-numeric: tabular-nums; }
.chain li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.chain li + li::before { content: "›"; margin-inline-end: 8px; color: var(--indigo); }
.chain li.on { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.chain li.on::before { color: #fff; }
.chain li.soon { border-style: dashed; background: transparent; }
.read { margin-top: 12px; display: grid; gap: 10px; }
.drop { border: 2px dashed #9aa6e0; border-radius: 12px; padding: 12px 14px; color: var(--indigo); font-weight: 600; background: rgba(255, 255, 255, .6); }
.read dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.read dl div { background: var(--white); border-radius: 10px; padding: 8px 12px; border: 1px solid #d5daf4; }
.read dt { font-size: .76rem; color: var(--muted); } .read dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-bars { display: flex; align-items: flex-end; gap: 10px; height: 110px; margin-top: 10px; }
.mini-bars i { flex: 1; height: var(--h); background: #c3c9ee; border-radius: 6px 6px 2px 2px; }
.mini-bars i.on { background: var(--indigo); }
.swatches { display: flex; gap: 10px; margin-top: 8px; }
.swatches i { width: 36px; height: 36px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--line); }

/* Étapes */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: s; }
.steps li { position: relative; padding-top: 6px; }
.steps .n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--night); color: #fff; font-weight: 700; margin-bottom: 14px; }
.steps h3 { font-size: 1.2rem; margin-bottom: 6px; } .steps p { color: var(--muted); }

/* Tarifs */
.billing { display: inline-flex; gap: 4px; margin-top: 26px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; }
.billing button { border: 0; background: transparent; font: inherit; font-weight: 600; padding: 9px 20px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.billing button.on { background: var(--night); color: #fff; }
.billing em { font-style: normal; font-size: .8rem; background: var(--mint); color: #062b1c; border-radius: 999px; padding: 2px 8px; margin-inline-start: 4px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 30px 28px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.plan h3 { font-size: 1.35rem; }
.pl-d { color: var(--muted); min-height: 3.2em; }
.price { margin-top: 10px; color: var(--muted); } .price b { font-size: 2.8rem; line-height: 1; color: var(--ink); letter-spacing: -.03em; }
.price-note { font-size: .88rem; color: var(--muted); margin-bottom: 14px; min-height: 1.4em; }
.plan ul { list-style: none; margin: 22px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.plan li { position: relative; padding-inline-start: 28px; }
.plan li::before { content: ""; position: absolute; inset-inline-start: 0; top: .42em; width: 16px; height: 9px; border-inline-start: 3px solid var(--mint-d); border-bottom: 3px solid var(--mint-d); transform: rotate(-45deg) scale(.8); }
[dir=rtl] .plan li::before { transform: rotate(45deg) scaleX(-1) scale(.8); }
.plan.best { background: var(--night); color: #fff; border-color: var(--night); box-shadow: var(--shadow); transform: translateY(-10px); }
.plan.best .pl-d, .plan.best .price, .plan.best .price-note { color: #aeb8ec; } .plan.best .price b { color: #fff; }
.plan.best ul { border-color: rgba(255, 255, 255, .16); } .plan.best li::before { border-color: var(--mint); }
.flag { position: absolute; top: -13px; inset-inline-start: 24px; background: var(--mint); color: #062b1c; font-weight: 700; font-size: .82rem; border-radius: 999px; padding: 4px 14px; }
.pay-note { margin-top: 22px; color: var(--muted); font-size: .95rem; max-width: 52em; }
.onprem { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding: 22px 26px; border: 1px dashed #aab2d3; border-radius: var(--r); background: var(--paper); }
.onprem h3 { font-size: 1.1rem; } .onprem p { color: var(--muted); }

/* FAQ */
details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; margin-top: 12px; }
summary { cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--indigo); flex: none; }
details[open] summary::after { content: "–"; }
details p { padding: 0 22px 20px; color: var(--muted); }
.sec.alt .sec-t { margin-bottom: 14px; }

/* Appel final + pied de page */
.final { background: var(--indigo); color: #fff; padding: 64px 0; }
.final-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.final h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2; letter-spacing: -.02em; max-width: 18em; } [dir=rtl] .final h2 { letter-spacing: 0; line-height: 1.45; }
.foot { background: var(--night); color: #aeb8ec; padding: 36px 0; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.brand-s { color: #fff; font-size: 1.1rem; }
.foot p { flex: 1; min-width: 200px; }
.foot nav { display: flex; gap: 18px; } .foot nav a { text-decoration: none; } .foot nav a:hover { color: #fff; }

/* Mobile */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 40px; padding-bottom: 60px; }
  .hero { padding-top: 40px; }
  .nav { display: none; }
  .bento { grid-template-columns: 1fr; }
  .c5, .c6, .c7 { grid-column: auto; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .plans { grid-template-columns: 1fr; gap: 26px; }
  .plan.best { transform: none; }
  .sec { padding: 64px 0; }
  .pl-d { min-height: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .link-login { display: none; }
  .top-in { gap: 12px; }
  .top .btn { padding: 0 14px; }
  .sheet { padding: 20px 16px; font-size: .72rem; transform: rotate(1deg); }
  .sheet-foot { grid-template-columns: 1fr; }
  .stamp { top: 104px; font-size: 1.2rem; inset-inline-end: 14px; }
  .chip-read { inset-inline-start: 0; position: relative; margin-top: -12px; inset-block-end: auto; width: fit-content; margin-inline: auto; }
  .hero-cta .btn { width: 100%; }
  .final .btn { width: 100%; }
  .cell { padding: 22px; }
}
[hidden] { display: none !important; }
.chain { margin-top: auto; padding-top: 16px; }
.hero-visual { padding-bottom: 54px; }
.chip-read { bottom: 0; inset-inline-start: -26px; }
@media (max-width: 560px) { .chip-read { inset-inline-start: 0; } }
.c12 { grid-column: span 12; } .tall { grid-row: span 2; }
.chain { margin-top: 12px; padding-top: 0; }
.hero-visual { padding-bottom: 88px; }
.chip-read { inset-inline-start: auto; left: -18px; bottom: 0; }
.mini-bars { height: 96px; }
@media (max-width: 900px) { .c12, .tall { grid-column: auto; grid-row: auto; } }
@media (max-width: 560px) { .chip-read { left: auto; } .hero-visual { padding-bottom: 20px; } }
.sheet td, .sheet th { white-space: nowrap; }
.sheet td:first-child { white-space: normal; }
@media (max-width: 560px) { .sheet table { font-size: .66rem; } .sheet th:nth-child(3), .sheet td:nth-child(3) { display: none; } }

.foot-in { row-gap: 10px; } .legal-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .92rem; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); } .legal-links a { text-decoration: none; } .legal-links a:hover { color: #fff; }

/* Très petits écrans : l'en-tête (logo + langue + essai) ne doit jamais déborder */
@media (max-width: 420px) {
  .top-in { gap: 8px; }
  .brand { font-size: 1.08rem; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .lang { padding: 0 10px; }
  .top .btn { padding: 0 10px; font-size: .92rem; white-space: nowrap; }
}
@media (max-width: 350px) {
  .top-in { gap: 6px; }
  .brand { font-size: .95rem; gap: 6px; }
  .brand img { width: 28px; height: 28px; }
  .lang { padding: 0 8px; font-size: .88rem; }
  .top .btn { padding: 0 8px; font-size: .86rem; }
}

/* Facturation électronique : pastille en tête de page et bascule « préparé / actif » selon le réglage de la console */
.einv-pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; margin-bottom: 22px; border-radius: 999px; background: rgba(52, 211, 153, .14); border: 1px solid rgba(52, 211, 153, .45); color: #d6fbea; font-weight: 600; font-size: .92rem; text-decoration: none; }
.einv-pill:hover { background: rgba(52, 211, 153, .22); }
.einv-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); flex: none; }
body:not([data-einv="on"]) .einv-on, body[data-einv="on"] .einv-off { display: none !important; }
#e-facture { scroll-margin-top: 90px; }
