/* =========================================================
   ATLAS FOR MEN — Formulaire jeu-concours (v2026)
   ========================================================= */

@font-face {
  font-family: "Avenir Next";
  src: url("../fonts/AvenirNext-Medium.woff") format("woff"),
       url("../fonts/AvenirNext-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Next";
  src: url("../fonts/AvenirNext-DemiBold.woff") format("woff"),
       url("../fonts/AvenirNext-DemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Next";
  src: url("../fonts/AvenirNextLTW01BoldRegular.woff") format("woff"),
       url("../fonts/AvenirNextLTW01BoldRegular.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Couleurs issues du logo Atlas For Men */
  --brown-900: #2a1a0e;
  --brown-800: #42271a;
  --brown-600: #6b4a33;
  --gold-500: #b7a313;
  --gold-400: #cdb928;
  --gold-100: #f6f1d3;
  --cream: #faf7f0;
  --white: #ffffff;
  --text: #2a1a0e;
  --muted: #7a6a5c;
  --line: #e4dccd;
  --error: #c0392b;
  --success: #2e7d4f;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(42, 26, 14, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Avenir Next", "Avenir", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  color: var(--text);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.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;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-header img { height: 112px; width: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(183, 163, 19, .35), transparent 60%),
    linear-gradient(135deg, var(--brown-900) 0%, var(--brown-800) 55%, var(--brown-600) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 56px 20px 140px;
  text-align: center;
}
.hero::after {
  /* Motif topographique discret — esprit "aventure" */
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-radial-gradient(circle at 20% 120%, transparent 0 22px, rgba(255,255,255,.035) 22px 23px);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }

.hero__badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(205, 185, 40, .6);
  border-radius: 999px;
  color: var(--gold-400);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero__title {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.01em;
}
.hero__title em {
  font-style: normal;
  color: var(--gold-400);
}
.hero__subtitle {
  margin: 0 auto;
  max-width: 560px;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(255, 255, 255, .82);
}

/* ---------- Carte formulaire ---------- */
.main { padding: 0 16px 64px; }

.card {
  position: relative;
  max-width: 560px;
  margin: -96px auto 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px 28px;
  z-index: 2;
}
.card__title {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brown-800);
}
.card__lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: .95rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Champ avec label flottant */
.field { position: relative; margin-bottom: 18px; }

.field input {
  width: 100%;
  height: 58px;
  padding: 22px 16px 6px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field label {
  position: absolute;
  left: 17px;
  top: 18px;
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
  transform-origin: left top;
  transition: transform .18s var(--ease), color .18s var(--ease);
}
.field input:focus,
.field input:not(:placeholder-shown) { background: var(--white); }
.field input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(183, 163, 19, .18); }
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-11px) scale(.76);
  color: var(--brown-600);
}
.field .req { color: var(--gold-500); }

.field.is-invalid input { border-color: var(--error); background: #fff8f7; }
.field.is-invalid input:focus { box-shadow: 0 0 0 4px rgba(192, 57, 43, .15); }
.field.is-valid input { border-color: var(--success); }

.field__error,
.check__error {
  display: none;
  margin-top: 6px;
  font-size: .82rem;
  color: var(--error);
}
.is-invalid > .field__error,
.is-invalid .check__error { display: block; }

/* ---------- Cases à cocher ---------- */
.checks { margin: 8px 0 22px; display: grid; gap: 12px; }

.check {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.check:hover { border-color: #d3c7b2; }
.check input {
  position: absolute;
  opacity: 0;
  width: 24px; height: 24px;
  margin: 0;
  cursor: pointer;
}
.check__box {
  width: 24px; height: 24px;
  border: 2px solid #c9bca6;
  border-radius: 7px;
  background: var(--white);
  display: grid;
  place-items: center;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.check__box svg {
  width: 14px; height: 14px;
  stroke: var(--white);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset .25s var(--ease) .05s;
}
.check input:checked + .check__box {
  background: var(--brown-800);
  border-color: var(--brown-800);
}
.check input:checked + .check__box svg { stroke-dashoffset: 0; }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 4px rgba(183, 163, 19, .3); }
.check:has(input:checked) { border-color: var(--brown-800); background: #fdfbf6; }

.check__text { font-size: .9rem; line-height: 1.5; color: var(--text); }
.check__text strong { font-weight: 600; color: var(--brown-800); }
.check__text small { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; }
.check__text a { color: var(--brown-800); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.check__text a:hover { color: var(--gold-500); }

.check.is-invalid { border-color: var(--error); background: #fff8f7; }

/* ---------- Captcha ---------- */
.captcha { display: flex; justify-content: center; margin: 4px 0 20px; min-height: 0; }

/* ---------- Bouton ---------- */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--brown-900);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(183, 163, 19, .8);
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(183, 163, 19, .9); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--brown-800); outline-offset: 3px; }
.btn svg { width: 20px; height: 20px; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn.is-loading { pointer-events: none; color: transparent; }
.btn.is-loading svg { opacity: 0; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 3px solid rgba(42, 26, 14, .25);
  border-top-color: var(--brown-900);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-alert {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fdecea;
  color: var(--error);
  font-size: .9rem;
}
.form-alert.is-visible { display: block; }

.legal {
  margin: 20px 0 0;
  font-size: .76rem;
  color: var(--muted);
  text-align: center;
}
.legal a { color: var(--brown-600); }

/* Honeypot anti-robot */
.hp { position: absolute !important; left: -9999px !important; }

/* ---------- Écran de confirmation ---------- */
.success { display: none; text-align: center; padding: 12px 0 4px; }
.success.is-visible { display: block; animation: rise .5s var(--ease) both; }
.success__icon {
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--gold-100);
  display: grid;
  place-items: center;
}
.success__icon svg { width: 38px; height: 38px; stroke: var(--brown-800); stroke-width: 2.5; fill: none; }
.success h2 { margin: 0 0 8px; font-size: 1.6rem; color: var(--brown-800); }
.success p { margin: 0 auto 24px; max-width: 400px; color: var(--muted); }
.success .btn { max-width: 320px; margin: 0 auto; text-decoration: none; }

.is-hidden { display: none !important; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown-900);
  color: rgba(255, 255, 255, .7);
  font-size: .8rem;
  text-align: center;
  padding: 28px 20px;
}
.site-footer p { max-width: 720px; margin: 0 auto 8px; }
.site-footer a { color: var(--gold-400); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .site-header img { height: 44px; }
  .hero { padding: 40px 16px 120px; }
  .card { padding: 28px 20px 22px; margin-top: -88px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

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