/* ═══════════════════════════════════════════════════════
   TOP TENNIS ASSOCIATION — Styles
   ═══════════════════════════════════════════════════════ */

/* ─── 1. VARIABLES ─────────────────────────────────── */
:root {
  --green:        #4a7c59;
  --green-dark:   #3a6347;
  --green-light:  #6aab7e;
  --yellow:       #f0c040;
  --yellow-dark:  #d4a820;
  --white:        #ffffff;
  --bg:           #f7faf8;
  --bg-card:      #ffffff;
  --text:         #1e2d26;
  --text-muted:   #5a7060;
  --border:       #dceade;
  --shadow-sm:    0 1px 4px rgba(30,45,38,.06);
  --shadow-md:    0 4px 16px rgba(30,45,38,.10);
  --shadow-lg:    0 8px 32px rgba(30,45,38,.14);
  --radius:       12px;
  --radius-sm:    8px;
  --header-h:     68px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --transition:   .18s ease;
}

/* ─── 2. RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-top: var(--header-h); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

/* ─── 3. TYPOGRAPHY ─────────────────────────────────── */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { line-height: 1.7; }

/* ─── 4. LAYOUT HELPERS ─────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 64px 0;
}
.section-title {
  color: var(--green-dark);
  margin-bottom: 36px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--yellow);
  border-radius: 2px;
}
.page-title {
  color: var(--green-dark);
  margin-bottom: 32px;
}

/* ─── 5. HEADER ─────────────────────────────────────── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 3px solid var(--green);
  z-index: 1000;
  transition: box-shadow var(--transition);
}
#header.scrolled {
  box-shadow: var(--shadow-md);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ─── 6. LOGO ───────────────────────────────────────── */
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}
.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dark);
}

/* ─── 7. NAV ────────────────────────────────────────── */
#main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
#main-nav a {
  display: block;
  padding: 8px 16px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
#main-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 16px; right: 16px;
  height: 2px;
  background: var(--yellow);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform var(--transition);
}
#main-nav a:hover {
  color: var(--green-dark);
  background: rgba(74,124,89,.06);
}
#main-nav a.active {
  color: var(--green-dark);
  font-weight: 600;
}
#main-nav a.active::after,
#main-nav a:hover::after {
  transform: scaleX(1);
}

/* ─── 8. MOBILE MENU ────────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.menu-toggle:hover { background: rgba(74,124,89,.08); }
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--green-dark);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── 9. HERO ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, var(--green-light) 100%);
  color: var(--white);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
}
.hero-text {
  text-align: left;
}
.hero-ball {
  width: clamp(140px, 16vw, 220px);
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.25));
}
.hero-title {
  color: var(--white);
  margin-bottom: 8px;
  text-shadow: 0 2px 12px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.1;
}
.hero-title-brand {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.hero-title-sub {
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  font-weight: 500;
  color: rgba(255,255,255,.92);
}
@media (max-width: 860px) {
  .hero-content { flex-direction: column-reverse; gap: 20px; text-align: center; }
  .hero-text    { text-align: center; }
  .hero-title   { align-items: center; }
  .hero-desc    { margin-left: auto; margin-right: auto; }
  .hero-ball    { width: 130px; }
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  font-weight: 500;
  margin-bottom: 16px;
}
.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,.78);
  margin-bottom: 32px;
  max-width: 540px;
}

/* ─── 10. BUTTONS ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-yellow {
  background: var(--yellow);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(240,192,64,.35);
}
.btn-yellow:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240,192,64,.45);
}
.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(74,124,89,.3);
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74,124,89,.4);
}
.btn-sm {
  padding: 8px 16px;
  font-size: .85rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 500;
  font-size: .95rem;
  margin-bottom: 28px;
  padding: 6px 0;
  transition: gap var(--transition), color var(--transition);
}
.back-link:hover { color: var(--green-dark); gap: 10px; }

/* ─── 11. BADGES ────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.badge-current  { background: #d4edda; color: #155724; }
.badge-upcoming { background: #cce5ff; color: #004085; }
.badge-past     { background: #f0f0f0; color: #555; }

/* ─── 12. CARDS GRID ────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ─── 12bis. SCHOOL LIST (wide cards, full width) ─── */
.school-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.school-card {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.school-photo-wrap {
  flex: 0 0 280px;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.school-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.school-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
}
.school-photo-placeholder svg {
  width: 72px; height: 72px;
}
.school-body {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.school-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0;
}
.school-fields {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.school-fields li {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.5;
}
.school-label {
  font-weight: 600;
  color: var(--green-dark);
}
.school-value { color: var(--text); }
.section-alt { background: var(--bg-soft, #f6f9f6); }

/* ─── 13. EVENT CARD ────────────────────────────────── */
.event-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
  border: 1px solid var(--border);
}
.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text);
}
.card-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  transition: filter .22s ease;
}
.card-thumb.has-photo {
  background-color: #000;
}
.event-card:hover .card-thumb { filter: brightness(.92); }
.card-thumb-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumb-icon {
  width: 56px; height: 56px;
  color: rgba(255,255,255,.25);
}
.card-thumb.has-photo .card-thumb-inner { display: none; }
.card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.35;
}
.card-date {
  font-size: .88rem;
  color: var(--green);
  font-weight: 500;
}
.card-meta {
  font-size: .85rem;
  color: var(--text-muted);
}
.card-prix {
  font-size: .88rem;
  color: var(--green-dark);
  font-weight: 600;
}
.prix-tag {
  display: inline-block;
  background: rgba(74,124,89,.1);
  color: var(--green-dark);
  font-weight: 600;
  border-radius: 50px;
  padding: 2px 10px;
  font-size: .9rem;
}

/* ─── 14. TEAM GRID ─────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.team-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .22s;
}
.team-card:hover { box-shadow: var(--shadow-md); }
.team-photo-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--bg);
}
.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.team-card:hover .team-photo { transform: scale(1.04); }
.team-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--green-dark), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  letter-spacing: -.02em;
}
.team-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.team-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.team-role {
  font-size: .88rem;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.team-bio {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}
.team-contact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: .88rem;
  color: var(--green);
  font-weight: 500;
  word-break: break-all;
  transition: color var(--transition);
}
.team-contact:hover { color: var(--green-dark); }

/* ─── 15. PHOTO GALLERY ─────────────────────────────── */
.event-gallery { margin-top: 48px; }
.event-gallery h2 { color: var(--green-dark); margin-bottom: 16px; }
.gallery-actions { margin-bottom: 20px; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.photo-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  background: var(--bg);
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.photo-item:hover img { transform: scale(1.07); }
.photo-hover {
  position: absolute;
  inset: 0;
  background: rgba(30,45,38,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity .22s;
}
.photo-item:hover .photo-hover { opacity: 1; }

.drive-folder-fallback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.tip {
  font-size: .85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── 16. LIGHTBOX ──────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lb-bg {
  position: absolute;
  inset: 0;
  background: rgba(10,18,13,.88);
  backdrop-filter: blur(4px);
}
.lb-panel {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lb-img-wrap {
  position: relative;
  max-width: 88vw;
  max-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 120px;
}
.lb-img-wrap img {
  max-width: 88vw;
  max-height: 76vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  transition: opacity .2s;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.lb-spinner {
  position: absolute;
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.lb-close {
  position: fixed;
  top: 20px; right: 24px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,.12);
  color: white;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  z-index: 2;
}
.lb-close:hover { background: rgba(255,255,255,.25); }
.lb-prev, .lb-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,.12);
  color: white;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  z-index: 2;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }
.lb-caption {
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  text-align: center;
  max-width: 80vw;
}
.lb-counter {
  color: rgba(255,255,255,.5);
  font-size: .8rem;
}

/* ─── 17. ACTIVITIES FILTERS ────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.search-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .95rem;
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74,124,89,.12);
}
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ftab {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--white);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.ftab:hover { border-color: var(--green); color: var(--green); }
.ftab.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  font-weight: 600;
}

/* ─── 18. EVENT DETAIL ──────────────────────────────── */
.event-detail-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--border);
}
.event-detail-title {
  color: var(--green-dark);
}
.event-detail-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.meta-item {
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 500;
}
.event-detail-desc {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 1rem;
  color: var(--text);
  border-left: 4px solid var(--yellow);
  margin-bottom: 8px;
}

/* ─── 19. CONTACT PAGE ──────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}
.contact-info h2, .contact-form-wrap h2 {
  color: var(--green-dark);
  margin-bottom: 20px;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.contact-item strong { font-weight: 600; }
.contact-role {
  font-size: .85rem;
  color: var(--green);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.contact-link {
  font-size: .9rem;
  color: var(--text-muted);
  word-break: break-all;
  margin-top: 2px;
  transition: color var(--transition);
}
a.contact-link:hover { color: var(--green); }
.club-info {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.club-info h3 { color: var(--green-dark); margin-bottom: 4px; font-size: 1rem; }
.club-info p { font-size: .9rem; color: var(--text-muted); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
}
.contact-form input,
.contact-form textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74,124,89,.1);
}
.contact-form .btn {
  align-self: flex-start;
  margin-top: 4px;
}
.form-note {
  font-size: .8rem;
  color: var(--text-muted);
}
.form-note a { color: var(--green); text-decoration: underline; }

/* ─── 20. SETUP SCREEN ──────────────────────────────── */
.setup-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 120px);
  padding: 40px 24px;
}
.setup-card {
  max-width: 560px;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  text-align: left;
}
.setup-icon { font-size: 2.5rem; margin-bottom: 16px; }
.setup-card h2 { color: var(--green-dark); margin-bottom: 12px; }
.setup-card > p { color: var(--text-muted); margin-bottom: 20px; }
.setup-steps {
  list-style: decimal;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  font-size: .95rem;
  line-height: 1.6;
}
.setup-steps a { color: var(--green); text-decoration: underline; }
.setup-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .88rem;
  font-family: 'Courier New', monospace;
  margin-bottom: 16px;
  word-break: break-all;
}
.highlight { color: var(--green-dark); font-weight: bold; }
.setup-note { font-size: .85rem; color: var(--text-muted); }

/* ─── 21. LOADING / ERROR ───────────────────────────── */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 24px;
  color: var(--text-muted);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.error-box {
  max-width: 480px;
  margin: 60px auto;
  padding: 28px 32px;
  background: #fff5f5;
  border: 1.5px solid #ffcccc;
  border-radius: var(--radius);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.error-box p { color: #c0392b; font-size: .95rem; }
.empty-state {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 40px 0;
}
.empty-state a { color: var(--green); text-decoration: underline; }

/* ─── 22. FOOTER ────────────────────────────────────── */
#footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.75);
  padding: 32px 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
}
.footer-logo {
  height: 36px;
  background: white;
  border-radius: 8px;
  padding: 3px 8px;
  object-fit: contain;
}
.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--white); }
.footer-copy {
  font-size: .82rem;
  color: rgba(255,255,255,.4);
}

/* ─── 23. ANIMATIONS ────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.section, .hero { animation: fadeIn .4s ease both; }

/* ─── 24. RESPONSIVE ────────────────────────────────── */

/* Tablette ≤ 900px */
@media (max-width: 900px) {
  .cards-grid       { grid-template-columns: repeat(2, 1fr); }
  .team-grid        { grid-template-columns: repeat(2, 1fr); }
  .photo-grid       { grid-template-columns: repeat(3, 1fr); }
  .school-photo-wrap { flex: 0 0 220px; }
}

/* Mobile ≤ 640px */
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .section { padding: 44px 0; }

  .menu-toggle { display: flex; }

  #main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 12px 0 20px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 999;
  }
  #main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }
  #main-nav ul { flex-direction: column; padding: 0 24px; gap: 0; }
  #main-nav a  { padding: 12px 0; border-bottom: 1px solid var(--border); border-radius: 0; }
  #main-nav a::after { display: none; }

  .cards-grid   { grid-template-columns: 1fr; }
  .team-grid    { grid-template-columns: 1fr; }
  .photo-grid   { grid-template-columns: repeat(2, 1fr); }
  .filter-bar   { flex-direction: column; align-items: stretch; }
  .search-input { min-width: auto; }

  .school-card       { flex-direction: column; }
  .school-photo-wrap { flex: 0 0 200px; width: 100%; }

  .hero { padding: 64px 0 60px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* Très petit ≤ 400px */
@media (max-width: 400px) {
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .setup-card { padding: 24px 20px; }
}
