/* ============================================================
   ANNECY PARODONTIE CHIRURGIE — Design system
   Dr Alice Marchand
   ============================================================ */

:root {
  /* Brand */
  --ink: #44272a;
  --ink-soft: #6b4a4d;
  --ink-mute: #9b8083;
  --cream: #f2eadd;
  --cream-2: #efe4de;
  --cream-3: #e6d8d0;
  --paper: #fbf7f4;
  --white: #ffffff;
  --line: #e6d8d0;
  --line-soft: #ecdfd8;
  --accent: #44272a;
  --accent-soft: rgba(68, 39, 42, 0.08);

  /* Type */
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --density: 1;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 16px;
  letter-spacing: -0.005em;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

body.mode-compact { --density: .82; }
body.bg-white { --cream: #ffffff; --cream-2: #f7efeb; --paper: #fbf7f4; background: #ffffff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.display {
  font-family: var(--font-display);
  font-weight: 450;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lede {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
  font-weight: 380;
  max-width: 62ch;
}
.h-xl { font-size: clamp(56px, 8.2vw, 104px); }
.h-lg { font-size: clamp(44px, 5.6vw, 88px); }
.h-md { font-size: clamp(32px, 3.6vw, 56px); }
.h-sm { font-size: clamp(22px, 2vw, 32px); }

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.page { display: none; }
.page.is-active { display: block; animation: fade .5s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: calc(var(--density) * 96px) 0;
  position: relative;
}
.section--lg { padding: calc(var(--density) * 140px) 0; }
.section--sm { padding: calc(var(--density) * 56px) 0; }

.hr {
  height: 1px;
  background: var(--line);
  border: 0;
}

.grid { display: grid; gap: 24px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 80;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in oklab, var(--cream) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled { border-color: var(--line); }

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand__mark {
  display: block;
  height: 150px;
  width: 150px;
  object-fit: contain;
  object-position: left center;
  flex: none;
}
.brand__text {
  display: flex; flex-direction: column;
  line-height: 1.1;
}
.brand__text small {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.brand__text span {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
@media (max-width: 900px) {
  .brand__mark {
    height: 100px;
    width: 100px;
    object-position: center;
  }
}
@media (max-width: 380px) {
  .brand__mark { height: 80px; width: 80px; }
}

.site-nav {
  display: flex; align-items: center; gap: 2px;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 450;
  color: var(--ink-soft);
  transition: color .2s var(--ease), background .2s var(--ease);
  letter-spacing: -0.005em;
}
.site-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.site-nav a.is-active { color: var(--ink); background: var(--accent-soft); }

.nav-tel {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 18px !important;
  font-size: 14px !important;
  font-weight: 500;
  color: var(--ink) !important;
  background: transparent !important;
  letter-spacing: -0.005em;
  border-radius: 999px;
  white-space: nowrap;
  margin-left: 8px;
}
.nav-tel:hover { background: var(--accent-soft) !important; color: var(--ink) !important; }
.nav-tel svg { flex: none; }
@media (max-width: 700px) {
  .nav-tel-text { display: none; }
  .nav-tel { padding: 10px 12px !important; margin-left: 0; }
}

.nav-cta {
  padding: 10px 18px !important;
  background: var(--ink) !important;
  color: var(--cream) !important;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .2s var(--ease), background .2s var(--ease) !important;
}
.nav-cta:hover { background: #2e181a !important; color: var(--cream) !important; }

.burger { display: none; }

@media (max-width: 900px) {
  .site-nav .nav-item { display: none; }
  .burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); }
  .site-nav.is-open .nav-item { display: block; }
  .site-nav.is-open {
    position: absolute; top: 100%; right: var(--gutter); left: var(--gutter);
    background: var(--cream); border: 1px solid var(--line); padding: 12px; border-radius: 20px;
    flex-direction: column; align-items: stretch;
    box-shadow: 0 24px 48px -24px rgba(68,39,42,.2);
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary { background: var(--ink); color: var(--cream); }
.btn--primary:hover { background: #2e181a; transform: translateY(-1px); }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--text {
  padding: 8px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--ink);
}
.btn--text:hover { opacity: .6; }

.btn .arrow {
  display: inline-block;
  width: 16px; height: 10px;
  background: currentColor;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'><path d='M1 5h13M10 1l4 4-4 4' stroke='black' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'><path d='M1 5h13M10 1l4 4-4 4' stroke='black' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  transition: transform .25s var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   PLACEHOLDERS (imagery)
   ============================================================ */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--cream-2) 0 8px,
      var(--cream) 8px 16px
    );
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.ph__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.ph--dark {
  background:
    repeating-linear-gradient(
      135deg,
      #3b2225 0 8px,
      #44272a 8px 16px
    );
  border-color: #3b2225;
  color: var(--cream);
}
.ph--dark .ph__tag { background: #44272a; border-color: #3b2225; color: var(--cream); }

/* ============================================================
   MAP EMBED
   ============================================================ */
.map-embed {
  aspect-ratio: 4/3;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cream-2);
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(0.95) sepia(0.1);
}

/* ============================================================
   CARD / LIST patterns
   ============================================================ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { border-color: var(--ink-mute); transform: translateY(-2px); }

/* ============================================================
   FORM
   ============================================================ */
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  transition: border-color .2s var(--ease), background .2s var(--ease);
  width: 100%;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 140px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .field--row { grid-template-columns: 1fr; } }

.radio-group {
  display: grid; gap: 8px;
}
.radio-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.radio-card:hover { border-color: var(--ink-mute); }
.radio-card input { accent-color: var(--ink); margin-top: 3px; }
.radio-card.is-checked { border-color: var(--ink); background: var(--accent-soft); }
.radio-card__label {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1;
  min-width: 0;
}
.radio-card__label strong { display: block; line-height: 1.3; }
.radio-card__label small { display: block; color: var(--ink-soft); font-size: 13px; line-height: 1.4; }

.form-disclaimer {
  margin-top: 16px;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.form-disclaimer a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.form-disclaimer a:hover { color: var(--ink); }

.field-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.file-drop {
  position: relative;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--paper);
  padding: 18px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.file-drop:hover { border-color: var(--ink-mute); background: var(--cream); }
.file-drop input[type=file] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border: 0;
  background: transparent;
}
.file-drop__cta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 450;
  pointer-events: none;
}
.file-drop__cta svg {
  color: var(--ink-soft);
  flex: none;
}
.file-drop__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.file-drop__list:empty::after {
  content: none;
}
.file-drop__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 13px;
}
.file-drop__list:not(:empty) {
  margin-top: 6px;
}
.file-drop__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.file-drop__size {
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  flex: none;
}

/* ============================================================
   FRISE (décor avant le footer)
   ============================================================ */
.frise {
  width: 100%;
  height: 50px;
  background: url(assets/frise.jpg) repeat-x center / auto 100%;
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 96px 0 32px;
  margin-top: 0;
}
.site-footer .container { max-width: var(--max); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(247, 239, 235, 0.14);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 239, 235, 0.5);
  margin-bottom: 16px;
  font-weight: 400;
}
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: var(--cream); opacity: .85; transition: opacity .2s; font-size: 14px; }
.footer-col a:hover { opacity: 1; }

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.footer-brand__tag {
  font-size: 14px;
  opacity: .7;
  max-width: 28ch;
}

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: .6;
  gap: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.divider {
  width: 100%; height: 1px; background: var(--line);
}
.dot {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; margin: 0 10px; vertical-align: middle; opacity: .4;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
}
.pill .dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: #7fa06a;
  box-shadow: 0 0 0 3px rgba(127, 160, 106, .2);
}

/* ============================================================
   TWEAKS PANEL
   ============================================================ */
.tweaks {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 300px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 24px 64px -16px rgba(68,39,42,.18);
  z-index: 100;
  display: none;
  font-size: 13px;
}
.tweaks.is-open { display: block; }
.tweaks h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
  font-weight: 400;
}
.tweak-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  gap: 12px;
}
.tweak-row:first-of-type { border-top: 0; }
.tweak-row > span:first-child { color: var(--ink); font-weight: 450; }
.tweak-row select, .tweak-row input[type="color"] {
  padding: 4px 8px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.tweak-swatches { display: flex; gap: 6px; }
.tweak-swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .2s;
}
.tweak-swatch.is-active { border-color: var(--ink); }

.toggle {
  width: 36px; height: 20px;
  background: var(--cream-3);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--paper);
  border-radius: 50%;
  transition: transform .2s var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.toggle.is-on { background: var(--ink); }
.toggle.is-on::after { transform: translateX(16px); }
