/* =========================================================
   Copenhagen Weed Telegram Group — thème « Nyhavn »
   Façades à pignons ocre, rouge, bleu et jaune, reflets qui ondulent dans le canal,
   bleu marine du port ; la loi en façades colorées, l'outil en ticket de caisse.
   Une seule police : Work Sans.
   ========================================================= */
:root {
  --sky: #eef3f8;
  --navy: #1c3f6e;
  --navy-dark: #132c4d;
  --water: #2f6f9f;
  --ink: #18222e;
  --muted: #536070;
  --h1: #e3a33a; --h2: #c8453a; --h3: #3f7cb8; --h4: #f2d36b; --h5: #e57c3c; --h6: #6aa77f; --h7: #d9c3a3; --h8: #8f3b4a;
  --low: #2f7d58; --mid: #c9860b; --high: #c0392b; --legal: #3f7cb8;
  --font: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 74px; }
body { margin: 0; background: var(--sky); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.06; font-weight: 800; overflow-wrap: break-word; }
h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); color: var(--navy); }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--h4); outline-offset: 2px; }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(800px, 100% - 32px); }
.eyebrow { margin: 0 0 10px; color: var(--h2); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; }
.intro { max-width: 62ch; color: var(--muted); font-size: 1.05rem; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .75em 1.3em; border-radius: 4px; border: 2px solid var(--navy); font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: transform .15s; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.2em; height: 1.2em; fill: currentColor; }
.btn-main { background: var(--navy); color: #fff; }
.btn-line { background: #fff; color: var(--navy); }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 4px solid transparent; border-image: linear-gradient(90deg, var(--h1) 0 12.5%, var(--h2) 0 25%, var(--h3) 0 37.5%, var(--h4) 0 50%, var(--h5) 0 62.5%, var(--h6) 0 75%, var(--h7) 0 87.5%, var(--h8) 0) 1; }
.top-in { display: flex; align-items: center; gap: 22px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.logo svg { width: 28px; height: 28px; fill: #2aabee; }
.logo b { color: var(--h2); }
.menu { display: flex; gap: 22px; margin-left: auto; }
.menu a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.menu a:hover { color: var(--navy); }
.langs { display: flex; border: 2px solid var(--navy); border-radius: 4px; overflow: hidden; }
.langs button { border: 0; background: #fff; color: var(--navy); font: 600 .8rem var(--font); padding: .35em .65em; cursor: pointer; }
.langs button + button { border-left: 2px solid var(--navy); }
.langs button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* ---------- Accueil : Nyhavn ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 84px) 0 0; background: linear-gradient(180deg, #dce9f4 0%, var(--sky) 100%); }
.hero h1 { font-size: clamp(2.4rem, 7vw, 5rem); color: var(--navy-dark); letter-spacing: -.02em; }
.hero h1 span { display: block; color: var(--h2); }
.hero-sub { display: inline-block; margin: 0 0 16px; padding: .25em .8em; background: var(--h4); color: var(--ink); font-weight: 600; border-radius: 3px; }
.lead { max-width: 58ch; color: var(--muted); font-size: 1.1rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.harbour { margin-top: clamp(30px, 5vw, 50px); }
.houses { display: flex; align-items: flex-end; justify-content: center; gap: 0; height: 150px; }
.houses span { flex: 1 1 0; max-width: 130px; height: var(--h, 120px); background: var(--c); position: relative; clip-path: polygon(0 18%, 18% 18%, 18% 8%, 34% 8%, 34% 0, 66% 0, 66% 8%, 82% 8%, 82% 18%, 100% 18%, 100% 100%, 0 100%); }
.houses span::after { content: ""; position: absolute; inset: 30% 18% 12%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .85) 0 12px, transparent 12px 22px), repeating-linear-gradient(0deg, transparent 0 16px, var(--c) 16px 26px); mix-blend-mode: normal; opacity: .75; }
.houses span:nth-child(1) { --c: var(--h1); --h: 120px; }
.houses span:nth-child(2) { --c: var(--h2); --h: 140px; }
.houses span:nth-child(3) { --c: var(--h3); --h: 110px; }
.houses span:nth-child(4) { --c: var(--h4); --h: 150px; }
.houses span:nth-child(5) { --c: var(--h5); --h: 126px; }
.houses span:nth-child(6) { --c: var(--h6); --h: 136px; }
.houses span:nth-child(7) { --c: var(--h7); --h: 116px; }
.houses span:nth-child(8) { --c: var(--h8); --h: 144px; }
.canal { height: 90px; overflow: hidden; background: var(--water); position: relative; }
.mirror { transform: scaleY(-1); opacity: .35; filter: blur(1px); animation: ripple 4s ease-in-out infinite alternate; transform-origin: top; }
@keyframes ripple { from { transform: scaleY(-1) skewX(-2deg); } to { transform: scaleY(-1) skewX(2deg); } }

/* ---------- Sections ---------- */
.sec { padding: clamp(56px, 8vw, 96px) 0; }
.sec-alt { background: #fff; }
.note { margin-top: 24px; padding: 14px 18px; border-left: 6px solid var(--h4); background: #fff; font-weight: 600; max-width: 80ch; }

/* ---------- Loi : les façades ---------- */
.facades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.facade { position: relative; padding: 44px 20px 18px; background: #fff; border-top: 10px solid var(--c); clip-path: polygon(0 18px, 30% 18px, 30% 0, 70% 0, 70% 18px, 100% 18px, 100% 100%, 0 100%); box-shadow: 0 10px 22px -18px rgba(24, 34, 46, .6); }
.facade p { margin: 0; color: var(--muted); }
[data-level="low"] { --c: var(--low); }
[data-level="mid"] { --c: var(--mid); }
[data-level="high"] { --c: var(--high); }
[data-level="legal"] { --c: var(--legal); }

/* ---------- Outil : calculateur ---------- */
.calc { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: start; }
.seg { display: inline-flex; flex-wrap: wrap; margin: 6px 0 18px; border: 2px solid var(--navy); border-radius: 4px; overflow: hidden; }
.seg button { border: 0; background: #fff; color: var(--navy); font: 600 .95rem var(--font); padding: .45em 1em; cursor: pointer; }
.seg button + button { border-left: 2px solid var(--navy); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.lbl { display: block; font-weight: 600; margin-top: 4px; }
.slider { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.slider input { flex: 1; min-width: 0; accent-color: var(--h2); height: 28px; }
.slider output { min-width: 78px; text-align: center; padding: .15em .6em; background: var(--navy); color: #fff; border-radius: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.receipt { position: sticky; top: 90px; padding: 24px 24px 30px; background: #fffef7; border: 1px solid #e3dccb; font-variant-numeric: tabular-nums; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 95% 100%, 90% calc(100% - 10px), 85% 100%, 80% calc(100% - 10px), 75% 100%, 70% calc(100% - 10px), 65% 100%, 60% calc(100% - 10px), 55% 100%, 50% calc(100% - 10px), 45% 100%, 40% calc(100% - 10px), 35% 100%, 30% calc(100% - 10px), 25% 100%, 20% calc(100% - 10px), 15% 100%, 10% calc(100% - 10px), 5% 100%, 0 calc(100% - 10px)); }
.r-head { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 2px dashed #cfc7b4; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--muted); }
.r-amount { margin: 0 0 8px; font-size: 2.3rem; font-weight: 800; color: var(--c); }
.r-text { margin: 0; color: var(--muted); }

/* ---------- Aide ---------- */
.help { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tips li { position: relative; padding-left: 30px; color: var(--muted); }
.tips li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; background: var(--h3); clip-path: polygon(0 30%, 30% 30%, 30% 0, 70% 0, 70% 30%, 100% 30%, 100% 100%, 0 100%); }
.tips li:nth-child(2)::before { background: var(--h2); }
.tips li:nth-child(3)::before { background: var(--h1); }
.tips li:nth-child(4)::before { background: var(--h6); }
.contacts { display: grid; gap: 12px; }
.contact { display: block; padding: 18px 20px; background: #fff; border-left: 6px solid var(--h3); text-decoration: none; color: var(--muted); }
.contact b { display: block; font-size: 1.35rem; color: var(--ink); overflow-wrap: anywhere; }
.contact-main { background: var(--navy); border-left-color: var(--h4); color: #cbd8e8; }
.contact-main b { color: var(--h4); font-size: 1.7rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: 24px; }
.faq details { border-bottom: 1px solid #d5dde6; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 44px 14px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; background: var(--h4); color: var(--ink); font-weight: 800; }
.faq details[open] summary::after { content: "−"; background: var(--h2); color: #fff; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Communauté ---------- */
.sec-join { background: var(--navy); color: #fff; }
.sec-join h2 { color: #fff; }
.sec-join .eyebrow { color: var(--h4); }
.sec-join .intro { color: #cbd8e8; }
.apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 30px 0 20px; }
.app { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 4px; background: #fff; color: var(--ink); text-decoration: none; transition: transform .15s; }
.app:hover { transform: translateY(-2px); }
.app svg { width: 38px; height: 38px; flex: none; }
.app-tg { background: #2aabee; color: #fff; }
.app-tg svg { fill: #fff; }
.app-tg small { color: #e6f6ff; }
.app-wa svg { fill: #25d366; }
.app-sig svg { fill: #3a76f0; }
.app b { display: block; font-size: 1.05rem; }
.app small { color: var(--muted); }
.group-rules { color: #cbd8e8; max-width: 80ch; }
.group-rules b { color: var(--h4); }

/* ---------- Pied de page ---------- */
.foot { padding: 26px 0 36px; background: var(--navy-dark); color: #a9bad0; font-size: .92rem; }
.foot p { margin: 0 0 .4em; }
.foot b { color: #fff; }
.foot a { color: var(--h4); }

/* ---------- Vérification d'âge ---------- */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(19, 44, 77, .9); }
.gate-box { width: min(440px, 100%); padding: 40px 26px 26px; text-align: center; background: #fff; border-top: 12px solid var(--h2); clip-path: polygon(0 20px, 30% 20px, 30% 0, 70% 0, 70% 20px, 100% 20px, 100% 100%, 0 100%); }
.gate-badge { width: 70px; height: 70px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--h4); color: var(--ink); font-weight: 800; font-size: 1.35rem; }
.gate-box h2 { font-size: 1.6rem; }
.gate-box p { color: var(--muted); }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.gate-no { margin: 14px 0 0; color: var(--high) !important; font-weight: 600; }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 960px) {
  .menu { display: none; }
  .langs { margin-left: auto; }
  .facades { grid-template-columns: 1fr 1fr; }
  .calc, .help { grid-template-columns: minmax(0, 1fr); }
  .receipt { position: relative; top: 0; }
  .apps { grid-template-columns: 1fr; max-width: 460px; }
}
@media (max-width: 600px) {
  .facades { grid-template-columns: 1fr; }
  .houses { height: 110px; }
  .houses span { --h: 90px !important; }
  .houses span:nth-child(even) { --h: 104px !important; }
  .canal { height: 60px; }
}
@media (max-width: 360px) {
  .top-in { gap: 10px; }
  .logo { font-size: .9rem; gap: 6px; }
  .logo svg { width: 22px; height: 22px; }
  .langs button { padding: .35em .4em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mirror { animation: none; }
  .btn, .app { transition: none; }
}
