/* =========================================================
   Simulateurs — Les Meufs Libres
   Charte : brun #823E00 · doré #F3BD3F · crème #FBEFBB · texte #2D1C1C
   Titres : Awesome Serif (fallback Fraunces) · Texte : Livvic
   ========================================================= */

/* --- Awesome Serif : dépose tes fichiers dans /fonts puis décommente ---
@font-face {
  font-family: "Awesome Serif";
  src: url("fonts/AwesomeSerif-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Awesome Serif";
  src: url("fonts/AwesomeSerif-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
---------------------------------------------------------------------- */

/* --- HK Grotesk : dépose tes fichiers dans /fonts puis décommente.
   Sinon, fallback automatique sur Hanken Grotesk (Google Fonts, même créateur).
@font-face {
  font-family: "HK Grotesk";
  src: url("fonts/HKGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "HK Grotesk";
  src: url("fonts/HKGrotesk-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "HK Grotesk";
  src: url("fonts/HKGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
---------------------------------------------------------------------- */

:root {
  --creme: #FBEFBB;
  --creme-clair: #FDF8E4;
  --dore: #F3BD3F;
  --brun: #823E00;
  --brun-fonce: #2D1C1C;
  --blanc: #FFFFFF;

  --ombre: 0 8px 30px rgba(45, 28, 28, 0.10);
  --ombre-soft: 0 2px 12px rgba(45, 28, 28, 0.06);
  --radius: 18px;
  --radius-sm: 12px;

  --serif: "Awesome Serif", "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Livvic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--brun-fonce);
  background: var(--creme-clair);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.1;
  color: var(--brun);
}

a { color: var(--brun); text-decoration: none; }

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

/* ---------- Header (générique site Alice Delvar) ---------- */
.site-header {
  background: var(--blanc);
  border-bottom: 1px solid rgba(130, 62, 0, 0.12);
  padding: 13px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--brun);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--brun-fonce);
  opacity: 0.8;
  transition: opacity 0.15s, color 0.15s;
}
.site-nav a:hover { opacity: 1; color: var(--brun); }
.site-nav a.current { color: var(--brun); opacity: 1; font-weight: 600; }

@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; gap: 12px; }
  .site-nav { gap: 18px; flex-wrap: wrap; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 32px 0 22px;
}
.hero .eyebrow {
  display: inline-block;
  background: var(--dore);
  color: var(--brun-fonce);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.hero p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.35;
  color: rgba(45, 28, 28, 0.75);
}

/* ---------- Grille de cartes (hub) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 8px 0 36px;
}
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--blanc);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--ombre-soft);
  border: 1px solid rgba(130, 62, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 170px;
}
.card.active:hover { transform: translateY(-4px); box-shadow: var(--ombre); }
.card .icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--creme);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.card p { font-size: 0.92rem; line-height: 1.4; color: rgba(45,28,28,0.65); flex: 1; }
.card .cta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--brun);
}
.card .badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.card .badge.populaire { background: var(--dore); color: var(--brun-fonce); }
.card.soon { opacity: 0.55; }
.card.soon .icon { background: #F0F0EC; }
.card .badge.bientot { background: #EDE7DA; color: var(--brun); }
.card.soon .cta { color: rgba(45,28,28,0.4); }

/* ---------- Page simulateur ---------- */
.sim-layout {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 30px;
  align-items: start;
  padding: 18px 0 32px;
}
.sim-intro { padding: 16px 0 4px; }
.sim-intro h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 6px; }
.sim-intro p { max-width: 880px; color: rgba(45,28,28,0.72); font-size: 1rem; line-height: 1.4; }

.panel {
  background: var(--blanc);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--ombre-soft);
  border: 1px solid rgba(130, 62, 0, 0.08);
}
.panel h2 { font-size: 1.3rem; margin-bottom: 14px; color: var(--brun-fonce); }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: rgba(45,28,28,0.5); font-size: 0.85rem; }
.input-group {
  display: flex;
  align-items: center;
  background: var(--creme-clair);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  transition: border-color 0.15s, background 0.15s;
}
.input-group:focus-within {
  border-color: var(--dore);
  background: var(--blanc);
}
.input-group input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brun-fonce);
  padding: 11px 0;
  width: 100%;
  outline: none;
}
.input-group .unit {
  font-weight: 600;
  color: var(--brun);
  padding-left: 10px;
  white-space: nowrap;
}
.input-group input::-webkit-outer-spin-button,
.input-group input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-group input[type=number] { -moz-appearance: textfield; }

/* slider */
.field input[type=range] {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--brun);
}
.range-val { font-weight: 600; color: var(--brun); }

/* ---------- Résultat ---------- */
.result {
  position: sticky;
  top: 24px;
  background: var(--brun);
  color: var(--creme);
  border-radius: var(--radius);
  padding: 26px 26px;
  box-shadow: var(--ombre);
}
.result .result-label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dore);
  margin-bottom: 10px;
}
.result .result-main {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  line-height: 1;
  color: var(--blanc);
  margin-bottom: 6px;
}
.result .result-sub { font-size: 0.95rem; opacity: 0.8; margin-bottom: 26px; }

.result-breakdown {
  border-top: 1px solid rgba(251, 239, 187, 0.2);
  padding-top: 20px;
  display: grid;
  gap: 14px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.result-row .k { font-size: 0.92rem; opacity: 0.85; }
.result-row .v { font-weight: 700; font-size: 1.1rem; color: var(--dore); white-space: nowrap; }

/* apport éditable dans le bloc résultat */
.result-row .v.apport-edit {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.result-row .v.apport-edit input {
  width: 96px;
  background: rgba(251, 239, 187, 0.12);
  border: 1px solid rgba(251, 239, 187, 0.35);
  border-radius: 8px;
  color: var(--dore);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: right;
  padding: 5px 8px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.result-row .v.apport-edit input:focus {
  border-color: var(--dore);
  background: rgba(251, 239, 187, 0.2);
}
.result-row .v.apport-edit input::-webkit-outer-spin-button,
.result-row .v.apport-edit input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.result-row .v.apport-edit input[type=number] { -moz-appearance: textfield; }
.result-row.total .v { font-size: 1.25rem; }
.result-row.total .k { opacity: 1; font-weight: 600; }

.result .warn {
  background: rgba(243, 189, 63, 0.15);
  border: 1px solid rgba(243, 189, 63, 0.4);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  margin-top: 18px;
  color: var(--creme);
}

/* ---------- Bouton email ---------- */
.email-cta {
  margin-top: 24px;
  border-top: 1px solid rgba(251, 239, 187, 0.2);
  padding-top: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--dore);
  color: var(--brun-fonce);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.email-form { margin-top: 14px; display: none; }
.email-form.open { display: block; }
.email-form .input-group { background: rgba(255,255,255,0.12); }
.email-form .input-group input { color: var(--creme); }
.email-form .input-group input::placeholder { color: rgba(251,239,187,0.6); }
.email-note { font-size: 0.82rem; opacity: 0.7; margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brun-fonce);
  color: rgba(251, 239, 187, 0.7);
  text-align: center;
  padding: 30px 0;
  font-size: 0.88rem;
}
.site-footer .disclaimer { max-width: 720px; margin: 0 auto 16px; opacity: 0.6; font-size: 0.8rem; }
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 12px;
}
.footer-nav a {
  color: var(--creme);
  opacity: 0.85;
  font-size: 0.88rem;
  transition: opacity 0.15s;
}
.footer-nav a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .sim-layout { grid-template-columns: 1fr; }
  .result { position: static; }
}
