/* Force le masquage des éléments avec l'attribut hidden */
[hidden] {
  display: none !important;
}
/* ============================================================
   MatchPix — Design System
   - Typre : bicyclette (Google Fonts)
   - Fond  : #f5f7fb
   - Accent: #1a1d38
   - Texte : #04091d
   ============================================================ */

@font-face {
  font-family: 'bicyclette';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('bicyclette'),
       url('https://fonts.gstatic.com/s/bicyclette/v2/8vIK9ww4t7cAfXwF6Q8wcaZSh0tz1yHGwE_w3w.woff2') format('woff2');
}
@font-face {
  font-family: 'bicyclette';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: local('bicyclette Italic'),
       url('https://fonts.gstatic.com/s/bicyclette/v2/8vIQ9ww4t7cAfXwF6Q8wcaZSh0tR1yHGwE_w3w.woff2') format('woff2');
}

:root {
  --bg:        #f5f7fb;
  --card:      #ffffff;
  --soft:      #eef1f7;
  --line:      #e3e7f0;
  --primary:   #1a1d38;
  --primary-2: #2a2f55;
  --text:      #04091d;
  --muted:     #6b7191;
  --halo:      rgba(26,29,56,0.10);
  --halo-strong: rgba(26,29,56,0.18);
  --danger:    #b3261e;
  --success:   #1f7a4d;
  --radius-xl: 1.25rem;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --shadow-card: 0 6px 30px rgba(20,24,55,0.06);
  --shadow-soft: 0 2px 12px rgba(20,24,55,0.05);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'bicyclette', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, p, span, a, button, input, select, textarea, label {
  font-family: 'bicyclette', sans-serif !important;
}

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

button { font-family: inherit; }

svg { display: block; }

::selection { background: var(--primary); color: #fff; }

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}
.brand-mark { width: 28px; height: 28px; color: var(--primary); }
.brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }

.brand-centered {
  justify-content: center;
  margin-bottom: var(--space-4);
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: var(--card);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
}
.ghost-link svg { width: 16px; height: 16px; }
.ghost-link:hover { color: var(--primary); text-decoration: none; }

/* ============================================================
   Landing
   ============================================================ */
.landing {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  text-align: center;
  margin-top: var(--space-6);
}
.hero-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: var(--space-3);
}
.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--primary);
  letter-spacing: -0.02em;
  font-weight: 700;
}
.hero-sub {
  color: var(--muted);
  margin: 0 auto 30px;
  max-width: 460px;
}
.hero-actions { display: flex; justify-content: center; margin: 0 0 28px; }

.hero-features {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: left;
  max-width: 380px;
  color: var(--text);
}
.hero-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  flex: 0 0 8px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  background: var(--card);
  color: var(--primary);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26,29,56,0.25);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-2); }
.btn-soft {
  background: var(--soft);
  border-color: var(--line);
  color: var(--primary);
}
.btn-soft:hover { background: #e6ebf5; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--primary); }
.btn-xl { padding: 16px 28px; font-size: 1.05rem; }

/* ============================================================
   Edit toast (15 min)
   ============================================================ */
.edit-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: 0 18px 50px rgba(20,24,55,0.18);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 60;
  max-width: 92vw;
}
.edit-toast svg { width: 22px; height: 22px; color: var(--primary); }
.edit-toast-text { display: flex; flex-direction: column; }
.edit-toast-text strong { font-size: 0.95rem; }
.edit-toast-text span { color: var(--muted); font-size: 0.85rem; }

/* ============================================================
   Modal
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 80;
}
.modal[aria-hidden="false"] { display: flex; }
.modal-shadow {
  position: absolute;
  inset: 0;
  background: rgba(4,9,29,0.55);
  backdrop-filter: blur(4px);
}
.modal-shell {
  position: relative;
  background: var(--card);
  width: 100%;
  max-width: 560px;
  border-radius: 24px 24px 0 0;
  padding: 22px 22px 28px;
  box-shadow: 0 -20px 60px rgba(20,24,55,0.25);
  animation: slideUp .25s ease;
  max-height: 92vh;
  overflow-y: auto;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@media (min-width: 720px) {
  .modal { align-items: center; }
  .modal-shell { border-radius: var(--radius-xl); max-height: 88vh; }
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-close svg { width: 18px; height: 18px; color: var(--primary); }

.modal-header { text-align: center; margin-bottom: var(--space-5); }
.step-pill {
  display: inline-block;
  background: var(--soft);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.modal-header h2 { margin: 0; font-size: 1.2rem; color: var(--primary); letter-spacing: -0.01em; }
.step-bar {
  margin: 14px auto 0;
  height: 4px; width: 100%;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
}
#stepBar {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  width: 33%;
  transition: width .25s ease;
}

/* ============================================================
   Step blocks
   ============================================================ */
.step { display: block; }
.step.hidden { display: none; }
.step-title { font-size: 1.05rem; margin: 0 0 16px; color: var(--primary); }

.profile-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) {
  .profile-toggle { grid-template-columns: 1fr; }
}
.profile-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.profile-card:hover { border-color: var(--halo-strong); }
.profile-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--halo);
}
.profile-icon {
  width: 36px; height: 36px;
  background: var(--soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.profile-icon svg { width: 20px; height: 20px; color: var(--primary); }
.profile-name { font-weight: 700; color: var(--primary); }
.profile-desc { color: var(--muted); font-size: 0.85rem; }

/* ============================================================
   Form bubbles
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: var(--space-4);
}
.form-grid.hidden { display: none; }
@media (max-width: 540px) {
  .form-grid { grid-template-columns: 1fr; }
}
.bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 16px 16px 14px;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.bubble-wide { grid-column: 1 / -1; }
.bubble > span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.bubble input, .bubble select {
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1rem;
  color: var(--text);
  padding: 4px 0 2px;
  font-family: inherit;
  width: 100%;
}
.bubble select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7191' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 6px center; padding-right: 26px; }
.bubble:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--halo);
}

.search-bubble {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 8px 14px;
  display: flex; flex-direction: column;
  width: 280px;
}
.search-bubble span { font-size: 0.7rem; }
.search-bubble input { border: 0; outline: 0; padding: 4px 0; font-size: 0.95rem; }

/* ============================================================
   Dropzone
   ============================================================ */
.dropzone {
  margin-top: var(--space-4);
  background: var(--soft);
  border: 1.5px dashed #cdd3df;
  border-radius: var(--radius-xl);
  padding: 22px;
  text-align: center;
}
.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.dropzone-inner > svg { width: 36px; height: 36px; color: var(--primary); }
.dropzone-text { display: flex; flex-direction: column; }
.dropzone-text strong { color: var(--primary); }
.dropzone-text span { color: var(--muted); font-size: 0.85rem; }

.preview-list {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px,1fr));
  gap: 10px;
}
.preview-list li {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--soft);
  aspect-ratio: 1/1;
}
.preview-list img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-list .remove {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.preview-list .remove svg { width: 12px; height: 12px; }

.compression-status {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Review
   ============================================================ */
.review-card {
  background: var(--soft);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-size: 0.92rem;
  display: grid;
  gap: 8px;
}
.review-card div { display: flex; gap: 8px; }
.review-card strong { color: var(--primary); }

.consent { margin-top: var(--space-4); }
.check {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
}
.check input { display: none; }
.check-box {
  width: 20px; height: 20px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  flex: 0 0 20px;
  background: #fff;
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}
.check input:checked + .check-box {
  background: var(--primary);
  border-color: var(--primary);
}
.check input:checked + .check-box::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Step nav */
.step-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: var(--space-5);
}

/* ============================================================
   Success screen
   ============================================================ */
.success-screen {
  position: fixed; inset: 0;
  background: rgba(4,9,29,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 90;
  padding: 20px;
}
.success-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(20,24,55,0.3);
}
.success-icon {
  width: 56px; height: 56px;
  background: var(--soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.success-icon svg { width: 28px; height: 28px; color: var(--success); }
.success-card h3 { margin: 0 0 8px; color: var(--primary); }
.success-card p { color: var(--muted); margin: 0 0 18px; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-size: 0.82rem;
}

/* ============================================================
   Login
   ============================================================ */
.login-shell {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-card);
}
.login-card h1 { margin: 8px 0 20px; font-size: 1.18rem; color: var(--primary); }
.alert {
  background: #fdecea;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

/* ============================================================
   Admin dashboard
   ============================================================ */
.admin-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 80px;
}
.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.admin-head h1 { margin: 0; font-size: 1.4rem; color: var(--primary); }
.admin-head p  { color: var(--muted); margin: 4px 0 0; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px,1fr));
  gap: 16px;
}
@media (max-width: 1024px) { .cards-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px)  { .cards-grid { grid-template-columns: 1fr; } }

.activity-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; }
.card-meta time { color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge svg { width: 14px; height: 14px; }
.badge-parent       { background: #fff3e6; color: #b15a00; }
.badge-photographer { background: #e7eaf6; color: var(--primary); }

.purge-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--muted);
}
.purge-indicator svg { width: 14px; height: 14px; }
.purge-indicator strong { color: var(--primary); }

.card-people { color: var(--text); }
.card-people strong { color: var(--primary); }
.muted { color: var(--muted); font-size: 0.86rem; display: block; }
.ig-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary);
  margin-top: 2px;
  font-size: 0.88rem;
}
.ig-link svg { width: 14px; height: 14px; }

.card-match {
  display: flex; align-items: baseline; gap: 10px;
  background: var(--soft);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
}
.match-teams { font-weight: 700; color: var(--primary); }
.match-score { margin-left: auto; font-weight: 700; }

.thumbs {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 6px;
}
.thumbs li {
  aspect-ratio: 1/1;
  background: var(--soft);
  border-radius: 8px;
  overflow: hidden;
}
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs-more {
  display: flex; align-items: center; justify-content: center;
  background: var(--soft);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  gap: 10px;
}
.photo-count {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--muted);
}
.photo-count svg { width: 14px; height: 14px; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-xl);
}
.empty-state svg { width: 36px; height: 36px; color: var(--muted); margin: 0 auto 10px; }
.empty-state h3 { margin: 6px 0 4px; color: var(--primary); }

/* ============================================================
   Responsive tightenings
   ============================================================ */
@media (max-width: 480px) {
  .topbar { padding: 14px 16px; }
  .landing { padding: 16px 16px 60px; }
  .hero-card { padding: 36px 22px; }
  .modal-shell { padding: 18px 18px 24px; }
}
