/* ===================================================
   CHARTE GRAPHIQUE FONDATION SAINT MICHEL (CASSIOPEIA)
   =================================================== */

:root {
  --fsm-bordeaux: #6B1D2F;
  --fsm-bordeaux-dark: #4A1320;
  --fsm-or: #D4AF37;
  --fsm-or-hover: #B59328;
  --fsm-fond-clair: #F9F7F3;
}

/* 1. Couleur globale de l'en-tête (Header) */
.container-header {
  background-color: var(--fsm-bordeaux) !important;
  background-image: none !important;
  border-bottom: 4px solid var(--fsm-or);
}

/* 2. Barre d'annonce supérieure (Topbar) */
.container-topbar {
  background-color: var(--fsm-or) !important;
  color: #111111 !important;
  text-align: center;
  font-weight: bold;
  padding: 6px 0;
}
.container-topbar a {
  color: #111111 !important;
  text-decoration: underline;
}

/* 3. Style du Menu de navigation */
.container-header .navbar-nav .nav-link {
  color: #FFFFFF !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 1.2rem;
  padding: 10px 15px;
}

.container-header .navbar-nav .nav-link:hover,
.container-header .navbar-nav .nav-link:focus {
  color: var(--fsm-or) !important;
}

/* 4. Bouton principal "Faire un don" */
.btn-don, 
a.btn-don {
  background-color: var(--fsm-or) !important;
  color: #111111 !important;
  font-weight: bold !important;
  padding: 8px 20px !important;
  border-radius: 4px;
  border: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn-don:hover {
  background-color: var(--fsm-or-hover) !important;
  color: #FFFFFF !important;
}

/* 5. Titres du site (Sérif pour le côté patrimonial/institutionnel) */
h1, h2, h3, .h1, .h2, .h3 {
  color: var(--fsm-bordeaux);
  font-family: "Georgia", "Times New Roman", serif;
}

/* 6. Arrière-plan du Pied de Page (Footer) */
.container-footer {
  background-color: var(--fsm-bordeaux-dark) !important;
  color: #FFFFFF;
  border-top: 3px solid var(--fsm-or);
}

.container-footer a {
  color: var(--fsm-or);
}

/* ===================================================
   LOGO AUTO-DIMENSIONNÉ & ROBUSTE (HEADER)
   =================================================== */

/* 1. Conteneur du logo (Lien de la marque) */
.navbar-brand {
  display: flex;
  align-items: center;
  max-width: 60%; /* Empêche le logo de pousser le menu en dehors de l'écran */
  overflow: hidden;
  flex-shrink: 0; /* Empêche le logo de se faire écraser si l'écran rétrécit */
}

/* 2. Ciblage de n'importe quelle image ou SVG importé */
.navbar-brand img, 
.navbar-brand svg {
  /* Limites de hauteur stricte */
  height: 80px !important;       /* Hauteur idéale sur ordinateur */
  max-height: 80px !important;   /* Sécurité si 'height' est outrepassé */
  
  /* Conservation parfaite du ratio */
  width: auto !important;
  max-width: 100% !important;    /* Ne dépassera jamais la largeur de son conteneur */
  
  /* Ajustement propre du rendu */
  object-fit: contain;          /* Recadre proprement sans déformer */
  display: block;
  transition: all 0.3s ease;
}

/* --- ADAPTATION MOBILE (Moins de 992px) --- */
@media (max-width: 991.98px) {
  .navbar-brand img, 
  .navbar-brand svg {
    height: 45px !important;     /* Réduction propre pour smartphone */
    max-height: 45px !important;
  }
}

/* ===================================================
   ALIGNEMENT DU MENU AVEC MARGES (CASSIOPEIA)
   =================================================== */

/* 1. Conteneur principal avec marges de sécurité latérales */
.container-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  padding-top: 10px;
  padding-bottom: 10px;
  /* Marges intérieures gauche/droite pour décoller du bord de l'écran */
  padding-left: 30px !important;
  padding-right: 30px !important;
}

/* 2. Bloc Logo à gauche */
.container-header .navbar-brand {
  margin-right: auto !important;
  flex-shrink: 0;
}

/* 3. Bloc Navigation aligné à droite avec marge */
.container-header .navbar {
  margin-left: auto !important;
  margin-right: 90px !important; /* Marge supplémentaire pour décoller du bord */
  display: flex !important;
  justify-content: flex-end !important;
}

.container-header .navbar-nav {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 20px; /* Espacement confortable entre chaque élément du menu */
  margin-bottom: 0 !important;
  padding-right: 0 !important;
}

/* 4. Style des liens */
.container-header .navbar-nav .nav-link {
  padding: 8px 12px !important;
  white-space: nowrap;
}

/* --- ADAPTATION MOBILE (Moins de 992px) --- */
@media (max-width: 991.98px) {
  .container-header {
    padding-left: 15px !important;
    padding-right: 60px !important;
    flex-wrap: wrap !important;
  }

  .container-header .navbar {
    margin-right: 0 !important;
  }
  
  .container-header .navbar-nav {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0;
    width: 100%;
  }
}

/*  ===================================================
   HERO BANNER MULTILINGUE - STYLISATION & SUPERPOSITION
   =================================================== */

.hero-banner {
  position: relative;
  width: 100%;
  min-height: 520px;
  /* Remplacez par le chemin exact de votre image générée */
  background-image: url('http://fondationsaintmichel.be/images/banners/HeroBanner.jpg'); 
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  box-sizing: border-box;
}

/* 1. Calque de contraste (Filtre dégradé sombre/bordeaux) */
.hero-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg, 
    rgba(107, 29, 47, 0.65) 0%,   /* Bordeaux (#6B1D2F) semi-transparent */
    rgba(15, 10, 12, 0.75) 100%   /* Ombre sombre pour détacher le texte */
  );
  z-index: 1;
}

/* 2. Bloc de texte superposé */
.hero-banner-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
  text-align: center;
  color: #FFFFFF;
}

/* 3. Titre */
.hero-title {
  color: #FFFFFF !important;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* 4. Sous-titre */
.hero-subtitle {
  color: #F9F7F3 !important;
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 35px;
  font-weight: 300;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

/* 5. Alignement des boutons */
.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Bouton Secondaire (Savoir plus / Projets) */
.btn-secondary-hero {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #FFFFFF !important;
  border: 2px solid #FFFFFF !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  border-radius: 4px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.btn-secondary-hero:hover {
  background-color: #FFFFFF !important;
  color: #6B1D2F !important;
}

/* --- ADAPTATION MOBILE (Écrans < 768px) --- */
@media (max-width: 767.98px) {
  .hero-banner {
    min-height: 420px;
    padding: 40px 15px;
  }
  
  .hero-title {
    font-size: 1.8rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: 25px;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-don, .btn-secondary-hero {
    width: 100%;
    text-align: center;
  }
}
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  box-sizing: border-box;
}

/* 1. Calque de contraste (Filtre dégradé sombre/bordeaux) */
.hero-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg, 
    rgba(107, 29, 47, 0.65) 0%,   /* Bordeaux (#6B1D2F) semi-transparent */
    rgba(15, 10, 12, 0.75) 100%   /* Ombre sombre pour détacher le texte */
  );
  z-index: 1;
}

/* 2. Bloc de texte superposé */
.hero-banner-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
  text-align: center;
  color: #FFFFFF;
}

/* 3. Titre */
.hero-title {
  color: #FFFFFF !important;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* 4. Sous-titre */
.hero-subtitle {
  color: #F9F7F3 !important;
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 35px;
  font-weight: 300;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

/* 5. Alignement des boutons */
.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Bouton Secondaire (Savoir plus / Projets) */
.btn-secondary-hero {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #FFFFFF !important;
  border: 2px solid #FFFFFF !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  border-radius: 4px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.btn-secondary-hero:hover {
  background-color: #FFFFFF !important;
  color: #6B1D2F !important;
}

/* --- ADAPTATION MOBILE (Écrans < 768px) --- */
@media (max-width: 767.98px) {
  .hero-banner {
    min-height: 420px;
    padding: 40px 15px;
  }
  
  .hero-title {
    font-size: 1.8rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: 25px;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-don, .btn-secondary-hero {
    width: 100%;
    text-align: center;
  }
}

/* ===================================================
   COULEUR DE FOND GLOBALE (JAUNE TRÈS PÂLE / IVOIRE)
   =================================================== */

:root {
  /* Nuance ivoire/parchemin très douce et chaleureuse */
  --fsm-fond-clair: #FDFBF7; 
}

/* Application du fond sur tout le corps du site */
body {
  background-color: var(--fsm-fond-clair) !important;
  color: #2B2B2B; /* Couleur du texte sombre pour une lisibilité parfaite */
}

/* Zone principale de contenu Joomla */
#main, 
.site-grid, 
.container-main {
  background-color: transparent !important;
}

/* Cartes, modules et blocs d'information sur fond clair */
.card, 
.well, 
.module-ct {
  background-color: #FFFFFF; /* Blanc pur pour les cartes pour créer un subtil relief */
  border: 1px solid #E8E2D5; /* Bordure discrète teinte pierre */
  border-radius: 6px;
}

/* ===================================================
   MARGES POUR LE CONTENU DES ARTICLES
   =================================================== */

/* Applique la marge de 8% sur ordinateurs et tablettes larges */
.com-content-article {
  padding-left: 8% !important;
  padding-right: 8% !important;
  box-sizing: border-box;
}

/* --- ADAPTATION MOBILE (Moins de 768px) --- */
/* Réduis les marges sur smartphone pour éviter d'avoir un texte trop étroit */
@media (max-width: 767.98px) {
  .com-content-article {
    padding-left: 3% !important;
    padding-right: 3% !important;
  }
}

/* ===================================================
   SECTION 3 CARTES - PAGE D'ACCUEIL
   =================================================== */

/* Couleurs de la charte */
.text-bordeaux {
  color: #3B0E19 !important;
}

.text-gold {
  color: #D4AF37 !important;
}

/* Style et effet de survol des cartes */
.fsm-card {
  border-radius: 8px !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  background-color: #FFFFFF !important;
  border-top: 4px solid #3B0E19 !important;
}

.fsm-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(59, 14, 25, 0.12) !important;
  border-top-color: #D4AF37 !important;
}

/* Boutons secondaires */
.btn-outline-bordeaux {
  color: #3B0E19 !important;
  border: 1px solid #3B0E19 !important;
  background-color: transparent !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-outline-bordeaux:hover {
  background-color: #3B0E19 !important;
  color: #FDFBF7 !important;
}

/* ===================================================
   FOOTER INSTITUTIONNEL - FONDATION SAINT MICHEL
   (Correction Grille Cassiopeia / Joomla 5)
   =================================================== */

/* 1. Neutraliser les débordements globaux */
html, body {
  overflow-x: hidden !important;
}

/* 2. Éliminer le fond bleu et forcer la zone footer sur TOUTE la largeur de l'écran */
.container-bottom-a,
.container-bottom-b,
.container-footer,
.site-footer-container,
.footer-wrapper,
#footer,
div[class*="container-footer"],
div[class*="container-bottom"] {
  background-color: #3B0E19 !important;
  background-image: none !important;
  background: #3B0E19 !important;
  grid-column: full-start / full-end !important; /* Force la pleine largeur dans la grille Cassiopeia */
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  display: block !important;
}

/* 3. Structure principale du Footer */
footer.site-footer {
  background-color: #3B0E19 !important;
  color: #FDFBF7 !important;
  border-top: 3px solid #D4AF37 !important;
  padding-top: 45px !important;
  padding-bottom: 25px !important;
  width: 100% !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box !important;
}

/* 4. CENTRAGE PARFAIT DU CONTENEUR (Correction clé pour Joomla 5) */
footer.site-footer .container,
.container-footer .container,
.container-bottom-b .container {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  background: transparent !important;
  box-sizing: border-box !important;
  display: block !important;
  float: none !important;
}

/* 5. Disposition des colonnes Bootstrap */
footer.site-footer .row {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-content: space-between !important;
}

/* 6. Colonne 1 : Logotype & Marque */
.site-footer .footer-logo {
  height: 48px;
  width: auto;
  display: block;
}

.site-footer .text-gold {
  color: #D4AF37 !important;
}

.site-footer .text-gold-light {
  color: #E6CA65 !important;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.site-footer .footer-text {
  color: #E8E2D5;
  line-height: 1.6;
  margin-top: 10px;
}

/* 7. Titres des sections du footer */
.site-footer .border-gold-bottom {
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 8px;
  letter-spacing: 1px;
  font-weight: 600;
}

/* 8. Liens et listes de navigation */
.site-footer .footer-links {
  padding-left: 0;
}

.site-footer .footer-links li {
  margin-bottom: 10px;
  list-style: none;
}

.site-footer .footer-links a, 
.site-footer .footer-contact a {
  color: #FDFBF7 !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer .footer-links a:hover, 
.site-footer .footer-contact a:hover {
  color: #D4AF37 !important;
  text-decoration: underline;
}

/* 9. Coordonnées de contact */
.site-footer address.footer-contact p {
  margin-bottom: 8px;
  color: #E8E2D5;
}

/* 10. Bouton de don spécifique au footer */
.site-footer .btn-don {
  background-color: #D4AF37 !important;
  color: #3B0E19 !important;
  font-weight: 700 !important;
  border: 1px solid #D4AF37 !important;
  padding: 10px 20px !important;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none !important;
}

.site-footer .btn-don:hover {
  background-color: #F5D061 !important;
  color: #24080F !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 11. Bande de copyright inférieure */
.site-footer .border-top-dark {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer .text-muted-light {
  color: #C5BCAE !important;
  font-size: 0.825rem;
}

/* --- ADAPTATION MOBILE ET TABLETTE (< 992px) --- */
@media (max-width: 991.98px) {
  .site-footer {
    padding-top: 35px !important;
    text-align: left;
  }
  
  .site-footer .col-lg-4 {
    margin-bottom: 25px;
  }
  
  .site-footer .footer-bottom {
    margin-top: 25px !important;
  }
}