/* RACINE IA — Landing page | palette alignée sur l'application Flutter */
:root {
  --bg: #F6F2EC;
  --bg-alt: #EFE9E1;
  --surface: #FFFDF9;
  --surface-strong: #FFFFFF;
  --text: #3A281F;
  --text-soft: #71645B;
  --text-muted: #9A8E85;
  --brand: #5B3A28;
  --brand-hover: #4A2F20;
  --brand-soft: #866550;
  --border: #E6DED5;
  --border-strong: #D8CDC2;
  --success: #4E6B55;
  --danger: #9A5147;
  --max-width: 1080px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-soft: 0 10px 30px rgba(58, 40, 31, .045);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  overflow-y: scroll;
}
body {
  min-width: 320px;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.62;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
body, main { width: 100%; }
img { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
a:hover { color: var(--brand-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid #B99A83; outline-offset: 3px; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 1000;
  padding: 10px 14px; border-radius: 8px; background: var(--surface);
  color: var(--text); transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.container { width: min(100% - 48px, var(--max-width)); margin-inline: auto; }
.narrow, .institutional { max-width: 800px; }

/* Header compact et toujours accessible */
.site-header {
  position: sticky; top: 0; z-index: 100;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 253, 249, .96);
  backdrop-filter: blur(12px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: 1rem; font-weight: 800;
}
.brand-name { color: var(--text); font-size: 1.02rem; font-weight: 750; letter-spacing: -.015em; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 10px 18px; border: 1px solid transparent;
  border-radius: var(--radius-md); text-align: center; line-height: 1.25;
  font-size: .92rem; font-weight: 650; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { color: #fff; background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-secondary { color: var(--text); background: var(--surface); border-color: var(--border-strong); }
.btn-secondary:hover { color: var(--brand); border-color: var(--brand); }

/* Hero */
.hero { padding: clamp(48px, 7vw, 76px) 0 clamp(44px, 6vw, 64px); background: var(--bg); }
.hero-content { max-width: 920px; }
.tagline, .eyebrow {
  display: inline-block; color: var(--brand-soft); font-size: .72rem;
  font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
}
.tagline { margin-bottom: 18px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 100px; background: var(--surface); letter-spacing: .08em; }
.hero h1 {
  max-width: 800px; margin: 0 0 18px; color: var(--text);
  font-size: clamp(2rem, 5vw, 3.15rem); line-height: 1.12;
  font-weight: 780; letter-spacing: -.04em;
}
.lead { max-width: 760px; margin: 0 0 24px; color: var(--text-soft); font-size: clamp(1rem, 1.6vw, 1.08rem); line-height: 1.72; }
.cta-group { display: flex; flex-wrap: wrap; gap: 10px; }

/* Sections : espaces resserrés pour une page plus courte sans retirer les contenus utiles */
.section { padding: clamp(42px, 5.5vw, 60px) 0; }
.section-alt { background: var(--bg-alt); }
.section h2, .final-cta h2 {
  margin: 0 0 16px; color: var(--text); font-size: clamp(1.45rem, 2.7vw, 1.9rem);
  font-weight: 760; line-height: 1.22; letter-spacing: -.025em;
}
.section p { max-width: 780px; margin: 0 0 12px; color: var(--text-soft); line-height: 1.72; }
.section p:last-child { margin-bottom: 0; }
.section-intro .eyebrow, .institutional .eyebrow, .final-cta .eyebrow { margin-bottom: 9px; }
.section-heading { max-width: 700px; margin-bottom: 22px; }
.section-heading > p:last-child { margin-top: 0; }

/* Cartes */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card {
  min-width: 0; padding: 21px 20px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft);
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card-number { display: inline-block; margin-bottom: 11px; color: var(--brand-soft); font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.card h3 { margin: 0 0 8px; color: var(--text); font-size: 1rem; font-weight: 750; line-height: 1.35; }
.card p { margin: 0; color: var(--text-soft); font-size: .91rem; line-height: 1.62; }

/* Publics */
.audience-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
.audience-copy .eyebrow { margin-bottom: 9px; }
.audience-copy p:last-child { margin-bottom: 0; }
.audience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.audience { min-width: 0; padding: 22px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.audience h3 { margin: 0 0 12px; color: var(--text); font-size: 1rem; font-weight: 750; line-height: 1.35; }
.audience ul { list-style: none; margin: 0; padding: 0; }
.audience li { position: relative; padding: 8px 0 8px 17px; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: .88rem; line-height: 1.55; }
.audience li:last-child { border-bottom: 0; }
.audience li::before { position: absolute; top: 16px; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); content: ""; }
.audience p { margin: 0; color: var(--text-soft); font-size: .9rem; line-height: 1.68; }
.institutional { max-width: 820px; }

/* CTA final */
.final-cta { padding: clamp(48px, 6vw, 68px) 0; text-align: center; }
.final-cta-inner { max-width: 720px; }
.final-cta h2 { margin-bottom: 10px; }
.final-cta p:not(.eyebrow):not(.small-note) { margin: 0 0 20px; color: var(--text-soft); }
.final-cta .small-note { margin: 12px 0 0; color: var(--text-muted); font-size: .83rem; }

/* Footer */
.site-footer { padding: 34px 0 22px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr .7fr; gap: 24px; margin-bottom: 26px; }
.site-footer h3 { margin: 4px 0 10px; color: var(--text); font-size: .88rem; font-weight: 800; }
.site-footer p { margin: 0 0 7px; color: var(--text-muted); font-size: .84rem; line-height: 1.6; }
.site-footer a { color: var(--text-soft); overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--brand); }
.footer-brand > p { margin-top: 12px; }
.footer-slogan { font-style: italic; font-size: .8rem !important; }
.copyright { margin: 0; padding-top: 17px; border-top: 1px solid var(--border); text-align: center; font-size: .8rem !important; }

/* Défilement visible sur ordinateur et tactile fluide sur appareils mobiles */
@media (hover: hover) and (pointer: fine) {
  html { scrollbar-width: auto; scrollbar-color: #B7A89D var(--bg-alt); }
  html::-webkit-scrollbar { width: 12px; }
  html::-webkit-scrollbar-track { background: var(--bg-alt); }
  html::-webkit-scrollbar-thumb { border: 3px solid var(--bg-alt); border-radius: 20px; background: #B7A89D; }
  html::-webkit-scrollbar-thumb:hover { background: var(--brand-soft); }
}
@media (pointer: coarse) {
  html { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audience-layout { grid-template-columns: 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 32px, var(--max-width)); }
  .site-header { padding: 8px 0; }
  .brand { gap: 8px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 9px; }
  .brand-name { font-size: .96rem; }
  .header-cta { min-height: 38px; padding: 8px 11px; font-size: .82rem; }
  .hero { padding: 43px 0 38px; }
  .tagline { max-width: 100%; font-size: .64rem; letter-spacing: .055em; }
  .hero h1 { font-size: clamp(1.85rem, 8vw, 2.45rem); }
  .lead { margin-bottom: 20px; font-size: .98rem; }
  .cta-group { flex-direction: column; align-items: stretch; }
  .cta-group .btn { width: 100%; }
  .section { padding: 38px 0; }
  .grid { grid-template-columns: 1fr; gap: 11px; }
  .card { padding: 19px 18px; }
  .audience-grid { grid-template-columns: 1fr; }
  .audience { padding: 20px 18px; }
  .final-cta { padding: 46px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px 14px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .container { width: min(100% - 24px, var(--max-width)); }
  .header-inner { gap: 8px; }
  .header-cta { padding-inline: 9px; font-size: .78rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
