:root {
  --bg: #0c0c0f;
  --bg-card: #141419;
  --bg-card-hover: #1a1a22;
  --text: #f0f0f5;
  --text-muted: #8a8a9a;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --border: #2a2a35;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --font: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; background: rgba(12, 12, 15, 0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.logo { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.site-header nav { display: flex; gap: 1.5rem; }
.site-header nav a { color: var(--text-muted); font-weight: 500; transition: color 0.2s; }
.site-header nav a:hover { color: var(--text); }

.main { flex: 1; padding: 2rem; max-width: 1400px; margin: 0 auto; width: 100%; }

.site-footer {
  padding: 1.5rem 2rem; text-align: center; color: var(--text-muted); font-size: 0.875rem;
  border-top: 1px solid var(--border);
}

/* Accueil */
.page-home { min-height: 60vh; }
.page-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.page-subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.empty-state { color: var(--text-muted); padding: 3rem; text-align: center; }

.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.club-card {
  background: var(--bg-card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; display: flex; flex-direction: column;
}
.club-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(99, 102, 241, 0.3); }
.club-card-image { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--border); }
.club-card-image img { width: 100%; height: 100%; object-fit: cover; }
.club-card-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--border) 0%, var(--bg-card-hover) 100%); }
.club-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%); pointer-events: none; }
.club-card-content { padding: 1.25rem; flex: 1; }
.club-card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.25rem; }
.club-card-meta { font-size: 0.875rem; color: var(--text-muted); }

/* Club */
.back-link { display: inline-block; color: var(--text-muted); margin-bottom: 1.5rem; font-weight: 500; transition: color 0.2s; }
.back-link:hover { color: var(--accent); }
.club-header { margin-bottom: 2.5rem; }
.club-header-image { width: 100%; max-height: 280px; border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; background: var(--bg-card); }
.club-header-image img { width: 100%; height: 100%; object-fit: cover; }
.club-header-placeholder { height: 200px; background: linear-gradient(135deg, var(--border) 0%, var(--bg-card-hover) 100%); }
.club-header-content h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 0.5rem; }
.club-description { color: var(--text-muted); max-width: 60ch; }
.section-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.album-card { background: var(--bg-card); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); transition: transform 0.2s, border-color 0.2s; }
.album-card:hover { transform: translateY(-2px); border-color: rgba(99, 102, 241, 0.3); }
.album-card-image { aspect-ratio: 1; overflow: hidden; background: var(--border); }
.album-card-image img { width: 100%; height: 100%; object-fit: cover; }
.album-card-placeholder { width: 100%; height: 100%; background: var(--bg-card-hover); }
.album-card-content { padding: 1rem; }
.album-card-content h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.album-card-meta { font-size: 0.8125rem; color: var(--text-muted); }

/* Album / photos */
.album-header { margin-bottom: 2rem; }
.album-header h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 0.25rem; }
.album-meta { font-size: 0.9375rem; color: var(--text-muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.photo-thumb {
  aspect-ratio: 1; padding: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border); cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.photo-thumb:hover { transform: scale(1.02); border-color: var(--accent); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 48px; height: 48px; font-size: 2rem; color: #fff; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s; cursor: pointer; }
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 2.5rem; color: #fff; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
.lightbox-prev { left: 1rem; } .lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-content { max-width: 90vw; max-height: 90vh; }
.lightbox-content img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: var(--radius-sm); }

/* Admin */
.page-admin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.admin-card { width: 100%; max-width: 400px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.admin-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.admin-card .hint { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.admin-card label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--text-muted); }
.admin-card input { width: 100%; padding: 0.75rem 1rem; margin-bottom: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 1rem; }
.admin-card input:focus { outline: none; border-color: var(--accent); }
.admin-card button[type="submit"] { width: 100%; padding: 0.875rem; background: var(--accent); color: #fff; font-weight: 600; border-radius: var(--radius-sm); margin-top: 0.5rem; transition: background 0.2s; cursor: pointer; }
.admin-card button[type="submit"]:hover { background: var(--accent-hover); }
.form-error { color: #f87171; font-size: 0.875rem; margin-bottom: 0.5rem; }

.admin-dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.admin-dash-header h1 { font-size: 1.5rem; font-weight: 700; }
.admin-dash-actions a, .admin-dash-actions button { padding: 0.5rem 1rem; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.9375rem; }
.admin-dash-actions a { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); }
.admin-dash-actions a:hover { border-color: var(--accent); color: var(--accent); }
.admin-dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 1000px) { .admin-dash-grid { grid-template-columns: 1fr; } }
.admin-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.admin-section h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-muted); }
.admin-form input, .admin-form textarea { width: 100%; padding: 0.6rem 0.75rem; margin-bottom: 0.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 0.9375rem; }
.admin-form textarea { resize: vertical; min-height: 60px; }
.admin-form button { padding: 0.5rem 1rem; margin-right: 0.5rem; margin-top: 0.25rem; background: var(--accent); color: #fff; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.875rem; cursor: pointer; }
.admin-form button[type="button"] { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.admin-list { list-style: none; }
.admin-list li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; border-radius: var(--radius-sm); padding: 0.25rem 0; }
.admin-list li:hover { background: var(--bg-card-hover); }
.admin-list li.selected { background: rgba(99, 102, 241, 0.15); }
.admin-list-btn { flex: 1; display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem; text-align: left; background: none; color: var(--text); font-size: 0.9375rem; border-radius: var(--radius-sm); cursor: pointer; border: none; }
.admin-list-btn img { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }
.admin-list-btn .no-img { width: 32px; height: 32px; border-radius: 6px; background: var(--border); }
.admin-list-actions button, .admin-list-actions label { padding: 0.35rem 0.5rem; background: transparent; color: var(--text-muted); font-size: 0.875rem; border-radius: 6px; cursor: pointer; border: none; }
.admin-list-actions button:hover, .admin-list-actions label:hover { color: var(--text); background: var(--border); }
.admin-upload-btn { display: inline-block; padding: 0.6rem 1rem; margin-bottom: 1rem; background: var(--accent); color: #fff; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.9375rem; cursor: pointer; transition: background 0.2s; }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.5rem; }
.admin-photo { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--border); }
.admin-photo img { width: 100%; height: 100%; object-fit: cover; }
.admin-photo button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; background: rgba(0,0,0,0.7); color: #fff; border-radius: 50%; font-size: 0.875rem; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; border: none; }
.admin-photo button:hover { background: #b91c1c; }
.admin-hint { color: var(--text-muted); font-size: 0.9375rem; }
.admin-dash-error { color: #f87171; margin-bottom: 1rem; font-size: 0.9375rem; }
