/**
 * Landing page - Hub multi-sport (Trouver un club)
 * Identité neutre : cette page lie toutes les applications par sport.
 * Les couleurs Basket Link sont réservées à la carte de l’app basket.
 */

@import url('../src/css/variables.css');

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

:root {
  /* Palette neutre du hub (pas les couleurs d’une app en particulier) */
  --landing-primary: #0d9488;
  --landing-primary-dark: #0f766e;
  --landing-bg: #f0fdfa;
  --landing-card: #fff;
  --landing-text: #134e4a;
  --landing-muted: #64748b;
  --landing-muted-text: #64748b;
  --landing-radius: 16px;
  --landing-radius-sm: 12px;
  --landing-shadow: 0 4px 20px rgba(13, 148, 136, 0.12);
  --landing-shadow-hover: 0 8px 28px rgba(13, 148, 136, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--landing-bg);
  color: var(--landing-text);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Fenêtre d’accueil explicative */
.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: welcomeModalFadeIn 0.25s ease-out;
}

.welcome-modal.is-hidden {
  display: none;
}

.welcome-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(19, 78, 74, 0.5);
  backdrop-filter: blur(4px);
}

.welcome-modal-box {
  position: relative;
  background: var(--landing-card);
  border-radius: var(--landing-radius);
  box-shadow: var(--landing-shadow-hover);
  max-width: 440px;
  width: 100%;
  padding: 28px 24px;
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.welcome-modal-title {
  font-size: 1.25rem;
  color: var(--landing-text);
  margin-bottom: 14px;
  padding-right: 28px;
}

.welcome-modal-text {
  font-size: 0.95rem;
  color: var(--landing-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.welcome-modal-text:last-of-type {
  margin-bottom: 20px;
}

.welcome-modal-btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: var(--landing-primary);
  color: #fff;
  border: none;
  border-radius: var(--landing-radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.welcome-modal-btn:hover {
  background: var(--landing-primary-dark);
}

@keyframes welcomeModalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 253, 250, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(13, 148, 136, 0.2);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--landing-text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo i.fa-map-location-dot {
  color: var(--landing-primary);
  font-size: 1.5rem;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  color: var(--landing-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--landing-primary);
}

.nav a.btn-login:hover {
  color: #fff !important;
}

.btn-login {
  padding: 8px 16px;
  background: var(--landing-primary);
  color: #fff !important;
  border-radius: var(--landing-radius-sm);
  font-weight: 600;
}

.btn-login:hover {
  background: var(--landing-primary-dark);
}

/* Hero */
.hero {
  padding: 48px 20px 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  text-align: center;
}

.hero-content {
  flex: 1;
  min-width: 280px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--landing-text);
  margin-bottom: 12px;
  line-height: 1.25;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--landing-muted);
  margin-bottom: 24px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--landing-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--landing-radius);
  box-shadow: var(--landing-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: var(--landing-shadow-hover);
}

.hero-sports-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 48px;
  pointer-events: none;
}

.hero-sports-icons .sport-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: default;
  pointer-events: none;
}

.hero-sports-icons .sport-icon i {
  pointer-events: none;
}

/* Couleurs par sport */
.hero-sports-icons .sport-football { color: #2e7d32; }        /* Football : vert terrain */
.hero-sports-icons .sport-basket { color: #ee6730; }          /* Basket : orange */
.hero-sports-icons .sport-rugby { color: #5d4037; }           /* Rugby : marron ballon */
.hero-sports-icons .sport-tennis { color: #fdd835; }          /* Tennis : jaune balle */
.hero-sports-icons .sport-volleyball { color: #1976d2; }       /* Volleyball : bleu */
.hero-sports-icons .sport-handball { color: #0d47a1; }         /* Handball : bleu foncé */
.hero-sports-icons .sport-natation { color: #0288d1; }        /* Natation : bleu eau */
.hero-sports-icons .sport-judo { color: #c62828; }            /* Judo : rouge */
.hero-sports-icons .sport-cyclisme { color: #f9a825; }        /* Cyclisme : jaune maillot */
.hero-sports-icons .sport-athletisme { color: #d32f2f; }      /* Athlétisme : rouge piste */
.hero-sports-icons .sport-golf { color: #2e7d32; }            /* Golf : vert */
.hero-sports-icons .sport-equitation { color: #6d4c41; }       /* Équitation : marron */
.hero-sports-icons .sport-petanque { color: #78909c; }        /* Pétanque : gris boule */
.hero-sports-icons .sport-boxe { color: #b71c1c; }            /* Boxe : rouge gants */
.hero-sports-icons .sport-escalade { color: #5d4037; }        /* Escalade : roche */
.hero-sports-icons .sport-ski { color: #2196f3; }              /* Ski : bleu neige */
.hero-sports-icons .sport-badminton { color: #43a047; }       /* Badminton : vert */
.hero-sports-icons .sport-tennis-table { color: #ff9800; }    /* Tennis de table : orange */
.hero-sports-icons .sport-danse { color: #8e24aa; }            /* Danse : violet */
.hero-sports-icons .sport-gymnastique { color: #ec407a; }     /* Gymnastique : rose */
.hero-sports-icons .sport-escrime { color: #607d8b; }          /* Escrime : argent */
.hero-sports-icons .sport-canoe { color: #0288d1; }           /* Canoë-kayak : bleu */
.hero-sports-icons .sport-voile { color: #1565c0; }            /* Voile : bleu marine */
.hero-sports-icons .sport-surf { color: #039be5; }             /* Surf : bleu océan */
.hero-sports-icons .sport-lutte { color: #ef6c00; }            /* Lutte : orange */
.hero-sports-icons .sport-hockey { color: #212121; }           /* Hockey : noir */

/* Section */
.section {
  padding: 40px 0 56px;
}

.section h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: var(--landing-text);
  text-align: center;
}

/* Search form */
.search-section {
  background: var(--landing-card);
  border-radius: var(--landing-radius);
  margin: 0 20px 24px;
  padding: 32px 24px;
  box-shadow: var(--landing-shadow);
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--landing-text);
}

.form-row input,
.form-row select {
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: var(--landing-radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--landing-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.form-row input::placeholder {
  color: #aaa;
}

.form-row .form-hint {
  font-size: 0.85rem;
  color: var(--landing-muted-text);
  margin-top: 4px;
}

.form-row .form-hint a {
  color: var(--landing-primary);
  text-decoration: none;
}

.form-row .form-hint a:hover {
  text-decoration: underline;
}

.form-row .btn-geo {
  margin-top: 8px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: var(--landing-radius-sm);
  font-size: 0.9rem;
  color: var(--landing-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.form-row .btn-geo:hover {
  background: rgba(13, 148, 136, 0.15);
  color: var(--landing-primary);
}

.btn-submit {
  margin-top: 8px;
  padding: 14px 24px;
  background: var(--landing-primary);
  color: #fff;
  border: none;
  border-radius: var(--landing-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s, transform 0.2s;
}

.btn-submit:hover {
  background: var(--landing-primary-dark);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Results */
.results-container,
.results-empty,
.results-error {
  margin-top: 28px;
  padding: 24px;
  border-radius: var(--landing-radius-sm);
}

.results-container {
  background: #f8f9fa;
  border: 1px solid #eee;
}

.results-container[hidden],
.results-empty[hidden],
.results-error[hidden] {
  display: none !important;
}

#results-title {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--landing-text);
}

.results-dep-notice {
  font-size: 0.9rem;
  color: var(--landing-muted);
  margin: 0 0 10px 0;
  font-style: italic;
}

.results-max-hint {
  font-size: 0.85rem;
  color: var(--landing-muted-text);
  margin-bottom: 12px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  max-height: 360px;
  overflow-y: auto;
}

.result-card {
  background: #fff;
  padding: 14px 16px;
  border-radius: var(--landing-radius-sm);
  border: 1px solid #eee;
  transition: box-shadow 0.2s;
}

.result-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.result-card h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--landing-text);
}

.result-card .result-ville {
  font-size: 0.9rem;
  color: var(--landing-muted);
}

.result-card .result-distance {
  font-size: 0.85rem;
  color: var(--landing-primary);
  font-weight: 600;
  margin-top: 2px;
}

.result-card .result-adresse,
.result-card .result-tel,
.result-card .result-correspondant {
  font-size: 0.85rem;
  color: var(--landing-text);
  margin-top: 4px;
}

.result-card .result-tel a {
  color: var(--landing-primary);
  text-decoration: none;
}

.result-card .result-tel a:hover {
  text-decoration: underline;
}

.result-card .label {
  font-weight: 600;
  color: var(--landing-muted-text);
  margin-right: 4px;
}

.result-card .result-equipes {
  font-size: 0.85rem;
  color: var(--landing-muted);
  margin-top: 6px;
}

.results-cta {
  font-size: 0.95rem;
  color: var(--landing-muted);
  margin-bottom: 12px;
}

.btn-cta {
  display: inline-block;
  padding: 12px 22px;
  background: var(--landing-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--landing-radius-sm);
  transition: background 0.2s;
}

.btn-cta:hover {
  background: var(--landing-primary-dark);
}

.results-empty,
.results-error {
  text-align: center;
  background: #f8f9fa;
  border: 1px solid #eee;
}

.results-empty i,
.results-error i {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.results-empty i {
  color: var(--landing-primary);
}

.results-error i {
  color: #e74c3c;
}

.results-empty p,
.results-error p {
  color: var(--landing-muted);
  font-size: 0.95rem;
}

/* Apps section */
.apps-section .container {
  max-width: 900px;
}

.apps-intro {
  text-align: center;
  color: var(--landing-muted);
  margin-bottom: 28px;
  font-size: 1rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--landing-card);
  border-radius: var(--landing-radius);
  padding: 28px;
  box-shadow: var(--landing-shadow);
  border: 1px solid rgba(13, 148, 136, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--landing-shadow-hover);
}

.app-card-coming {
  opacity: 0.85;
  cursor: default;
}

.app-card-coming:hover {
  transform: none;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.2);
  color: var(--landing-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* Carte Basket Link : identité propre (couleurs basket) */
.app-card-draft {
  border-color: rgba(242, 157, 53, 0.25);
}
.app-card-draft:hover {
  box-shadow: 0 8px 28px rgba(242, 157, 53, 0.2);
}
.app-icon-draft {
  background: rgba(242, 157, 53, 0.2);
  color: #F29D35;
}
.app-link-draft {
  color: #F29D35;
}
.app-card-draft:hover .app-link-draft {
  text-decoration: underline;
}

.app-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--landing-text);
}

.app-card p {
  font-size: 0.95rem;
  color: var(--landing-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.app-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--landing-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Footer */
.footer {
  padding: 28px 20px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

.footer a {
  color: var(--landing-primary);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-credit {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--landing-muted);
}

/* Mobile */
@media (max-width: 600px) {
  .nav a:not(.btn-login) {
    display: none;
  }

  .hero {
    padding: 32px 16px 40px;
  }

  .search-section {
    margin: 0 12px 20px;
    padding: 24px 16px;
  }
}
