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

:root {
  --red:       #D80669;
  --red-dark:  #b0054f;
  --red-light: #fce8f2;
  --grey-100:  #f5f5f5;
  --grey-200:  #e8e8e8;
  --grey-400:  #aaa;
  --grey-600:  #666;
  --grey-800:  #333;
  --blue:      #1a5276;
  --green:     #1e8449;
  --green-bg:  #eafaf1;
  --white:     #fff;
  --radius:    6px;
  --shadow:    0 2px 12px rgba(0,0,0,.09);
  --font:      'Helvetica Neue', Arial, sans-serif;
  --max-w:     720px;
}

html { font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--grey-800);
  background: var(--grey-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--red); }
a:hover { color: var(--red-dark); }

/* ── Header UNIGE ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--red);
  padding: 0;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.unige-logo img {
  height: 44px;
  width: auto;
  display: block;


}
.header-right { display: flex; align-items: center; gap: 1rem; }
.lang-switch {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.5);
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s;
}
.lang-switch:hover { background: rgba(255,255,255,.35); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--grey-800); color: #ccc;
  padding: 1.1rem 0; font-size: .8rem; text-align: center;
  margin-top: auto;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
main.container { padding-top: 2rem; padding-bottom: 3rem; }

/* ── Intro ────────────────────────────────────────────────────────────────── */
.contest-intro { margin-bottom: 1.75rem; }
.contest-intro h1 {
  font-size: 1.5rem; font-weight: 700;
  color: var(--grey-800); margin-bottom: .4rem; line-height: 1.3;
}
.intro-text { color: var(--grey-600); font-size: 1rem; }

/* ── Step indicator ───────────────────────────────────────────────────────── */
.step-indicator {
  display: flex; align-items: center; margin-bottom: .4rem;
}
.step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--grey-200); color: var(--grey-400);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
  transition: all .25s;
}
.step-dot.active { background: var(--red); color: var(--white); }
.step-dot.done   { background: var(--green); color: var(--white); }
.step-line {
  flex: 1; height: 2px; background: var(--grey-200); transition: background .25s;
}
.step-line.active { background: var(--green); }
.step-labels {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--grey-400);
  margin-bottom: 1.25rem;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow);
}
.card h2 {
  font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem;
  padding-bottom: .6rem; border-bottom: 2px solid var(--grey-200);
}
.card-success { text-align: center; }
.card-success h2 { border: none; margin-bottom: .75rem; color: var(--green); }

/* ── Formulaire ───────────────────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: .875rem; font-weight: 600;
  margin-bottom: .35rem; color: var(--grey-800);
}
.required { color: var(--red); margin-left: .1rem; }
.optional  { font-weight: 400; color: var(--grey-400); font-size: .8rem; margin-left: .3rem; }
.field-hint { font-size: .78rem; color: var(--grey-600); margin-top: .3rem; }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%; padding: .6rem .75rem;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius); font-size: .95rem;
  font-family: var(--font); background: var(--white);
  transition: border-color .15s; color: var(--grey-800);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,.12);
}
textarea { resize: vertical; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center;
  padding-right: 2rem;
}
.checkbox-label {
  display: flex; align-items: flex-start; gap: .6rem;
  cursor: pointer; font-size: .9rem;
}
.checkbox-label input { margin-top: .2rem; accent-color: var(--red); flex-shrink: 0; }

.form-actions {
  display: flex; gap: 1rem; justify-content: flex-end;
  margin-top: 1.75rem; padding-top: 1.25rem;
  border-top: 1px solid var(--grey-200);
}

/* ── Boutons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .65rem 1.4rem; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  border: none; transition: background .15s, opacity .15s;
  font-family: var(--font);
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--red-dark); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: var(--grey-200); color: var(--grey-800); }
.btn-secondary:hover:not(:disabled) { background: var(--grey-400); color: var(--white); }

/* ── Erreurs ──────────────────────────────────────────────────────────────── */
.error-box {
  background: var(--red-light); border: 1px solid var(--red);
  border-radius: var(--radius); padding: .85rem 1rem;
  margin-bottom: 1.25rem; font-size: .9rem; color: var(--red-dark);
}
.error-box ul { margin: .4rem 0 0 1.2rem; }
.hidden { display: none !important; }

/* ── Upload zone ──────────────────────────────────────────────────────────── */
.upload-notice {
  display: flex; gap: .75rem; align-items: flex-start;
  background: #eef4fb; border: 1px solid #c1d9f0;
  border-radius: var(--radius); padding: .85rem 1rem;
  font-size: .875rem; color: var(--blue); margin-bottom: 1.25rem;
}
.upload-notice svg { flex-shrink: 0; margin-top: .1rem; }

.drop-zone {
  border: 2px dashed var(--grey-200); border-radius: var(--radius);
  padding: 2.5rem 1rem; text-align: center; position: relative;
  cursor: pointer; transition: border-color .2s, background .2s;
  background: var(--grey-100);
}
.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--red); background: var(--red-light);
}
.file-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.drop-zone-content svg { color: var(--grey-400); margin-bottom: .75rem; }
.drop-text { font-size: 1rem; color: var(--grey-600); margin-bottom: .35rem; }
.drop-link { color: var(--red); font-weight: 600; }
.drop-formats { font-size: .8rem; color: var(--grey-400); }

.file-selected {
  display: flex; align-items: center; gap: 1rem;
  background: var(--green-bg); border-radius: var(--radius);
  padding: .85rem 1rem; text-align: left;
}
.file-selected svg { color: var(--green); flex-shrink: 0; }
.file-selected strong { display: block; font-size: .9rem; }
.file-size { font-size: .8rem; color: var(--grey-600); }
.btn-clear {
  margin-left: auto; background: none; border: none;
  cursor: pointer; color: var(--grey-600); font-size: 1.1rem;
  padding: .25rem; border-radius: 50%;
}
.btn-clear:hover { background: var(--grey-200); }

/* ── Progression ──────────────────────────────────────────────────────────── */
.upload-progress {
  margin-top: 1.25rem; padding: 1rem;
  background: var(--grey-100); border-radius: var(--radius);
}
.progress-header {
  display: flex; justify-content: space-between;
  font-size: .875rem; font-weight: 600; margin-bottom: .5rem;
}
.progress-bar-track {
  height: 10px; background: var(--grey-200);
  border-radius: 99px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; width: 0%; background: var(--red);
  border-radius: 99px; transition: width .3s ease;
}
.progress-hint { font-size: .78rem; color: var(--grey-600); margin-top: .5rem; }

/* ── Confirmation ─────────────────────────────────────────────────────────── */
.success-icon { color: var(--green); margin-bottom: 1rem; }
.success-text { color: var(--grey-600); margin-bottom: 1.5rem; }
.confirm-details {
  background: var(--green-bg); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin-bottom: 1.5rem; text-align: left;
}
.confirm-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .45rem 0; border-bottom: 1px solid var(--grey-200);
}
.confirm-row:last-child { border: none; }
.confirm-label { font-size: .85rem; color: var(--grey-600); }
.confirm-value { font-weight: 700; font-size: .95rem; }
.confirm-note {
  font-size: .82rem; color: var(--grey-600);
  background: var(--grey-100); border-radius: var(--radius);
  padding: .75rem 1rem;
}

/* ── Visibilité étapes ────────────────────────────────────────────────────── */
.step { display: none; }
.step.active { display: block; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .btn { justify-content: center; }
  .card { padding: 1.25rem; }
  .contest-intro h1 { font-size: 1.2rem; }
  .step-labels { font-size: .68rem; }
}

/* ── Lang switcher ────────────────────────────────────────────────────────── */
.lang-switcher {
  display: flex; gap: .3rem; align-items: center;
}
.lang-btn {
  background: none; border: none;
  color: white; font-size: .9rem; font-weight: 700;
  padding: .25rem .4rem; cursor: pointer;
  font-family: var(--font); opacity: .45;
  transition: opacity .15s;
  border-radius: 3px;
}
.lang-btn.active { opacity: 1; cursor: default; }
.lang-btn:not(.active):hover { opacity: .75; }

/* ── Photo slots ──────────────────────────────────────────────────────────── */
.photo-slot {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--grey-100);
}
.slot-header {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .9rem; margin-bottom: .75rem;
}
.slot-number { color: var(--grey-800); }
.slot-required {
  font-size: .72rem; font-weight: 600;
  background: var(--red); color: white;
  padding: .1rem .4rem; border-radius: 99px;
}
.slot-optional {
  font-size: .72rem; font-weight: 400;
  color: var(--grey-400);
}
.slot-meta { margin-top: .75rem; }
.slot-meta .form-group { margin-bottom: .6rem; }
.slot-meta label { font-size: .8rem; }
.slot-meta input, .slot-meta textarea {
  font-size: .875rem; padding: .4rem .6rem;
}
.slot-meta textarea { rows: 2; }

/* Drop zone compacte dans les slots */
.photo-slot .drop-zone {
  padding: 1rem; min-height: 80px;
  display: flex; align-items: center; justify-content: center;
}
.photo-slot .drop-zone-content {
  display: flex; align-items: center; gap: .75rem;
  color: var(--grey-600);
}
.photo-slot .drop-zone-content svg { color: var(--grey-400); flex-shrink: 0; }
.photo-slot .drop-text { font-size: .875rem; margin: 0; }

.file-info { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size  { font-size: .75rem; color: var(--grey-600); }

/* Confirmation multi-photos */
.confirm-photo-row {
  padding: .5rem 0; border-bottom: 1px solid var(--grey-200);
  display: flex; flex-direction: column; gap: .15rem;
}
.confirm-photo-row:last-child { border: none; }
.confirm-photo-num { font-weight: 700; font-size: .85rem; }
.confirm-photo-detail { font-size: .82rem; color: var(--grey-600); }
