@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Karla:wght@400;500;600;700&display=swap');

/* === DESAMIANTAGE-GENEVE.CH === */
/* Ambiance: Takram (日式思辨设计) — soft tech, modest sophistication, charts as art */
/* Palette: #1A2A3A (deep navy) / #D98A6C (copper) / #4A9D8E (teal) */

:root {
  --c-p: #1A2A3A;
  --c-s: #D98A6C;
  --c-a: #4A9D8E;
  --c-p-light: #243548;
  --c-p-lighter: #2E4055;
  --c-s-light: #E6A88F;
  --c-s-dark: #C57456;
  --c-a-light: #5FB5A5;
  --c-a-dark: #3A7D6E;
  --blanc: #FCFAF8;
  --blanc-casse: #F5F2EF;
  --gris-clair: #EAE6E2;
  --gris: #9B9792;
  --gris-fonce: #5A5652;
  --trait: #D5D0CA;
  --ombre: rgba(26,42,58,.08);
  --t-display: 'Playfair Display', Georgia, serif;
  --t: 'Karla', 'Helvetica Neue', sans-serif;
  --rayon: 4px;
  --rayon-lg: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; font-size: 17px; }

body {
  font-family: var(--t);
  color: var(--c-p);
  background: var(--blanc);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

/* --- Layout --- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 820px; }
.section { padding: clamp(40px,6vw,72px) 0; }
.section--alt { background: var(--blanc-casse); }
.section--dark { background: var(--c-p); color: var(--blanc); }

/* --- Typography --- */
h1, .h1 { font-family: var(--t-display); font-weight: 600; font-size: clamp(2rem,4.5vw,3.2rem); line-height: 1.18; color: var(--c-p); }
h2, .h2 { font-family: var(--t-display); font-weight: 600; font-size: clamp(1.5rem,3vw,2.1rem); line-height: 1.25; color: var(--c-p); }
h3, .h3 { font-family: var(--t-display); font-weight: 600; font-size: 1.25rem; line-height: 1.35; color: var(--c-p); }
h4 { font-weight: 600; font-size: 1.05rem; }

.lede { font-size: clamp(1.08rem,1.5vw,1.22rem); color: var(--gris-fonce); line-height: 1.55; }
.eyebrow { font-family: var(--t); font-weight: 600; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-s); }
.plain { font-size: .93rem; color: var(--gris); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  font-family: var(--t); font-weight: 600; font-size: .95rem;
  border-radius: var(--rayon);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
  text-align: center;
  line-height: 1.3;
}
.btn--primary { background: var(--c-s); color: #fff; border-color: var(--c-s); }
.btn--primary:hover { background: var(--c-s-dark); border-color: var(--c-s-dark); }
.btn--secondary { background: transparent; color: var(--c-s); border-color: var(--c-s); }
.btn--secondary:hover { background: var(--c-s); color: #fff; }
.btn--dark { background: var(--c-p); color: #fff; border-color: var(--c-p); }
.btn--dark:hover { background: var(--c-p-light); }
.btn--large { padding: 16px 36px; font-size: 1.02rem; }
.btn--ligne { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--ligne:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }

/* --- Header --- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-p);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.header__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__icon {
  font-size: 1.6rem; color: var(--c-s);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--c-s); border-radius: 50%;
}
.logo__text { font-family: var(--t-display); font-weight: 600; font-size: 1.1rem; color: var(--blanc); }
.header__badge {
  font-size: .72rem; font-weight: 600;
  background: var(--c-s); color: var(--blanc);
  padding: 3px 10px; border-radius: 20px;
}
.header__right { display: flex; align-items: center; gap: 14px; }

.nav { display: flex; gap: 6px; }
.nav a {
  text-decoration: none; color: rgba(255,255,255,.85);
  font-weight: 500; font-size: .91rem; padding: 6px 12px;
  border-radius: var(--rayon); transition: all .2s;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,.12); color: var(--blanc); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--blanc); border-radius: 2px; transition: all .2s; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

@media (max-width: 860px) {
  .header__right { position: fixed; top: 59px; left: 0; right: 0; bottom: 0; background: var(--blanc); flex-direction: column; padding: 32px 24px; gap: 8px; transform: translateX(100%); transition: transform .3s; }
  .header__right.open { transform: translateX(0); }
  .nav { flex-direction: column; width: 100%; }
  .nav a { font-size: 1.05rem; padding: 12px 16px; border-radius: var(--rayon); color: var(--c-p); }
  .nav a:hover, .nav a.active { background: var(--gris-clair); color: var(--c-s); }
  .nav-toggle { display: flex; }
  .header .btn--primary { width: 100%; margin-top: 12px; }
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: clamp(46px,7vw,86px) 0 clamp(34px,5vw,58px);
  overflow: hidden;
  background: var(--c-p);
}
.hero .hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .15; z-index: 0;
}
.hero .hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(26,42,58,.92) 0%, rgba(26,42,58,.7) 50%, rgba(26,42,58,.85) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: clamp(24px,4vw,48px);
  align-items: start;
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lede { color: rgba(255,255,255,.85); margin-top: 12px; }
.hero .eyebrow { color: var(--c-s-light); }
.hero .plain { color: rgba(255,255,255,.7); margin-top: 8px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-form-wrap {
  background: var(--blanc);
  border-radius: var(--rayon-lg);
  padding: 22px 24px;
  box-shadow: 0 4px 32px rgba(0,0,0,.22);
}
.hero-form-wrap h3 { font-family: var(--t); font-size: 1rem; margin-bottom: 12px; color: var(--c-p); }
.hero-form input, .hero-form select {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--trait); border-radius: var(--rayon);
  font-family: var(--t); font-size: .91rem;
  margin-bottom: 9px; background: var(--blanc);
}
.hero-form input:focus, .hero-form select:focus { outline: none; border-color: var(--c-s); box-shadow: 0 0 0 2px rgba(217,138,108,.15); }
.hero-form .btn { width: 100%; text-align: center; margin-top: 4px; }
.hero-form .rgpd-label { font-size: .75rem; color: var(--gris); display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 4px; }
.hero-form .rgpd-label input { width: auto; margin: 3px 0 0 0; }

@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-form-wrap { max-width: 440px; }
}

/* --- Cards --- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 20px; }
.card { background: #fff; border-radius: var(--rayon-lg); padding: 24px; border: 1px solid var(--trait); transition: box-shadow .2s; }
.card:hover { box-shadow: 0 4px 20px var(--ombre); }
.card-icon { font-size: 1.6rem; margin-bottom: 10px; color: var(--c-s); }
.card-img { height: 160px; object-fit: cover; border-radius: var(--rayon) var(--rayon) 0 0; margin: -24px -24px 16px -24px; width: calc(100% + 48px); }
.card h3 { margin-bottom: 6px; }
.card p { font-size: .93rem; color: var(--gris-fonce); line-height: 1.55; }
.card a { color: var(--c-s); text-decoration: none; font-weight: 600; font-size: .91rem; }
.card a:hover { text-decoration: underline; }

/* --- Key numbers --- */
.key-numbers { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; text-align: center; }
.key-num { padding: 20px 12px; }
.key-num__value { font-family: var(--t-display); font-size: 2.6rem; font-weight: 700; color: var(--c-s); line-height: 1.1; }
.key-num__label { font-size: .88rem; color: var(--gris); margin-top: 6px; }

@media (max-width: 640px) {
  .key-numbers { grid-template-columns: repeat(2,1fr); }
}

/* --- Steps (pastilles) --- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; }
.step {
  text-align: center; padding: 20px 14px;
  background: #fff; border-radius: var(--rayon-lg);
  border: 1px solid var(--trait);
}
.step__num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-s); color: #fff;
  font-family: var(--t-display); font-weight: 700; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.step h4 { margin-bottom: 4px; }
.step p { font-size: .85rem; color: var(--gris-fonce); }

/* --- Presta subsections --- */
.presta-subsection {
  display: grid; grid-template-columns: 48px 1fr;
  gap: 16px; align-items: start;
  margin-bottom: 28px;
}
.presta-subsection__icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: var(--blanc-casse);
  border-radius: var(--rayon);
  color: var(--c-s);
}
.presta-subsection__content h3 { margin-bottom: 4px; }
.presta-subsection__content p { color: var(--gris-fonce); font-size: .95rem; }

.section-img { max-width: min(720px, 100%); margin: 16px auto 32px; border-radius: var(--rayon-lg); overflow: hidden; }
.section-img img { width: 100%; height: auto; }

/* --- Testimonials / situations types --- */
.situations { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; }
.situation { background: var(--blanc-casse); padding: 24px; border-radius: var(--rayon-lg); border-left: 4px solid var(--c-s); }
.situation h4 { margin-bottom: 6px; color: var(--c-p); }
.situation p { font-size: .91rem; color: var(--gris-fonce); }

/* --- Why us --- */
.why-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.why-card { background: #fff; padding: 24px; border-radius: var(--rayon-lg); border: 1px solid var(--trait); text-align: center; }
.why-card__icon { font-size: 2rem; margin-bottom: 10px; }
.why-card h4 { margin-bottom: 6px; color: var(--c-p); }
.why-card p { font-size: .91rem; color: var(--gris-fonce); line-height: 1.55; }

@media (max-width: 700px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* --- Breadcrumb --- */
.breadcrumb { padding: 16px 0; font-size: .85rem; color: var(--gris); }
.breadcrumb a { color: var(--c-s); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--gris-fonce); }

/* --- Article body --- */
.article-header { padding: clamp(32px,5vw,56px) 0 8px; }
.article-header .eyebrow { margin-bottom: 8px; }
.article-header h1 { max-width: 20ch; }
.article-meta { font-size: .85rem; color: var(--gris); margin-top: 8px; }
.article-lead-img { margin: 20px 0 28px; border-radius: var(--rayon-lg); overflow: hidden; }
.article-body { max-width: 760px; margin: 0 auto; }
.article-body p { margin-bottom: 16px; font-size: .98rem; color: var(--c-p); }
.article-body h2 { margin: 36px 0 12px; }
.article-body h3 { margin: 24px 0 8px; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body li { margin-bottom: 6px; font-size: .95rem; }
.article-body blockquote {
  border-left: 4px solid var(--c-s); padding: 12px 20px;
  margin: 20px 0; background: var(--blanc-casse); border-radius: 0 var(--rayon) var(--rayon) 0;
  font-style: italic; color: var(--gris-fonce);
}

/* --- FAQ --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--trait); padding: 16px 0; }
.faq-q { font-weight: 600; color: var(--c-p); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: .98rem; }
.faq-q::after { content: '+'; font-size: 1.3rem; color: var(--c-s); font-weight: 400; }
.faq-a { padding-top: 10px; font-size: .93rem; color: var(--gris-fonce); display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q::after { content: '−'; }

/* --- Simulateur --- */
.sim-hero { padding: 40px 0 32px; background: var(--blanc-casse); }
.sim-progress { display: flex; gap: 4px; margin-bottom: 24px; }
.sim-progress span { height: 4px; flex: 1; background: var(--trait); border-radius: 2px; transition: background .3s; }
.sim-progress span.done { background: var(--c-s); }
.sim-step { display: none; animation: fadeIn .3s; }
.sim-step.active { display: block; }
.sim-step h3 { margin-bottom: 16px; }
.sim-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 12px; }
.sim-opt {
  padding: 16px; border: 2px solid var(--trait); border-radius: var(--rayon-lg);
  cursor: pointer; text-align: center; transition: all .2s; font-weight: 500;
}
.sim-opt:hover { border-color: var(--c-s); background: rgba(217,138,108,.05); }
.sim-opt.selected { border-color: var(--c-s); background: rgba(217,138,108,.1); }
.sim-nav { display: flex; justify-content: space-between; margin-top: 24px; }
.sim-result { display: none; }
.sim-result.show { display: block; animation: fadeIn .4s; }
.sim-result__price { font-family: var(--t-display); font-size: 2.8rem; color: var(--c-s); font-weight: 700; }
.sim-result__range { font-size: 1.1rem; color: var(--gris-fonce); margin: 8px 0 16px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* --- Admin --- */
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { background: var(--c-p); color: #fff; padding: 10px 12px; text-align: left; font-weight: 500; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--trait); }
.admin-table tr:hover td { background: var(--blanc-casse); }
.admin-actions { display: flex; gap: 6px; }
.admin-btn { padding: 5px 12px; border-radius: var(--rayon); font-size: .8rem; font-weight: 600; cursor: pointer; border: none; }
.admin-btn--view { background: var(--c-a); color: #fff; }
.admin-btn--export { background: var(--c-s); color: #fff; }
.admin-popup { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(26,42,58,.6); z-index: 200; justify-content: center; align-items: center; }
.admin-popup.show { display: flex; }
.admin-popup__inner { background: #fff; border-radius: var(--rayon-lg); padding: 28px; max-width: 540px; width: 90%; max-height: 80vh; overflow-y: auto; }
.admin-popup__inner h3 { margin-bottom: 12px; }
.admin-popup__inner table { width: 100%; font-size: .9rem; }
.admin-popup__inner td { padding: 6px 0; border-bottom: 1px solid var(--gris-clair); }
.admin-popup__inner td:first-child { font-weight: 600; color: var(--c-p); width: 40%; }

/* --- City hub --- */
.city-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; }
.city-card { display: block; background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon-lg); padding: 20px; text-decoration: none; transition: all .2s; }
.city-card:hover { border-color: var(--c-s); box-shadow: 0 4px 16px var(--ombre); }
.city-card h4 { color: var(--c-p); margin-bottom: 4px; }
.city-card p { font-size: .85rem; color: var(--gris-fonce); }

/* --- Footer --- */
.footer { background: var(--c-p); color: rgba(255,255,255,.75); padding: clamp(36px,5vw,56px) 0 24px; }
.footer__grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 28px; }
.footer__col h4 { color: #fff; margin-bottom: 12px; font-size: .92rem; letter-spacing: .04em; text-transform: uppercase; }
.footer__col a, .footer__col li { color: rgba(255,255,255,.7); text-decoration: none; font-size: .88rem; display: block; margin-bottom: 7px; transition: color .2s; }
.footer__col a:hover { color: var(--c-s-light); }
.footer__col ul { list-style: none; padding: 0; }
.footer__legal { margin-top: 32px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; text-align: center; color: rgba(255,255,255,.45); }
.footer__legal a { color: rgba(255,255,255,.55); }

@media (max-width: 760px) {
  .footer__grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 440px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* --- Maps --- */
.map-wrap { border-radius: var(--rayon-lg); overflow: hidden; margin-top: 16px; }

/* --- CTA block --- */
.cta-block { text-align: center; padding: clamp(32px,5vw,56px) 0; }
.cta-block h2 { margin-bottom: 8px; }
.cta-block .lede { margin-bottom: 20px; }

/* --- Alert / notice --- */
.notice { background: rgba(74,157,142,.1); border: 1px solid rgba(74,157,142,.3); border-radius: var(--rayon-lg); padding: 16px 20px; font-size: .93rem; margin: 16px 0; }
.notice strong { color: var(--c-a-dark); }

/* --- Reg page --- */
.reg-timeline { position: relative; padding-left: 32px; }
.reg-timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--c-s); border-radius: 1px; }
.reg-step { position: relative; margin-bottom: 24px; }
.reg-step::before { content: ''; position: absolute; left: -28px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--c-s); border: 3px solid var(--blanc); box-shadow: 0 0 0 2px var(--c-s); }
.reg-step h3 { margin-bottom: 4px; }
.reg-step p { color: var(--gris-fonce); }

/* Cookie banner (v37) */
#cookie-banner{position:fixed;bottom:0;left:0;right:0;z-index:10000;background:#fff;border-top:1px solid #e5e0db;padding:clamp(12px,2vw,20px);display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;box-shadow:0 -2px 12px rgba(0,0,0,.08);}
#cookie-banner p{margin:0;font-size:.9rem;max-width:700px;color:#4a4a4a;line-height:1.5;}
#cookie-banner button{min-height:44px;min-width:44px;padding:10px 22px;font-weight:600;border-radius:3px;cursor:pointer;font-size:.9rem;}
#cookie-accept{background:#D98A6C;color:#fff;border:none;}
#cookie-refuse{background:transparent;border:2px solid #D98A6C;color:#D98A6C;}

/* --- Texte justifié (v40 — §4.3, §10.7) --- */
p, li { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
/* Exceptions : éléments courts ou centrés — la justification y crée des rivières */
.hero p, .lede, .card p, .city-card p, .cta-block p,
.footer p, .footer li, .footer__legal p, #cookie-banner p,
.key-num__label, .key-num__value, .eyebrow, .notice,
.faq-q { text-align: left; }
.cta-block p { text-align: center; }


/* ===== v51 — CTA lisibles sur fonds sombres (règle dure 133, §13.52) ===== */
.section--dark .btn--primary, .card .btn--primary, .cta-block .btn--primary { color: #fff; }

/* ===== v51 — titres convertis depuis H3 précoces (§2bis.0.22, §13.40-41) ===== */
.hero-form-wrap .form-title { font-family: var(--t); font-size: 1rem; margin-bottom: 12px; color: var(--c-p); font-weight: 600; }
.sim-result__title { font-family: var(--t-display); font-weight: 600; font-size: 1.4rem; color: var(--c-p); margin-bottom: 8px; }

/* ===== v51 — exigences mobiles §10.9 (adaptées au gabarit du site) ===== */
input, select, textarea { font-size: 16px; }
.hero-form input, .hero-form select { font-size: 16px; min-height: 44px; }
button { min-height: 44px; }
.nav-toggle { min-height: 0; }
.rgpd-label input[type="checkbox"] { width: auto; min-height: 18px; height: 18px; padding: 0; margin: 3px 0 0; border: none; background: transparent; appearance: auto; -webkit-appearance: checkbox; flex: none; }
@media (max-width: 640px) {
  .header__badge { display: none; }
  .logo__text { font-size: 1.05rem; }
}
@media (max-width: 767px) {
  .footer__col a { display: inline-block; padding: 12px 0; margin-bottom: 0; }
}
@media (max-width: 640px) {
  #cookie-banner { flex-direction: column; align-items: stretch; gap: 10px; max-height: 34vh; overflow-y: auto; }
  #cookie-banner p { font-size: .78rem; line-height: 1.5; max-height: 5.4em; overflow-y: auto; }
  #cookie-banner button { flex: 1; }
}