:root { --nav-h: 72px; }

html, body { height: 100%; background: transparent !important; }

body {
  position: relative;
  background: none;            
}

body.home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url('/vierge.jpg') top center / cover no-repeat;  
  transform: translateZ(0);
  pointer-events: none;
}

body.home::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: 0;                /* même plan que ::before, mais on va le mettre au-dessus visuellement */
  pointer-events: none;

  /* Voile à gauche 0–50%, transparent après */
  background:
    linear-gradient(to right,
      rgba(255,255,255,0.78) 0%,
      rgba(255,255,255,0.78) 50%,
      rgba(255,255,255,0.00) 60%,
      rgba(255,255,255,0.00) 100%
    );
}


body > img {
  max-height: 250px;
  margin-bottom: 10px;
}

.church-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.church-card:hover {
    transform: translateY(-5px);
}

.church-image img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 5px;
}

.church-info h5 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.church-info p {
    margin: 0.25rem 0 0;
    color: #666;
    font-size: 0.9rem;
}

.row.align-items-stretch {
    min-height: 500px; /* Hauteur minimale pour garantir un bon rendu même avec peu de contenu */
}

#curate-contact,
#contact-form {
    height: 100%; /* Chaque élément prend toute la hauteur */
    display: flex;
    flex-direction: column;
    justify-content: center;
}


#programme-section {
    display: flex;
    height: 100vh;
}

.hero-section{
  /* utilisez svh/dvh pour mobiles modernes, avec fallback */
  height: calc(100svh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  height: calc(100vh  - var(--nav-h));  /* fallback anciens navigateurs */

  overflow: hidden;           /* empêche tout débordement interne */

  background: none; 

  display: flex;
  align-items: center;        /* centre verticalement le texte */
}


.prehero-section { display: none; }

.posthero-section {
  flex: 1;                            
  display: flex;
}

.text-content {
  width: 50%;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Mobile */
@media (max-width: 768px) {
  .hero-section { height: auto; }
  .text-content { width: 100%; padding: 24px; }
}

.text-content h2, h2 {
    font-size: 3rem;
    font-weight: 600;
    color: #343a40;
    max-width: 600px;
}

.text-content p {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
    margin-top: 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    min-height: var(--nav-h);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.navbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    font-size: 1.1rem;
    flex-grow: 1;
    margin-right: 70px;
}

.navbar-nav .nav-item {
    margin-right: 30px;
    color: #000;
}

.navbar-nav .nav-link {
    position: relative;
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    height: 3px;
    width: 0;
    background-image: linear-gradient(to right, #ff9a9e, #fad0c4, #fbc2eb, #a1c4fd, #c2e9fb, #d4fc79, #f3d6e4);
    bottom: 0;
    left: 50%;
    transition: width 0.5s ease, left 0.5s ease;
}

.navbar-nav .nav-link:hover::before {
    width: 100%;
    left: 0;
}

.navbar-nav .nav-link.active::before {
    width: 100%;
    left: 0;
}

/* Tabs avec surlignement arc-en-ciel */
.nav-tabs {
    display: flex;
    justify-content: center;
    border-bottom: none;
    padding-bottom: 10px;
}

.nav-tabs .nav-link {
    position: relative;
    color: #000;
    background-color: transparent;
    border: none;
    padding: 10px 20px;
    text-decoration: none;
    transition: color 0.3s ease;
    text-align: center;
}

.nav-tabs .nav-link::before {
    content: '';
    position: absolute;
    height: 3px;
    width: 0;
    background-image: linear-gradient(to right, #ff9a9e, #fad0c4, #fbc2eb, #a1c4fd, #c2e9fb, #d4fc79, #f3d6e4);
    bottom: 0;
    left: 50%;
    transition: width 0.5s ease, left 0.5s ease;
}

.nav-tabs .nav-link:hover::before {
    width: 80%;
    left: 10%;
}

.nav-tabs .nav-link.active::before {
    width: 80%;
    left: 10%;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.fade-in {
  opacity: 1;
  transition: opacity 0.4s ease;
}


/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        height: auto;
    }
    .text-content {
        width: 100%;
    }
}

#page-content {
    position: relative;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.with-margin-top {
    margin-top: 140px;
}



/* Images */
img {
    max-height: 250px;
    margin-bottom: 10px;
}

.eglise-image {
    max-height: 150px;
    border-radius: 8px;
}

.eglise-card img, .event-image img {
    border-radius: 10px;
    object-fit: cover;
}

.event-image img {
    width: 150px;
    height: 100px;
}

/* Formulaires */
form {
    max-width: 600px;
    margin: auto;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

input:focus, textarea:focus, select:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: none;
}

/* Dropdown */
.form-select {
    background-color: #f0f0f0;
    color: #343a40;
    border: 1px solid #f0f0f0;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    width: auto;
}

.form-select:focus {
    border-color: #e2e6ea;
    background-color: #e2e6ea;
}

.form-select option {
    background-color: white;
    color: #343a40;
}

/* Style de base pour le bouton "Envoyer" */
#contact-form button[type="submit"] {
    position: relative;
    padding: 10px 20px;
    font-size: 16px;
    color: #000;
    background-color: transparent;
    border: none; /* Retire complètement la bordure */
    cursor: pointer;
    overflow: hidden;
    transition: color 0.3s ease;
}

/* Animation arc-en-ciel au survol */
#contact-form button[type="submit"]::before {
    content: '';
    position: absolute;
    height: 3px;
    width: 0;
    max-width: 60%; /* Limite la largeur de la ligne à 60% */
    background-image: linear-gradient(to right, #ff9a9e, #fad0c4, #fbc2eb, #a1c4fd, #c2e9fb, #d4fc79, #f3d6e4);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%); /* Centre la ligne sous le bouton */
    transition: width 0.5s ease;
}

/* Étendre le surlignement arc-en-ciel au survol */
#contact-form button[type="submit"]:hover::before {
    width: 60%; /* Applique la largeur limitée de la ligne au survol */
}

/* Suppression des styles de clic/focus */
#contact-form button[type="submit"]:focus {
    outline: none;
    box-shadow: none;
}

.contact-info {
    display: flex; /* Active Flexbox */
    flex-direction: column; /* Aligne les éléments verticalement */
    justify-content: center; /* Centre verticalement */
    align-items: center; /* Centre horizontalement */
    text-align: left; /* Le texte reste aligné à gauche */
    background-color: #f9f9f9; /* Couleur de fond légère */
    border: 1px solid #ddd; /* Bordure légère */
    padding: 20px; /* Ajoute de l'espace intérieur */
    height: 100%; /* Assure que la section occupe toute la hauteur disponible */
}

.contact-info h3 {
    margin-bottom: 15px; /* Espacement sous le titre */
    text-align: center; /* Le titre est centré horizontalement */
}

.contact-info p {
    font-size: 1rem;
    margin-bottom: 10px;
    width: 100%; /* Le texte occupe toute la largeur disponible */
}

.filtre-container {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

.filtre-container select {
    min-width: 200px;
}

/* Cartes d'événements */
.event-card, .eglise-card {
    display: flex; 
    align-items: flex-start;  
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 15px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    gap: 15px; /* espace entre image et texte */
    height: 100%; /* pour uniformiser les colonnes */
}

/* Ton "image" est un DIV: on le traite comme une vignette fixe */
.event-card .event-image {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin: 0; /* aucune marge parasite */
}

/* Nettoyage des marges des textes */
.event-card .event-info h5 { margin: 0 0 .4rem; }
.event-card .event-info > p { margin: 0 0 .4rem; line-height: 1.4; }
/* Si ton script met .mt-2 sur le grand paragraphe, limite-le : */
.event-card .event-info p.mt-2 { margin-top: .25rem; }

.event-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;             /* évite l’espace inline */
  margin: 0;                  /* neutralise la marge globale sur img */
  align-self: flex-start;     /* sécurité : colle en haut */
}

.event-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.eglise-card {
    background-color: #f9f9f9;
    overflow: hidden;
}

.event-card-content {
    flex: 1; /* le texte prend l’espace restant */
    display: flex;
    flex-direction: column;
}

.event-card h5 {
  margin: 0 0 .5rem;          
  font-size: 1.1rem;
  color: #333;
}
.event-card p {
    flex: 1; /* pousse le texte vers le bas si besoin */
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.event-card .event-time {
  margin: 0 0 .5rem;
  line-height: 1.2;
  color: #666;
  font-size: .95rem;
}


option:checked {
    background-color: #c2e9fb;
    color: #000;
}


/* Styles pour les feuillets paroissiaux */
.feuillet-card {
    display: flex;
    flex-direction: column;
    align-items: start;
    padding: 1rem;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.feuillet-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.feuillet-card h5 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.event-card p {
  margin: 0;
  color: #666;
  font-size: .9rem;
  line-height: 1.5;
}

.feuillet-card a {
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, #ff9a9e, #fad0c4, #fbc2eb, #a1c4fd, #c2e9fb, #d4fc79, #f3d6e4);
    color: #fff;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.feuillet-card a:hover {
    background: linear-gradient(to right, #fbc2eb, #a1c4fd, #c2e9fb, #d4fc79);
}

#feuillets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Hauteur nav fixe (adapte si besoin) */
:root { --nav-h: 96px; }           /* desktop ≈ logo 70 + padding */
@media (max-width: 992px){
  :root { --nav-h: 80px; }         /* mobile/toggler */
}

/* NAVBAR fixe, sans arrondi ni marge basse Bootstrap */
#main-navbar{
  position: fixed; top:0; left:0; right:0; z-index:1000;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}

/* Réserve la place de la navbar dans le flux + coupe le pixel fantôme */
body.home{
  padding-top: var(--nav-h);
  overflow-y: clip;                 /* évite le mini scroll blanc */
  overflow-x: hidden;
}

/* HERO : une seule règle, rogne par le bas, pas de margin/padding parasites */
body.home .hero-section{
  min-height: calc(100vh - var(--nav-h));  /* hero + nav = viewport */
  display: flex; align-items: center;
  margin: 0; padding: 0; overflow: hidden;
}

/* Aucune marge/padding en bas de la page d’accueil */
body.home #page-content{ padding:0 !important; margin:0 !important; border:0 !important; }

/* Par sécurité : pas de marge résiduelle dans le bloc texte */
body.home .hero-section .text-content > h2{ margin-top:0 !important; }
body.home .hero-section .text-content > p:last-child{ margin-bottom:0 !important; }

