/* 
  =============================================================================
  FICHIER     : custom.css
  CHEMIN      : assets/css/custom.css
  DESCRIPTION : Feuille de style personnalisee centralisant toutes les 
                modifications graphiques de l'association MHV.
                
  PARAMETRES GERES (MAINTENANCE) :
  - Espacements : Reduction des marges globales (bas de page, articles).
  - Footer      : Hauteur, couleurs, taille et comportement des icones/liens.
  - Image Bambou: Declaration de l'URL du divider, taille (80%) et position.
  - Animations  : Parametrage du Yin-Yang (roulement) et du bouton "Remonter".
  - Slider      : Gestion des 5 images de l'accueil (URLs) et de leur fondu (30s).
  - Lisibilite  : Opacite du voile sombre (Overlay) et ombres des textes.
  - Mobile      : Ajustements responsifs pour les ecrans < 768px.
  =============================================================================
*/

/* ==========================================================================
   1. REGLAGES GLOBAUX
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

/* Ecrasement absolu des espacements Ghost en bas de page pour coller le bambou */
.site-content,
.site-main,
.gh-article,
.gh-canvas,
.gh-content,
.read-more-wrap,
.read-more,
.footer-cta,
.article-comments,
.article-footer {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.gh-content > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* ==========================================================================
   2. FOOTER MHV (Bas de page & Bambou)
   ========================================================================== */
.site-footer {
    position: relative;              
    padding-top: 1.5rem !important;    
    padding-bottom: 0 !important; 
    margin-top: 100px !important;    
    background-color: #e4e4e4 !important; 
    color: #000000 !important;            
    font-size: 1.6rem !important;         
}

/* IMAGE DIVIDER (BAMBOU) CENTRALISEE ICI */
.site-footer::before {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 200px; 
    top: -100px;   
    background-image: url('/content/images/2026/10/divider-bamboo-1.png') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important; 
    background-size: 80% auto !important; 
    pointer-events: none; 
}

/* Lisibilite et survol des liens du footer */
.site-footer a, 
.site-footer .copyright, 
.site-footer .copyright a, 
.site-footer-nav a, 
.gh-powered-by, 
.gh-powered-by a {
    color: #000000 !important; 
    opacity: 1 !important; 
    font-weight: 500 !important; 
}

.site-footer a:hover {
    color: #333333 !important;
    opacity: 0.8 !important;
}

/* Structure et alignement du footer */
.site-footer .inner {
    gap: 1.2rem !important;
    max-width: 96% !important; 
    width: 100% !important;
}

.site-footer-center {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.site-footer-nav,
.site-footer-nav a {
    font-size: 1.6rem !important; 
}

.site-footer-social-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.site-footer-social-links a svg {
    fill: #000000 !important;
    opacity: 1 !important;
    width: 32px !important;  
    height: 32px !important; 
}

/* Alignement Gauche (Yin-Yang + Texte) */
.site-footer .copyright {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important; 
    gap: 1.5rem; 
}

.copyright-subtitle {
    font-size: 1.4rem !important; 
    color: #333333 !important;
    text-align: left;
}

.copyright-subtitle p {
    margin: 0 0 0.8rem 0 !important;
    padding: 0 !important;
}

.copyright-subtitle p:last-child {
    margin-bottom: 0 !important;
}

/* Alignement Droite (Credits) */
.right-text-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    text-align: right !important;
    gap: 0.4rem !important;
    margin-left: auto !important; 
}

.copyright-title {
    font-size: 2.2rem !important; 
    font-weight: 600 !important;  
}

.credits-incremental {
    font-size: 1.6rem !important;
    margin-top: 3rem !important; 
}

/* Animation Yin-Yang Geante (l'image GIF reste en HTML par securite d'affichage) */
.yin-yang-footer {
    height: 240px !important;       
    max-height: 240px !important;   
    width: auto !important;         
    opacity: 0; 
}

.yin-yang-footer.is-animating {
    animation: roulerFooter 3s ease-out forwards;
}

@keyframes roulerFooter {
    0% { transform: translateX(-100vw) rotate(-720deg); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translateX(0) rotate(0deg); opacity: 1; }
}

/* ==========================================================================
   3. BOUTON FLOTTANT REMONTER
   ========================================================================== */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;         
    height: 65px;        
    font-size: 3rem;     
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
    padding-bottom: 3px; 
}

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

#scroll-to-top:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    transform: translateY(-3px);
}

/* ==========================================================================
   4. ACCUEIL : SLIDER 5 PHOTOS ET LISIBILITE TEXTE
   ========================================================================== */
.lb-slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    overflow: hidden;
    background-color: #111;
}

/* Style de base des "boites" d'images du slider */
.lb-slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;          
    background-position: center;     
    background-repeat: no-repeat;
    opacity: 0;
    animation: lbCrossfade 30s infinite; 
}

/* DECLARATION DES 5 IMAGES ET DES TEMPS DE DECALAGE */
.lb-slide-1 { background-image: url('/content/images/2026/10/Slider1.jpg'); animation-delay: 0s; }
.lb-slide-2 { background-image: url('/content/images/2026/10/Slider2.jpg'); animation-delay: 6s; }
.lb-slide-3 { background-image: url('/content/images/2026/10/Slider3.jpg'); animation-delay: 12s; }
.lb-slide-4 { background-image: url('/content/images/2026/10/Slider4.jpg'); animation-delay: 18s; }
.lb-slide-5 { background-image: url('/content/images/2026/10/Slider5.jpg'); animation-delay: 24s; }

/* L'animation de fondu recalculee pour 5 images (30 secondes) */
@keyframes lbCrossfade {
    0%   { opacity: 0; }
    7%   { opacity: 1; }  
    20%  { opacity: 1; }  
    27%  { opacity: 0; }  
    100% { opacity: 0; }
}

/* Voile sombre sur le slider pour le contraste (Overlay) */
.lb-slider-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* Ombres portees sur le texte de l'accueil */
.site-title, 
.site-description {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.6) !important;
    position: relative;
    z-index: 2; 
}
.site-description {
    font-weight: 500 !important;
}

/* ==========================================================================
   5. MODE MOBILE (Ajustements sur petits ecrans)
   ========================================================================== */
@media (max-width: 768px) {
    .site-footer { padding-top: 2rem !important; }
    .site-footer::before { background-size: 95% auto !important; }
    #scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 55px;         
        height: 55px;        
        font-size: 2.5rem;   
    }
    .yin-yang-footer {
        height: 150px !important;     
        max-height: 150px !important; 
    }
    .site-footer .copyright {
        flex-direction: column !important; 
        text-align: center !important;
    }
    .copyright-subtitle { text-align: center !important; }
    .right-text-group {
        align-items: center !important;
        text-align: center !important;
        margin-left: 0 !important; 
    }
    .copyright-title { font-size: 1.8rem !important; }
    .credits-incremental { margin-top: 2rem !important; }
}