/* Achille - site vitrine. Mêmes couleurs que l'app et le thème Keycloak. */
:root {
  --blue: #3C7AB8;
  --blue-dark: #2D5F91;
  --blue-light: #7DB4EA;
  --caramel: #C98E5A;
  --cream: #F3D2AE;
  --ink: #1B2B3A;
  --muted: #5B6B7B;
  --bg-top: #E6F0FA;
  --bg-bottom: #F7F9FC;
  --card: #FFFFFF;
  --line: #D5DEE8;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #7DB4EA;
    --blue-dark: #A9CDF2;
    --ink: #EEF3F8;
    --muted: #A3B1BF;
    --bg-top: #13263A;
    --bg-bottom: #0D1620;
    --card: #17222E;
    --line: #2A3B4D;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 640px) no-repeat, var(--bg-bottom);
  min-height: 100vh;
}

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

h1, h2, h3 { font-family: var(--font-rounded); line-height: 1.2; letter-spacing: -0.01em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- En-tête ---------- */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-rounded); font-weight: 700; font-size: 22px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 4px 12px rgba(27, 61, 99, .2); }
.site-header nav { display: flex; gap: 20px; font-size: 15px; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 17px;
  background: var(--blue); color: #fff;
  border: 0; cursor: pointer;
}
.btn:hover { background: var(--blue-dark); color: #fff; }
@media (prefers-color-scheme: dark) { .btn, .btn:hover { color: #0D1620; } }
.btn.secondary { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.btn.secondary:hover { color: var(--blue-dark); box-shadow: inset 0 0 0 2px var(--blue-dark); }
.btn[aria-disabled="true"] { opacity: .65; pointer-events: none; }

/* ---------- Accueil : hero ---------- */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.5vw, 56px); margin: 0 0 16px; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* Téléphone dessiné en CSS (pas de capture d'écran à maintenir) */
.phone {
  justify-self: center;
  width: 280px; aspect-ratio: 9 / 19;
  border-radius: 44px; padding: 14px;
  background: #0f1720;
  box-shadow: 0 30px 60px rgba(27, 61, 99, .28);
}
.phone .screen {
  height: 100%; border-radius: 32px; overflow: hidden;
  background: linear-gradient(180deg, #7DB4EA 0%, #3C7AB8 100%);
  padding: 46px 16px 16px; display: flex; flex-direction: column; gap: 12px;
}
.widget {
  background: rgba(255, 255, 255, .95); color: #1B2B3A;
  border-radius: 22px; padding: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.widget .label { font-size: 12px; font-weight: 600; color: #5B6B7B; text-transform: uppercase; letter-spacing: .04em; }
.widget .big { font-family: var(--font-rounded); font-size: 34px; font-weight: 700; color: #3C7AB8; line-height: 1.1; margin: 4px 0; }
.widget .small { font-size: 13px; color: #5B6B7B; }
.widget.row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.widget.row strong { font-size: 15px; }
.widget.row span { font-size: 13px; color: #5B6B7B; }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
section h2 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 12px; text-align: center; }
section p.sub { text-align: center; color: var(--muted); max-width: 40em; margin: 0 auto 40px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.feature .icon { font-size: 30px; line-height: 1; margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { text-align: center; padding: 8px 12px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 700; font-family: var(--font-rounded);
  margin-bottom: 12px;
}
@media (prefers-color-scheme: dark) { .step::before { color: #0D1620; } }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

.trust {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.trust h3 { margin: 0 0 6px; font-size: 18px; }
.trust p { margin: 0; color: var(--muted); font-size: 16px; }

.cta { text-align: center; }
.cta .btn { margin-top: 8px; }

/* ---------- Pages de texte (CGU, confidentialité...) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 24px 24px 64px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); margin: 8px 0 8px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.doc h2 { font-size: 22px; margin: 36px 0 8px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; }
.doc .todo { background: rgba(201, 142, 90, .18); border-radius: 4px; padding: 0 4px; }

.draft-banner {
  background: rgba(201, 142, 90, .16); border: 1px solid var(--caramel);
  border-radius: 12px; padding: 12px 16px; font-size: 15px; margin: 0 0 24px;
}

/* ---------- Page invitation ---------- */
.center-card {
  max-width: 460px; margin: 24px auto 80px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 40px 28px;
}
.center-card img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 8px 20px rgba(27, 61, 99, .25); }
.center-card h1 { font-size: 28px; margin: 20px 0 8px; }
.center-card p { color: var(--muted); margin: 0 0 24px; }
.center-card .actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.center-card .small { font-size: 14px; margin-top: 20px; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Petits écrans ---------- */
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .actions { justify-content: center; }
  .features, .steps, .trust { grid-template-columns: 1fr; }
  .site-header nav { display: none; }
  .phone { width: 240px; }
}
@media (min-width: 821px) and (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
