/* ==========================================================================
   DESIGN GLOBAL DE LA PAGE D'ACCUEIL APCE (FOND SOMBRE & JAUNE)
   ========================================================================== */
.apce-home-wrapper {
    background-color: var(--apce-bg-page);
    color: var(--apce-yellow);
    padding: 40px 20px;
    font-family: sans-serif;
    border-radius: 8px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box; /* Évite les bugs de débordement dus au padding */
}

/* --- TYPOGRAPHIE --- */
.apce-home-wrapper h1, 
.apce-home-wrapper h2, 
.apce-home-wrapper h3 {
    color: var(--apce-yellow);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}
.apce-home-wrapper h1 { font-size: 2.5rem; text-align: center; }
.apce-home-wrapper h2 { font-size: 1.8rem; border-bottom: 2px solid var(--apce-yellow); padding-bottom: 10px; margin-top: 40px; }
.apce-home-wrapper h3 { font-size: 1.3rem; margin-top: 0; }

.apce-home-wrapper p {
    color: #f0f0f5; /* Blanc cassé doux pour un meilleur confort de lecture */
    line-height: 1.6;
}
.apce-lead {
    font-size: 1.2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* --- BOUTONS (AVEC SURVOL BLANC INTERACTIF) --- */
.apce-cta-group {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.apce-btn {
    display: inline-block;
    background-color: var(--apce-yellow);
    color: var(--apce-bg-page) !important;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease; /* Transition fluide pour le survol */
}
/* Survol blanc sur bouton plein */
.apce-btn:hover {
    background-color: #FFFFFF !important;
    color: var(--apce-bg-page) !important;
    transform: translateY(-2px);
}
.apce-btn.btn-outline {
    background-color: transparent;
    color: var(--apce-yellow) !important;
    border: 2px solid var(--apce-yellow);
}
/* Survol blanc sur bouton contour */
.apce-btn.btn-outline:hover {
    background-color: #FFFFFF !important;
    border-color: #FFFFFF;
    color: var(--apce-bg-page) !important;
}

/* --- GRILLES & CARTES --- */
.apce-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.apce-card, .apce-info-block {
    background-color: var(--apce-bg-card); /* Léger relief visuel */
    padding: 20px;
    border-radius: 6px;
    border-top: 4px solid var(--apce-yellow);
    border-left: var(--apce-border-card);
    border-right: var(--apce-border-card);
    border-bottom: var(--apce-border-card);
    box-shadow: var(--apce-shadow-card);
}

/* --- SECTION ÉVÉNEMENTS DYNAMIQUES --- */
.apce-dynamic-events {
    list-style: none;
    padding: 0;
}
.apce-dynamic-events li {
    padding: 12px;
    border-bottom: 1px dashed rgba(229, 230, 66, 0.3);
}
.apce-dynamic-events li .event-date {
    font-weight: bold;
    margin-right: 10px;
}
.apce-dynamic-events li a {
    color: var(--apce-yellow);
    text-decoration: none;
    font-weight: 500;
}
.apce-dynamic-events li a:hover {
    text-decoration: underline;
}
.apce-no-events {
    font-style: italic;
    opacity: 0.7;
}

/* ==========================================================================
   📱 ADAPTATION POUR TÉLÉPHONES ET TABLETTES (RESPONSIVE)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .apce-home-wrapper {
        padding: 25px 15px; /* Moins d'espace perdu sur les bords */
        border-radius: 0;   /* Plein écran sur mobile */
    }

    .apce-home-wrapper h1 {
        font-size: 1.8rem; /* Titre plus petit pour ne pas déborder */
    }

    .apce-home-wrapper h2 {
        font-size: 1.4rem; /* Titres de sections plus compacts */
    }

    .apce-lead {
        font-size: 1rem;   /* Paragraphe d'intro adapté */
    }

    /* Les boutons s'empilent verticalement sur mobile pour cliquer facilement avec le pouce */
    .apce-cta-group {
        flex-direction: column;
        align-items: stretch;
        max-width: 280px;  /* Largeur max idéale pour un bouton sur téléphone */
        margin: 0 auto 30px auto;
    }
    
    .apce-btn {
        text-align: center;
    }

    .apce-grid {
        grid-template-columns: 1fr; /* Une seule colonne propre sur mobile */
    }
}