/* ==============================================================
   PALETTE DE COULEURS & VARIABLES
================================================================= */
:root {
    --blue-dark: #0b1f3b;
    --blue-main: #123b6d;
    --blue-soft: #e7f0fa;
    --blue-light: #4da3ff;
    --white: #ffffff;
    --gray-soft: #f4f6f9;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.15);
}

/* ==============================================================
   BASE GLOBALE
================================================================= */
html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gray-soft);
    color: #1c1c1c;
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
}

/* ==============================================================
   NAVBAR & LOGIQUE D'ALIGNEMENT
================================================================= */
.navbar-brand {
    display: flex !important;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px; 
    height: 42px;
    background-color: var(--white);
    border-radius: 50%;
    padding: 5px;
    flex-shrink: 0; 
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.logo-icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

.navbar-spacer {
    height: 75px; 
}

.navbar.bg-unasmoh {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-main));
    min-height: 70px;
}

.navbar-container-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap !important;
}

/* Responsive Navbar */
@media (max-width: 991px) {
    .navbar-collapse {
        position: absolute !important; top: 75px; left: 0; width: 100%;
        background: var(--blue-dark); padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.4); z-index: 1050;
        border-radius: 0 0 15px 15px;
    }
    .navbar-container-custom { height: 75px; }
    .navbar-nav { width: 100%; }
    .navbar-nav .nav-item {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
}

@media (min-width: 992px) {
    .brand-text { font-size: 1.25rem; white-space: nowrap; }
    .navbar-nav .nav-link { margin-left: 15px; }
    .navbar .nav-link::after {
        content: "";
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--blue-light);
        transition: width 0.3s ease;
    }
    .navbar .nav-link:hover::after, .navbar .nav-link.active::after { width: 100%; }
}

.navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    position: relative;
    transition: 0.3s;
}

.navbar .nav-link:hover, .navbar .nav-link.active {
    color: var(--white) !important;
}

/* ==============================================================
   HERO SECTION
================================================================= */
.hero-slider {
    position: relative; 
    min-height: 100vh; 
    width: 100%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    overflow: hidden; 
    background-color: var(--blue-dark);
}

.hero-container { position: relative; z-index: 10; width: 100%; padding: 0 15px; }

.hero-content.section-title {
    color: var(--white) !important;
    text-shadow: 0 2px 15px rgba(0,0,0,0.6);
    margin-bottom: 0;
    border: none;
}
.hero-content.section-title::after { display: none; } /* Retire la ligne sous le titre hero */

/* BOUTONS HERO - BASE */
.btn-hero-gradient, .btn-hero-outline {
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

/* STYLE BOUTON PLEIN (GRADIENT) */
.btn-hero-gradient {
    background: linear-gradient(135deg, #4da3ff 0%, #123b6d 100%);
    color: white;
    border: none;
}

/* STYLE BOUTON CONTOUR (OUTLINE) */
.btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

/* EFFETS AU SURVOL */
.btn-hero-gradient:hover, .btn-hero-outline:hover {
    transform: translateY(-5px) scale(1.05);
    color: white;
    box-shadow: 0 15px 30px rgba(77, 163, 255, 0.3);
}

.btn-hero-outline:hover {
    background: white;
    color: #123b6d;
}

/* COMPATIBILITÉ MOBILE */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column !important; /* Force l'empilement */
        align-items: center;
        gap: 15px !important;
    }

    .btn-hero-gradient, .btn-hero-outline {
        width: 100%;
        max-width: 280px; /* Taille idéale sur téléphone */
        font-size: 0.85rem;
        padding: 12px 20px;
    }
}

/* ==============================================================
   SECTIONS & TITRES
================================================================= */
section { padding: 80px 0; }

.section-title {
    text-align: center; font-size: 2.4rem;
    color: var(--blue-dark); margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: ""; display: block; width: 80px; height: 4px;
    background: linear-gradient(90deg, var(--blue-main), var(--blue-light));
    margin: 15px auto 0; border-radius: 10px;
}

.bg-light { background-color: var(--white) !important; }

/* ==============================================================
   CARTES (TEAM, NEWS, EVENTS)
================================================================= */
.card { 
    transition: transform 0.4s ease, box-shadow 0.4s ease; 
    overflow: hidden; 
    border: none;
    box-shadow: var(--shadow-soft);
}
.card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.2); }

/* News Specific */
.news-card {
    width: 320px;
    background: white;
    border-radius: 15px;
}
.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.news-card:hover img { transform: scale(1.1); }

.news-title { color: var(--blue-dark); font-size: 1.2rem; margin-bottom: 10px; }
.news-summary { color: #666; font-size: 0.9rem; line-height: 1.5; }

/* ==============================================================
   GALERIE MODERNE & FLUIDE
================================================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    height: 220px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Overlay (Effet au survol) */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 59, 109, 0.7); /* --blue-main avec transparence */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

/* Hover Effects */
.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-soft);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
    transform: translateY(0);
}

/* Adaptation Dark Mode pour la galerie */
body.dark-mode .gallery-item {
    border: 1px solid rgba(255,255,255,0.1);
}
/* ==============================================================
   CONTACT & FORMULAIRE PREMIUM
================================================================= */
.contact-form-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px;
    border-radius: 25px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.contact-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.form-group-custom {
    position: relative;
    margin-bottom: 30px;
}

/* Icônes à gauche */
.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blue-light);
    z-index: 5;
    transition: 0.3s;
}

textarea ~ .input-icon { top: 25px; } /* Ajustement pour textarea */

.form-group-custom .form-control {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding: 15px 15px 15px 45px !important; /* Espace pour l'icône */
    border-radius: 12px !important;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Label Ajusté */
.form-group-custom label {
    position: absolute;
    top: 50%;
    left: 45px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: all 0.3s ease;
}

textarea ~ label { top: 25px; transform: none; }

/* Animation Label & Icone */
.form-control:focus ~ label,
.form-control:not(:placeholder-shown) ~ label {
    top: -12px;
    left: 15px;
    transform: scale(0.85);
    color: var(--blue-light);
    font-weight: bold;
    background: var(--blue-dark);
    padding: 0 10px;
}

.form-control:focus ~ .input-icon {
    color: white;
    text-shadow: 0 0 8px var(--blue-light);
}

/* Bouton à effet Glow */
.btn-unasmoh-glow {
    background: linear-gradient(135deg, var(--blue-light), var(--blue-main));
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: 0.4s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-unasmoh-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(77, 163, 255, 0.4);
    filter: brightness(1.1);
}
.btn-hero-outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(77, 163, 255, 0.5);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
    display: inline-flex;
    align-items: center;
}

.btn-hero-outline:hover {
    background: var(--blue-light);
    border-color: var(--blue-light);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(77, 163, 255, 0.3);
}
/* archive */
.archive-card {
    background: rgba(11, 31, 59, 0.6);
    border: 1px solid rgba(77, 163, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: 0.4s ease;
}

.archive-card:hover {
    transform: translateY(-10px);
    border-color: var(--blue-light);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.year-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--blue-light);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: bold;
    z-index: 2;
}

.archive-img-container {
    height: 200px;
    overflow: hidden;
}

.archive-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: 0.5s;
}

.archive-card:hover .archive-img-container img {
    filter: grayscale(0%);
    transform: scale(1.1);
}
/* ==============================================================
   ADAPTATION DARKNESS (MODE SOMBRE)
================================================================= */
body.dark-mode .contact-form-box {
    background: rgba(10, 22, 40, 0.8); /* Fond plus sombre pour le Dark Mode */
    border: 1px solid rgba(77, 163, 255, 0.2);
}

body.dark-mode .form-control:focus ~ label,
body.dark-mode .form-control:not(:placeholder-shown) ~ label {
    background: #1a2d47; /* Correspond à votre couleur de card dark */
}

/* On force le blanc pour les textes saisis même si le navigateur a des préférences */
body.dark-mode input:-webkit-autofill {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0 30px #1a2d47 inset !important;
}
/* ==============================================================
   DARK MODE LOGIC
================================================================= */
body.dark-mode { background-color: #0a1628; color: #e6eef8; }

body.dark-mode .section-title:not(.contact-title),
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 { 
    color: var(--white) !important; 
}

body.dark-mode .card, 
body.dark-mode .bg-light {
    background-color: #1a2d47 !important;
    color: #e6eef8 !important;
}

body.dark-mode p, body.dark-mode .news-summary { color: #b0c4de !important; }

body.dark-mode .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ==============================================================
   FOOTER & TOGGLE
================================================================= */
.theme-toggle {
    position: fixed; bottom: 25px; right: 25px;
    background: linear-gradient(135deg, var(--blue-light), var(--blue-main));
    color: white; border: none; border-radius: 50%;
    width: 55px; height: 55px; z-index: 2000;
    cursor: pointer;
}

footer {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-main));
    color: white; padding: 50px 0 20px;
}