/* Potamos : grille de tuiles carrées à filets fins, grands titres légers, bleu réservé à l'action */
:root {
  --bg: #FFFFFF;
  --surface: #F3F5F8;
  --fg: #111214;
  --muted: #4B5563;
  --line: #D9DEE6;
  --accent: #2B4BFF;
  --accent-fg: #FFFFFF;
  --night: #111214;
  --night-fg: #EDEFF3;
  --night-muted: #A2A9B6;
  --night-line: #2C3038;
  --error: #B42318;
  --font: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --t-xs: 14px; --t-s: 16px; --t-m: 19px; --t-l: 24px;
  --t-xl: clamp(30px, 4vw, 44px);
  --t-xxl: clamp(38px, 6vw, 72px);
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 72px; --s6: 112px;
  --logo-filter: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F12; --surface: #17191E; --fg: #EDEFF3; --muted: #A7AEBB; --line: #2A2E36;
    --accent: #6D85FF; --accent-fg: #0E0F12; --night: #050607; --night-line: #23262C; --error: #FF8B7E;
    --logo-filter: invert(1); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F12; --surface: #17191E; --fg: #EDEFF3; --muted: #A7AEBB; --line: #2A2E36;
  --accent: #6D85FF; --accent-fg: #0E0F12; --night: #050607; --night-line: #23262C; --error: #FF8B7E;
  --logo-filter: invert(1); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: var(--t-m); line-height: 1.55; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.gutter { padding-left: max(clamp(20px, 5vw, 64px), env(safe-area-inset-left, 0px)); padding-right: max(clamp(20px, 5vw, 64px), env(safe-area-inset-right, 0px)); }
.container { max-width: 1240px; margin: 0 auto; }
.section { padding-block: var(--s6); }
.section-s { padding-block: var(--s5); }
.pt0 { padding-top: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s2); top: var(--s2); z-index: 40; background: var(--bg); padding: var(--s1) var(--s2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); min-height: 48px; padding: 0 var(--s3); font: inherit; font-size: var(--t-s); font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--fg); color: var(--bg); }
.btn-ghost { color: var(--fg); border-color: var(--fg); background: transparent; }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }

/* en-tête */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: var(--s3); min-height: 68px; position: relative; }
.logo { display: inline-flex; align-items: center; text-decoration: none; padding: 6px 0; }
.logo img { height: 28px; width: auto; display: block; filter: var(--logo-filter); }
.nav { display: flex; align-items: center; gap: var(--s3); margin-left: auto; font-size: var(--t-s); }
.nav > a, .dd > button { text-decoration: none; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: inherit; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav > a:hover, .dd > button:hover, .nav > a[aria-current="page"] { border-bottom-color: var(--accent); }
.dd { position: relative; }
.dd svg { width: 14px; height: 14px; stroke: currentColor; }
.dd-menu { position: absolute; top: calc(100% + 12px); left: -16px; min-width: 300px; background: var(--bg); border: 1px solid var(--line); display: none; flex-direction: column; padding: var(--s1) 0; z-index: 30; }
.dd-menu a { padding: 12px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.dd-menu a small { color: var(--muted); font-size: var(--t-xs); }
.dd-menu a:hover { background: var(--surface); }
.dd[data-open="true"] .dd-menu { display: flex; }
.menu-btn { display: none; margin-left: auto; min-height: 44px; padding: 0 var(--s2); font: inherit; font-size: var(--t-s); font-weight: 600; background: transparent; color: var(--fg); border: 1px solid var(--line); cursor: pointer; }
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .bar > .btn { display: none; }
  .nav { display: none; }
  .nav[data-open="true"] { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: 100%; left: calc(-1 * max(clamp(20px, 5vw, 64px), env(safe-area-inset-left, 0px))); right: calc(-1 * max(clamp(20px, 5vw, 64px), env(safe-area-inset-right, 0px))); background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--s1) max(clamp(20px, 5vw, 64px), env(safe-area-inset-right, 0px)) var(--s3) max(clamp(20px, 5vw, 64px), env(safe-area-inset-left, 0px)); max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav > a, .dd > button { padding: var(--s2) 0; border-bottom: 1px solid var(--line); width: 100%; justify-content: space-between; }
  .dd-menu { position: static; border: 0; min-width: 0; padding: 0 0 var(--s1); }
  .dd-menu a { padding: 12px 0 12px 16px; }
  .nav .nav-cta { display: inline-flex; margin-top: var(--s3); border: 0; }
}
.nav .nav-cta { display: none; }

/* hero de l'accueil */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: var(--s5); align-items: center; padding-block: var(--s5) var(--s6); }
.hero h1, .page-hero h1 { font-size: var(--t-xxl); font-weight: 300; line-height: 1.05; letter-spacing: -1.5px; }
.hero h1 strong, .page-hero h1 strong { font-weight: 700; }
.lead { font-size: var(--t-l); font-weight: 300; color: var(--muted); max-width: 32em; line-height: 1.4; }
.hero-text { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.baseline { font-size: var(--t-s); color: var(--muted); }
.tagline { display: flex; align-items: center; gap: 14px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; letter-spacing: -0.3px; color: var(--accent); line-height: 1.2; }
.tagline svg { width: 44px; height: 16px; flex: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; }

.flow { margin: 0; min-width: 0; }
.flow svg { display: block; width: 100%; height: auto; }
.flow .lines path { stroke: var(--accent); stroke-width: 1.6; stroke-opacity: .4; }
.flow .out { stroke: var(--accent); stroke-width: 4; }
.flow .chip rect { fill: var(--surface); stroke: var(--line); }
.flow text { font-family: var(--font); fill: var(--fg); }
.flow .chip text { font-size: 15px; }
.flow .node { fill: var(--accent); }
.flow .node-label { fill: var(--accent-fg); font-weight: 700; font-size: 20px; }
.flow .card rect { fill: var(--bg); stroke: var(--fg); stroke-width: 1.5; }
.flow .card text { font-size: 15px; font-weight: 600; }
.flow .check { stroke: var(--accent); stroke-width: 2.5; }
.flow .pulse { fill: var(--accent); }
@media (max-width: 860px) { .flow { display: none; } }

/* hero des pages intérieures */
.page-hero { padding-block: var(--s5); display: flex; flex-direction: column; gap: var(--s3); border-bottom: 1px solid var(--line); }
.crumbs { font-size: var(--t-xs); color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--muted); }
.meta { font-size: var(--t-xs); color: var(--muted); }

/* titres de section */
.sec-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--s3) var(--s5); align-items: end; margin-bottom: var(--s4); }
.sec-head h2, .h2 { font-size: var(--t-xl); font-weight: 300; line-height: 1.12; letter-spacing: -0.5px; }
.sec-head p { color: var(--muted); max-width: 34em; }

/* tuiles */
.tiles { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tiles > * { background: var(--bg); min-width: 0; }
.t2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.t3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.t4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.tile { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s3) var(--s3); text-decoration: none; transition: background .15s; }
a.tile:hover { background: var(--surface); }
.tile .ico { width: 48px; height: 48px; stroke: var(--accent); }
.tile .kind { font-size: var(--t-xs); color: var(--muted); }
.tile h3 { font-size: var(--t-l); font-weight: 600; line-height: 1.2; }
.tile p, .tile li { color: var(--muted); font-size: var(--t-s); }
.tile ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.tile .go { margin-top: auto; padding-top: var(--s2); display: flex; justify-content: space-between; align-items: center; font-size: var(--t-s); font-weight: 600; color: var(--accent); }
.tile .go svg { width: 20px; height: 20px; stroke: var(--accent); transition: transform .15s; }
a.tile:hover .go svg { transform: translateX(4px); }

@media (max-width: 1080px) {
  .tiles.slide { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .tiles.slide > * { flex: 0 0 min(78%, 340px); scroll-snap-align: start; }
  .slider-hint { display: flex; }
}
.slider-hint { display: none; justify-content: flex-end; gap: var(--s1); margin-top: var(--s2); font-size: var(--t-xs); color: var(--muted); align-items: center; }
.slider-hint button { width: 44px; height: 44px; display: grid; place-items: center; background: var(--bg); color: var(--fg); border: 1px solid var(--line); cursor: pointer; }
.slider-hint button:hover { border-color: var(--fg); }
.slider-hint svg { width: 18px; height: 18px; stroke: currentColor; }

/* bloc sombre */
.night { background: var(--night); color: var(--night-fg); }
.night .sec-head p { color: var(--night-muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .steps, .steps-4 { grid-template-columns: minmax(0, 1fr); } }
.steps li { display: flex; flex-direction: column; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--night-line); }
.steps .num { font-size: clamp(52px, 6vw, 88px); font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: var(--t-l); font-weight: 600; }
.steps p { color: var(--night-muted); }
.steps-light li { border-top-color: var(--line); }
.steps-light .num { color: var(--accent); }
.steps-light p { color: var(--muted); }

/* deux colonnes de contenu */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--s4) var(--s5); align-items: start; }
.split > * { min-width: 0; }

/* texte long : articles et pages */
.prose { max-width: 72ch; display: flex; flex-direction: column; gap: var(--s3); }
.prose h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 400; line-height: 1.2; margin-top: var(--s4); }
.prose h3 { font-size: var(--t-l); font-weight: 600; margin-top: var(--s2); }
.prose ul, .prose ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: var(--s1); }
.prose a { color: var(--accent); }
.prose strong { font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: var(--t-s); min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.note { font-size: var(--t-xs); color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--s2); }
.sources { font-size: var(--t-xs); color: var(--muted); }
.sources a { color: var(--muted); }

/* FAQ */
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--s4) var(--s5); }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s3) 0; font-weight: 600; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 300; font-size: 28px; line-height: 1; color: var(--accent); flex: none; }
details[open] summary::after { content: "−"; }
details p { padding-bottom: var(--s3); color: var(--muted); max-width: 40em; }

/* appel à l'action */
.cta-band { background: var(--surface); border-top: 1px solid var(--line); }
.cta-band h2 { font-size: var(--t-xxl); font-weight: 300; line-height: 1.05; letter-spacing: -1px; }
.cta-band .lead { margin-top: var(--s3); }
.cta-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); font-size: var(--t-s); }
.cta-points li { display: flex; gap: var(--s2); align-items: baseline; }
.cta-points li::before { content: ""; width: 10px; height: 10px; background: var(--accent); flex: none; transform: translateY(-1px); }

/* agenda Calendly */
.calendly-box { background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--accent); min-height: 300px; }
.calendly-inline-widget { min-width: 300px; height: 720px; }
.cal-fallback { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.cal-fallback h2 { font-size: var(--t-l); font-weight: 600; }
.cal-fallback p { color: var(--muted); }
.contact-lines { display: flex; flex-direction: column; gap: 4px; }

/* formulaire de contact (page contact, sous l'agenda) */
.form-section .container { border-top: 1px solid var(--line); padding-top: var(--s5); }
.form-intro { display: flex; flex-direction: column; gap: var(--s2); }
.contact-form, .form-done { background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--accent); padding: var(--s4) var(--s3) var(--s3); display: flex; flex-direction: column; gap: var(--s3); }
.field { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
fieldset.field { display: block; border: 0; margin: 0; padding: 0; }
.field > label, .field legend { font-size: var(--t-s); font-weight: 600; padding: 0; }
.field > label span { font-weight: 400; color: var(--muted); }
.hint { font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--s2); margin-top: var(--s1); }
.sub { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sub label { font-size: var(--t-xs); color: var(--muted); }
.contact-form input, .contact-form textarea { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: var(--t-s); line-height: 1.4; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 0; transition: border-color .15s; }
.contact-form textarea { min-height: 128px; resize: vertical; }
.contact-form input:hover, .contact-form textarea:hover { border-color: var(--muted); }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.contact-form [aria-invalid="true"] { border-color: var(--error); }
.form-error { font-size: var(--t-s); color: var(--error); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.form-foot .meta { flex: 1 1 220px; }
.form-foot .meta a { color: var(--muted); }
.contact-form .btn[disabled] { opacity: .6; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done h3 { font-size: var(--t-l); font-weight: 600; }
.form-done p { color: var(--muted); }
.form-done:focus { outline: none; }

/* portrait (à propos) */
.portrait { aspect-ratio: 4 / 5; max-width: 100%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: var(--t-s); }

/* pied */
.site-footer { background: var(--night); color: var(--night-fg); font-size: var(--t-s); }
.site-footer .logo img { filter: invert(1); height: 26px; }
.foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--s4); padding-block: var(--s5); }
.foot h2 { font-size: var(--t-s); font-weight: 600; margin-bottom: var(--s2); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }
.foot a { color: var(--night-muted); text-decoration: none; }
.foot a:hover { color: var(--night-fg); text-decoration: underline; }
.foot p { color: var(--night-muted); }
.legal { border-top: 1px solid var(--night-line); padding-block: var(--s3); font-size: var(--t-xs); color: var(--night-muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); }

/* encadré des gains (page secteurs) */
.gains { border: 1px solid var(--line); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.gains h3 { font-size: var(--t-l); font-weight: 600; }
.gains .cta-points { font-size: var(--t-m); }

/* bouton qui ressemble à un lien (pied de page) */
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--night-muted); cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--night-fg); text-decoration: underline; }

/* bandeau de cookies */
.cookie-banner { position: fixed; z-index: 50; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 560px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-top: 4px solid var(--accent); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); font-size: var(--t-s); box-shadow: 0 12px 40px rgba(17, 18, 20, .18); }
.cookie-banner h2 { font-size: var(--t-l); font-weight: 600; }
.cookie-banner p { color: var(--muted); }
.cookie-banner a { color: var(--accent); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--s1); }
.cookie-actions .btn { flex: 1 1 140px; min-height: 44px; }
.cookie-prefs { display: flex; flex-direction: column; gap: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s2); }
.cookie-prefs label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer; }
.cookie-prefs input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.cookie-prefs small { display: block; color: var(--muted); font-size: var(--t-xs); }

/* approche (accueil) : toujours empilée verticalement */
.principles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.principles li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s1) var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.principles h2 { font-size: var(--t-l); font-weight: 600; letter-spacing: -0.2px; line-height: 1.25; }
.principles p { color: var(--muted); max-width: 62ch; }
@media (max-width: 760px) {
  .principles li { grid-template-columns: 1fr; padding: var(--s2) 0; }
}

/* bandeau de cookies : catégories */
.cookie-prefs .always { font-size: var(--t-xs); font-weight: 600; color: var(--muted); margin-left: 6px; }
.cookie-prefs input:disabled { opacity: .6; cursor: not-allowed; }
.cal-consent { color: var(--muted); }
.cal-consent .link-btn { color: var(--accent); text-decoration: underline; }

/* bloc sombre encadré (méthode sur l'accueil) */
.night-box { padding: var(--s5) var(--s4); }
@media (max-width: 760px) { .night-box { padding: var(--s4) var(--s3); } }
