/* ============================================================================
   MAQUETTE INTERFACE V2 — système de design « solaire »
   Palette soleil / terre / énergie · chaleureux, moderne · zéro gris administratif.
   (CDN Google Fonts accepté pour la maquette ; la version finale embarquera les
    polices en local — offline-first.)
   ============================================================================ */
:root {
  /* soleil */
  --or:        #FFC23C;   --or-vif:  #FCA311;   --or-clair: #FFE29A;
  /* énergie / feu */
  --braise:    #F1652B;   --braise-deep: #D6431A;
  /* terre / sable (fonds chauds) */
  --sable:     #FBF4E8;   --sable-2: #F5E9D6;   --creme: #FFFDF8;
  --terre:     #7A4A25;
  /* accents frais (eau, autonomie) */
  --sauge:     #2FA98C;   --sauge-deep: #1C7E67;
  --nuit:      #2A2018;   /* texte principal, brun très foncé (pas noir) */
  --nuit-doux: #6B5D4F;   /* texte secondaire */
  --trait:     #ECE0CE;   /* séparateurs */
  --vert-eco:  #3E9A54;
  --ombre:     0 18px 40px -22px rgba(120, 74, 37, .40);
  --ombre-carte: 0 10px 30px -18px rgba(120, 74, 37, .35);
  /* A5 (25/08) : code SÉLECTION unique, toutes pages — fond FRANC (nettement distinct
     du fond de page sable/crème) + bordure épaisse + coche. Changer ICI change partout.
     Finitions 25/08 soir (2) : variante C « SAUGE » retenue par Arnaud. */
  --sel-fond:  #DFF3EC;
  --sel-bord:  #1C7E67;
  --r-l: 26px; --r-m: 18px; --r-s: 12px;
  --contenu: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--nuit);
  background:
    radial-gradient(1200px 640px at 88% -8%, #FFE7B8 0%, rgba(255,231,184,0) 60%),
    radial-gradient(900px 520px at -6% 4%, #FBD9C0 0%, rgba(251,217,192,0) 55%),
    var(--sable);
  font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.08; letter-spacing: -.01em; color: var(--nuit); }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); margin: 0 0 .3em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 .35em; }
p { margin: 0 0 1em; }
a { color: var(--braise-deep); }

/* ---------- barre de marque + étapes ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 22px;
  padding: 14px clamp(18px, 4vw, 44px);
  background: rgba(255, 253, 248, .94);
  border-bottom: 1px solid var(--trait);
}
.brand { display: flex; align-items: center; gap: 11px; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.25rem; color: var(--nuit); text-decoration: none; }
.brand .sun { width: 30px; height: 30px; flex: none; }
.brand small { display:block; font-family:"Nunito Sans",sans-serif; font-weight:700; font-size:.52rem; letter-spacing:.22em; color: var(--nuit-doux); margin-top: 2px; }
.steps { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.steps a {
  display: flex; align-items: center; gap: 9px; text-decoration: none;
  padding: 8px 15px; border-radius: 999px; color: var(--nuit-doux); font-weight: 700; font-size: .93rem;
  border: 1.5px solid transparent; transition: .15s;
}
.steps a .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sable-2); color: var(--nuit-doux); font-size: .82rem; font-weight: 800; }
.steps a:hover { background: var(--creme); border-color: var(--trait); }
.steps a.on { background: linear-gradient(135deg, var(--or) 0%, var(--braise) 100%); color: #fff; box-shadow: var(--ombre-carte); }
.steps a.on .n { background: rgba(255,255,255,.28); color: #fff; }
.steps a.off { opacity: .55; }

/* ---------- ossature ---------- */
.wrap { max-width: var(--contenu); margin: 0 auto; padding: clamp(24px, 4vw, 52px) clamp(18px, 4vw, 44px) 80px; }
.eyebrow { display:inline-flex; align-items:center; gap:9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; font-size: .74rem; color: var(--braise-deep); background: #FBE3D3; padding: 6px 13px; border-radius: 999px; margin-bottom: 16px; }
.lead { font-size: 1.16rem; color: var(--nuit-doux); max-width: 44ch; }

/* ---------- cartes ---------- */
.card { background: var(--creme); border: 1px solid var(--trait); border-radius: var(--r-l); box-shadow: var(--ombre-carte); }
.grid { display: grid; gap: 22px; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .g-3, .g-2 { grid-template-columns: 1fr; } }

/* choix visuels (toiture/sol, facture/équipements) */
.choix { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.tuile { cursor: pointer; text-align: center; padding: 30px 22px; border-radius: var(--r-m); border: 2px solid var(--trait); background: var(--creme); transition: .16s; }
.tuile:hover { border-color: var(--or-vif); transform: translateY(-3px); box-shadow: var(--ombre-carte); }
.tuile { position: relative; }
.tuile.sel { border-color: var(--sel-bord); background: var(--sel-fond);
  box-shadow: inset 0 0 0 1.5px var(--sel-bord), var(--ombre-carte); }
.tuile.sel::after { content: '✓'; position: absolute; top: -9px; right: -9px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--sel-bord); color: #fff;
  font-size: .8rem; font-weight: 900; line-height: 22px; text-align: center;
  border: 2px solid var(--creme); box-shadow: var(--ombre-carte); }
.tuile .ic { width: 62px; height: 62px; margin: 0 auto 12px; color: var(--braise); }
.tuile h3 { margin: 0 0 4px; font-size: 1.28rem; }
.tuile p { margin: 0; color: var(--nuit-doux); font-size: .96rem; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; border: none; font-family: inherit; font-weight: 800; font-size: 1.02rem; padding: 15px 26px; border-radius: 999px; transition: .15s; text-decoration: none; }
.btn-primaire { background: linear-gradient(135deg, var(--or-vif) 0%, var(--braise) 100%); color: #fff; box-shadow: 0 14px 26px -12px rgba(214,67,26,.7); }
.btn-primaire:hover { transform: translateY(-2px); box-shadow: 0 20px 32px -12px rgba(214,67,26,.75); }
.btn-fantome { background: var(--creme); color: var(--nuit); border: 1.8px solid var(--trait); }
.btn-fantome:hover { border-color: var(--or-vif); }
.btn-grand { padding: 18px 34px; font-size: 1.12rem; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- chips / drapeaux / pourquoi ---------- */
.chip { display:inline-flex; align-items:center; gap:7px; background: var(--sable-2); color: var(--nuit-doux); font-weight: 700; font-size: .85rem; padding: 6px 13px; border-radius: 999px; }
.drapeaux { display: grid; gap: 10px; margin: 22px 0; }
.drapeau { display: flex; gap: 12px; align-items: flex-start; background: #FFF7E8; border: 1px solid #F3DDA9; border-left: 5px solid var(--or-vif); border-radius: var(--r-s); padding: 13px 16px; font-size: .96rem; color: #6a5423; }
.drapeau .ic { flex: none; width: 22px; height: 22px; color: var(--or-vif); margin-top: 1px; }
.pourquoi { margin-top: 12px; }
.pourquoi summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--sauge-deep); font-size: .92rem; list-style: none; }
.pourquoi summary::-webkit-details-marker { display: none; }
.pourquoi summary .q { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #DDF1EB; color: var(--sauge-deep); font-weight: 900; }
.pourquoi[open] summary .q { background: var(--sauge); color: #fff; }
.pourquoi .rep { margin-top: 10px; padding: 13px 16px; background: #F0FAF6; border-radius: var(--r-s); color: #2c4a42; font-size: .95rem; }

/* ---------- stat / donut ---------- */
.stats { display: flex; gap: 30px; flex-wrap: wrap; align-items: center; }
.stat .k { font-size: .82rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--nuit-doux); }
.stat .v { font-family: "Fraunces", serif; font-size: 2.1rem; font-weight: 600; color: var(--nuit); line-height: 1.1; }
.stat .v small { font-size: .95rem; color: var(--nuit-doux); font-family: "Nunito Sans", sans-serif; font-weight: 700; }
.donut-bloc { text-align: center; }
.donut-bloc .lg { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; color: var(--nuit-doux); margin-top: 6px; }

/* ---------- offres ---------- */
.offres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .offres { grid-template-columns: 1fr; } }
.offre { position: relative; display: flex; flex-direction: column; background: var(--creme); border: 2px solid var(--trait); border-radius: var(--r-l); padding: 26px 24px; transition: .16s; }
.offre:hover { transform: translateY(-4px); box-shadow: var(--ombre); }
.offre.reco { border-color: var(--braise); box-shadow: var(--ombre); background: linear-gradient(180deg, #FFF7EE 0%, var(--creme) 40%); }
.offre .ruban { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--or-vif), var(--braise)); color: #fff; font-weight: 800; font-size: .78rem; letter-spacing: .05em; padding: 6px 16px; border-radius: 999px; box-shadow: var(--ombre-carte); white-space: nowrap; }
.offre .nom { font-family: "Fraunces", serif; font-size: 1.5rem; font-weight: 600; }
.offre .tag { color: var(--nuit-doux); font-size: .95rem; margin-bottom: 14px; }
.offre .grand { font-family: "Fraunces", serif; font-size: 3rem; font-weight: 600; line-height: 1; background: linear-gradient(135deg, var(--braise), var(--or-vif)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.offre .grand-sous { font-size: .92rem; color: var(--nuit-doux); margin-bottom: 16px; }
.offre .ligne { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--trait); font-size: .97rem; }
.offre .ligne b { font-weight: 800; }
.offre .eco { margin-top: auto; padding-top: 16px; }
.offre .eco .n { font-family: "Fraunces", serif; font-size: 1.7rem; color: var(--vert-eco); font-weight: 600; }
.offre .eco .n small { font-size: .85rem; color: var(--nuit-doux); font-family: "Nunito Sans"; font-weight: 700; }

/* ---------- postes modifiables (écran 3) ---------- */
.poste { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--trait); }
.poste:last-child { border-bottom: none; }
.poste .ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px; background: #FFF1DF; color: var(--braise); }
.poste .txt { flex: 1; min-width: 0; }
.poste .txt .r { font-weight: 800; font-size: 1.08rem; }
.poste .txt .s { color: var(--nuit-doux); font-size: .92rem; }
.poste select { font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--nuit); padding: 11px 14px; border-radius: 12px; border: 1.8px solid var(--trait); background: var(--creme); cursor: pointer; }
.poste select:focus { outline: none; border-color: var(--or-vif); }
.ecart { margin-top: 18px; display: none; align-items: center; gap: 14px; background: #F0FAF6; border: 1px solid #BEE6D9; border-radius: var(--r-m); padding: 15px 20px; }
.ecart.show { display: flex; }
.ecart .pastille { font-weight: 800; padding: 6px 13px; border-radius: 999px; font-size: .9rem; }
.ecart .pos { background: #DDF1E4; color: var(--vert-eco); }
.ecart .neg { background: #FBE3D3; color: var(--braise-deep); }

/* ---------- hero accueil ---------- */
.hero { position: relative; overflow: hidden; border-radius: var(--r-l); padding: clamp(38px, 6vw, 74px); color: #fff; box-shadow: var(--ombre); background: linear-gradient(120deg, #F1652B 0%, #FCA311 62%, #FFC23C 100%); }
.hero::after { content:""; position:absolute; right:-90px; top:-90px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.35), rgba(255,255,255,0) 68%); }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: #FFF3E0; font-size: 1.25rem; max-width: 40ch; }
.hero .actions { margin-top: 34px; }
.hero .btn-primaire { background: #fff; color: var(--braise-deep); }
.hero .btn-fantome { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.5); }

.section-t { display: flex; align-items: baseline; gap: 14px; margin: 40px 0 18px; }
.section-t .num { font-family: "Fraunces", serif; font-size: 1.1rem; color: var(--braise); font-weight: 700; }
.muted { color: var(--nuit-doux); }
.center { text-align: center; }
.mt { margin-top: 28px; } .mt-s { margin-top: 14px; }
