/* ==========================================================================
   CHARTE GRAPHIQUE & CONFIGURATION - ONG AHPAA
   ========================================================================== */

:root {
    /* Couleurs de marque (Extraites du logo) */
    --vert-ahpaa: #0A7A16;
    --marron-ahpaa: #4A2E11;
    --jaune-ahpaa: #FDB813;
    
    /* Contrôle du fond Gris Clair (Valeurs RGB modifiables) */
    --gray-start-r: 245; --gray-start-g: 247; --gray-start-b: 250; /* #f5f7fa */
    --gray-end-r: 218;   --gray-end-g: 221;   --gray-end-b: 225;   /* #dadee1 */
    
    /* Dégradés et Textes */
    --bg-gradient-start: rgb(var(--gray-start-r), var(--gray-start-g), var(--gray-start-b));
    --bg-gradient-end: rgb(var(--gray-end-r), var(--gray-end-g), var(--gray-end-b));
    --text-main: rgb(33, 37, 41);
    --text-muted: rgb(108, 117, 125);
    
    /* Ajustement Glassmorphism Premium */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-hover: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow-light: rgba(0, 0, 0, 0.06);
    --shadow-hover: rgba(0, 0, 0, 0.12);
    
    /* Layout constants */
    --nav-height: 70px;
}

/* Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    scroll-behavior: smooth;
}

h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 600;
}

/* ==========================================================================
   STRUCTURE TRANSLUCIDE (LIGHT GLASSMORPHISM)
   ========================================================================== */

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 15px 35px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-4px);
    box-shadow: 0 25px 45px var(--shadow-hover);
}

/* ==========================================================================
   BARRE DE NAVIGATION INTEGRALE
   ========================================================================== */

nav {
    position: fixed;
    top: 0; left: 0; width: 100%; z-index: 1000;
    height: var(--nav-height);
    padding: 0 5%;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area img { height: 45px; border-radius: 5px; object-fit: contain; }
.logo-area span { font-weight: 700; font-size: 1.2rem; color: var(--marron-ahpaa); letter-spacing: 0.5px; }

.nav-center { display: flex; align-items: center; gap: 25px; }
.nav-links { display: flex; gap: 20px; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: color 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--vert-ahpaa); }

/* Zone de Recherche */
.search-container { position: relative; display: flex; align-items: center; }
.search-input {
    width: 180px; padding: 6px 15px 6px 35px;
    border-radius: 30px; border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.6); font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-input:focus { width: 240px; outline: none; border-color: var(--vert-ahpaa); background: #fff; }
.search-container i { position: absolute; left: 12px; color: var(--text-muted); font-size: 0.85rem; }

/* Actions Droite */
.nav-right { display: flex; align-items: center; gap: 12px; }

.btn-login {
    padding: 8px 18px; border-radius: 30px;
    border: 1px solid var(--vert-ahpaa); background: transparent;
    color: var(--vert-ahpaa); font-weight: 500; font-size: 0.85rem;
    cursor: pointer; transition: all 0.3s ease; text-decoration: none;
}
.btn-login:hover { background: rgba(10, 122, 22, 0.05); }

.btn-pisf-app {
    padding: 8px 18px; border-radius: 30px;
    border: none; background: var(--marron-ahpaa);
    color: #fff; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; transition: all 0.3s ease; text-decoration: none;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 10px rgba(74, 46, 17, 0.15);
}
.btn-pisf-app:hover { background: #35200b; transform: translateY(-1px); }

/* ==========================================================================
   SLIDER HERO INTERACTIF
   ========================================================================== */

.hero-wrapper { position: relative; margin-top: var(--nav-height); width: 100%; }
.hero-slider { width: 100%; height: 75vh; overflow: hidden; background: #000; }

.slide-item { 
    height: 75vh; position: relative; 
    display: flex !important; align-items: center; justify-content: center; 
    text-align: center; background-size: cover; background-position: center; 
}
.slide-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.45); }

.slide-content { position: relative; z-index: 2; max-width: 800px; padding: 0 20px; }
.slide-content h2 { font-size: 3.2rem; margin-bottom: 15px; color: #fff; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.slide-content p { color: rgba(255, 255, 255, 0.95); font-size: 1.15rem; text-shadow: 0 1px 5px rgba(0,0,0,0.2); }

/* Panneau de Commandes Flottant (Glassmorphism) */
.slider-controls {
    position: absolute; bottom: 30px; right: 5%;
    z-index: 10; display: flex; gap: 10px; align-items: center;
}

.slider-btn {
    width: 45px; height: 45px; border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); font-size: 0.9rem;
}
.slider-btn:hover { background: var(--vert-ahpaa); border-color: var(--vert-ahpaa); transform: scale(1.1); }

/* ==========================================================================
   CARROUSEL DE PROJETS (BANQUE DE PROJETS)
   ========================================================================== */

.section-title { text-align: center; padding: 60px 0 20px; font-size: 2rem; color: var(--marron-ahpaa); }
.carousel-container { padding: 0 5% 50px; position: relative; }

.project-card { margin: 15px; overflow: hidden; height: 440px; display: flex; flex-direction: column; }
.project-img { height: 190px; background-size: cover; background-position: center; width: 100%; }
.project-desc { padding: 22px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.project-desc h3 { color: var(--vert-ahpaa); margin-bottom: 8px; font-size: 1.25rem; line-height: 1.4; }
.project-desc p { font-size: 0.88rem; color: var(--text-muted); }

/* Overrides Slick flèches standards */
.project-carousel .slick-prev, .project-carousel .slick-next { z-index: 5; width: 40px; height: 40px; }
.project-carousel .slick-prev:before, .project-carousel .slick-next:before { color: var(--vert-ahpaa) !important; font-size: 28px; opacity: 0.8; transition: opacity 0.2s; }
.project-carousel .slick-prev:hover:before, .project-carousel .slick-next:hover:before { opacity: 1; }
.project-carousel .slick-prev { left: -35px; }
.project-carousel .slick-next { right: -35px; }

/* ==========================================================================
   SECTION NEWSLETTER
   ========================================================================== */

.newsletter-box {
    margin: 40px 5% 60px; padding: 45px; text-align: center;
    background: linear-gradient(135deg, rgba(10, 122, 22, 0.05) 0%, rgba(253, 184, 19, 0.05) 100%);
}
.newsletter-box h2 { color: var(--vert-ahpaa); font-size: 1.7rem; margin-bottom: 10px; }
.newsletter-form { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.newsletter-form input {
    padding: 12px 22px; border-radius: 50px; border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.8); color: var(--text-main); width: 340px; font-size: 0.9rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--vert-ahpaa); background: #fff; }

.btn-submit {
    padding: 12px 32px; border-radius: 50px; border: none;
    background: var(--vert-ahpaa); color: #fff; font-weight: 600; cursor: pointer;
    box-shadow: 0 5px 15px rgba(10, 122, 22, 0.15); transition: all 0.3s ease;
}
.btn-submit:hover { background: var(--marron-ahpaa); box-shadow: 0 8px 20px rgba(74, 46, 17, 0.2); }

/* ==========================================================================
   FOOTER (BLOC SOMBRE DE STRUCTURE)
   ========================================================================== */

footer { background: #191b1e; padding: 70px 5% 25px; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 40px; }
.footer-logo img { height: 55px; margin-bottom: 15px; border-radius: 4px; }

.footer-col h4 { color: var(--jaune-ahpaa); margin-bottom: 20px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #a0a5aa; text-decoration: none; font-size: 0.9rem; transition: all 0.2s ease; }
.footer-col ul li a:hover { color: #fff; padding-left: 4px; }

.copyright { text-align: center; padding-top: 25px; border-top: 1px solid #2d3237; color: #5a5f64; font-size: 0.85rem; }

/* ==========================================================================
   MEDIA QUERIES - RESPONSIVE DESIGN COMPLET
   ========================================================================== */

/* Tablettes et Écrans Moyens */
@media (max-width: 1024px) {
    .slide-content h2 { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .project-carousel .slick-prev { left: -15px; }
    .project-carousel .slick-next { right: -15px; }
}

/* Smartphones et Écrans Mobiles */
@media (max-width: 768px) {
    nav { padding: 0 20px; }
    .logo-area span, .search-container, .nav-links { display: none; } /* On cache les éléments encombrants sur mobile */
    
    .nav-right { width: 100%; justify-content: flex-end; }
    .hero-slider, .slide-item { height: 60vh; }
    .slide-content h2 { font-size: 1.8rem; }
    .slide-content p { font-size: 0.95rem; }
    
    .slider-controls { right: 50%; transform: translateX(50%); bottom: 20px; } /* Centrage des boutons sur mobile */
    
    .newsletter-form { flex-direction: column; align-items: center; width: 100%; }
    .newsletter-form input { width: 100%; max-width: 300px; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 35px; text-align: center; }
    .footer-logo img { margin: 0 auto 15px; }
}