/* Variables couleurs issues de Sambaplan (Theme Brésil) */
:root {
  
  /* Neutres pour la lisibilité */
    --bg-light: #F9F9F9;
    --text-dark: #212529;

    --theme-primary: #009B4D; /* Vert du drapeau */
    --theme-primary-darker: #007A2E;
    --theme-primary-lighter: #8CC63F;
    --theme-primary-subtle: #f0f9f4; /* Vert très pâle pour fond de section */
    
    --theme-secondary: #FFD200; /* Jaune du drapeau */
    --theme-secondary-darker: #E6B800;
    --theme-secondary-subtle: #fffdf2; /* Jaune très pâle pour fond de section */
    
    --theme-accent: #1D4486; /* Bleu du drapeau */
    --theme-accent-lighter: #00A3DA;

    --text-white: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Typography Premium --- */
/* Application du nuancier sur les titres de section (h2) */
section h2 {
    background: linear-gradient(135deg, var(--theme-primary-darker) 0%, var(--theme-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* On réinitialise le gradient pour les spans colorés spécifiques à l'intérieur des titres */
section h2 span {
    background: none;
    -webkit-text-fill-color: initial;
}

/* --- Navbar --- */
.navbar {
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(to right, var(--theme-primary) 33%, var(--theme-secondary) 33%, var(--theme-secondary) 66%, var(--theme-accent) 66%);
    border-image-slice: 1;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--theme-primary) !important;
}

/* --- Boutons & Couleurs Bootstrap Overrides --- */
.text-primary { color: var(--theme-primary) !important; }
.text-secondary { color: var(--theme-secondary-darker) !important; }
.bg-theme-accent { background-color: var(--theme-accent) !important; }

/* Fonds de section personnalisés */
.bg-primary-subtle { background-color: var(--theme-primary-subtle) !important; }
.bg-secondary-subtle { background-color: var(--theme-secondary-subtle) !important; }

/* Bouton Principal (Jaune - CTA fort) */
.btn-primary {
    background: linear-gradient(135deg, var(--theme-secondary) 0%, var(--theme-secondary-darker) 100%);
    border-color: var(--theme-secondary);
    color: var(--theme-accent);
    border: none;
    transition: all 0.3s ease;
    background-size: 200% auto;
}
.btn-primary:hover {
    background-position: right center; /* Effet de mouvement du dégradé */
    color: var(--theme-accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 41, 0.4);
}

/* Bouton Secondaire (Vert) */
.btn-secondary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-darker) 100%);
    border-color: var(--theme-primary);
    color: #fff;
    border: none;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background: linear-gradient(135deg, var(--theme-primary-darker) 0%, var(--theme-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 155, 58, 0.4);
}

/* --- Hero Section --- */
#hero {
    height: 90vh;
    background-color: #222; /* Fallback couleur sombre pour texte blanc */
    background: url('../img/nb3.jpg') no-repeat center center/cover;
    background-attachment: fixed; /* Effet parallaxe pour le relief */
    position: relative;
}

/* --- Hero Programmes --- */
#hero-programs {
    height: 60vh;
    background-color: #222;
    background: url('https://images.unsplash.com/photo-1574680096141-1cddd32e0340?q=80&w=1920&auto=format&fit=crop') no-repeat center center/cover;
    background-attachment: fixed;
    position: relative;
}

#hero h1, #hero p {
    text-shadow: 0 4px 10px rgba(0,0,0,0.6); /* Relief du texte sur l'image */
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, rgba(0, 39, 118, 0.8), rgba(0, 155, 58, 0.6)); /* Bleu vers Vert */
}

.z-index-1 { z-index: 1; }

/* --- Cards --- */
.service-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Ombre douce initiale */
}

/* Mise en avant de la carte populaire */
.transform-scale {
    transform: scale(1.05);
    z-index: 2;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important; /* Ombre profonde au survol */
}

/* --- Galerie Transformations --- */
/* Ajout d'ombre aux images de la galerie et bio pour le relief */
.gallery-item, section#bio img {
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-radius: 16px !important;
}

.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* --- Section Philosophie --- */
.philosophy-card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.philosophy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08) !important;
}

.icon-box {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    background-color: var(--bg-light); /* Par défaut */
    transition: all 0.3s ease;
}

/* --- Formulaire --- */
/* Bordure dégradée Brésil */
#contactForm {
    position: relative;
    border: 4px solid transparent;
    border-radius: 1rem;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 50%, var(--theme-accent) 100%) border-box;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.input-group-text {
    background-color: #f8f9fa;
    color: var(--theme-accent);
    border-color: #dee2e6;
}

.form-control, .form-select {
    border-left: none; /* Fusion visuelle avec l'icône */
}

.form-control:focus, .form-select:focus {
    border-color: var(--theme-primary);
    box-shadow: none;
    border-bottom: 2px solid var(--theme-primary);
    background-color: #fff;
}

/* --- Animations --- */
.animate-on-scroll {
    opacity: 1; /* Modifié de 0 à 1 pour garantir l'affichage par défaut */
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}