/* ==========================================
   PAGE PÉRISCOLAIRE — ASSOCIATION BEAUFIEF
   Styles spécifiques à la page periscolaire.html uniquement.
   Les styles globaux (variables, reset, topbar, header,
   nav, footer, boutons, .container) sont dans style.css
========================================== */


/* ==========================================
   HERO PLEIN ÉCRAN
   Bandeau avec photo du périscolaire en fond
========================================== */
.page-hero {
  position: relative;
  min-height: 320px;
  background: linear-gradient(135deg, #1e3a2f, #5c6f5c 50%, #d8b24a); /* Dégradé de secours */
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Photo de fond semi-transparente */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/periscolaire/jeu\ exterieur.webp') center/cover no-repeat;
  opacity: 0.3;
}

/* Zone texte au-dessus de la photo */
.page-hero .hero-inner {
  position: relative;
  z-index: 1;
  padding: 60px 0 50px;
  width: 100%;
}

.page-hero h2 {
  font-family: var(--font-title);
  font-size: 3rem;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4); /* Ombre pour lisibilité sur photo */
}

.page-hero p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  max-width: 680px;
}


/* ==========================================
   INTRODUCTION EN 2 COLONNES
   Photo à gauche, texte à droite
========================================== */
.intro-split {
  display: grid;
  grid-template-columns: 1fr 1.4fr; /* Texte légèrement plus large */
  gap: 50px;
  align-items: center;
  margin-bottom: 40px;
}


/* ==========================================
   GRILLE DES HORAIRES
   3 cartes : matin accueil, soir 1, soir 2
========================================== */
.horaires-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0;
}

/* Carte d'un créneau horaire */
.horaire-card {
  background: var(--blanc);
  border-radius: 18px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
  text-align: center;
  border-bottom: 4px solid var(--vert-sauge); /* Trait coloré en bas */
}

/* Couleurs différentes pour distinguer les créneaux */
.horaire-card:nth-child(2) { border-bottom-color: var(--terre-cuite); }
.horaire-card:nth-child(3) { border-bottom-color: var(--jaune-moutarde); }

/* Étiquette de période (ex : "MATIN", "SOIR GAMBETTA") */
.horaire-card .period {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gris);
  margin-bottom: 8px;
}

/* Heure affichée en grand */
.horaire-card .time {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--vert-sauge);
  margin-bottom: 6px;
}

/* Couleurs de l'heure calquées sur la bordure */
.horaire-card:nth-child(2) .time { color: var(--terre-cuite); }
.horaire-card:nth-child(3) .time { color: var(--jaune-moutarde); }

.horaire-card .desc {
  color: var(--gris);
  font-size: 0.9rem;
}


/* ==========================================
   BLOC ÉCOLES DESSERVIES
   Grille 2 colonnes : école Gambetta, école Lair
========================================== */
.schools-block {
  background: var(--blanc);
  border-radius: 20px;
  padding: 35px 40px;
  box-shadow: var(--shadow);
  margin: 30px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: center;
}

/* Item d'une école individuelle */
.school-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--beige-lin);
  border-radius: 14px;
}

/* Icône carrée avec initiales de l'école */
.school-icon {
  width: 44px;
  height: 44px;
  background: var(--vert-sauge);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;      /* Ne rétrécit pas */
}

.school-icon span {
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  font-family: var(--font-title);
}

.school-name {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--texte);
  font-size: 1rem;
}


/* ==========================================
   ENCADRÉ DE RÉSERVATION
   Fond rouge avec infos et bouton Portail Famille
========================================== */
.reservation-box {
  background: linear-gradient(135deg, var(--terre-cuite), #98392f); /* Dégradé rouge */
  color: #fff;
  border-radius: 22px;
  padding: 40px;
  margin: 40px 0;
}

.reservation-box h3 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 14px;
}

.reservation-box p {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 8px;
  line-height: 1.7;
}

.reservation-box ul {
  padding-left: 18px;
  margin: 12px 0;
}

.reservation-box li {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Mots importants en doré */
.reservation-box strong {
  color: var(--jaune-moutarde);
}

/* Bouton blanc sur fond coloré */
.btn-white {
  background: #fff;
  color: var(--terre-cuite);
  padding: 13px 28px;
  border-radius: 14px;
  font-weight: 700;
  display: inline-block;
  transition: 0.25s;
  font-family: var(--font-title);
  margin-top: 16px;
}

.btn-white:hover {
  background: var(--jaune-moutarde);
  color: var(--texte);
}


/* ==========================================
   SECTION TARIFS
   Wrapper de la grille de prix périscolaires
========================================== */
.pricing-wrap {
  padding: 60px 0;
  background: var(--beige-lin);
}

/* Titre de sous-section tarifaire */
.pricing-section-title {
  font-family: var(--font-title);
  color: var(--vert-sauge);
  font-size: 1.1rem;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--jaune-moutarde); /* Trait doré sous le titre */
}

/* Tableau des tarifs (même structure que infos-pratiques) */
.pricing-table {
  background: var(--blanc);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 10px 0 20px;
  width: 100%;
}

.price-header {
  display: flex;
  background: var(--vert-sauge);
  color: var(--blanc);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.83rem;
}

.price-header .col,
.price-row .col {
  padding: 12px 10px;
  flex: 1;
  text-align: center;
}

/* Première colonne plus large pour le libellé de la tranche */
.price-header .col:first-child,
.price-row .col:first-child {
  flex: 1.8;
  text-align: left;
  padding-left: 18px;
}

.price-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--beige-lin);
}

.price-row:last-child { border-bottom: none; }

/* Alternance de fond sur les lignes paires */
.price-row:nth-child(even) { background: rgba(246, 240, 230, 0.5); }

.price-row .col:first-child {
  color: var(--gris);
  font-weight: 600;
  font-size: 0.88rem;
}

.price-row .col:not(:first-child) {
  color: var(--terre-cuite);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Note explicative sous un tableau de tarifs */
.note-tarif {
  background: rgba(216, 178, 74, 0.13);
  border-left: 4px solid var(--jaune-moutarde);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--gris);
  margin: 8px 0 20px;
}

.note-tarif strong { color: var(--terre-cuite); }


/* ==========================================
   DIAPORAMA (Carrousel de photos)
   Identique au composant cslide de ado.css
========================================== */
.cslide {
  min-width: 380px;
  height: 260px;
  margin: 0 10px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.13);
  flex-shrink: 0;
  background: #222;
}

.cslide img,
.cslide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.cslide:hover img,
.cslide:hover video { transform: scale(1.04); }

/* Boutons précédent/suivant du carrousel */
.cbtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terre-cuite);
  transition: 0.25s;
  line-height: 1;
}

.cbtn:hover { background: var(--jaune-moutarde); color: #fff; transform: translateY(-50%) scale(1.1); }
.cbtn-prev { left: 12px; }
.cbtn-next { right: 12px; }

/* Points indicateurs de position */
.cdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
  transition: 0.25s;
}

.cdot.active { background: var(--terre-cuite); transform: scale(1.3); }


/* ==========================================
   RESPONSIVE — TABLETTES (max-width: 850px)
========================================== */
@media (max-width: 850px) {
  .page-hero { min-height: 260px; }
  .page-hero h2 { font-size: 2.2rem; }
  .page-hero p { font-size: 1rem; }

  /* Passage en 1 colonne pour intro et écoles */
  .intro-split { grid-template-columns: 1fr; gap: 30px; }
  .horaires-grid { grid-template-columns: 1fr; gap: 16px; }
  .schools-block { grid-template-columns: 1fr; padding: 28px 24px; gap: 20px; }
  .reservation-box { padding: 30px 24px; }

  /* Forçage 1 colonne sur les .grid-3 hérités de style.css */
  .grid-3 { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* Sur tablette : tableaux de tarifs défilent en horizontal */
  .pricing-table { overflow-x: auto; display: block; }
  .price-header,
  .price-row { min-width: 600px; }
}

/* ==========================================
   RESPONSIVE — MOBILES (max-width: 600px)
========================================== */
@media (max-width: 600px) {
  .page-hero { min-height: 220px; }
  .page-hero .hero-inner { padding: 40px 0 35px; }
  .page-hero h2 { font-size: 1.8rem; margin-bottom: 8px; }
  .page-hero p { font-size: 0.95rem; }

  .horaire-card { padding: 22px 18px; }
  .horaire-card .period { font-size: 0.7rem; letter-spacing: 1px; }
  .horaire-card .time { font-size: 1.4rem; }
  .horaire-card .desc { font-size: 0.85rem; }

  .schools-block { padding: 24px 18px; }
  .school-item { padding: 14px 16px; gap: 12px; }
  .school-icon { width: 40px; height: 40px; }
  .school-icon span { font-size: 0.85rem; }
  .school-name { font-size: 0.95rem; }

  .reservation-box { padding: 24px 20px; border-radius: 18px; }
  .reservation-box h3 { font-size: 1.3rem; }
  .reservation-box ul { padding-left: 16px; }
  .reservation-box li { font-size: 0.9rem; }

  /* Bouton pleine largeur sur mobile */
  .btn-white { padding: 12px 24px; font-size: 0.95rem; width: 100%; text-align: center; }

  .pricing-section-title { font-size: 1rem; margin: 20px 0 8px; }
  .pricing-table { margin: 8px 0 16px; border-radius: 14px; }
  .price-header,
  .price-row { min-width: 650px; }
  .price-header .col,
  .price-row .col { padding: 10px 8px; font-size: 0.75rem; }
  .price-header .col:first-child,
  .price-row .col:first-child { padding-left: 12px; font-size: 0.78rem; }
  .note-tarif { padding: 10px 14px; font-size: 0.85rem; }

  /* Carrousel plus petit sur mobile */
  .cslide { min-width: 280px; height: 190px; }
}

/* ==========================================
   RESPONSIVE — TRÈS PETITS MOBILES (max-width: 400px)
========================================== */
@media (max-width: 400px) {
  .page-hero h2 { font-size: 1.5rem; }
  .page-hero p { font-size: 0.9rem; }
  .horaire-card .time { font-size: 1.2rem; }
  .reservation-box h3 { font-size: 1.15rem; }
  .pricing-section-title { font-size: 0.95rem; }
}
