/* DigitecPharma — page de maintenance + page contact
   Charte issue de digitecpharma.fr : vert #68BF00, texte #3F3F3F, Quicksand + DM Sans */

:root {
  --brand: #68bf00;
  --brand-soft: #eefae8;
  --sky: #f4f9ff;
  --text: #3f3f3f;
  --muted: #657568;
  --line: #e0eadc;
  --field-line: #d8e4d6;
  --danger: #c22f2f;
  --bg: #ffffff;
  --font-title: "Quicksand", Arial, sans-serif;
  --font-body: "DM Sans", Arial, sans-serif;
  --ease: cubic-bezier(.22, .7, .2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

main { flex: 1; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { font-family: var(--font-title); color: var(--text); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

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

.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- Fond animé ---------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(ellipse at 85% 25%, #eaf6db88, transparent 42%),
    radial-gradient(ellipse at 10% 75%, #f0f8e9aa, transparent 38%),
    #fff;
}
.ambient::before {
  content: ""; position: absolute; inset: -25%;
  background: conic-gradient(from 30deg at 50% 50%, transparent, #a6e87a1c, transparent, #68bf0010, transparent);
  filter: blur(85px);
  animation: rotate 38s linear infinite;
}
.ambient::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, #68bf0020 1px, transparent 1.5px);
  background-size: 38px 38px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #0003 35%, transparent 90%);
  mask-image: linear-gradient(to bottom, transparent, #0003 35%, transparent 90%);
}
.blob { position: absolute; width: 44vmax; height: 44vmax; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.blob-a { top: -16vmax; right: -12vmax; background: #d5f0b8; }
.blob-b { bottom: -20vmax; left: -14vmax; background: #e2eefc; }
@keyframes rotate { to { transform: rotate(360deg); } }

/* ---------- En-tête ---------- */
.top {
  min-height: 155px; padding: 24px 0 10px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px;
  text-align: center;
}
.logo { display: flex; justify-content: center; align-items: center; text-decoration: none; }
.logo img { display: block; height: 175px; width: auto; }
.baseline {
  margin: 0; font-family: var(--font-title); font-weight: 600; color: #4c6351;
  font-size: clamp(16px, 1.7vw, 21px); line-height: 1.4;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 56px 0 36px; }
.hero h1 {
  margin: 0 0 22px; font-weight: 700;
  font-size: clamp(36px, 5.4vw, 68px);
  line-height: 1.06; letter-spacing: -.055em;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.intro {
  margin: 0 auto; max-width: 830px; color: #5b6a60;
  font-size: clamp(18px, 2vw, 23px); line-height: 1.55;
}
.lead {
  margin: 30px auto 0; font-family: var(--font-title); font-weight: 700; color: var(--text);
  font-size: clamp(22px, 2.6vw, 31px); line-height: 1.3;
}

/* ---------- Scène des questions ---------- */
.stage {
  position: relative; isolation: isolate; overflow: hidden;
  height: min(540px, 66vh); min-height: 430px;
}
.stage::before {
  content: ""; position: absolute; inset: 12% 15%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, #d6f3c344, transparent 68%); filter: blur(35px);
  animation: breathe 11s ease-in-out infinite alternate;
}
@keyframes breathe { to { transform: translate(8%, -7%) scale(1.2); } }

.question {
  position: absolute; margin: 0; padding: 4px 0;
  max-width: min(350px, 38%);
  font-family: var(--font-title); font-weight: 700; text-align: center;
  font-size: clamp(15px, 1.65vw, 21px); line-height: 1.5; color: var(--text);
  text-shadow: 0 2px 16px #fff;
  opacity: 0; visibility: hidden; will-change: transform, opacity, filter;
}
.question:nth-of-type(3n) { color: var(--brand); }
.question:nth-of-type(4n) { font-weight: 600; color: #64746a; }
.question-text { display: block; transition: filter .35s ease, opacity .35s ease; }
.question.depth-back { z-index: 1 !important; }
.question.depth-back .question-text { filter: blur(3.8px); opacity: .23; }

/* Sans animation (mouvement réduit ou JS indisponible) : simple liste lisible */
.stage.is-static { height: auto; min-height: 0; overflow: visible; padding: 20px 0 30px; }
.stage.is-static::before { display: none; }
.question-list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 900px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px;
}
.question-list li {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #ffffffcc;
  font-family: var(--font-title); font-weight: 700; color: var(--text); text-align: center;
}

.controls { position: relative; z-index: 5; display: flex; justify-content: flex-end; margin: -46px 0 26px; }
.motion-toggle {
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--brand); border-radius: 50%; background: #fff; color: var(--brand);
  transition: border-color .2s, color .2s, background .2s;
}
.motion-toggle:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.motion-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.motion-toggle .i-play, .motion-toggle[aria-pressed="true"] .i-pause { display: none; }
.motion-toggle[aria-pressed="true"] .i-play { display: block; }

/* ---------- Conclusion ---------- */
.conclusion { text-align: center; max-width: 850px; margin: 0 auto; padding: 0 0 70px; }
.conclusion h2 {
  margin: 0 0 18px; font-weight: 700;
  font-size: clamp(24px, 3vw, 40px); line-height: 1.2; letter-spacing: -.04em;
}
.conclusion p { margin: 0 0 14px; color: var(--muted); font-size: clamp(18px, 1.85vw, 22px); }
.conclusion .strong { font-family: var(--font-title); font-weight: 700; color: var(--text); font-size: clamp(19px, 2vw, 24px); }

.social { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.social a {
  width: 56px; height: 56px; display: grid; place-items: center;
  border: 1px solid #d5e4d2; border-radius: 50%; background: #fff; color: var(--text);
  transition: translate .25s var(--ease), border-color .25s, color .25s, box-shadow .25s;
}
.social a:hover { translate: 0 -4px; border-color: var(--brand); color: var(--brand); box-shadow: 0 14px 26px -14px #68bf00aa; }
.social svg { width: 26px; height: 26px; fill: currentColor; }

/* ---------- Bloc contact (page maintenance) ---------- */
.contact { border-top: 1px solid var(--line); padding: 55px 0 80px; text-align: center; }
.contact h3 { margin: 0 0 10px; font-size: clamp(25px, 3vw, 38px); line-height: 1.2; }
.contact-highlight { display: inline-block; margin-top: 5px; color: var(--brand); }
.contact p { margin: 0 0 22px; color: var(--muted); font-size: clamp(18px, 1.85vw, 22px); }

/* ---------- Boutons ---------- */
.btn-primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border: 0; border-radius: 100px; cursor: pointer; text-decoration: none;
  background: var(--brand); color: #fff; font-family: var(--font-title); font-weight: 700; font-size: 18px;
  box-shadow: 0 16px 32px -16px #68bf00;
  transition: background .2s, box-shadow .25s;
}
.btn-primary:hover { background: var(--brand); box-shadow: 0 20px 36px -14px #68bf00; }
.btn-primary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: translate .25s var(--ease); }
.btn-primary:hover svg { translate: 4px 0; }
.btn-primary[disabled] { cursor: progress; opacity: .8; }
.btn-primary .spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid #ffffff66; border-top-color: #fff; animation: rotate .7s linear infinite;
}
.btn-primary.is-loading .spinner { display: block; }
.btn-primary.is-loading svg { display: none; }

/* ---------- Page contact ---------- */
.contact-page { padding: 26px 0 80px; }
.contact-head { text-align: center; margin-bottom: 30px; }
.contact-head h1 { margin: 0 0 10px; font-size: clamp(32px, 4.4vw, 54px); line-height: 1.1; letter-spacing: -.05em; }
.contact-head h1 em { font-style: normal; color: var(--brand); }
.contact-head p { margin: 0; color: var(--muted); font-size: clamp(17px, 1.7vw, 20px); }

.card {
  max-width: 780px; margin: 0 auto; padding: clamp(22px, 4.5vw, 50px);
  background: #ffffffd9; border: 1px solid var(--line); border-radius: 28px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 34px 80px -46px #3c6e0a80;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { position: relative; grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.field.half { grid-column: span 1; }

.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  display: block; width: 100%; padding: 25px 16px 9px;
  color: var(--text); background: #fff; border: 1.5px solid var(--field-line); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368bf00' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b9d3ad; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px #68bf002e;
}
.field ::placeholder { color: #9aa79d; opacity: 1; }

.field > label {
  position: absolute; left: 17px; top: 17px; max-width: calc(100% - 34px);
  color: var(--muted); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform-origin: left top; transition: transform .2s var(--ease), color .2s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field.is-static > label { transform: translateY(-11px) scale(.76); color: var(--brand); }
.req { color: var(--brand); margin-left: 2px; }

.field legend { padding: 0; margin-bottom: 10px; color: var(--muted); font-size: 15px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill span {
  display: block; padding: 11px 20px; border: 1.5px solid var(--field-line); border-radius: 100px;
  background: #fff; color: var(--text); font-weight: 500;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.pill:hover span { border-color: var(--brand); }
.pill input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 12px 22px -14px #68bf00; }
.pill input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 3px; }

.error { display: block; margin: 6px 4px 0; color: var(--danger); font-size: 14px; line-height: 1.35; }
.error:empty { display: none; }
.field.is-invalid input[type="text"], .field.is-invalid input[type="email"], .field.is-invalid input[type="tel"],
.field.is-invalid select, .field.is-invalid .pill span { border-color: var(--danger); }

.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.form-note { margin: 0; color: var(--muted); font-size: 14px; }

.form-alert {
  grid-column: 1 / -1; margin: 0; padding: 13px 16px; border-radius: 14px;
  background: #fdf0f0; border: 1px solid #f0c9c9; color: #8f2020; font-size: 15px;
}
.form-alert[hidden] { display: none; }

.rgpd { margin: 28px 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: #7a877d; font-size: 13.5px; line-height: 1.6; }

.form-success { text-align: center; padding: 14px 0 6px; }
.form-success[hidden] { display: none; }
.form-success svg { width: 84px; height: 84px; margin-bottom: 12px; fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.form-success h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; }
.form-success p { margin: 0 0 8px; color: var(--muted); }
.form-success .btn-ghost { margin-top: 16px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 100px;
  border: 1px solid var(--field-line); background: #fff; color: var(--text); text-decoration: none; font-weight: 500;
  transition: border-color .2s, background .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

.back { display: flex; justify-content: center; margin-top: 26px; }

/* ---------- Pied de page ---------- */
.foot {
  padding: 22px 0 26px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px;
  color: #6f7d73; font-size: 14px;
}
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.foot a { text-decoration: none; transition: color .2s; }
.foot a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .top { min-height: 135px; padding-top: 18px; }
  .logo img { height: 140px; }
  .hero { padding: 40px 0 26px; }
  .stage { height: 560px; }
  .question { max-width: 60%; font-size: 14px; }
  .conclusion { padding-bottom: 50px; }
  .contact { padding: 44px 0 60px; }
  .field.half { grid-column: 1 / -1; }
  .card { border-radius: 22px; }
  .form-actions .btn-primary { width: 100%; }
  .foot { justify-content: center; text-align: center; }
  .foot nav { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ambient::before, .stage::before { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- Pages légales ---------- */
.legal { max-width: 860px; font-size: 16px; overflow-wrap: anywhere; }
.legal h2, .legal h3, .legal h4 { margin: 34px 0 10px; line-height: 1.25; letter-spacing: -.02em; }
.legal h2 { font-size: clamp(22px, 2.4vw, 28px); }
.legal h3 { font-size: clamp(19px, 2vw, 22px); color: var(--brand); }
.legal h3 strong { font-weight: inherit; }
.legal h4 { font-size: 18px; }
.legal > :first-child { margin-top: 0; }
.legal p, .legal ul, .legal ol { margin: 0 0 14px; color: #55615a; }
.legal ul, .legal ol { padding-left: 22px; }
.legal a { color: #4f9d00; }

/* ---------- Gestionnaire de cookies + reCAPTCHA ---------- */
.grecaptcha-badge { visibility: hidden; }
.captcha-note { margin: 22px 0 0; color: #7a877d; font-size: 13px; }
.captcha-note a { color: inherit; }
.captcha-note + .rgpd { margin-top: 14px; }
.captcha-consent {
  grid-column: 1 / -1; padding: 16px 18px; border: 1px solid #cfe6b8; border-radius: 16px; background: var(--brand-soft);
  display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap;
}
.captcha-consent[hidden] { display: none; }
.captcha-consent p { flex: 1 1 280px; margin: 0; font-size: 15px; line-height: 1.5; }
.captcha-consent .btn-ghost { cursor: pointer; border-color: var(--brand); color: #3d7a00; font-weight: 700; }

.ck-banner, .ck-dialog { font-family: var(--font-body); color: var(--text); }
.ck-banner {
  position: fixed; z-index: 1000; left: 20px; bottom: 20px; width: min(430px, calc(100% - 40px)); padding: 22px 24px;
  background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 70px -24px #1f3d0a80;
  animation: ck-in .5s cubic-bezier(.22, .7, .2, 1) both;
}
.ck-banner[hidden] { display: none; }
@keyframes ck-in { from { opacity: 0; transform: translateY(24px); } }
.ck-banner h2, .ck-dialog h2 { margin: 0 0 8px; font-family: var(--font-title); font-size: 20px; line-height: 1.25; letter-spacing: -.02em; color: var(--text); }
.ck-banner p, .ck-dialog p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.ck-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.ck-btn { cursor: pointer; border-radius: 100px; font-family: var(--font-title); font-weight: 700; font-size: 15px; transition: background .2s, border-color .2s, color .2s; }
.ck-primary { padding: 10px 20px; border: 1.5px solid var(--brand); background: var(--brand); color: #fff; }
.ck-primary:hover { background: #5aa800; border-color: #5aa800; }
.ck-ghost { padding: 10px 18px; border: 1.5px solid var(--field-line); background: #fff; color: var(--text); }
.ck-ghost:hover { border-color: var(--brand); color: #3d7a00; }
.ck-link { padding: 10px 6px; border: 0; background: none; color: var(--muted); text-decoration: underline; }
.ck-link:hover { color: #3d7a00; }
.ck-foot { padding: 0; border: 0; border-radius: 4px; background: none; color: inherit; font: inherit; cursor: pointer; }
.ck-foot:hover { color: var(--brand); text-decoration: underline; }

.ck-dialog { width: min(560px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: 26px; background: #fff; box-shadow: 0 40px 90px -30px #000000aa; }
.ck-dialog::backdrop { background: #0c2713a6; }
.ck-intro { margin-bottom: 8px !important; }
.ck-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.ck-row:first-of-type { margin-top: 16px; }
.ck-label { display: block; margin-bottom: 4px; font-family: var(--font-title); font-weight: 700; color: var(--text); cursor: pointer; }
.ck-switch { position: relative; flex: none; width: 48px; height: 28px; margin-top: 2px; }
.ck-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.ck-switch input:disabled { cursor: not-allowed; }
.ck-switch i { position: absolute; inset: 0; border-radius: 100px; background: #cdd6cf; transition: background .2s; }
.ck-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px #0003; transition: transform .2s; }
.ck-switch input:checked + i { background: var(--brand); }
.ck-switch input:checked + i::after { transform: translateX(20px); }
.ck-switch input:disabled + i { opacity: .55; }
.ck-switch input:focus-visible + i { outline: 3px solid var(--brand); outline-offset: 3px; }
.ck-dialog .ck-actions { justify-content: flex-end; padding-top: 18px; border-top: 1px solid var(--line); margin-top: 0; }
@media (max-width: 650px) {
  .ck-banner { left: 12px; bottom: 12px; width: calc(100% - 24px); padding: 18px; border-radius: 20px; }
  .ck-banner .ck-primary { flex: 1; }
  .ck-dialog { padding: 20px; }
  .ck-dialog .ck-btn { flex: 1 1 100%; }
}

/* ---------- Téléphone ---------- */
.contact-phone { margin: 20px 0 0 !important; font-size: 17px !important; color: var(--muted); }
.contact-head .contact-phone { margin-top: 10px !important; }
.contact-phone a {
  margin-left: 4px; color: var(--text); font-family: var(--font-title); font-weight: 700; font-size: 1.12em;
  white-space: nowrap; text-decoration: none; border-bottom: 2px solid var(--brand); transition: color .2s;
}
.contact-phone a:hover { color: #3d7a00; }
