/* Federy · charte v2.2 · styles communs à toutes les pages
   Encre = couleur principale, safran = accent (le point), fond gris froid.
   Basilic et sauge sont réservés aux états de succès. */
:root {
  --primary: #16181D;
  --primary-h: #2B2F37;
  --brume: #EEF0F3;
  --basilic: #1E6B4F;
  --basilic-h: #18573F;
  --sauge: #DCEBDF;
  --safran: #F2B035;
  --creme: #FBEBC8;
  --paprika: #B83A25;
  --rose: #F8DDD6;
  --encre: #16181D;
  --zinc: #646972;
  --zinc-2: #A3A7AE;
  --papier: #F5F6F8;
  --filet: #E3E6EB;
  --blanc: #FFFFFF;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
  --r: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--papier); color: var(--encre); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--safran); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
section { padding-block: clamp(64px, 9vw, 112px); }
.white { background: var(--blanc); }
.eyebrow { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--zinc); margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--safran); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; }
.dot-s { color: var(--safran); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--zinc); max-width: 60ch; margin: 18px 0 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); }
.logo svg { width: 23px; height: 32px; flex: none; }
.logo span { font-family: var(--display); font-weight: 700; font-size: 27px; letter-spacing: -.035em; line-height: 1; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #FFFFFF; }
.btn-primary:hover { background: var(--primary-h); }
.btn-ghost { background: transparent; color: var(--encre); border-color: var(--encre); }
.btn-ghost:hover { background: rgba(22,24,29,.05); }
.btn-safran { background: var(--safran); color: var(--encre); }
.btn-safran:hover { background: #E5A126; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(245,246,248,.88); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--filet); padding-top: env(safe-area-inset-top, 0px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.nav ul { display: flex; gap: 22px; white-space: nowrap; list-style: none; margin: 0; padding: 0; font-size: 15px; color: var(--zinc); }
.nav ul a { text-decoration: none; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--encre); }
.nav .btn { min-height: 42px; font-size: 15px; padding: 0 18px; }
@media (max-width: 1100px) { .nav ul { display: none; } }

/* Ticket : bord déchiré sous une carte */
.tear { display: block; width: 100%; height: 9px; }

/* Cartes génériques */
.card { background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--r); padding: 24px; }

/* Modules */
.mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
@media (max-width: 960px) { .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .mods { grid-template-columns: minmax(0, 1fr); } }
.mod { background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.mod .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brume); color: var(--encre); }
.mod .ico.s { background: var(--creme); color: #7A5300; }
.mod .ico svg { width: 22px; height: 22px; }
.mod .tag { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--zinc); }
.mod h3 { font-size: 23px; line-height: 1.12; }
.mod p { margin: 0; color: var(--zinc); font-size: 15.5px; }
.mod ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.mod ul li { display: flex; gap: 8px; }
.mod ul li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--safran); margin-top: 9px; }
.mod .price { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--filet); font-size: 14px; color: var(--zinc); }
.mod .price b { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; color: var(--encre); }

/* Tarifs */
.packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 44px; align-items: stretch; }
@media (max-width: 1060px) { .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .packs { grid-template-columns: minmax(0, 1fr); } }
.pack { position: relative; background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.pack.star { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.pack .flag { position: absolute; top: -12px; left: 24px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; background: var(--safran); color: var(--encre); padding: 4px 10px; border-radius: 999px; }
.pack h3 { font-size: 23px; }
.pack .for { margin: 0; color: var(--zinc); font-size: 15px; }
.pack.star .for { color: var(--zinc-2); }
.pack .amount { display: flex; align-items: baseline; gap: 6px; }
.pack .amount b { font-family: var(--display); font-weight: 700; font-size: 48px; letter-spacing: -.04em; line-height: 1; }
.pack .amount span { font-size: 14px; color: var(--zinc); }
.pack.star .amount span { color: var(--zinc-2); }
.pack ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.pack ul li { display: flex; gap: 10px; }
.pack ul li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 4px; border-radius: 4px; background: var(--sauge) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-5' fill='none' stroke='%231E6B4F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.pack .btn { margin-top: auto; width: 100%; }
.pack.star .btn-ghost { color: var(--papier); border-color: rgba(255,255,255,.35); }
.terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
@media (max-width: 860px) { .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .terms { grid-template-columns: minmax(0, 1fr); } }
.term { font-size: 14.5px; color: var(--zinc); border-top: 2px solid var(--encre); padding-top: 12px; }
.term:nth-child(2) { border-color: var(--safran); }
.term b { display: block; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--encre); margin-bottom: 2px; }

/* FAQ */
.faq-list { margin-top: 36px; max-width: 860px; border-top: 1px solid var(--filet); }
.faq details { border-bottom: 1px solid var(--filet); padding: 18px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--encre); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--zinc); max-width: 70ch; }

/* Contact */
.contact { background: var(--encre); color: var(--papier); }
.contact .eyebrow { color: var(--safran); }
.contact .lede { color: var(--zinc-2); }
form { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 820px; }
@media (max-width: 620px) { form { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: var(--zinc-2); }
.field input, .field select { font: inherit; font-size: 16px; color: var(--encre); background: var(--blanc); border: 1px solid var(--filet); border-radius: 10px; padding: 12px 14px; min-height: 48px; width: 100%; }
.full { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-foot small { font-size: 13px; color: var(--zinc-2); max-width: 54ch; }
.status { font-size: 15px; min-height: 1.4em; margin: 0; }
.status.ok { color: var(--safran); }
.status.err { color: #F4B3A6; }

/* Pied de page */
footer { border-top: 1px solid var(--filet); padding-block: 36px; font-size: 14px; color: var(--zinc); background: var(--papier); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
footer .sig { font-family: var(--display); font-weight: 700; color: var(--encre); letter-spacing: -.01em; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--encre); }

/* Accès à l'app : connexion et création de compte */
.nav-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.nav-login { font-size: 15px; font-weight: 500; color: var(--encre); text-decoration: none; white-space: nowrap; }
.nav-login:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav .btn { white-space: nowrap; }
.xs-show { display: none; }
.hero .fine-login { margin-top: 4px; }
.fine-login a { color: var(--encre); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 420px) {
  .nav-actions { gap: 12px; }
  .nav-login { font-size: 14px; }
  .nav .btn { padding: 0 14px; font-size: 14px; }
  .xs-hide { display: none; }
  .xs-show { display: inline; }
}

/* ---------- Guides et outils gratuits ---------- */
.crumbs { font-size: 14px; color: var(--zinc); margin: 0 0 18px; }
.crumbs a { text-decoration: none; color: var(--zinc); }
.crumbs a:hover { color: var(--encre); text-decoration: underline; }
.page-hero { padding-block: clamp(40px, 6vw, 80px) clamp(28px, 4vw, 48px); }
.page-hero h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; max-width: 20ch; }
.page-hero .lede { max-width: 64ch; }
.page-hero .meta { margin-top: 18px; font-size: 14px; color: var(--zinc); }
.article { padding-block: 0 clamp(56px, 8vw, 96px); }
.article .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .article .wrap { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.prose { min-width: 0; font-size: 17px; }
.prose > :not(.tool):not(.table-scroll):not(.related):not(.cta-band):not(.callout) { max-width: 72ch; }
.prose > .callout, .prose > .table-scroll { max-width: 80ch; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; margin: 52px 0 14px; scroll-margin-top: 90px; }
.prose h3 { font-size: 21px; margin: 30px 0 8px; }
.prose p, .prose li { color: #2E3138; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--encre); font-weight: 500; text-underline-offset: 3px; }
.prose .formula { font-family: var(--mono); font-size: 15px; background: var(--blanc); border: 1px solid var(--filet); border-left: 4px solid var(--safran); border-radius: 10px; padding: 14px 16px; margin: 16px 0; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; background: var(--blanc); border: 1px solid var(--filet); border-radius: 12px; overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--filet); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--zinc); background: #F8F9FB; }
.prose tr:last-child td { border-bottom: 0; }
.prose td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.callout { border-radius: 14px; padding: 16px 18px; margin: 20px 0; background: var(--sauge); color: var(--encre); }
.callout.warn { background: var(--creme); }
.callout p { margin: 6px 0 0; color: var(--encre); }
.callout b:first-child { font-family: var(--display); font-weight: 700; }
.toc { position: sticky; top: 92px; font-size: 14px; border-left: 2px solid var(--filet); padding-left: 16px; }
.toc b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--zinc); margin-bottom: 10px; }
.toc a { display: block; text-decoration: none; color: var(--zinc); padding: 4px 0; }
.toc a:hover { color: var(--encre); }
.cta-band { margin: 44px 0 0; border-radius: var(--r); background: var(--encre); color: var(--papier); padding: clamp(22px, 3vw, 32px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; }
@media (max-width: 640px) { .cta-band { grid-template-columns: minmax(0, 1fr); } }
.cta-band h2, .prose .cta-band h2 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); color: var(--papier); }
.cta-band p, .prose .cta-band p { margin: 6px 0 0; color: var(--zinc-2); }
.cta-band .btn { white-space: nowrap; }
.faq-mini details { border-bottom: 1px solid var(--filet); padding: 14px 0; }
.faq-mini summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.faq-mini details p { margin: 8px 0 0; }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.related a { display: grid; gap: 4px; text-decoration: none; background: var(--blanc); border: 1px solid var(--filet); border-radius: 14px; padding: 16px; color: var(--encre); font-weight: 400; }
.related a:hover { border-color: var(--encre); }
.related a b { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.related a span { font-size: 14px; color: var(--zinc); }

/* Outils de calcul */
.tool { background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--r); padding: clamp(16px, 2.4vw, 24px); display: grid; gap: 16px; margin: 8px 0 28px; }
.tool .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tool label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--encre); }
.tool input, .tool select { font: inherit; font-size: 16px; color: var(--encre); background: var(--blanc); border: 1px solid var(--filet); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; min-width: 0; }
.tool input:focus, .tool select:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px rgba(242,176,53,.35); }
.tool input.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tool .lines { display: grid; gap: 8px; }
.tool .line { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(70px, .8fr) 96px minmax(80px, .9fr) 96px 76px 76px 32px; gap: 8px; align-items: center; }
.tool .line.head { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--zinc); }
.tool .line .cost { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; min-width: 64px; }
.tool .x { border: 0; background: none; color: var(--zinc-2); font-size: 20px; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.tool .x:hover { background: var(--papier); color: var(--paprika); }
@media (max-width: 760px) {
  .tool .line.head { display: none; }
  .tool .line { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 10px; border: 1px solid var(--filet); border-radius: 12px; }
  .tool .line > :nth-child(1) { grid-column: 1 / -1; }
  .tool .line > :nth-child(2), .tool .line > :nth-child(3), .tool .line > :nth-child(4) { grid-column: span 2; }
  .tool .line > :nth-child(5), .tool .line > :nth-child(6) { grid-column: span 2; }
  .tool .line .cost { grid-column: span 1; text-align: left; }
}
.tool .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tool .btn { min-height: 42px; font-size: 15px; padding: 0 18px; }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.res { border: 1px solid var(--filet); border-radius: 12px; padding: 12px 14px; background: #F8F9FB; }
.res.main { background: var(--sauge); border-color: transparent; }
.res.bad { background: var(--rose); border-color: transparent; }
.res .k { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--zinc); }
.res .v { font-family: var(--mono); font-weight: 500; font-size: 24px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res small { display: block; font-size: 12.5px; color: var(--zinc); }
.tool .note { font-size: 13.5px; color: var(--zinc); margin: 0; }
.dl { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }

/* Bande « outils gratuits » de l'accueil */
.free-tools .related { margin-top: 32px; }

@media print {
  .nav, footer, .toc, .cta-band, .related, .no-print, .crumbs, .page-hero .meta { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .article .wrap { display: block; }
  .tool { border: 0; padding: 0; }
  .tool input, .tool select { border: 0; border-bottom: 1px solid #999; border-radius: 0; padding: 2px 0; min-height: 0; }
  .tool .x { display: none; }
  .print-hide-guide .prose > :not(.tool):not(.print-keep) { display: none !important; }
}
.prose a.btn { text-decoration: none; font-weight: 700; }
.prose a.btn-primary { color: var(--papier); }
.prose a.btn-safran, .prose a.btn-ghost { color: var(--encre); }
.prose .related a { font-weight: 400; }
