/* Importation de la police Roboto */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* --- Global Styles --- */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  text-align: center;
}

/* --- Header --- */
header {
  background-color: #b4003a;
  padding: 15px;
}
.logo {
  max-width: 50px; /* Logo réduit */
}


/* --- Section Vidéo & Donateurs --- */
.video-donors-section {
  display: flex;
  justify-content: center; /* Centre l'ensemble dans le conteneur parent */
  align-items: stretch;
  gap: 30px;              /* Espace constant entre les colonnes */
  margin: 40px auto;
  max-width: 1200px;
}

.video-container {
  flex: 0 0 65%;                /* La vidéo prend tout l'espace disponible à gauche */
}

.video-container iframe,
.video-container video {
  width: 100%;
  height: 460px;          /* Hauteur fixée, ajustable selon vos besoins */
  border-radius: 10px;
  object-fit: cover;
}



.donors-list-container {
  flex: 0 0 350px;        /* Largeur fixe pour la liste */
  padding: 20px;
  border: 2px solid #b4003a;
  border-radius: 10px;
  background-color: #fff;
  text-align: left;
  max-height: 415px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.donor-list-campaign-text {
  display: flex;
  justify-content: center; /* Centre l'ensemble dans le conteneur parent */
  align-items: flex-start;
  gap: 30px;              /* Espace constant entre les colonnes */
  margin: 20px auto;
  max-width: 1200px;
  width: 100%;
}

.text-campaign-container {
  flex: 1;                /* La vidéo prend tout l'espace disponible à gauche */
}

.text-campaign-container iframe,


/* Barre de recherche dans le conteneur des donateurs */
.donors-list-container input#donor-search {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 2px solid #b4003a;
  border-radius: 25px;
  outline: none;
  transition: all 0.3s ease;
  margin-bottom: 15px;
  box-sizing: border-box;
  background-color: #fff;
}
.donors-list-container input#donor-search:focus {
  border-color: #90002c;
  box-shadow: 0 0 8px rgba(180, 0, 58, 0.5);
}
/* --- Nouvelle Carte pour chaque Donateur --- */
.donor-card {
  background-color: #fff;
  border: 2px solid #b4003a;
  border-radius: 10px;
  padding: 10px 15px;
  margin: 10px auto;
  max-width: 550px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.donor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.donor-card .donor-name {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  flex: 1;
  margin-right: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.donor-card .donor-amount {
  font-size: 16px;
  color: #b4003a;
  font-weight: 700;
  white-space: nowrap;
  position: relative;
}



/* --- Nouvelle présentation de la barre de progression --- */
.campaign-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin: 40px auto;
  max-width: 900px;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 20px 0;
}

.stat-block {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 20px;
}
.stat-block:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background-color: #ccc;
}

/* Bloc gauche : pourcentage et barre de progression */
.left-block .progress-percentage {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}
.progress-bar-container {
  width: 250px;
  height: 10px;
  background-color: #ddd;
  border-radius: 5px;
  overflow: hidden;
  margin: 0 auto;
}
#progress-fill {
  height: 100%;
  background-color: #b4003a;
  width: 0%;
  transition: width 0.3s;
}

/* Bloc central : objectif et nombre de prélèvements */
.center-block .stat-objectif {
  font-size: 16px;
  font-weight: 500;
  color: #555;
  margin-bottom: 5px;
  text-transform: none;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: #333;
}
.stat-label {
  margin-top: 5px;
  color: #555;
  font-size: 14px;
}

/* Bloc droit : nombre total de donateurs */
.right-block .stat-value {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: #333;
}
.right-block .stat-label {
  margin-top: 5px;
  color: #555;
  font-size: 14px;
}

/* --- Texte de la Campagne --- */
.campaign-text {
  margin: 20px auto;
  max-width: 800px;
  font-size: 18px;
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
}

/* --- Carousel --- */
.carousel {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px;
  scroll-snap-type: x mandatory;
}
.carousel img {
  width: 100%;
  max-width: 300px;
  height: auto;
  scroll-snap-align: center;
  border-radius: 10px;
  transition: transform 0.3s;
}
.carousel img:hover {
  transform: scale(1.05);
}



/* --- Bouton de Don --- */
.donate-button {
  display: inline-block;
  background-color: #b4003a;
  color: white;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  margin: 20px 0;
  transition: background-color 0.3s;
}
.donate-button:hover {
  background-color: #90002c;
}

/* --- Formulaire de Contact --- */
#contact-form {
  max-width: 500px;
  margin: 20px auto;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 2px solid #b4003a;
  border-radius: 5px;
  font-size: 16px;
  box-sizing: border-box;
}
#contact-form button {
  background-color: #b4003a;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}
#contact-form button:hover {
  background-color: #90002c;
}

/* --- Adaptations Responsive --- */
@media (max-width: 768px) {
  .campaign-stats {
    flex-direction: column;
  }
  .progress-bar-container {
    width: 80%;
  }
  .video-donors-section {
    flex-direction: column;
  }
}
.donate-button-full {
  display: block;
  width: 100%;
  background-color: #b4003a;
  color: white;
  padding: 15px;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.donate-button-full:hover {
  background-color: #90002c;
}
/* --- Barre de défilement personnalisée moderne pour la liste des donateurs --- */
.donors-list-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.donors-list-container::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.donors-list-container::-webkit-scrollbar-thumb {
  background-color: #b4003a;
  border-radius: 10px;
  border: none;
}

.donors-list-container::-webkit-scrollbar-thumb:hover {
  background-color: #90002c;
}

/* Pour Firefox */
.donors-list-container {
  scrollbar-width: thin;
  scrollbar-color: #b4003a transparent;
}
 #page-heading {
      font-size: 40px;
      font-weight: 700;
      color: #fff; /* texte en couleur unie */
      margin: 50px auto 20px;
      padding: 20px 30px;
      background: linear-gradient(135deg, #b4003a, #90002c); /* fond en dégradé */
      border-radius: 10px;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
      width: fit-content;
      transition: all 0.3s ease; /* transition pour un effet fluide */
    }

    #page-heading:hover {
      background: #fff; /* fond passe en blanc */
      color: transparent; /* on rend le texte transparent pour laisser transparaître le dégradé */
      background-image: linear-gradient(135deg, #b4003a, #90002c); /* même dégradé appliqué au texte */
      -webkit-background-clip: text; /* nécessaire pour Chrome, Safari... */
      background-clip: text;
    }
#carousel-images-admin .carousel-image-item img {
    width: 120px;        /* largeur que tu veux, modifiable */
    height: auto;        /* préserve le ratio hauteur-largeur */
    object-fit: cover;   /* maintient un bon rendu */
    border-radius: 6px;  /* optionnel pour arrondir les coins */
    margin: 5px;         /* espace entre les images */
    border: 1px solid #ccc; /* bordure légère autour */
}
/* Scrollbar stylisée moderne pour toute la page */
body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

body::-webkit-scrollbar-thumb {
    background: #b71c45; /* Couleur principale assortie à ton site */
    border-radius: 8px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #951637;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1500px;
  margin: 20px auto;
  overflow: hidden;
}

.carousel {
  display: flex;
  gap: 15px;
  overflow: hidden;
  scroll-behavior: smooth;
}

.carousel img {
  width: 300px; /* ajuste selon la largeur désirée de tes images */
  height: 200px; /* hauteur fixe et claire */
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6); /* Fond semi-transparent */
  color: white;
  border: none;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.9); /* Effet au survol */
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

/* Icônes SVG intégrées pour des flèches plus modernes */
.carousel-btn::before {
  content: '';
  width: 20px;
  height: 20px;
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
}

.carousel-prev::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M15.41 16.58L10.83 12l4.58-4.58L14 6l-6 6 6 6z"/></svg>');
}

.carousel-next::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M9 6l6 6-6 6-1.41-1.41L12.17 12 7.59 7.41z"/></svg>');
}
.site-footer {
    background-color: #b71c45;
    color: white;
    padding: 40px 20px;
    text-align: center;
    font-size: 16px;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    border-bottom: 2px solid white;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 18px;
}

.social-icons a {
    display: inline-block;
    margin: 0 10px;
    transition: transform 0.3s;
}

.social-icons a img {
    width: 32px;
    height: 32px;
}

.social-icons a:hover {
    transform: scale(1.1);
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 14px;
}
/* --- Ajout de la responsivité (mise à jour nécessaire uniquement) --- */
@media (max-width: 767px) {
  /* Réorganisation de la section Vidéo & Donateurs en colonne pour mobile */
  .video-donors-section {
    flex-direction: column;
    align-items: center;
  }
  /* Amélioration de la vidéo pour mobile : agrandir et élargir la vidéo */
  .video-container {
    width: 100%;
  }
  .video-container iframe,
  .video-container video {
    width: 95%;
    height: 300px;  /* Ajustez cette valeur selon la taille désirée */
    object-fit: cover;
  }
  /* La liste des donateurs s'affiche en pleine largeur tout en conservant sa largeur maximale */
  .donors-list-container {
    flex: none;
    width: 90%;
    max-width: 350px;
  }
  /* --- Forcer l'affichage de la progression sur une seule ligne --- */
.campaign-stats {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
  overflow-x: auto; /* Permet un défilement horizontal si nécessaire */
}

/* Optionnel : s'assurer que chaque bloc conserve une taille minimale */
.stat-block {
  flex: 1;
  min-width: 80px;
  text-align: center;
}

  #page-heading {
  white-space: nowrap;          /* Empêche le retour à la ligne */
  overflow: hidden;             /* Masque le débordement si le texte est trop long */
  text-overflow: ellipsis;      /* Affiche "..." en cas de dépassement */
  font-size: clamp(18px, 5vw, 32px); /* La taille du texte s'adapte entre 18px et 32px */
}
@media (max-width: 768px) {
  .carousel-container {
    display: none !important;
  }
}
.amount-input-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  position: relative;
}

.amount-input-wrapper input {
  flex: 1;
  padding: 12px;
  font-size: 18px;
  border: 1px solid #ccc;
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.amount-input-wrapper span {
  padding: 12px 15px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  white-space: nowrap;
}

.radio-options {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio-label {
  font-size: 16px;
}

.full-width-button {
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  font-size: 18px;
  border-radius: 8px;
  background: #b4003a;
  color: white;
  border: none;
  cursor: pointer;
}

.full-width-button:hover {
  background: #e76d94;
}
/* Conteneur pour input avec unité à droite */
.input-with-unit {
  position: relative;
  width: 100%;
}

.input-with-unit input {
  padding-right: 60px; /* espace pour l’unité */
  box-sizing: border-box;
}

.input-with-unit .unit {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 16px;
  pointer-events: none;
}

/* Menu déroulant stylisé */
#installments {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 8px 10px;
}

.video-container iframe{
  aspect-ratio: 16 / 9;               /* réserve la place, évite le décalage */
  width: 100%;
  border-radius: 12px;
  background: #b4003a;                /* fond propre pendant le chargement */
}
header .logo{
  display:block;
  height:auto;
  max-height:70px;       /* garde le même rendu qu’avant */
  object-fit:contain;    /* évite la déformation si le fichier change */
}
.carousel img{
  width:100%;
  height:auto;
  display:block;
  border-radius:12px;
}
/* ===== Mise en page responsive pour .donor-list-campaign-text ===== */
.donor-list-campaign-text{
  width:100%;
  max-width:1200px;
  margin:40px auto;
  padding:0 16px;              /* souffle latéral sur petits écrans */
  box-sizing:border-box;
  display:block;                /* mobile: empilé */
  gap:20px;
}

/* Desktop/tablette large: 2 colonnes (texte | liste) */
@media (min-width: 992px){
  .donor-list-campaign-text{
    display:grid;
    grid-template-columns: 1.2fr 1fr;
    gap:32px;
    align-items:start;
  }
}

/* Texte de campagne : lisible et “bord à bord” visuel */
.donor-list-campaign-text .campaign-text{
  margin:0;
  font-size:clamp(16px,2.2vw,18px);
  line-height:1.6;
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
}

/* Donors list : grille fluide + champ de recherche plein largeur */
.donor-list-campaign-text .donors-list-container{ width:100%; }
#donor-search{ width:100%; max-width:600px; margin:0 0 12px; }

.donors-list{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap:12px;
}

@media (max-width: 480px){
  .donors-list{ grid-template-columns: 1fr 1fr; gap:8px; }
  .donor-list-campaign-text .campaign-text{ padding:0 4px; }
}

/* Conteneur de la donor list */
.donors-list-container{
  max-width: 700px;
  margin: 16px auto;
 
}

/* Champ de recherche : prend toute la largeur */
#donor-search{
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
}

/* La liste: une SEULE colonne + scroll interne */
.donors-list{
  display: grid !important;
  grid-template-columns: 1fr !important;  /* <-- 1 colonne */
  gap: 10px;
  max-height: 340px;                      /* hauteur visible */
  overflow-y: auto;                       /* scroll interne */
  padding-right: 10px;                     /* espace pour scroll bar */
  overscroll-behavior: contain;
}

/* Chaque item occupe toute la largeur */
.donors-list > *{
  width: 100% !important;
  box-sizing: border-box;
}



/* Si ton parent (ex: .donor-list-campaign-text) impose 2 colonnes,
   on le neutralise en mobile pour éviter que la donor list “casse”. */
@media (max-width: 768px){
  .donor-list-campaign-text{
    display: block !important;
  }
}




/* 🔹 Nouveau style pour le badge */
.donor-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: #f0f0f0; /* gris doux */
  color: #555;
  display: inline-block;
}




}