/* ==========================================================================
   LES CULOTTES COURTES - DESIGN SYSTEM & STYLESHEET (PHP VERSION)
   Centre de Loisirs & Périscolaire à Boëge
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --primary: #059669;
  --primary-light: #34d399;
  --primary-dark: #047857;
  --primary-bg: #ecfdf5;
  
  --secondary: #f59e0b;
  --secondary-light: #fbbf24;
  --secondary-dark: #d97706;
  --secondary-bg: #fffbebf;

  --accent: #f43f5e;
  --accent-light: #fda4af;
  --accent-dark: #be123c;
  --accent-bg: #fff1f2;

  --blue: #0ea5e9;
  --blue-light: #7dd3fc;
  --blue-bg: #f0f9ff;

  --dark: #0f172a;
  --dark-light: #334155;
  --muted: #64748b;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;

  /* Typography */
  --font-heading: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 20px 40px rgba(5, 150, 105, 0.18);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--dark);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--dark);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Top Notification / Alert Banner */
.top-alert {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: #ffffff;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  position: relative;
  z-index: 1000;
}
.top-alert strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.top-alert .badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-right: 0.5rem;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

/* Header & Navigation */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--dark);
  color: #cbd5e1;
  font-size: 0.85rem;
  padding: 0.4rem 0;
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-top-info span {
  margin-right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  border-radius: 6px;
  transition: var(--transition);
}
.logo:hover .logo-img {
  transform: scale(1.05);
}

.footer-logo-img {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  border-radius: 6px;
  background: white;
  padding: 4px;
}
.logo-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: block;
  line-height: 1.1;
}
.logo-sub {
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--muted);
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex: 1;
  margin-left: 1.5rem;
}

.nav-links-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--dark-light);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-dark);
  background-color: var(--primary-bg);
  font-weight: 600;
}

.nav-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-nav-portail {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
  transition: var(--transition);
}
.btn-nav-portail:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
  color: white !important;
}

.btn-nav-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-bg);
  color: var(--primary-dark) !important;
  border: 1px solid rgba(5, 150, 105, 0.25);
  padding: 0.48rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}
.btn-nav-contact:hover, .btn-nav-contact.active {
  background: var(--primary);
  color: white !important;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.top-alert-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 0.5rem;
  white-space: nowrap;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--dark);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 4.5rem 0 5rem;
  background: radial-gradient(circle at top right, #dcfce7, transparent 50%),
              radial-gradient(circle at bottom left, #fef3c7, transparent 50%),
              var(--light-bg);
  overflow: hidden;
}

/* Page Header Hero Banner (Subpages) */
.page-header {
  position: relative;
  padding: 4rem 0 4.5rem;
  background: linear-gradient(135deg, #065f46, var(--primary), #047857);
  color: white;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.15);
}
.page-header::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.page-header h1 {
  color: white !important;
  font-size: 2.8rem;
  font-family: var(--font-heading);
  margin-bottom: 0.8rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.page-header p {
  color: #e2e8f0 !important;
  font-size: 1.15rem;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}
.page-header .page-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.18);
  color: white !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.hero-title {
  font-size: 3rem;
  color: var(--dark);
  margin-bottom: 1.2rem;
  letter-spacing: -0.5px;
}
.hero-title span {
  color: var(--primary);
  position: relative;
  display: inline-block;
}
.hero-title span::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--secondary-light);
  opacity: 0.5;
  border-radius: 4px;
  z-index: -1;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: white;
}
.btn-secondary {
  background: white;
  color: var(--dark);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--light-bg);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-accent {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}
.btn-accent:hover {
  transform: translateY(-3px);
  color: white;
}

/* Hero Cards / Visual Badge */
.hero-visual {
  position: relative;
}
.hero-card-main {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  z-index: 2;
}

.hero-badge-float {
  position: absolute;
  top: -20px;
  right: -20px;
  background: linear-gradient(135deg, var(--accent), #e11d48);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.35);
  font-family: var(--font-heading);
  text-align: center;
  z-index: 3;
  animation: float 4s ease-in-out infinite;
}
.hero-badge-float strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
}

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

.feature-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
}
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Section Styles */
.section {
  padding: 5rem 0;
}
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}
.section-subtitle {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: block;
}
.section-title {
  font-size: 2.3rem;
  margin-bottom: 1rem;
}
.section-desc {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.service-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.card-header-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}
.icon-emerald { background: var(--primary-bg); color: var(--primary); }
.icon-amber { background: #fffbe0; color: var(--secondary-dark); }
.icon-blue { background: var(--blue-bg); color: var(--blue); }
.icon-rose { background: var(--accent-bg); color: var(--accent); }

.card-title {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}
.card-text {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.98rem;
}
.card-footer-link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Navette & Logistique Saint-André Box */
.st-andre-box {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}
.st-andre-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}
.st-andre-title {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.st-andre-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #e0f2fe;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.8rem;
}
.st-andre-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.st-andre-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  font-size: 1.05rem;
}
.st-andre-card-right {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 1.8rem;
}

/* Schedule & Info Tables */
.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}
.schedule-table th {
  background: var(--primary);
  color: white;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  padding: 1rem 1.2rem;
  text-align: left;
}
.schedule-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.98rem;
}
.schedule-table tr:last-child td {
  border-bottom: none;
}
.schedule-table tr:nth-child(even) {
  background: var(--light-bg);
}

.time-tag {
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Contact Form & Info */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-box {
  background: white;
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.contact-item {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 1.2rem;
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}
textarea.form-control {
  min-height: 130px;
  resize: vertical;
}

/* Footer */
.footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-title {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}
.footer-links li {
  margin-bottom: 0.6rem;
}
.footer-links a {
  color: #94a3b8;
}
.footer-links a:hover {
  color: white;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

/* Toast Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal.active {
  display: flex;
}
.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* Smooth Page Entrance & Animations */
body {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}
body.page-loaded {
  opacity: 1;
}

.reveal-element {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-element.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Table Container */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

@media (max-width: 1100px) {
  .nav-menu {
    gap: 0.8rem;
    margin-left: 0.8rem;
  }
  .nav-link {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 992px) {
  .hero-grid, .grid-3, .st-andre-grid, .contact-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .mobile-toggle {
    display: block;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    display: none;
    border-bottom: 1px solid var(--border);
    margin-left: 0;
  }
  .nav-menu.active {
    display: flex;
    animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-links-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }
  .nav-actions-group {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0.8rem;
    gap: 0.6rem;
  }
  .btn-nav-portail, .btn-nav-contact {
    justify-content: center;
    width: 100%;
  }
  .header-top-info {
    display: none;
  }
  .hero-badge-float {
    position: static;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
  .hero {
    padding: 2.5rem 0 3.5rem;
  }
  .hero-title {
    font-size: 1.95rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .top-alert {
    font-size: 0.85rem;
    padding: 0.55rem 0.8rem;
  }
  .top-alert .badge {
    display: block;
    margin: 0 auto 0.3rem;
    width: fit-content;
  }
  .logo-title {
    font-size: 1.15rem;
  }
  .logo-sub {
    font-size: 0.68rem;
  }
  .logo-img {
    height: 36px;
  }
  .st-andre-box {
    padding: 1.5rem 1.2rem;
    border-radius: var(--radius-md);
  }
  .st-andre-title {
    font-size: 1.7rem;
  }
  .contact-info-box {
    padding: 1.4rem 1.1rem;
  }
  .section {
    padding: 3.5rem 0;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .footer {
    padding: 3rem 0 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
