/* 
  BCNantes.fr - Components
  =============================
  Boutons, Cartes, Sections Hero, Badges...
*/

/* =========================================================================
   SECTIONS
   ========================================================================= */

.section {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.section-lg {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section-bg-alt {
  background-color: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-4);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: clamp(1.75rem, 9vw, 2.25rem);
  font-family: var(--font-serif);
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-2);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: var(--radius-sm);
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
  .section-lg {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
  .section-header {
    margin-bottom: var(--space-12);
  }
  .section-title {
    font-size: var(--text-4xl);
    padding-bottom: var(--space-3);
  }
  .section-subtitle {
    font-size: var(--text-lg);
  }
}

/* =========================================================================
   HERO BANNER
   ========================================================================= */

.hero {
  position: relative;
  background-color: var(--color-primary-dark);
  color: white;
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  mix-blend-mode: overlay;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 10;
  max-width: 900px;
}

.hero-title {
  color: white;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: hsl(215, 20%, 90%);
  margin-bottom: var(--space-8);
  font-weight: var(--weight-normal);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

@media (min-width: 768px) {
  .hero {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
}

/* =========================================================================
   BUTTONS (Senior Optimized & Premium)
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.125rem 2.5rem; /* Larger hit area */
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  text-align: center;
  line-height: 1;
  min-height: 60px; /* Strong touch target */
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
  box-shadow: 0 4px 15px rgba(213, 63, 140, 0.25);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  color: white;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(213, 63, 140, 0.35);
}

.btn-secondary {
  background-color: var(--color-bg-surface);
  color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-secondary:hover {
  background-color: var(--color-primary-dark);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Version outline pour fond sombre */
.btn-outline-light {
  background-color: transparent;
  color: white;
  border-color: white;
}

.btn-outline-light:hover {
  background-color: white;
  color: var(--color-primary-dark);
}

/* =========================================================================
   CARDS (Luxury Depth)
   ========================================================================= */

.card {
  background-color: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrap {
  height: 32px;
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal) ease-out;
}

.card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card-content {
  padding: var(--space-8);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: var(--text-2xl); /* Larger for seniors */
  margin-bottom: var(--space-4);
  font-family: var(--font-serif);
}

.card-title a {
  color: inherit;
}

.card-title a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0; /* Makes whole card clickable */
}

.card-text {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  flex-grow: 1;
}

.card-link {
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto; /* Push to bottom */
}

.card-link::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.card:hover .card-link::after {
  transform: translateX(4px);
}

/* =========================================================================
   SUBNAV CLUB (Floating Glass Style)
   ========================================================================= */
.subnav-club {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
}
.subnav-card {
  flex: 1;
  min-width: 250px;
  background-color: var(--color-bg-surface);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-primary-dark);
  transition: all var(--transition-normal);
}
.subnav-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}
.subnav-card.active {
  background-color: var(--color-primary-dark);
  color: white;
  border-color: var(--color-primary-dark);
  box-shadow: var(--shadow-lg);
}
.subnav-card.active h3 {
  color: white !important;
}
.subnav-card .subnav-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-2);
}

/* Mobile-specific adjustments for Subnav (Ultra-Sober) */
@media (max-width: 991px) {
  .subnav-club {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-1); /* Even smaller gap: 4px */
    padding: 0; /* No internal padding */
    margin-bottom: var(--space-3); /* Reduced margin: 12px */
  }

  /* No need for custom scrollbar styles as we wrap now */
  .subnav-club::-webkit-scrollbar {
    display: none;
  }

  .subnav-card {
    min-width: 0; /* Allow shrinking */
    padding: var(--space-2) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 13px; /* Slightly smaller to ensure "Organisation" fits */
    box-shadow: none;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  .subnav-card:hover {
    transform: none; /* Disable lift effect on mobile */
  }

  .subnav-card .subnav-icon {
    display: none; /* Hide icons entirely for sobriety */
  }

  .subnav-label {
    margin: 0 !important;
    font-size: var(--text-sm) !important;
    font-weight: var(--weight-semibold);
  }

  .subnav-card.active {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: white;
  }
}
/* =========================================================================
   VIDEO SHOWCASE
   ========================================================================= */

.section-dark {
  background-color: var(--color-primary-dark);
  color: white;
}

.section-dark .section-title {
  color: white;
}

.section-dark .section-subtitle {
  color: hsl(215, 20%, 80%);
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 992px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.video-card {
  position: relative;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--color-accent);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #000;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity var(--transition-normal);
}

.video-card:hover .video-thumb img {
  opacity: 1;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background-color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  transition:
    transform var(--transition-fast),
    background-color var(--transition-fast);
}

.video-card:hover .play-button {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: var(--color-accent-hover);
}

.video-info {
  padding: var(--space-4);
}

.video-tag {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-1);
  display: block;
}

.video-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin: 0;
  color: white;
}

/* Modal / Lightbox */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16/9;
  background: black;
  border-radius: var(--radius-md);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  padding: var(--space-2);
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-accent);
}

#video-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-md);
}
/* =========================================================================
   FEATURE GRID (Side by side Image/Text)
   ========================================================================= */

.grid-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-surface);
  box-shadow: var(--shadow-sm);
}

.grid-feature-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.grid-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.grid-feature:hover .grid-feature-img img {
  transform: scale(1.03);
}

.grid-feature-content {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 767px) {
  .grid-feature-content {
    padding: var(--space-3, 0.75rem); /* Reduced to 12px padding on mobile */
  }
}

@media (min-width: 992px) {
  .grid-feature {
    grid-template-columns: 1fr 1fr;
  }

  .grid-feature-reverse .grid-feature-img {
    order: 2;
  }

  .grid-feature-reverse .grid-feature-content {
    order: 1;
  }

  .grid-feature-lg {
    grid-template-columns: 1fr 1.5fr;
  }

  .grid-feature-lg.grid-feature-reverse {
    grid-template-columns: 1.5fr 1fr;
  }
}

/* =========================================================================
   TOURNOIS SCHEDULE GRID
   ========================================================================= */
.schedule-container {
  overflow-x: auto;
  margin-bottom: var(--space-8);
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 colonnes (Lun-Ven) au lieu de 6 */
  gap: var(--space-1);
  min-width: 750px;
}

.schedule-header {
  font-weight: var(--weight-bold);
  text-align: center;
  padding: var(--space-1);
  color: var(--color-primary-dark);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
}

/* Anciennes étiquettes supprimées */

.day-column {
  display: contents;
}

.schedule-slot {
  min-height: 50px; /* Réduit encore à 50px pour plus de densité */
  background: var(--color-bg-alt); /* Light gray for empty slots */
  border-radius: var(--radius-md);
  padding: 0; /* Events will touch edges */
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  overflow: hidden; /* Ensure event radius matches slot */
}

.schedule-slot:hover {
  border-color: var(--color-border);
  background: white;
  box-shadow: var(--shadow-sm);
}

.schedule-event {
  padding: 6px; /* Resserre tout à l'intérieur de la boîte */
  border-radius: 0; /* Fill the slot completely */
  color: white;
  font-size: var(--text-sm);
  display: flex;
  flex-direction: column;
  gap: 2px; /* Supprime les grands vides entre Type, Heure et Bouton */
  line-height: 1.1;
  height: 100%;
  width: 100%;
  transition: all var(--transition-normal);
}

.event-type {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  font-size: 0.55rem;
  opacity: 0.85;
}

.event-time {
  font-weight: var(--weight-bold);
  font-size: var(--text-xs);
}

.event-info,
.event-link {
  font-size: 0.55rem;
  font-weight: var(--weight-semibold);
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 5px;
  border-radius: 20px;
  display: inline-block;
  align-self: flex-start;
  margin-top: 1px;
  color: white !important;
  text-decoration: none;
  transition: background var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-link:hover {
  background: rgba(255, 255, 255, 0.4);
}

.event-regularite {
  background-color: var(--color-primary);
}
.event-bridgeup {
  background-color: var(--color-green);
}
.event-qnjb {
  background: linear-gradient(135deg, #6b46c1 0%, #d53f8c 100%);
}

.mobile-day-title,
.mobile-time-label {
  display: none;
}

/* Mobile responsive redesign: Day by Day */
@media (max-width: 1199px) {
  .schedule-container {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    overflow-x: visible;
  }

  .schedule-grid {
    display: flex;
    flex-direction: column;
    min-width: unset;
    gap: var(--space-4); /* Réduit le trou entre les jours (Lundi, Mardi...) */
  }

  .schedule-header,
  .schedule-row-label {
    display: none;
  }

  .day-column {
    display: block;
    background: var(--color-bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-2); /* Réduit le padding interne du bloc blanc */
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--color-primary);
  }

  .day-column.monday {
    border-top-color: var(--color-accent);
  }

  .mobile-day-title {
    display: block !important;
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    color: var(--color-primary-dark);
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 4px;
  }

  .schedule-slot {
    min-height: unset;
    background: transparent;
    padding: 0;
    margin-bottom: var(--space-2); /* Réduit l'espace entre deux tournois du même jour */
    display: block;
  }

  .schedule-slot:last-child {
    margin-bottom: 0;
  }

  .schedule-event {
    padding: 6px; /* Version mobile resserrée au max */
    border-radius: var(--radius-md);
    margin-bottom: 0;
    gap: 2px;
  }

  .event-time {
    font-size: var(--text-base);
  }
  .event-type {
    font-size: var(--text-xs);
  }
  .event-info,
  .event-link {
    font-size: var(--text-sm);
    padding: 2px 10px;
    margin-top: 2px;
  }
}
