/* Marianne (DSFR) — shared fonts from lasuite-landingpage */
@font-face { font-family: "Marianne"; font-weight: 400; font-style: normal; font-display: swap; src: url("https://lasuite.numerique.gouv.fr/assets/fonts/Marianne-Regular.woff2") format("woff2"); }
@font-face { font-family: "Marianne"; font-weight: 500; font-style: normal; font-display: swap; src: url("https://lasuite.numerique.gouv.fr/assets/fonts/Marianne-Medium.woff2") format("woff2"); }
@font-face { font-family: "Marianne"; font-weight: 700 800; font-style: normal; font-display: swap; src: url("https://lasuite.numerique.gouv.fr/assets/fonts/Marianne-Bold.woff2") format("woff2"); }

:root {
  --brand:      #3E5DE7;
  --brand-deep: #2845C1;
  --brand-soft: #EDF0FF;
  --red:        #C83F49;
  --ink:        #3A3A3A;
  --ink-soft:   #626A80;
  --line:       #DFE2EA;
  --bg:         #FFFFFF;
  --bg-tint:    radial-gradient(60% 50% at 70% 0%, rgba(62,93,231,0.06), transparent 70%), #FFFFFF;
  --radius:     8px;
  --shadow:     0 1px 0 rgba(22,22,22,0.04), 0 8px 32px -16px rgba(40,69,193,0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Marianne", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg-tint);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Topbar ───────────────────────── */
.topbar {
  top: 0;
  z-index: 100;
}
.topbar__inner {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  width: 100%;
  margin: auto;
  max-width: 1200px;
  gap: 20px;
}

/* Government logo block — hidden on mobile */
.brand-gouv {
  display: none;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  gap: 12px;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .brand-gouv { display: flex; }
}
.brand-gouv__logo { width: 112px; height: auto; display: block; }

.header-sep {
  display: none;
  width: 1px;
  height: 40px;
  background: #fff;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .header-sep { display: block; }
}

.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.brand__logo { height: 42px; width: auto; display: block; }

/* ── Hero ───────────────────────── */
.main { padding: 48px 24px 96px; }
.hero { width: 100%; margin-bottom: 40px; }
.hero h1 { font-size: 2rem; font-weight: 700; line-height: 2.5rem; margin: 0 0 16px; color: #242424; text-wrap: balance; }
@media (min-width: 768px) { .hero h1 { font-size: 2.75rem; line-height: 3rem; } }
.hero p { color: var(--ink-soft); font-size: 1rem; margin: 0; }

/* ── Layout ───────────────────────── */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 960px) { .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; } .preview-wrap { position: sticky; top: 88px; align-self: start; } }

/* ── Card / Preview ───────────────────────── */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.preview__head { display: flex; justify-content: space-between; margin-bottom: 16px; max-width: 460px; margin-left: auto; margin-right: auto; }
.meta { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.meta--live { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.canvas-wrap { aspect-ratio: 1 / 1; width: 100%; max-width: 460px; margin: 0 auto; background: var(--brand-soft); border-radius: 4px; overflow: hidden; }
#avatar { display: block; width: 100%; height: 100%; }

.actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 460px; margin-left: auto; margin-right: auto; }
.btn { border-radius: 6px; padding: 12px 18px; font-size: 14px; font-weight: 600; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--brand); color: #fff; flex: 1; min-width: 180px; }
.btn--primary:hover { background: var(--brand-deep); }
.btn--outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand-soft); }
.btn--ghost { background: transparent; color: var(--ink-soft); }
.btn--ghost:hover { color: var(--ink); }

/* ── Controls ───────────────────────── */
.controls { display: flex; flex-direction: column; gap: 32px; }
.step__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.step__n { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 11px; font-weight: 800; color: #fff; background: var(--brand); border-radius: 999px; }
.step h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 24px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: #fff; color: var(--brand); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone__title { color: var(--ink); font-size: 14px; font-weight: 500; }
.dropzone__hint { color: var(--ink-soft); font-size: 12px; }
.link { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.adjust { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.slider__head { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.slider input[type="range"] { width: 100%; accent-color: var(--brand); }
.mono { font-variant-numeric: tabular-nums; color: var(--ink); }

.reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 520px) { .reasons { grid-template-columns: repeat(3, 1fr); } }
.reason { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 500; text-align: left; transition: border-color .12s, background .12s, color .12s; }
.reason:hover { border-color: var(--brand); }
.reason svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--brand); transition: color .12s; }
.reason.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.reason.is-active svg { color: #fff; }

.field + .field { margin-top: 18px; }
.field__label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); transition: border-color .12s, background .12s, color .12s; }
.seg:hover { border-color: var(--brand); }
.seg.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.sw { width: 12px; height: 12px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.1); display: inline-block; }

/* ── Tool links ───────────────────────── */
.tool-footer { margin-top: 64px; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink-soft); }
.tool-footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.tool-footer__links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.tool-footer__links a:hover { color: var(--brand); }

/* ── DSFR Footer ───────────────────────── */
.site-footer {
  margin-top: 64px;
  padding: 32px 0;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.site-footer__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

/* Government brand block */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.footer-brand:before {
  content: '';
  display: block;
  background-image: url('https://lasuite.numerique.gouv.fr/assets/marianne.svg');
  background-repeat: no-repeat;
  background-size: contain;
  height: 1.25rem;
  width: 3rem;
  flex-shrink: 0;
}
.footer-brand-sep {
  display: block;
  width: 1px;
  height: 5rem;
  background: #000;
  flex-shrink: 0;
}
.footer-brand__text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

/* Right side: numerique.gouv logo + external links */
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.footer-numerique-logo { width: auto; height: 52px; }
.footer-external-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 20px;
}
.footer-external-links a {
  font-size: 13px;
  font-weight: 700;
  color: #2B303D;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #2B303D;
}
.footer-external-links a:hover { text-decoration-thickness: 2px; }

/* Bottom bar */
.site-footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-internal-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.footer-internal-links li { display: inline; }
.footer-internal-links li + li:before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1rem;
  background: #ddd;
  margin: 0 12px;
  vertical-align: middle;
}
.footer-internal-links a {
  font-size: 12px;
  color: #3F4759;
  text-decoration: none;
}
.footer-internal-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-internal-links svg { vertical-align: middle; margin-right: 4px; margin-top: -2px; }

.footer-license {
  margin: 0;
  font-size: 12px;
  color: #3F4759;
}
.footer-license a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
