/* Canelé Café Dax — styles communs des pages secondaires (CGV, mentions, compte, connexion) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper:       #FBF7F1;
  --paper-2:     #F3EBDF;
  --paper-3:     #EADFCF;
  --cacao:       #1F1714;
  --ink:         #1F1714;
  --ink-2:       #5B4A42;
  --muted:       #8C7B72;
  --copper:      #D7782E;
  --copper-deep: #B35C1C;
  --copper-soft: #F2C9A0;
  --line:        rgba(31,23,20,.12);
  --danger:      #B3361C;
  --ok:          #3E7B4F;
  --amber:       var(--copper-deep); /* alias utilisé dans les textes légaux existants */
  --serif: 'Fraunces', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1280px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); background: var(--paper); color: var(--ink);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; line-height: 1.08; font-variation-settings: "opsz" 144; }
em { font-style: italic; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--copper-deep);
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }

/* ── BOUTONS ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .92rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-dark { background: var(--cacao); color: var(--paper); }
.btn-dark:hover { background: var(--copper-deep); }
.btn-line { border-color: var(--line); background: none; }
.btn-line:hover { border-color: var(--ink); }
.btn-danger { border-color: rgba(179,54,28,.35); color: var(--danger); background: none; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-block { width: 100%; }
.link { background: none; border: none; color: var(--copper-deep); font-weight: 600; cursor: pointer; text-underline-offset: 3px; }
.link:hover { text-decoration: underline; }

/* ── EN-TÊTE DE PAGE ─────────────────────── */
.page-head { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 350; margin: 18px 0 14px; }
.page-head h1 em { color: var(--copper-deep); font-weight: 300; }
.page-head .sub { color: var(--muted); font-size: .95rem; }

/* ── PAGES LÉGALES ───────────────────────── */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(64px, 8vw, 120px); }
.toc { position: sticky; top: 108px; align-self: start; }
.toc-title { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.toc a {
  display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line);
  font-size: .9rem; color: var(--ink-2); text-decoration: none; transition: all .2s;
}
.toc a:hover { color: var(--ink); }
.toc a.on { border-left-color: var(--copper); color: var(--ink); font-weight: 600; }

.doc { max-width: 760px; }
.doc section { scroll-margin-top: 100px; padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.doc section:last-child { border-bottom: none; }
.doc h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: 18px; }
.doc h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; letter-spacing: 0; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { margin: 12px 0 12px 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.doc ul li { position: relative; padding-left: 22px; }
.doc ul li::before { content: ''; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--copper); }
.doc ol { counter-reset: n; }
.doc ol li { counter-increment: n; position: relative; padding-left: 36px; }
.doc ol li::before {
  content: counter(n); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%; background: var(--paper-2);
  display: grid; place-items: center; font-size: .78rem; font-weight: 600; color: var(--copper-deep);
}
.doc strong { color: var(--ink); }
.doc a { color: var(--copper-deep); text-underline-offset: 3px; }

.info-box { background: var(--paper-2); border-radius: 20px; padding: 8px 24px; margin: 18px 0; }
.info-box dl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; }
.info-box dt, .info-box dd { padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-box dt { font-size: .82rem; font-weight: 600; color: var(--ink); padding-right: 16px; }
.info-box dd { color: var(--ink-2); font-size: .95rem; }
.info-box dt:last-of-type, .info-box dd:last-of-type { border-bottom: none; }
.info-box p { margin: 12px 0; }

.price-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .95rem; background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.price-table th { text-align: left; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 18px; background: var(--paper-2); }
.price-table td { padding: 13px 18px; border-top: 1px solid var(--line); color: var(--ink-2); }
.price-table td.price-col, .price-table th.price-col { text-align: right; }
.price-table td.price-col { font-family: var(--serif); color: var(--copper-deep); font-size: 1.05rem; }

.highlight-box, .retractation-box {
  margin: 18px 0; padding: 18px 22px; border-radius: 18px;
  background: rgba(215,120,46,.08); border: 1px solid rgba(215,120,46,.28); color: var(--ink-2);
}
.retractation-box h3 { margin-top: 0; }
.placeholder {
  background: #FFF1C2; color: #6B4E00; border-radius: 6px; padding: 1px 6px;
  box-shadow: inset 0 0 0 1px rgba(107,78,0,.2);
}

/* ── FORMULAIRES ─────────────────────────── */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field label span { font-weight: 400; color: var(--muted); }
.field input {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff; font: 400 .98rem var(--sans); color: var(--ink);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--copper); box-shadow: 0 0 0 3px rgba(215,120,46,.18); }
.field input[readonly] { background: var(--paper-2); border-color: transparent; color: var(--ink); }
.field.err input { border-color: var(--danger); }
.field .msg { font-size: .78rem; color: var(--danger); display: none; }
.field.err .msg { display: block; }
.pw { position: relative; }
.pw input { padding-right: 52px; }
.pw button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: none; background: none; cursor: pointer; color: var(--muted); border-radius: 10px;
}
.pw button:hover { color: var(--ink); }
.pw button svg { width: 18px; height: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--copper-deep); margin-top: 2px; flex-shrink: 0; }
.alert { display: none; padding: 12px 16px; border-radius: 14px; font-size: .88rem; margin-bottom: 16px; }
.alert.show { display: block; }
.alert.err { background: rgba(179,54,28,.08); color: var(--danger); }
.alert.ok { background: rgba(62,123,79,.1); color: var(--ok); }

/* ── FOOTER ──────────────────────────────── */
footer.foot { background: var(--cacao); color: rgba(251,247,241,.6); padding: 56px 0 32px; font-size: .88rem; }
.foot-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: center; }
.foot-inner img { height: 72px; background: var(--paper); border-radius: 14px; padding: 6px 10px; }
.foot-inner ul { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; }
.foot-inner a { text-decoration: none; }
.foot-inner a:hover { color: var(--copper-soft); }
.foot-bottom { margin-top: 40px; font-size: .8rem; color: rgba(251,247,241,.36); }

/* ── TOAST ───────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; pointer-events: none;
  transform: translate(-50%, calc(100% + 48px)); transition: transform .4s var(--ease);
  background: var(--cacao); color: var(--paper); padding: 14px 22px; border-radius: 999px;
  font-size: .88rem; box-shadow: 0 16px 40px rgba(31,23,20,.3); white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 860px) {
  .legal { grid-template-columns: 1fr; padding-top: 0; }
  .toc {
    position: sticky; top: 76px; z-index: 5; margin: 0 calc(var(--gutter) * -1);
    padding: 10px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line);
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  }
  .toc::-webkit-scrollbar { display: none; }
  .toc-title { display: none; }
  .toc a { flex-shrink: 0; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: .84rem; white-space: nowrap; }
  .toc a.on { border-color: var(--cacao); background: var(--cacao); color: var(--paper); font-weight: 500; }
  .doc section { scroll-margin-top: 150px; }
}
@media (max-width: 560px) {
  .fields { grid-template-columns: 1fr; }
  .info-box { padding: 4px 18px; }
  .info-box dl { grid-template-columns: 1fr; }
  .info-box dt { border-bottom: none; padding-bottom: 0; }
  .info-box dd { padding-top: 4px; }
  .price-table th, .price-table td { padding: 11px 12px; }
}
