/* Casting OpenSkinDiag : turquoise, blanc et gris clair (charte OpenSkinDiag). */
@font-face {
  font-family: 'Outfit';
  src: url('fonts/Outfit-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --turquoise: #8ECBD0;
  --turquoise-light: #E6F4F5;
  --teal: #2F7F86;
  --teal-dark: #1F5F65;
  --ink: #1C1C1F;
  --muted: #5A5A60;
  --gray: #F4F6F7;
  --line: #E1E6E8;
  --white: #FFFFFF;
  --danger: #B42318;
  --danger-bg: #FEF3F2;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(31, 95, 101, 0.08);
}

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

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

body {
  margin: 0;
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--gray);
}

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
strong { font-weight: 600; }

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

/* ------------------------------------------------------------ En-tête */

.hero {
  background: linear-gradient(150deg, var(--teal-dark) 0%, var(--teal) 48%, var(--turquoise) 100%);
  color: var(--white);
  padding: 28px 16px 72px;
}
.hero-small { padding-bottom: 56px; }
.hero-inner { max-width: 760px; margin: 0 auto; }

.brand {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 28px;
  font-size: 22px; font-weight: 700; letter-spacing: -0.3px;
}
.brand img { border-radius: 10px; }
.wordmark span { color: #CFEDEF; }

.eyebrow {
  display: inline-block;
  margin: 0 0 12px; padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.1; font-weight: 800; letter-spacing: -0.8px;
  text-transform: uppercase;
}
.h1-sub {
  display: block; margin-top: 8px;
  font-size: clamp(20px, 4.6vw, 26px);
  font-weight: 600; letter-spacing: -0.3px; text-transform: none;
  color: #E3F5F6;
}

.intro p { margin: 0 0 12px; color: #F1FAFB; }

.facts {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; gap: 10px;
}
.facts li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 16px;
}
.fact-icon { font-size: 20px; line-height: 1.3; }

@media (min-width: 720px) {
  .hero { padding: 40px 24px 96px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts li { flex-direction: column; gap: 6px; }
}

/* ------------------------------------------------------------ Contenu */

.container { max-width: 760px; margin: -48px auto 0; padding: 0 16px 40px; position: relative; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 18px;
}
@media (min-width: 720px) { .card { padding: 36px 40px; } }

.details {
  background: var(--white);
  border-left: 4px solid var(--turquoise);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 18px;
  font-size: 16px;
}
.details p { margin: 0 0 8px; }
.details p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ Formulaire */

.progress { margin-bottom: 20px; }
.progress-label { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--teal); }
.progress-track { height: 8px; border-radius: 999px; background: var(--turquoise-light); overflow: hidden; }
.progress-bar { height: 100%; width: 20%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--turquoise)); transition: width 0.3s ease; }
.no-js .progress { display: none; }

.required-note { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.req { color: var(--teal); font-weight: 700; }
.optional { color: var(--muted); font-weight: 400; font-size: 0.9em; }

.form-alert {
  margin: 0 0 16px; padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid #FECDCA;
  font-size: 15px;
}

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

fieldset.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.no-js fieldset.step + fieldset.step { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.js fieldset.step:not(.is-active) { display: none; }

legend {
  display: flex; align-items: center; gap: 12px;
  padding: 0; margin: 12px 0 22px;
  font-size: 23px; font-weight: 700; letter-spacing: -0.3px;
}
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--turquoise-light); color: var(--teal);
  font-size: 16px; font-weight: 700;
}

.field { margin-bottom: 22px; }
.field > label, .question {
  display: block; margin: 0 0 8px;
  font-weight: 600; font-size: 16px;
}
.hint-inline { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.hint, .formats { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.formats { margin: -8px 0 22px; }
.note { margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: var(--turquoise-light); color: var(--teal-dark); font-size: 15px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="url"], textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font: inherit; font-size: 16px; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
input[type="date"] { min-height: 50px; }
textarea { resize: vertical; min-height: 140px; }
input:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(142, 203, 208, 0.35); }
[aria-invalid="true"] { border-color: var(--danger) !important; }

.field-error { margin: 6px 0 0; color: var(--danger); font-size: 14px; font-weight: 500; }
.field-error[hidden] { display: none; }

.choices { display: grid; gap: 8px; }
@media (min-width: 560px) { .choices { grid-template-columns: repeat(2, 1fr); } }

.choice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  font-weight: 500; font-size: 16px;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--turquoise); }
.choice input { margin: 3px 0 0; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--teal); }
.choice:has(input:checked) { border-color: var(--teal); background: var(--turquoise-light); }
.choice:focus-within { box-shadow: 0 0 0 4px rgba(142, 203, 208, 0.35); }
.consent { font-weight: 400; font-size: 15px; }

.js [data-minor-only]:not(.is-visible) { display: none; }

/* Photos */
.photo-drop {
  display: flex !important; gap: 14px; align-items: center;
  padding: 14px;
  border: 2px dashed var(--turquoise);
  border-radius: 16px;
  background: #FAFDFD;
  cursor: pointer;
  font-weight: 400 !important;
  transition: background 0.15s, border-color 0.15s;
}
.photo-drop:hover { background: var(--turquoise-light); }
.photo-field:focus-within .photo-drop { box-shadow: 0 0 0 4px rgba(142, 203, 208, 0.35); border-color: var(--teal); }
.photo-field.has-photo .photo-drop { border-style: solid; border-color: var(--teal); }
.photo-field [aria-invalid="true"] + .field-error { display: block; }
.photo-preview {
  width: 84px; height: 84px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden;
  background: var(--turquoise-light);
  display: flex; align-items: center; justify-content: center;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { font-size: 28px; font-weight: 700; color: var(--teal); }
.photo-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.photo-text strong { font-size: 16px; }
.photo-hint { font-size: 14px; color: var(--muted); }
.photo-action { align-self: flex-start; margin-top: 4px; padding: 5px 12px; border-radius: 999px; background: var(--teal); color: var(--white); font-size: 14px; font-weight: 600; }
.photo-field.has-photo .photo-action { background: var(--turquoise-light); color: var(--teal-dark); }

/* Notice */
.privacy {
  margin-top: 8px; padding: 16px 18px;
  border-radius: 14px;
  background: var(--gray);
  font-size: 14px; color: var(--muted);
}
.privacy h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink); }
.privacy p { margin: 0 0 8px; }
.privacy p:last-child { margin-bottom: 0; }

/* Boutons */
.form-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 24px;
  border: 0; border-radius: 999px;
  background: var(--teal); color: var(--white);
  font: inherit; font-size: 17px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.button:hover { background: var(--teal-dark); }
.button:active { transform: scale(0.98); }
.button:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 3px; }
.button-secondary { background: var(--gray); color: var(--teal-dark); border: 1.5px solid var(--line); }
.button-secondary:hover { background: var(--turquoise-light); }
.button-submit { flex: 1 1 100%; font-size: 18px; background: linear-gradient(90deg, var(--teal-dark), var(--teal)); }
.button[hidden] { display: none; }
.js .form-nav .button[data-next] { margin-left: auto; }
.js .button-submit:not(.is-visible) { display: none; }
@media (min-width: 560px) { .button-submit { flex: 0 1 auto; margin-left: auto; } }

/* Envoi en cours */
.upload-overlay {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(28, 28, 31, 0.55);
}
.upload-overlay[hidden] { display: none; }
.upload-box { width: 100%; max-width: 380px; padding: 24px; border-radius: var(--radius); background: var(--white); text-align: center; }
.upload-title { margin: 0 0 14px; font-weight: 700; font-size: 18px; }
.upload-percent { margin: 10px 0 4px; font-weight: 600; color: var(--teal); }
.upload-note { margin: 0; font-size: 14px; color: var(--muted); }
.upload-box .progress-bar { width: 0; }

/* ------------------------------------------------------------ Confirmation et notice */

.thanks { text-align: center; }
.thanks-icon { font-size: 52px; margin: 0; }
.thanks h1 { color: var(--teal-dark); text-transform: none; font-size: clamp(28px, 6vw, 38px); margin: 8px 0 12px; }
.thanks .lead { font-size: 19px; font-weight: 600; color: var(--teal); }
.thanks p { margin: 0 0 14px; }
.signature { margin-top: 22px !important; }

.legal h1 { text-transform: none; color: var(--ink); font-size: clamp(26px, 5vw, 34px); }
.legal h2 { margin: 26px 0 8px; font-size: 19px; color: var(--teal-dark); }
.legal p { margin: 0 0 10px; color: #333338; }

.site-footer { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; text-align: center; font-size: 14px; color: var(--muted); }
.site-footer p { margin: 0 0 6px; }
.site-footer span { color: var(--teal); }
legend:focus { outline: none; }
