/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: #000;
  overflow-x: hidden;
  background-color: #ffffff;
  border: 1px #333;
  border-radius: 10px;
  margin: 5px;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 10000;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: #0979b0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #19d1e6;
  font-size: 50px;
}
h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}
h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 2em;
}

/* Focus Styles for Accessibility pour le bouton visite virtuelle */
*:focus {
  outline: 2px solid #fac420;
  outline-offset: 2px;
  color: #12aacc;
}

/* Page Hero - Style commun pour toutes les pages */
.page-hero {
  background: linear-gradient(135deg, #ffffff4f, #3f3f3f63),
    url("assets/images/35.jpg") center/cover no-repeat;
  min-height: 600px;
  display: flex;
  align-items: last baseline;
  background-size: cover;
  margin-top: 5%;
  padding-left: 0; /* Ajouté */
  margin-left: 0; /* Ajouté */
}

.hero-video {
  position: relative;
  width: 100%;
  height: 100vh; /*pleine hauteur*/
  overflow: hidden;
}
/*la vidéo en fond*/
.background-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}
/*overlay foncé pour ameliorer la visiblité du texte*/
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.04); /*couche noire transparente*/
  z-index: 2;
}
/*contenu par-dessus la video*/
.hero-content {
  position: relative;
  z-index: 3;
  color: #004173, #12aacc;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  padding: 20px;
}
.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-hero p {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  max-width: 800px;
  margin: 0 auto 30px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Styles pour la page Basilique */
.about-section {
  padding: 80px 0;
}

.about-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.history-section {
  padding: 80px 0;
  background: #f9fafb;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 40px auto 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #f59e0b;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
}

.timeline-year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -20px;
  background: #fbe362;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
  z-index: 1;
}

.timeline-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  width: calc(50% - 40px);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-content h3 {
  color: #1f2937;
  margin-bottom: 15px;
}

.timeline-content img {
  width: 100%;
  border-radius: 8px;
  margin-top: 15px;
}

.architecture-section {
  padding: 80px 0;
}

.feature-card {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

.feature-card.reverse {
  flex-direction: row-reverse;
}

.feature-image {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

.feature-content {
  flex: 1;
}

.feature-content h3 {
  color: #1f2937;
  margin-bottom: 20px;
}

.feature-content ul {
  margin: 20px 0;
}

.feature-content li {
  margin-bottom: 10px;
  color: #6b7280;
}

.gallery-section {
  padding: 80px 0;
  background: #f9fafb;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.gallery-actions {
  text-align: center;
  margin-top: 40px;
}

.numbers-section {
  padding: 80px 0;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.number-card {
  background: white;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.number {
  font-size: 3rem;
  font-weight: bold;
  color: #f2b33d;
  margin-bottom: 10px;
  background-color: white;
}

.number-label {
  color: black;
}

/* Footer - Commun à toutes les pages */
.footer {
  background: #1f2937;
  color: white;
  padding: 60px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: #f59e0b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.footer-brand .logo-text h3 {
  font-size: 18px;
  color: white;
  margin: 0;
}

.footer-brand .logo-text p {
  font-size: 14px;
  color: #d1d5db;
  margin: 0;
}

.footer-brand p {
  color: #d1d5db;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: white;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: #f59e0b;
}

.footer-column h4 {
  color: white;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: #f59e0b;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 20px 0;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.footer-legal a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: #f59e0b;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fbe362;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #fbe362;
}

/* ================= Animations Scroll / Entrée ================= */
.animate {
  --duration: 0.85s;
  --easing: cubic-bezier(0.4, 0.12, 0.2, 1);
  --delay: 0ms;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration) var(--easing) var(--delay),
    transform var(--duration) var(--easing) var(--delay),
    filter var(--duration) var(--easing) var(--delay);
  will-change: opacity, transform;
}

.animate.in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Variantes */
.fade-up {
} /* déjà par défaut */
.fade-in {
  transform: none;
}
.fade-in-zoom {
  transform: scale(0.94);
}
.fade-in-zoom.in {
  transform: scale(1);
}

.slide-left {
  transform: translateX(-55px);
}
.slide-right {
  transform: translateX(55px);
}
.slide-left.in,
.slide-right.in {
  transform: translateX(0);
}

.scale-in {
  transform: scale(0.85);
  opacity: 0;
}
.scale-in.in {
  transform: scale(1);
  opacity: 1;
}

.pop-up {
  transform: translateY(25px) scale(0.92);
}
.pop-up.in {
  transform: translateY(0) scale(1);
}

.zoom-soft {
  transform: scale(1.08);
}
.zoom-soft.in {
  transform: scale(1);
}

.stagger-parent.in > .animate {
  /* sécurité si imbriqué */
}

/* Stagger automatique */
[data-stagger] > .animate {
  transition-delay: calc(var(--delay, 0ms));
}

/* Hero spécifique */
.page-hero.animate {
  background-attachment: fixed;
}

/* Accessibilité / Motion */
@media (prefers-reduced-motion: reduce) {
  .animate,
  .animate.in {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Petites optimisations */
@media (max-width: 600px) {
  .slide-left,
  .slide-right {
    transform: translateY(35px);
  }
}

/* Fins de section élégantes */
.section-header.animate:after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  margin: 10px auto 0;
  background: linear-gradient(90deg, #19d1e6, #f2b33d);
  opacity: 0;
  transform: scaleX(0);
  transition: transform 0.6s ease 0.25s, opacity 0.6s ease 0.25s;
}

.section-header.animate.in:after {
  opacity: 1;
  transform: scaleX(1);
}

/* Carrousel items animés */
.carrousel .thumbnail .item.animate {
  transition: opacity 0.9s var(--easing) var(--delay),
    transform 0.9s var(--easing) var(--delay) s;
}

/* Numbers pulse léger */
.number-card.animate.in {
  animation: pulseOnce 1.8s cubic-bezier(0.45, 0.2, 0.2, 1) 0.15s 1;
}
@keyframes pulseOnce {
  0% {
    box-shadow: 0 0 0 0 rgba(242, 179, 61, 0);
  }
  40% {
    box-shadow: 0 0 0 8px rgba(242, 179, 61, 0.15);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(242, 179, 61, 0);
  }
}

/* Timeline progressive */
.timeline-item.animate {
  position: relative;
}
.timeline-item.animate:before {
  content: "";
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 14px;
  height: 14px;
  background: #f2b33d;
  border-radius: 50%;
  transition: transform 0.5s var(--easing) 0.2s;
}
.timeline-item.animate.in:before {
  transform: translateX(-50%) scale(1);
}

/* Responsive Design */
@media (max-width: 992px) {
  .about-content,
  .feature-card {
    flex-direction: column;
  }

  .feature-card.reverse {
    flex-direction: column;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    padding-left: 70px;
  }

  .timeline-year {
    left: 0;
    transform: none;
  }

  .timeline-content {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-hero {
    height: 50vh;
    min-height: 400px;
  }

  .booking-card {
    grid-template-columns: 1fr;
  }

  .visit-types {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .page-hero {
    height: 40vh;
    min-height: 300px;
  }

  .about-buttons {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-legal {
    flex-direction: column;
    gap: 10px;
  }
}
