/*==============================================
  THÈME COHÉRENT : VIOLET & JAUNE/ORANGE (aligné HTML)
  - Correspond aux classes de guigol-index.php optimisé
  - Focus states, contraste, composants Bootstrap personnalisés
================================================*/

/*----------------------------------------------
  1) Variables
----------------------------------------------*/
:root {
  --primary: #6A1B9A;
  --primary-light: #8A2BE2;
  --primary-dark: #4A148C;
  --secondary: #6c757d;
  --highlight: #FFAB00;
  --light: #f8f9fa;
  --success: #28a745;
  --danger: #D32F2F;
  --warning: #ffc107;
  --info: #17a2b8;

  --gradient-violet: linear-gradient(135deg, var(--primary-light), var(--primary));
  --gradient-orange: linear-gradient(135deg, #FFD700, #FF8C00);
  --gradient-stats: linear-gradient(135deg, var(--primary-dark), var(--primary-light));

  --radius: 10px;
  --radius-lg: 15px;
  --shadow: 0 5px 15px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.15);
  --shadow-xl: 0 15px 35px rgba(0,0,0,.2);
  --transition: all .3s ease;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;
}

/*----------------------------------------------
  2) Base & resets
----------------------------------------------*/
* { 
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { 
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body { 
  font-family: var(--font-body); 
  color: #333; 
  line-height: 1.6; 
  overflow-x: hidden; 
  padding-top: 80px !important;
}

h1, h2, h3, h4, h5, h6 { 
  font-family: var(--font-heading); 
  font-weight: 700; 
  color: var(--primary-dark); 
  margin-bottom: 1rem;
  line-height: 1.2;
}

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

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

.text-primary { color: var(--primary) !important; }
.text-highlight { color: var(--highlight) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-light { background-color: var(--light) !important; }

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

/* Focus visible pour accessibilité */
:focus-visible { 
  outline: 3px solid var(--highlight); 
  outline-offset: 2px; 
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: 2px;
}

/*----------------------------------------------
  3) Navbar (classes existantes)
----------------------------------------------*/
.custom-navbar { 
  background: var(--gradient-violet) !important; 
  padding: 1rem 0; 
  position: fixed !important; 
  top: 0; 
  width: 100%; 
  z-index: 1030; 
  box-shadow: 0 4px 12px rgba(0,0,0,.15) !important; 
  transition: var(--transition); 
}

.custom-navbar.scrolled { 
  padding: .5rem 0; 
  background: var(--primary-dark) !important; 
  box-shadow: 0 2px 8px rgba(0,0,0,.2) !important; 
}

.navbar-brand { 
  font-family: var(--font-heading); 
  font-size: 1.8rem; 
  font-weight: 700; 
  display: flex;
  align-items: center;
}

.brand-text { 
  color: #fff; 
}

.brand-dot { 
  color: var(--highlight); 
  margin-left: 2px;
}

.navbar-nav .nav-link { 
  color: #fff !important; 
  font-weight: 500; 
  padding: .5rem 1rem !important; 
  position: relative; 
  opacity: .9;
  border-radius: var(--radius);
  margin: 0 .2rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { 
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link::after { 
  content: ""; 
  position: absolute; 
  left: 50%;
  bottom: 0; 
  width: 0; 
  height: 2px; 
  background: var(--highlight); 
  transition: var(--transition);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after, 
.navbar-nav .nav-link.active::after { 
  width: 80%; 
}

.btn-donate { 
  background: var(--highlight); 
  color: var(--primary-dark) !important; 
  border-radius: 50px; 
  padding: .5rem 1.5rem !important; 
  font-weight: 600; 
  margin-left: 1rem; 
  border: none; 
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(255, 171, 0, 0.3);
}

.btn-donate:hover { 
  background: #FFD700; 
  transform: translateY(-2px); 
  box-shadow: 0 6px 15px rgba(255, 171, 0, 0.4);
}

/*----------------------------------------------
  4) Sections & en-têtes
----------------------------------------------*/
section { 
  padding: 5rem 0;
  position: relative;
}

.section-header { 
  text-align: center; 
  margin-bottom: 3rem; 
}

.section-header h2 { 
  font-size: 2.5rem; 
  color: var(--primary-dark); 
  position: relative; 
  display: inline-block; 
  margin-bottom: 1.5rem;
}

.section-header h2::after { 
  content: ""; 
  position: absolute; 
  left: 50%; 
  transform: translateX(-50%); 
  bottom: -15px; 
  width: 80px; 
  height: 4px; 
  background: var(--highlight); 
  border-radius: 2px; 
}

.section-header .lead {
  font-size: 1.2rem;
  color: var(--secondary);
  max-width: 600px;
  margin: 0 auto;
}

.divider { 
  height: 3px; 
  width: 60px; 
  background: var(--primary); 
  margin: 0 auto 1rem; 
  border-radius: 2px; 
}

/*----------------------------------------------
  5) À propos
----------------------------------------------*/
.section-about { 
  background: var(--light);
  position: relative;
}

.section-about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="%236A1B9A" opacity="0.02"><circle cx="50" cy="50" r="2"/></svg>') repeat;
  pointer-events: none;
}

.about-content h3 { 
  color: var(--primary-dark); 
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.about-content p { 
  margin-bottom: 1.2rem; 
  font-size: 1.05rem;
  color: #555;
}

.about-image img { 
  border-radius: var(--radius-lg); 
  box-shadow: var(--shadow-lg); 
  transition: var(--transition);
  border: 8px solid white;
}

.about-image img:hover { 
  transform: translateY(-5px) scale(1.02); 
  box-shadow: var(--shadow-xl);
}

/*----------------------------------------------
  6) Chiffres clés
----------------------------------------------*/
.section-stats { 
  background: var(--gradient-stats); 
  padding: 4rem 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.section-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="white" opacity="0.05"><circle cx="50" cy="50" r="2"/></svg>') repeat;
  pointer-events: none;
}

.stat-item { 
  text-align: center; 
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.stat-number { 
  font-size: 3rem; 
  font-weight: 700; 
  color: var(--highlight); 
  margin-bottom: .5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-label { 
  font-size: 1.05rem; 
  color: rgba(255, 255, 255, 0.9); 
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/*----------------------------------------------
  7) Événements - Styles améliorés pour conteneurs vidéo/image
----------------------------------------------*/
.section-events {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.event-card { 
  border-radius: var(--radius-lg); 
  overflow: hidden; 
  box-shadow: var(--shadow); 
  background: #fff; 
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

/* Conteneurs vidéo et image avec ratio cohérent */
.video-container, 
.image-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Ratio 16:9 */
  height: 0;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.video-container video,
.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 3rem;
  opacity: 0.8;
  transition: var(--transition);
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.video-container:hover .play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.event-card-badge { 
  position: absolute; 
  top: 12px; 
  right: 12px; 
  background: var(--primary); 
  color: #fff; 
  padding: .4rem .8rem; 
  border-radius: 999px; 
  font-weight: 600; 
  font-size: .85rem; 
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  z-index: 2;
}

.event-card-badge.past { 
  background: var(--secondary); 
}

.event-card-badge.upcoming {
  background: var(--success);
}

.event-card-content { 
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.event-card-content h4 { 
  color: var(--primary-dark); 
  margin-bottom: .6rem;
  font-size: 1.25rem;
}

.event-card-date { 
  display: flex; 
  align-items: center; 
  color: var(--primary-light); 
  font-weight: 500; 
  margin-bottom: .9rem;
  font-size: 0.9rem;
}

.event-card-date i {
  margin-right: 0.5rem;
}

.event-card-content p {
  flex-grow: 1;
  margin-bottom: 1rem;
  color: #555;
}

.event-card-link { 
  color: var(--primary); 
  font-weight: 600; 
  display: inline-flex; 
  align-items: center; 
  gap: .25rem;
  margin-top: auto;
  align-self: flex-start;
}

.event-card-link:hover { 
  color: var(--primary-dark);
  transform: translateX(3px);
}

.event-card-link i {
  transition: var(--transition);
}

.event-card-link:hover i {
  transform: translateX(3px);
}

/* Featured event */
.featured-event { 
  background: #fff; 
  border-radius: var(--radius-lg); 
  padding: 2rem; 
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--primary-light);
  position: relative;
  overflow: hidden;
}

.featured-event::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-violet);
}

.event-image { 
  position: relative;
}

.event-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/*----------------------------------------------
  8) Actions & Aide
----------------------------------------------*/
.section-actions {
  background: var(--light);
}

.action-card, .help-card { 
  border-radius: var(--radius); 
  background: #fff; 
  box-shadow: var(--shadow); 
  transition: var(--transition);
  height: 100%;
  border-top: 4px solid var(--primary-light);
  padding: 2rem 1.5rem;
  text-align: center;
}

.action-card:hover, .help-card:hover { 
  transform: translateY(-8px); 
  box-shadow: var(--shadow-xl);
  border-top-color: var(--highlight);
}

.action-icon, .help-icon {
  margin-bottom: 1.5rem;
}

.action-icon i, .help-icon i { 
  font-size: 3rem;
  color: var(--primary-light);
  transition: var(--transition);
}

.action-card:hover .action-icon i,
.help-card:hover .help-icon i {
  color: var(--highlight);
  transform: scale(1.1);
}

.action-card h3, .help-card h4 { 
  color: var(--primary-dark); 
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.action-card p, .help-card p {
  color: #555;
  margin-bottom: 1.5rem;
}

.help-link { 
  color: var(--primary); 
  font-weight: 600; 
  display: inline-flex; 
  align-items: center; 
  gap: .25rem;
  transition: var(--transition);
}

.help-link:hover { 
  color: var(--primary-dark);
  transform: translateX(3px);
}

.help-link i {
  transition: var(--transition);
}

.help-link:hover i {
  transform: translateX(3px);
}

/* CTA Box */
.cta-box { 
  background: var(--gradient-violet); 
  color: #fff; 
  padding: 3rem; 
  border-radius: var(--radius-lg); 
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="white" opacity="0.05"><circle cx="50" cy="50" r="2"/></svg>') repeat;
  pointer-events: none;
}

.cta-box h3 { 
  color: #fff; 
  margin-bottom: 1rem;
  position: relative;
}

.cta-box .lead {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  position: relative;
}

.cta-box .btn-light {
  background: white;
  color: var(--primary-dark);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border: none;
  transition: var(--transition);
}

.cta-box .btn-light:hover {
  background: var(--highlight);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/*----------------------------------------------
  9) Galerie
----------------------------------------------*/
.section-gallery { 
  background: var(--light);
}

.gallery-photo a { 
  border-radius: var(--radius); 
  box-shadow: var(--shadow); 
  transition: var(--transition);
  display: block;
  overflow: hidden;
  position: relative;
}

.gallery-photo a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-violet);
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
}

.gallery-photo a::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 2rem;
  color: white;
  z-index: 2;
  transition: var(--transition);
}

.gallery-photo a:hover { 
  transform: translateY(-5px); 
  box-shadow: var(--shadow-xl);
}

.gallery-photo a:hover::before {
  opacity: 0.8;
}

.gallery-photo a:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

.gallery-photo img {
  transition: var(--transition);
}

.gallery-photo a:hover img {
  transform: scale(1.1);
}

/* Lightbox improvements */
.lightboxOverlay {
  background: rgba(0, 0, 0, 0.9) !important;
}

.lightbox .lb-image {
  border: 8px solid white;
  border-radius: var(--radius);
}

.lightbox .lb-data .lb-caption {
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
}

.lightbox .lb-data .lb-number {
  color: rgba(255, 255, 255, 0.8);
}

.lightbox .lb-nav a.lb-prev,
.lightbox .lb-nav a.lb-next {
  background: var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*----------------------------------------------
  10) Formulaires & contact
----------------------------------------------*/
.section-contact {
  background: var(--light);
}

.form-control:focus, 
.form-select:focus { 
  border-color: var(--primary); 
  box-shadow: 0 0 0 0.2rem rgba(106, 27, 154, .25); 
}

.contact-info {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  height: 100%;
}

.contact-item { 
  display: flex; 
  margin-bottom: 2rem;
  align-items: flex-start;
}

.contact-icon { 
  color: var(--primary-light);
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.contact-details h4 { 
  color: var(--primary-dark); 
  margin-bottom: .5rem;
  font-size: 1.1rem;
}

.contact-social {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.social-link { 
  color: var(--primary); 
  border: 2px solid var(--primary);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover { 
  background: var(--primary); 
  color: #fff; 
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.contact-form {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  height: 100%;
}

/*----------------------------------------------
  11) Footer
----------------------------------------------*/
.footer { 
  background: var(--gradient-violet); 
  color: #fff; 
  padding: 4rem 0 2rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="white" opacity="0.03"><circle cx="50" cy="50" r="2"/></svg>') repeat;
  pointer-events: none;
}

.footer a { 
  color: rgba(255, 255, 255, .7); 
  transition: var(--transition);
}

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

.footer-brand h3 {
  color: white;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-contact { 
  list-style: none;
  padding: 0;
}

.footer-contact li { 
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.footer-contact i { 
  margin-right: .8rem; 
  color: var(--highlight);
  width: 20px;
}

.footer-social { 
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.footer-social a { 
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.footer-social a:hover { 
  background: var(--highlight); 
  color: var(--primary-dark); 
  transform: translateY(-3px);
  border-color: var(--highlight);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 3rem;
}

/*----------------------------------------------
  12) Divers & utilitaires
----------------------------------------------*/
.price strong { 
  color: var(--primary-light); 
  font-size: 1.1rem; 
}

.scroll-to-top { 
  position: fixed; 
  right: 20px; 
  bottom: 20px; 
  background: var(--primary); 
  color: #fff; 
  border-radius: 50%; 
  padding: 12px 14px; 
  box-shadow: var(--shadow-lg); 
  opacity: 0; 
  visibility: hidden; 
  transform: translateY(10px); 
  transition: var(--transition);
  border: none;
  z-index: 99;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.show { 
  opacity: 1; 
  visibility: visible; 
  transform: translateY(0); 
}

.scroll-to-top:hover { 
  background: var(--primary-dark); 
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* Pattern background utility */
.bg-pattern {
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="currentColor" opacity="0.05"><circle cx="50" cy="50" r="2"/></svg>') repeat;
}

/* Hover text utility */
.hover-text-white:hover {
  color: white !important;
}

/*----------------------------------------------
  13) Responsive
----------------------------------------------*/
@media (max-width: 992px){
  .featured-event .row > * { 
    margin-bottom: 1.5rem; 
  }
  
  .section-header h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px){
  body { 
    padding-top: 70px; 
  }
  
  section { 
    padding: 3rem 0; 
  }
  
  .section-header h2 { 
    font-size: 2rem; 
  }
  
  .navbar-nav .nav-link { 
    padding: .8rem 1rem !important; 
    text-align: center; 
    margin: 0.25rem 0;
  }
  
  .btn-donate { 
    margin: 1rem auto 0; 
    display: block; 
    width: fit-content; 
  }
  
  .stat-number { 
    font-size: 2.5rem; 
  }
  
  .featured-event .row { 
    flex-direction: column-reverse; 
  }
  
  .event-image { 
    margin-top: 2rem; 
  }
  
  .cta-box {
    padding: 2rem 1.5rem;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-icon {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px){
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .about-content h3 {
    font-size: 1.5rem;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  .event-card-content {
    padding: 1.25rem;
  }
  
  .action-card, 
  .help-card {
    padding: 1.5rem 1rem;
  }
}

/* Animation pour le défilement */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading states */
.btn:disabled,
.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Alert improvements */
.alert {
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
}

.alert-success {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-danger {
  background: rgba(211, 47, 47, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}