/* ==========================================================================
   Configurateur de packs — Dental Addict
   Brand book v1.0 : Dental Grey #214152 · Dental Pink #e8327c · Dental
   Purple #2c2d55 · dégradé 135° violet → rose · Ubuntu (titres Light 300,
   sous-titres Bold 700, corps Medium 500 italique sur les textes éditoriaux ;
   les contrôles de formulaire restent droits pour la lisibilité).
   ========================================================================== */

:root {
  --grey: #214152;
  --pink: #e8327c;
  --pink-dark: #c9226a;
  --purple: #2c2d55;
  --gradient: linear-gradient(135deg, #2c2d55 0%, #e8327c 100%);

  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --line: #e3e7ee;
  --line-strong: #c9d1dc;
  --txt: #214152;
  --txt-dim: #5b6b7a;
  --txt-faint: #8a97a5;
  --ok: #1f9d55;
  --warn: #e07a17;
  --err: #d3302f;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(33, 65, 82, 0.08);
  --shadow-lg: 0 18px 50px rgba(44, 45, 85, 0.16);
  --maxw: 1180px;
  --gutter: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: Ubuntu, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.55;
  color: var(--txt);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input, select, textarea { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* Typo de marque */
h1, h2, h3 { font-weight: 300; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 4.4vw, 46px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 19px; font-weight: 700; }
.subtitle { font-weight: 700; }
.lead { font-style: italic; color: var(--txt-dim); font-size: 17px; }
.kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--pink);
}
.hero .kicker { color: rgba(255, 255, 255, 0.85); }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.header-links { display: flex; gap: 18px; align-items: center; font-size: 14px; font-weight: 700; }
.header-links a { color: var(--grey); }
.header-links a:hover { color: var(--pink); text-decoration: none; }
@media (max-width: 560px) { .header-links .hide-sm { display: none; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; color: #fff; background: var(--gradient); overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("assets/da-icon-white.svg");
  background-size: 120px auto; background-repeat: repeat;
  opacity: 0.07; transform: rotate(-8deg) scale(1.25);
}
.hero .wrap { position: relative; z-index: 1; padding: clamp(40px, 7vw, 84px) var(--gutter); }
.hero h1 { max-width: 760px; }
.hero h1 strong { font-weight: 700; }
.hero .lead { color: rgba(255, 255, 255, 0.9); max-width: 640px; margin-top: 14px; }
.hero .claim {
  margin-top: 22px; font-weight: 700; font-size: 20px; letter-spacing: 0.01em;
  color: #fff; opacity: 0.95;
}
.hero-steps {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px;
  font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.92);
}
.hero-steps span::before {
  content: attr(data-n); display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%; margin-right: 8px;
  background: #fff; color: var(--purple); font-size: 12px;
}

/* --------------------------------------------------------------------------
   Sections & cartes
   -------------------------------------------------------------------------- */
.section { padding: clamp(34px, 5vw, 60px) 0; }
.section-head { margin-bottom: 22px; }
.section-head p { color: var(--txt-dim); font-style: italic; margin-top: 6px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Choix du pack */
.pack-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pack-card { display: flex; flex-direction: column; overflow: hidden; text-align: left; transition: transform 0.15s, box-shadow 0.15s; }
.pack-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pack-card .thumb { aspect-ratio: 16 / 10; background: var(--bg-soft); display: grid; place-items: center; overflow: hidden; }
.pack-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pack-card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pack-card h3 { font-size: 21px; font-weight: 300; }
.pack-card h3 strong { font-weight: 700; }
.pack-card .tagline { font-style: italic; color: var(--txt-dim); font-size: 15px; }
.pack-card .cta { margin-top: auto; padding-top: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: rgba(232, 50, 124, 0.1); color: var(--pink);
  width: fit-content;
}

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 2px solid transparent; transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); }
.btn-primary:disabled { background: #e8a9c4; cursor: not-allowed; }
.btn-ghost { border-color: var(--line-strong); color: var(--grey); background: #fff; }
.btn-ghost:hover { border-color: var(--pink); color: var(--pink); }
.btn-link { color: var(--pink); font-weight: 700; padding: 6px 2px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Configurateur
   -------------------------------------------------------------------------- */
.config-top { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.config-top h2 strong { font-weight: 700; }

.config-layout { display: grid; gap: 22px; align-items: start; }
@media (min-width: 1024px) {
  .config-layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .summary-wrap { position: sticky; top: 84px; }
}

.steps { display: grid; gap: 16px; }

.step { padding: 18px; }
@media (min-width: 640px) { .step { padding: 22px 24px; } }
.step-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.step-head .num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient); color: #fff; font-size: 13px; font-weight: 700; margin-top: 2px;
}
.step-title { display: flex; gap: 12px; align-items: flex-start; }
.step-title h3 { font-size: 19px; }
.step-title p { color: var(--txt-dim); font-size: 14px; font-style: italic; margin-top: 2px; }
.step.is-off .step-body { display: none; }
.step.is-off { background: var(--bg-soft); box-shadow: none; }
.step.is-off .step-title h3 { color: var(--txt-dim); }

/* Interrupteur inclure / exclure */
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--txt-dim); white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 42px; height: 24px; border-radius: 999px; background: #cfd6df; position: relative; transition: background 0.15s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.switch input:checked + .track { background: var(--pink); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(232, 50, 124, 0.35); outline-offset: 2px; }
.required-tag { font-size: 12px; font-weight: 700; color: var(--txt-faint); text-transform: uppercase; letter-spacing: 0.08em; }

.step-body { margin-top: 16px; display: grid; gap: 16px; }

/* Modèles (produits) */
.models { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
.model {
  text-align: left; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 10px;
  background: #fff; display: grid; gap: 8px; transition: border-color 0.15s, box-shadow 0.15s;
}
.model img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--bg-soft); border-radius: 6px; }
.model span { font-size: 13px; font-weight: 700; line-height: 1.3; }
.model:hover { border-color: rgba(232, 50, 124, 0.5); }
.model[aria-pressed="true"] { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232, 50, 124, 0.15); }

/* Axes : pastilles */
.axis { display: grid; gap: 8px; }
.axis-label { font-size: 13px; font-weight: 700; color: var(--txt-dim); display: flex; justify-content: space-between; }
.axis-label em { font-style: normal; color: var(--grey); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--line); background: #fff; font-size: 14px; font-weight: 700;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.pill:hover { border-color: rgba(232, 50, 124, 0.5); }
.pill[aria-pressed="true"] { border-color: var(--pink); background: rgba(232, 50, 124, 0.08); color: var(--pink-dark); }
.pill.is-unavailable { opacity: 0.45; border-style: dashed; }
.pill.is-unavailable:hover { opacity: 0.8; }
.swatch {
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(33, 65, 82, 0.25); flex: none;
  background: var(--sw, #ccc);
}
.swatch.is-transparent {
  background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 8px 8px;
}
.pill-size { min-width: 46px; justify-content: center; }

/* Ligne quantité + référence */
.step-foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding-top: 6px; border-top: 1px dashed var(--line); }
.ref { font-size: 14px; color: var(--txt-dim); }
.ref code { font-family: Menlo, Consolas, monospace; font-size: 13px; background: var(--bg-soft); padding: 2px 7px; border-radius: 6px; color: var(--grey); font-weight: 700; }
.ref.is-missing { color: var(--warn); }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty label { font-size: 13px; font-weight: 700; color: var(--txt-dim); margin-right: 4px; }
.qty button {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); font-size: 18px; font-weight: 700; line-height: 1;
  display: grid; place-items: center;
}
.qty button:hover { border-color: var(--pink); color: var(--pink); }
.qty input {
  width: 60px; height: 34px; text-align: center; border: 2px solid var(--line); border-radius: 8px; font-weight: 700;
  -moz-appearance: textfield;
}
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
.qty .unit { font-size: 13px; color: var(--txt-dim); }

/* Thème couleur */
.theme-step .pills { gap: 10px; }
.theme-pill { padding: 8px 16px 8px 10px; }
.theme-pill .swatch { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   Récapitulatif
   -------------------------------------------------------------------------- */
.summary { padding: 20px; }
.summary h3 { font-size: 17px; display: flex; justify-content: space-between; align-items: baseline; }
.summary h3 small { font-weight: 500; color: var(--txt-dim); font-size: 13px; }
.summary-theme { margin-top: 8px; font-size: 13px; color: var(--txt-dim); display: flex; align-items: center; gap: 8px; }
.summary-list { list-style: none; margin-top: 14px; display: grid; gap: 10px; }
.summary-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-list li:last-child { border-bottom: 0; }
.summary-list .name { font-weight: 700; }
.summary-list .meta { color: var(--txt-dim); font-size: 13px; grid-column: 1; }
.summary-list .meta code { font-family: Menlo, Consolas, monospace; font-size: 12px; color: var(--grey); }
.summary-list .q { grid-row: 1 / span 2; align-self: center; font-weight: 700; white-space: nowrap; }
.summary-empty { color: var(--txt-dim); font-style: italic; font-size: 14px; margin-top: 12px; }
.summary .btn { margin-top: 16px; }
.summary-note { margin-top: 10px; font-size: 12px; color: var(--txt-faint); text-align: center; }

/* Barre mobile */
.summary-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px var(--gutter);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(33, 65, 82, 0.12);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.summary-bar strong { font-size: 15px; }
.summary-bar small { display: block; color: var(--txt-dim); font-size: 12px; }
@media (min-width: 1024px) { .summary-bar { display: none; } }
body.has-bar { padding-bottom: 84px; }
@media (min-width: 1024px) { body.has-bar { padding-bottom: 0; } }

/* --------------------------------------------------------------------------
   Formulaire de contact
   -------------------------------------------------------------------------- */
.contact { padding: 22px; }
@media (min-width: 640px) { .contact { padding: 28px 30px; } }
.form-grid { display: grid; gap: 14px; margin-top: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--txt-dim); }
.field label .req { color: var(--pink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  font-weight: 500; transition: border-color 0.12s, box-shadow 0.12s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232, 50, 124, 0.15); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--err); }
.field .hint { font-size: 12px; color: var(--err); display: none; }
.field.is-invalid .hint { display: block; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--txt-dim); margin-top: 6px; }
.consent input { margin-top: 3px; accent-color: var(--pink); width: 16px; height: 16px; flex: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }
.form-status { font-size: 14px; font-weight: 700; }
.form-status.is-error { color: var(--err); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Écran de succès / secours */
.result { padding: 28px 24px; text-align: center; }
.result .icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center;
  background: rgba(31, 157, 85, 0.12); color: var(--ok); font-size: 30px; font-weight: 700;
}
.result.is-fallback .icon { background: rgba(224, 122, 23, 0.12); color: var(--warn); }
.result h2 { margin-bottom: 8px; }
.result p { color: var(--txt-dim); max-width: 560px; margin: 0 auto; }
.result .recap { margin: 22px auto 0; max-width: 640px; text-align: left; }
.result .recap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.result .recap th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--txt-faint); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.result .recap td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.result .recap td:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.result .recap code { font-family: Menlo, Consolas, monospace; font-size: 13px; font-weight: 700; }
.result .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.site-footer { margin-top: 40px; background: var(--grey); color: rgba(255, 255, 255, 0.85); }
.site-footer .wrap { padding: 34px var(--gutter); display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; font-size: 14px; }
.site-footer img { height: 30px; }
.site-footer a { color: #fff; font-weight: 700; }
.site-footer .claim { font-weight: 700; color: #fff; }

/* Utilitaires */
.hidden { display: none !important; }
.mt-2 { margin-top: 8px; }
.muted { color: var(--txt-dim); }

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