/* ====================================================================
   Jeunesse 2027 — formulaire d'inscription
   Charte : navy + CyGrotesk + formes angulaires, palette Gen-Z.
   ================================================================== */

@font-face {
  font-family: "CyGrotesk Grand";
  src: url("../../fonts/CyGroteskStd-GrandLight.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "CyGrotesk Grand";
  src: url("../../fonts/CyGroteskStd-GrandRegular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "CyGrotesk Grand";
  src: url("../../fonts/CyGroteskStd-GrandMedium.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "CyGrotesk Grand";
  src: url("../../fonts/CyGroteskStd-GrandBold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "CyGrotesk Grand";
  src: url("../../fonts/CyGroteskStd-GrandHeavy.otf") format("opentype");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "CyGrotesk Grand";
  src: url("../../fonts/CyGroteskStd-GrandBlack.otf") format("opentype");
  font-weight: 900; font-style: normal; font-display: swap;
}

:root {
  --navy:     #1a0a3d;
  --navy-2:   #241452;
  --navy-3:   #30206b;
  --green:    #11d761;
  --pink:     #ff385f;
  --acid:     #c8f402;
  --yellow:   #f3ff47;
  --pink-2:   #f46ebd;
  --white:    #ffffff;
  --line:     rgba(255,255,255,0.18);
  --line-2:   rgba(255,255,255,0.35);
  --muted:    rgba(255,255,255,0.7);
  --danger:   #ff385f;
  --success:  #11d761;
  --radius:   14px;
  --radius-s: 8px;
  --forme:    polygon(0 0, 100% 28.93%, 100% 71.07%, 0 100%);
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { background: var(--navy); }
body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: "CyGrotesk Grand", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-smooth: always;
}

a { color: var(--acid); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip {
  position: absolute; left: -9999px; top: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  background: var(--acid); color: var(--navy);
  padding: .5rem .8rem; border-radius: var(--radius-s);
  z-index: 1000;
}

/* ====================================================================
   Bandeau institutionnel (signal de confiance, en tête de page)
   ================================================================== */

.institution-strip {
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid var(--line);
  padding: .6rem clamp(1rem, 4vw, 2.5rem);
  font-size: .82rem;
  line-height: 1.5;
  color: var(--muted);
}
.institution-strip-line strong { color: var(--white); }

/* ====================================================================
   Header
   ================================================================== */

.form-header {
  padding: 1.4rem clamp(1rem, 4vw, 2.5rem);
  display: flex; align-items: center;
}
.form-back {
  display: inline-flex; align-items: center; gap: .8rem;
  color: var(--white);
  font-weight: 700; font-size: 1rem; letter-spacing: .02em;
}
.form-back span { font-size: 1.5rem; line-height: 1; }
.form-back img { height: 32px; width: auto; display: block; }
.form-back:hover { text-decoration: none; opacity: .85; }

/* ====================================================================
   Layout
   ================================================================== */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 5rem;
}

/* ====================================================================
   Hero
   ================================================================== */

.hero-form {
  padding: 3rem 0 2.5rem;
  text-align: left;
}
.eyebrow {
  font-size: .8rem; font-weight: 500;
  letter-spacing: .12em; text-transform: lowercase;
  color: var(--acid);
  margin: 0 0 1rem;
}
.title {
  font-family: "CyGrotesk Grand", sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
  text-transform: lowercase;
}
.title .hl {
  color: var(--green);
}
.subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 56ch;
  margin: 0;
}

/* ====================================================================
   Card
   ================================================================== */

.card {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3.5vw, 2rem);
  margin: 0 0 1.4rem;
}
.card-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin: 0 0 .8rem;
}
.card-head h2 {
  font-family: "CyGrotesk Grand", sans-serif;
  font-weight: 800; font-size: 1.45rem;
  letter-spacing: -.01em;
  text-transform: lowercase;
  margin: 0;
}
.card .hint {
  color: var(--muted); font-size: .92rem; margin: 0 0 1rem;
}
.card .label-strong {
  font-size: .92rem; font-weight: 700; text-transform: lowercase;
  letter-spacing: .04em;
  margin: 1.1rem 0 .4rem;
}
/* séparateur entre deux sous-blocs d'une même carte (Rencontres d'Aix / hébergement) */
.card .label-strong.section-sep {
  margin-top: 1.6rem; padding-top: 1.2rem;
  border-top: 1px solid var(--line-2);
}
.meals .hint-inline { font-weight: 500; color: var(--muted); font-size: .8rem; text-transform: none; letter-spacing: 0; }

.card--accent { background: var(--navy-3); border-color: var(--line-2); }
.card--info {
  background: var(--navy-2);
  border: 2px solid var(--acid);
}
.card--closed {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--navy-2);
  border: 2px solid var(--acid);
  position: relative;
  overflow: hidden;
}
.card--closed::before {
  content: "";
  position: absolute; inset: -40% -10% auto -10%;
  height: 60%;
  background: radial-gradient(120% 100% at 50% 0, rgba(200,244,2,0.18), transparent 70%);
  pointer-events: none;
}
.card--closed > * { position: relative; }
.closed-emoji { display: block; font-size: 3rem; line-height: 1; margin-bottom: .8rem; }
.card--closed h2 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  margin: 0 0 1.2rem;
  text-transform: lowercase;
  color: var(--acid);
}
.closed-lead { font-size: 1.15rem; margin: 0 0 1rem; }
.closed-sub  { color: var(--muted); margin: 0 0 1.6rem; }
.closed-contact { font-size: .95rem; margin: 0 0 1.8rem; }
.closed-cta {
  background: var(--acid);
  color: var(--navy);
}
.closed-cta:hover { background: var(--green); color: var(--navy); text-decoration: none; }
.card--rgpd { background: var(--navy); border-color: var(--line); }
.card--thanks { text-align: center; padding: 2rem; }
.card--thanks p { margin: .6rem 0; }

/* ====================================================================
   Badge
   ================================================================== */

.badge {
  display: inline-block;
  font-size: .68rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .35rem .7rem;
  border-radius: 999px;
}
.badge--req { background: var(--pink); color: var(--navy); }
.badge--obl { background: var(--pink); color: var(--white); }
.badge--opt { background: var(--line); color: var(--white); }
.badge--info { background: var(--acid); color: var(--navy); }

/* ====================================================================
   Form fields
   ================================================================== */

.form { display: block; }

.grid {
  display: grid; gap: 1rem 1rem;
  margin: 0 0 1.3rem;            /* espace entre deux grilles empilées */
}
.grid:last-child { margin-bottom: 0; }
.grid[hidden] { display: none !important; }   /* sinon display:grid écrase l'attribut hidden */
.grid--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) {
  .grid--2 { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; min-width: 0; }
.field label {
  font-size: .82rem; font-weight: 700;
  text-transform: lowercase; letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 .4rem;
}
.field .req { color: var(--pink); }
.field .hint-inline { font-weight: 500; color: var(--muted); font-size: .8rem; text-transform: none; letter-spacing: 0; }

input[type=text],
input[type=email],
input[type=tel],
input[type=date],
select {
  width: 100%;
  height: 46px;
  padding: 0 1rem;
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  -webkit-appearance: none; appearance: none;
}
/* champ date : icône calendrier en blanc + alignement */
input[type=date] { padding-right: .8rem; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .7; cursor: pointer; }
input[type=date]::-webkit-datetime-edit { color: var(--white); }
input[type=date]:invalid::-webkit-datetime-edit { color: rgba(255,255,255,0.35); }
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--white) 50%),
                    linear-gradient(135deg, var(--white) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}
input::placeholder { color: rgba(255,255,255,0.35); }
input[type=text]:focus,
input[type=email]:focus,
input[type=tel]:focus,
input[type=date]:focus,
select:focus,
input[type=file]:focus,
textarea:focus {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  border-color: var(--acid);
}

input[type=file] {
  width: 100%;
  color: var(--white);
  background: var(--navy);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-s);
  padding: .8rem;
  font-family: inherit;
  font-size: .9rem;
}
input[type=file]::file-selector-button {
  margin-right: .8rem;
  padding: .5rem .9rem;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--acid);
  color: var(--navy);
  font-family: inherit; font-weight: 700;
  cursor: pointer;
}

/* ====================================================================
   Checkbox / radio
   ================================================================== */

.opt {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .55rem 0;
  cursor: pointer;
  line-height: 1.45;
}
/* l'attribut hidden doit toujours masquer (sinon display:flex l'écrase) —
   utilisé pour les repas conditionnés à la nuit réservée */
.opt[hidden] { display: none !important; }
.opt input[type=checkbox],
.opt input[type=radio] {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--acid);
  flex-shrink: 0;
}
.opt strong { font-weight: 700; }

/* gros bloc "choice" du choix participation */
.choice {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1rem 1.1rem;
  margin: 0 0 .8rem;
  background: var(--navy);
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.choice:hover { border-color: var(--acid); }
.choice input { margin-top: 4px; width: 22px; height: 22px; accent-color: var(--acid); }
.choice-body { flex: 1; }
.choice-body strong { font-weight: 800; }
.choice.is-active { border-color: var(--acid); background: rgba(200,244,2,.06); }
.choice--danger.is-active { border-color: var(--pink); background: rgba(255,56,95,.07); }

.bullets {
  margin: .6rem 0 0; padding: 0 0 0 1rem;
  list-style: square;
  color: var(--muted);
  font-size: .92rem;
}
.bullets li { margin: .25rem 0; }
.bullets li::marker { color: var(--acid); }

/* ====================================================================
   Callouts
   ================================================================== */

.callouts { margin-top: 1rem; display: grid; gap: .6rem; }
.callout {
  margin: 0;
  padding: .8rem 1rem;
  border-radius: var(--radius-s);
  font-size: .92rem;
  line-height: 1.5;
}
.callout--neutral { background: var(--navy); color: var(--white); border: 1px solid var(--line); }
.callout--success { background: rgba(17,215,97,.12); color: var(--green); border: 1px solid rgba(17,215,97,.4); }

/* ====================================================================
   Meals grid
   ================================================================== */

.meals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
@media (max-width: 480px) { .meals { grid-template-columns: 1fr; } }

/* ====================================================================
   Submit
   ================================================================== */

.submit {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .6rem;
  width: 100%;
  margin: 1.5rem 0 .5rem;
  padding: 1.1rem 1.5rem;
  background: var(--acid);
  color: var(--navy);
  border: 0;
  border-radius: 999px;
  font-family: inherit; font-weight: 900; font-size: 1.1rem;
  text-transform: lowercase;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.submit:hover { transform: translateY(-2px); background: var(--green); color: var(--navy); }
.submit:active { transform: translateY(0); }

/* ====================================================================
   Footnote / alerts
   ================================================================== */

.footnote {
  text-align: center;
  font-size: .8rem; letter-spacing: .15em;
  color: var(--muted);
  margin: 1.5rem 0 0;
}

.alert {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 0 0 1.2rem;
  font-size: .95rem;
}
.alert--error {
  background: rgba(255,56,95,.10);
  border: 1px solid rgba(255,56,95,.55);
  color: var(--white);
}
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* ====================================================================
   Honeypot
   ================================================================== */

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

/* ====================================================================
   Btn ghost (page merci)
   ================================================================== */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 800; text-transform: lowercase;
  letter-spacing: .03em;
}
.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--white);
}
.btn--ghost:hover { background: var(--white); color: var(--navy); text-decoration: none; }

.page--thanks { min-height: 70vh; }

/* ====================================================================
   Cropper photo
   ================================================================== */

.photo-field input[type=file] {
  margin-bottom: .4rem;
}
.cropper-zone {
  margin: .8rem 0 .5rem;
  padding: 1rem;
  background: var(--navy);
  border: 1.5px solid var(--acid);
  border-radius: var(--radius);
}
.cropper-stage {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  margin: 0 auto .8rem;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius-s);
}
.cropper-stage img {
  display: block;
  max-width: 100%;
}
.cropper-actions {
  display: flex; justify-content: flex-end; gap: .6rem;
}

.photo-preview {
  display: flex; align-items: center; gap: 1rem;
  margin: .8rem 0 .5rem;
  padding: .8rem;
  background: var(--navy);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.photo-preview img {
  width: 96px; height: 96px;
  object-fit: cover;
  border-radius: var(--radius-s);
  border: 2px solid var(--acid);
}

/* l'attribut hidden doit toujours masquer (sinon display:flex l'écrase) */
.cropper-zone[hidden], .photo-preview[hidden] { display: none !important; }

/* utilitaire : masquage fiable (CSP interdit les style="display:none" inline) */
.is-hidden { display: none !important; }

/* bloc d'accueil pré-rempli (magic link) : fond jaune, texte bleu marine */
.subtitle--prefill {
  display: inline-block;
  background: #f3ff47; color: #13235b;
  padding: .9rem 1.3rem; border-radius: 18px;
  font-weight: 700;
}
.subtitle--prefill strong { color: #13235b; }

/* hint mis en avant (porte-parole) */
.hint--strong { color: #fff; font-size: 1.05rem; font-weight: 700; line-height: 1.45; }
.hint--strong em { font-weight: 600; }

/* intro de groupe de cases */
.label-strong { color: #fff; font-weight: 700; font-size: 1rem; margin: .2rem 0 .3rem; }

/* exemples du cadrage attendu */
.photo-examples { margin: .2rem 0 .7rem; }
.photo-examples-label { display: block; font-size: .98rem; color: #fff; font-weight: 600; line-height: 1.4; margin-bottom: .55rem; }
.photo-examples-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.photo-examples-row img {
  width: 108px; height: 162px;            /* portrait 2:3 (≈ 800×1200) */
  object-fit: contain;                     /* personnage entier, pas de découpe */
  object-position: center bottom;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-2);
  background: #241452;
}

.photo-feedback {
  margin: .4rem 0 0;
  font-size: .85rem;
  min-height: 1.1em;
  color: var(--muted);
}
.photo-feedback--info    { color: var(--white); }
.photo-feedback--success { color: var(--green); }
.photo-feedback--error   { color: var(--pink); }

/* ====================================================================
   Mini boutons (cropper / preview)
   ================================================================== */

.btn--mini {
  background: var(--acid); color: var(--navy);
  padding: .55rem 1rem;
  font-size: .9rem;
  border: 0;
  border-radius: 999px;
  font-weight: 800; text-transform: lowercase;
  letter-spacing: .03em;
  cursor: pointer;
}
.btn--mini:hover { background: var(--green); }
.btn--ghost-mini {
  background: transparent; color: var(--white);
  border: 1.5px solid var(--line-2);
  padding: .55rem 1rem;
  font-size: .9rem;
  border-radius: 999px;
  font-weight: 700; text-transform: lowercase;
  letter-spacing: .03em;
  cursor: pointer;
}
.btn--ghost-mini:hover { border-color: var(--acid); color: var(--acid); }
