/* --- COULEURS PERSONNALISÉES --- */
:root {
  --purple: #5C2D91;
  --purple-dark: #4B1F6F;
  --pink: #E10098;
  --light: #F8F0FC;
  --white: #FFFFFF;
  --black: #333333;
  --grey-light: #f1f1f1;
  --border-radius: 12px;
}

/* --- GÉNÉRAL --- */
html {
  font-size: 110%; 
  padding:0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light);
  color: var(--black);
  margin: 0;
  padding: 0;
  background-image: url('../img/im-acc.jpg'); 
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

/* --- BOUTONS --- */
.btn-purple {
  background-color: var(--purple);
  color: white;
  border-radius: var(--border-radius);
  padding: 12px 25px;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-purple:hover {
  background-color: var(--pink);
  color: white;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.btn-outline-purple {
  border: 2px solid var(--purple);
  color: var(--purple);
  background-color: transparent;
  border-radius: var(--border-radius);
  padding: 12px 25px;
  transition: 0.3s ease;
}

.btn-outline-purple:hover {
  background-color: var(--purple);
  color: white;
}

/* --- HERO PLEINE PAGE AVEC IMAGE DE FOND --- */
.hero {
  background-image: url('../img/im-acc.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Pour un effet de parallaxe simple */
  height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
  position: relative;
  padding: 0 15px; /* Ajout de padding pour les petits écrans */
}

.hero .overlay {
  background-color: rgba(0,0,0,0.5);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}


.hero .overlay h1,
.hero .overlay p {
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
}

.hero .overlay h1 {
  font-size: 3.8rem;
  font-weight: bold;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.hero .overlay p {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.hero .overlay .btn-purple {
  font-size: 1.2rem;
  padding: 14px 30px;
}

/* --- HERO PETIT FORMAT POUR PAGES REGISTER/LOGIN --- */
.small-hero {
  min-height: 300px;
  height: auto; /* Hauteur auto pour s'adapter au contenu */
}

/* --- FORMULAIRES --- */
form fieldset {
  border: none;
  padding: 20px;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

form legend {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--purple);
}

form label {
  font-weight: 500;
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="password"],
form input[type="date"],
form select {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  box-sizing: border-box; /* Assure que le padding ne modifie pas la largeur */
}

form input[type="radio"],
form input[type="checkbox"] {
  margin-right: 6px;
}

/* --- CARDS D'ÉVÉNEMENTS --- */
.card-title {
  color: var(--purple);
  font-weight: bold;
}

.card {
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  transition: transform 0.3s;
  overflow: hidden; /* Empêche l'image de déborder */
}

.card:hover {
  transform: translateY(-5px) scale(1.02); /* Effet de survol plus subtil */
}

.card-img-top {
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  width: 100%;
  height: 200px; /* Hauteur fixe pour les images de cartes */
  object-fit: cover; /* Assure que l'image couvre la zone sans se déformer */
}

/* --- FOOTER --- */
footer {
  background-color: var(--purple);
  color: white;
  padding: 20px 0;
  text-align: center; /* Centrer le contenu du footer */
}

footer p {
  margin: 0;
  font-weight: bold;
  font-size: 1.1rem;
}

/* --- UTILS --- */
.fade-out {
  opacity: 1;
  transition: opacity 0.5s ease-out;
}
.fade-out.hide {
  opacity: 0;
}


/* --- RESPONSIVE --- */

/* Pour les grands écrans */
@media (min-width: 1201px) {
    .container {
        max-width: 1140px;
    }
}

/* Pour les tablettes en mode paysage et petits ordinateurs*/
@media (max-width: 1200px) {
    .hero .overlay h1 {
        font-size: 3.2rem;
    }
    .hero .overlay p {
        font-size: 1.4rem;
    }
}

/* Pour les tablettes en mode portrait*/
@media (max-width: 992px) {
    .hero .overlay h1 {
        font-size: 2.8rem;
    }
    .hero .overlay p {
        font-size: 1.3rem;
    }
    .card-title {
        font-size: 1.1rem;
    }
}


/* Pour les petits appareils, tablettes et grands téléphones*/
@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 300px;
    padding: 20px;
  }

  .hero .overlay h1 {
    font-size: 2.2rem;
  }

  .hero .overlay p {
    font-size: 1rem;
  }
  
  .hero .overlay .btn-purple {
    font-size: 1rem;
    padding: 12px 25px;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .btn-purple {
    font-size: 1rem;
    padding: 12px 20px;
  }
  
  form .row > [class*="col-"] {
      margin-bottom: 1rem;
  }

}

/* Pour les téléphones portables (jusqu'à 576px) */
@media (max-width: 576px) {
  body {
    background-image: none;
    background-color: var(--light);
  }
  
  .hero .overlay h1 {
    font-size: 1.8rem;
  }

  .hero .overlay p {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  form legend {
    font-size: 1.5rem;
  }

  .btn-purple, .btn-outline-purple {
    width: 100%;
    margin-bottom: 10px;
  }

  .row > .col-md-6.d-grid + .col-md-6.d-grid {
    margin-top: 10px;
  }

  footer p {
      font-size: 1rem;
  }
}