/* Styles généraux et Variables */
:root {
  --primary-color: #1198D5; /* Bleu Resiwell */
  --primary-color-dark: #0a7cb5;
  --primary-color-light: rgba(17, 152, 213, 0.08); /* Plus léger */
  --primary-rgb: 17, 152, 213;
  --secondary-color: #4CAF50; /* Vert Resiwell */
  --secondary-color-light: rgba(76, 175, 80, 0.08);
  --secondary-rgb: 76, 175, 80;
  --text-color: #555;
  --heading-color: #222;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --navbar-height: 80px; /* Légèrement plus haute */
  --navbar-height-scrolled: 70px;
  --transition-smooth: all 0.35s ease-in-out;
  --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  --hover-shadow: 0 15px 30px rgba(17, 152, 213, 0.3);
  --navbar-transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1); /* Smoother transition */
  --navbar-link-color: #444; /* Un peu plus foncé */
  --navbar-link-hover-color: var(--primary-color); /* Texte bleu au survol */
  --navbar-link-hover-bg: transparent; /* Plus de fond au survol */
  --navbar-link-active-color: var(--primary-color);
  --navbar-bg: var(--white); /* Fond blanc permanent */
  --navbar-shadow-scrolled: 0 8px 24px rgba(0, 0, 0, 0.06); /* Softer shadow */
  --navbar-transition-curve: cubic-bezier(0.4, 0, 0.2, 1); /* Standard ease */
  --navbar-hover-duration: 0.3s;
  --navbar-hover-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --navbar-icon-color: #888; /* Standard icon color */
  --navbar-icon-hover-color: var(--primary-color); /* Icon hover color */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  /* padding-top est géré par JS pour la navbar fixe */
  box-sizing: border-box;
  color: var(--text-color);
}

/* ============================================= */
/*          Navbar Élégante v8 (Ultime)         */
/* ============================================= */

.navbar-elegant {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--navbar-bg); /* Permanent white background */
    backdrop-filter: none; /* No blur */
    z-index: 1030;
    padding: 0;
    height: var(--navbar-height-scrolled); /* Use scrolled height permanently */
    box-shadow: var(--navbar-shadow-scrolled); /* Permanent shadow */
    transition: none; /* No transitions needed for background/blur/shadow */
    border-bottom: 1px solid #eee; /* Standard border color */
}

.navbar-elegant .container {
    height: 100%;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Logo */
.navbar-elegant .navbar-brand { padding: 0; margin-right: auto; }
.navbar-elegant .navbar-logo { height: 40px; } /* Use scrolled height permanently */

/* Navigation Links */
.navbar-elegant .navbar-nav { gap: 8px; } /* Un peu plus d'espace */
.navbar-elegant .nav-item { margin: 0; }

.navbar-elegant .nav-link {
    color: var(--navbar-link-color); /* Standard link color */
    font-size: 15.5px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.3px;
    padding: 12px 20px !important;
    margin: 0 5px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 8px;
    transition: color var(--navbar-hover-duration) var(--navbar-hover-easing);
    background-color: transparent !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-shadow: none; /* No text shadow needed on white background */
}

/* Effet de Survol V8 - Soulignement */
.navbar-elegant .nav-link::before { /* Soulignement */
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 70%;
    height: 2px;
    background-color: var(--navbar-link-hover-color); /* Standard hover color */
    transition: transform var(--navbar-hover-duration) var(--navbar-hover-easing),
                background-color var(--navbar-hover-duration) ease;
    display: block;
}

/* Suppression de l'ancien effet ::after */
.navbar-elegant .nav-link::after {
    display: none;
}

.navbar-elegant .nav-link:hover {
    color: var(--navbar-link-hover-color); /* Standard hover color */
    transform: none; /* Pas de soulèvement */
    background-color: transparent !important;
    box-shadow: none;
}

.navbar-elegant .nav-link:hover::before {
    transform: translateX(-50%) scaleX(1); /* Le soulignement apparaît */
}

/* Active State */
.navbar-elegant .nav-link.active {
    color: var(--navbar-link-active-color); /* Standard active color */
    font-weight: 600; /* Légèrement plus gras */
    background-color: var(--primary-color-light) !important; /* Light primary background */
    transform: none;
    text-shadow: none;
}






@media (max-width: 576px) {
    .equipe-card .card-img-top, .projet-card .card-img-top {
        height: 150px;
    }
}

/* Styles pour la section Mission & Valeurs */
.mission-valeurs {
    /* Ancien background-color: #f8f9fa; */
    /* NOUVEAU FOND MULTICOUCHE */
    background-color: #282c2f; /* Couleur de secours */
    background-image: 
        /* Couche 1: Motif de points subtils pour la texture */
        radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.04) 1px, transparent 0),
        /* Couche 2: Dégradé de couleur très léger */
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.09) 0%, rgba(var(--secondary-rgb), 0.03) 100%);
    background-size: 3px 3px, 100% 100%; /* Taille pour chaque couche d'image */
    
    padding: 100px 0; /* Plus d'espace */
    width: 100%;
    position: relative;
     overflow: hidden; /* Pour contenir les effets de fond */
}





/* --- Indicateur Dropdown Simplifié (Chevron) --- */
.navbar-elegant .dropdown-toggle::after { /* Remplacer les points par un chevron */
    content: '\f282'; /* Code Bootstrap Icon pour chevron-down */
    font-family: 'bootstrap-icons';
    display: inline-block;
    vertical-align: middle;
    font-size: 0.7em; /* Taille du chevron */
    width: auto; /* Largeur auto */
    height: auto; /* Hauteur auto */
    margin-left: 8px; /* Espace après le texte */
    position: static; /* Positionnement normal */
    transition: transform 0.3s var(--navbar-transition-curve), color 0.3s ease;
    color: var(--navbar-link-color); /* Set default color */
}

/* Supprimer les anciens styles des points */
.navbar-elegant .dropdown-toggle::after::before,
.navbar-elegant .dropdown-toggle::after::after {
    display: none;
}

/* Animation au survol du LIEN dropdown (juste couleur) */
.navbar-elegant .dropdown-toggle:hover::after {
     color: var(--primary-color);
     transform: translateY(2px); /* Léger mouvement */
}

/* Transformation quand le dropdown est OUVERT (.show) */
.navbar-elegant .dropdown-toggle.show::after {
    transform: rotate(180deg); /* Rotation pour indiquer ouvert */
}

/* Dropdown Menu (styles existants semblent OK, juste vérifier cohérence) */
.navbar-elegant .dropdown-menu {
    border-radius: 10px; /* Cohérent avec les liens */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Ombre plus douce */
    padding: 10px 0;
    margin-top: 15px !important;
    animation: dropdownAppear 0.35s var(--navbar-transition-curve) forwards;
    transform: scale(0.98) translateY(5px);
}

@keyframes dropdownAppear {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.navbar-elegant .dropdown-item {
    font-size: 14.5px;
    padding: 10px 22px;
    transition: background-color 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

.navbar-elegant .dropdown-item:hover,
.navbar-elegant .dropdown-item:focus {
    background-color: var(--primary-color-light);
    color: var(--primary-color);
    padding-left: 25px;
}

/* Active Dropdown Item */
.navbar-elegant .dropdown-item.active,
.navbar-elegant .dropdown-item:active {
    background-color: transparent;
    color: var(--primary-color);
    font-weight: 600;
}

/* Social Icons V8 - Subtle Hover */
.navbar-elegant .social-icons {
    margin-left: 30px;
    gap: 0; /* Remove gap, handled by padding */
}
.navbar-elegant .social-icons a {
    color: var(--navbar-icon-color); /* Standard icon color */
    font-size: 1.1rem;
    transition: color var(--navbar-hover-duration) ease, transform var(--navbar-hover-duration) ease;
    display: inline-flex; /* Needed for circle */
    align-items: center;
    justify-content: center;
    width: 38px; /* Circle size */
    height: 38px;
    border-radius: 50%;
    position: relative;
    overflow: hidden; /* For background circle */
    text-decoration: none;
    z-index: 1;
}
.navbar-elegant .social-icons a::before { /* Background circle */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(var(--primary-rgb), 0); /* Transparent initially */
    border-radius: 50%;
    transition: transform var(--navbar-hover-duration) var(--navbar-hover-easing) 0.05s, /* Slight delay */
                opacity var(--navbar-hover-duration) var(--navbar-hover-easing),
                background-color var(--navbar-hover-duration) var(--navbar-hover-easing);
    opacity: 0;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.navbar-elegant .social-icons a:hover {
    color: var(--navbar-icon-hover-color); /* Primary color icon on hover */
    transform: translateY(-2px);
}
.navbar-elegant .social-icons a:hover::before {
    transform: scale(1);
    opacity: 1;
    background-color: var(--primary-color-light); /* Light primary circle */
}

/* Mobile Toggler */
.navbar-elegant .navbar-toggler { border: none; padding: 0; }
.navbar-elegant .navbar-toggler:focus { box-shadow: none; }
.navbar-elegant .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23343a40' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 8h22M4 15h22M4 22h22'/%3e%3c/svg%3e"); width: 24px; height: 24px; }

/* Mobile Menu */
@media (max-width: 991px) {
    .navbar-elegant {
        height: var(--navbar-height-scrolled); /* Keep scrolled height */
        /* Styles inherited from base rule now */
    }
    .navbar-elegant .container { max-width: none; padding-left: 20px; padding-right: 20px; }
    .navbar-elegant .navbar-collapse {
        position: absolute;
        top: 100%; /* Se positionne juste en dessous */
        left: 0;
        width: 100%;
        background-color: var(--white); /* Fond blanc pour le menu mobile */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #eee;
        max-height: calc(100vh - var(--navbar-height)); /* Limite la hauteur */
        overflow-y: auto;
        padding-bottom: 15px;
    }
    .navbar-elegant .navbar-nav { align-items: stretch; padding: 10px 0; gap: 0; }
    .navbar-elegant .nav-item { width: 100%; margin: 0; border-bottom: 1px solid #f1f3f5; }
    .navbar-elegant .nav-item:last-child { border-bottom: none; }
    .navbar-elegant .nav-link {
        padding: 14px 20px !important; /* Plus de padding vertical sur mobile */
        margin: 0;
        border-radius: 0;
        color: var(--navbar-link-color); /* Always use standard color */
        text-shadow: none;
        width: 100%;
        justify-content: space-between; /* Align chevron properly */
    }
    /* Supprimer soulignement sur mobile */
    .navbar-elegant .nav-link::before {
        display: none; /* Remove underline effect on mobile */
    }
     .navbar-elegant .nav-link:hover {
        color: var(--navbar-link-hover-color);
        background-color: var(--primary-color-light) !important; /* Keep hover background */
     }
     .navbar-elegant .nav-link.active {
        color: var(--navbar-link-active-color);
        background-color: var(--primary-color-light) !important; /* Keep active background */
        font-weight: 600; /* Keep active font weight */
     }

     /* Ajuster chevron dropdown mobile */
     .navbar-elegant .dropdown-toggle::after {
         color: var(--navbar-link-color); /* Keep standard color */
         font-size: 0.8em;
     }
     .navbar-elegant .dropdown-toggle.show::after {
        /* Garder la rotation */
     }

    .navbar-elegant .dropdown-menu {
        box-shadow: none;
        border-radius: 0;
        margin-top: 0 !important;
        padding: 0;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        animation: none;
        transform: none;
        opacity: 1;
        position: static;
        float: none;
        width: 100%;
        background-color: #fdfdfd; /* Fond légèrement différent pour les sous-menus */
    }
    .navbar-elegant .dropdown-item { padding: 12px 40px; font-size: 14px; }
    .navbar-elegant .dropdown-item:hover,
    .navbar-elegant .dropdown-item:focus {
         padding-left: 45px; /* Indentation au survol */
         background-color: rgba(var(--primary-rgb), 0.1);
    }
    .navbar-elegant .dropdown-item.active { font-weight: 500; } /* Moins gras sur mobile */

    .navbar-elegant .social-icons { justify-content: center; padding: 20px 0 10px 0; margin-top: 10px; border-top: 1px solid #f1f3f5; }
}

/* ============================================= */
/*      FIN Navbar Élégante v8 (Ultime)        */
/* ============================================= */

/* Styles pour la section Équipe */
.equipe {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.equipe-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.equipe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.equipe-card .card-img-top {
    height: 250px;
    object-fit: cover;
}

.equipe-card .card-body {
    padding: 20px;
}

.equipe-card .card-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.equipe-card .social-links a {
    color: #6c757d;
    transition: color 0.3s ease;
}

.equipe-card .social-links a:hover {
    color: #1198D5;
}

/* Styles pour les Projets */
.projet-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.projet-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.projet-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.projet-card .card-body {
    padding: 20px;
}

.projet-card .card-title {
    font-weight: 700;
    color: #2c3e50;
}

.projet-card .card-text {
    color: #6c757d;
    margin-bottom: 20px;
}

.projet-card .card-footer {
    background-color: rgba(0,0,0,0.03);
    padding: 10px 20px;
}

.projet-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Styles pour la section Communication */
.actualite-card, .publication-card, .rapport-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.actualite-card:hover, .publication-card:hover, .rapport-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.actualite-card .card-title, .publication-card .card-title, .rapport-card .card-title {
    font-weight: 600;
    color: #2c3e50;
}

.actualite-card .card-text, .publication-card .card-text, .rapport-card .card-text {
    color: #6c757d;
}

/* Responsive pour les sections ajoutées */
@media (max-width: 768px) {
    .equipe-card .card-img-top, .projet-card .card-img-top {
        height: 180px;
    }

    .projet-links {
        flex-direction: column;
    }

    /* DEBUT Suppression Styles Ancienne Section Communication (Media Query) */
    /*
    .actualite-card, .publication-card, .rapport-card {
        margin-bottom: 20px;
    }
    */
    /* FIN Suppression Styles Ancienne Section Communication (Media Query) */
}

@media (max-width: 576px) {
    .equipe-card .card-img-top, .projet-card .card-img-top {
        height: 150px;
    }
}

/* Styles pour la section Mission & Valeurs */
.mission-valeurs {
    background-color: #f8f9fa;
    padding: 100px 0; /* Plus d'espace */
    width: 100%;
    position: relative;
     overflow: hidden; /* Pour contenir les effets de fond */
}

.mission-valeurs .container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}

/* Partie Supérieure (Titre + Mission) */
.upper-part {
    width: 100%;
    max-width: 900px; /* Limit width for readability */
    margin-bottom: 50px;
    text-align: center;
}

.upper-part .section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem; /* Main title size */
    color: #2c3e50;
    margin-bottom: 30px;
    position: relative;
}

.upper-part .section-title::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    background: #1198D5;
    margin: 15px auto 0;
}

.mission-content-wrapper {
    position: relative; /* For dot positioning */
    margin-bottom: 20px;
}

.mission-text-container { /* Styles for the static text container */
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between vision and mission text */
}

.mission-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    padding: 0 15px; /* Add some padding */
    transition: background-color 0.3s ease;
}

.mission-text strong {
    color: #1198D5;
}

.mission-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.mission-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mission-dot.active {
    background-color: #1198D5;
}

/* Partie Inférieure (Valeurs Carrousel) */
.lower-part {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 60px; /* Plus d'espace */
}

.valeurs-title-container {
    text-align: center;
    margin-bottom: 2rem;
}

.valeurs-section-title {
    font-size: 2.6rem;
    font-weight: 700;
    color: #0e3243;
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.valeurs-section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    left: 25%;
    bottom: -10px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

/* Conteneur Bento V2 */
.valeurs-bento-container {
    width: 100%;
    max-width: 1200px; /* Limiter la largeur max */
    margin: 0 auto; /* Centrer */
    padding: 3rem 15px; /* Ajouter padding horizontal */
    position: relative;
    overflow: visible; /* Permettre aux ombres de déborder */
}

/* Effets de fond décoratifs améliorés */
.valeurs-bento-container::before {
    content: '';
    position: absolute;
    width: 450px; /* Plus grand */
    height: 450px;
    background: radial-gradient(circle, var(--primary-color-light) 0%, transparent 70%);
    top: -50px;
    left: -50px;
    border-radius: 50%;
    filter: blur(60px); /* Plus flou */
    opacity: 0.5; /* Plus subtil */
    z-index: 0;
    animation: pulse-background 12s ease-in-out infinite alternate;
}
.valeurs-bento-container::after {
    content: '';
    position: absolute;
    width: 400px; /* Plus grand */
    height: 400px;
    background: radial-gradient(circle, var(--secondary-color-light) 0%, transparent 70%);
    bottom: -50px;
    right: -50px;
    border-radius: 50%;
    filter: blur(60px); /* Plus flou */
    opacity: 0.5; /* Plus subtil */
    z-index: 0;
    animation: pulse-background 10s ease-in-out 2s infinite alternate;
}
@keyframes pulse-background { /* Peut rester similaire ou être ajusté */
    0% { opacity: 0.3; transform: scale(0.9) rotate(-10deg); }
    100% { opacity: 0.6; transform: scale(1.1) rotate(10deg); }
}

/* Grille Bento V2 */
.valeurs-bento-grid {
    display: grid;
    /* Ajuster pour potentiellement 4 colonnes sur grand écran */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 2.5rem; /* Plus d'espace */
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Carte Valeur V2 - Glassmorphism Amélioré & Interactions */
.valeur-card {
    background: rgba(255, 255, 255, 0.7); /* Moins transparent */
    backdrop-filter: blur(18px); /* Flou plus prononcé */
    -webkit-backdrop-filter: blur(18px);
    border-radius: 20px; /* Arrondi plus doux */
    padding: 2.5rem 2rem; /* Plus de padding */
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); /* Transition plus longue et douce */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); /* Ombre plus diffuse */
    position: relative;
    overflow: hidden; /* Important pour la bordure animée */
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Bordure subtile de base */
    transform-style: preserve-3d; /* Nécessaire pour rotate */
    perspective: 1200px; /* Augmenter perspective */
}

/* Pseudo-élément pour la bordure animée */
.valeur-card::before {
    content: '';
    position: absolute;
    inset: 0; /* Couvre toute la carte */
    border-radius: 20px; 
    padding: 2px; /* Épaisseur de la bordure */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-mask: /* Masque pour créer l'effet de bordure */
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; /* Technique de masquage */
            mask-composite: exclude; 
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 0; /* Derrière le contenu */
}

/* Hover State V2 */
.valeur-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(-3deg) scale(1.04); /* Inclinaison et scale ajustés */
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.12); /* Ombre plus prononcée */
    border-color: transparent; /* Cacher la bordure de base */
}

.valeur-card:hover::before { /* Afficher la bordure animée */
    opacity: 1;
}

/* Icône V2 */
.valeur-icon {
    font-size: 2.4rem; /* Plus grand */
    width: 85px; 
    height: 85px; 
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color-light), rgba(var(--secondary-rgb), 0.15)); /* Dégradé subtil */
    color: var(--primary-color);
    border-radius: 50%;
    margin-bottom: 1.8rem; /* Plus d'espace */
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 18px rgba(var(--primary-rgb), 0.12),
                inset 0 -3px 5px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 2;
}

/* Effet Parallaxe & Animation Icône Hover V2 */
.valeur-card:hover .valeur-icon {
    transform: scale(1.15) translateY(-10px) rotate(-10deg) translateZ(20px); /* Mouvement Parallaxe et Animation */
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 15px 25px rgba(var(--primary-rgb), 0.2);
}

/* Titre V2 */
.valeur-card h4 {
    font-size: 1.6rem; /* Plus grand */
    font-weight: 600;
    margin-bottom: 0.8rem; /* Moins d'espace avant la description */
    color: var(--heading-color);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5); /* Légère ombre pour lisibilité */
}

/* Effet Parallaxe Titre Hover V2 */
.valeur-card:hover h4 {
    transform: translateY(-5px) translateZ(10px); /* Mouvement Parallaxe */
    color: var(--primary-color); /* Changement de couleur plus marqué */
    text-shadow: none;
}

/* Suppression de l'ancienne ligne sous le titre */
.valeur-card h4::after {
   display: none;
}

/* Description V2 */
.valeur-card p {
    color: var(--text-color);
    font-size: 0.98rem; /* Légèrement plus grand */
    line-height: 1.65; /* Meilleure lisibilité */
    margin-top: 0.5rem; /* Espace après le titre */
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 2;
    flex-grow: 1; /* Assure que le texte pousse vers le bas */
}

/* Effet Parallaxe Description Hover V2 */
.valeur-card:hover p {
    transform: translateZ(5px); /* Léger effet de profondeur */
    color: #333; /* Un peu plus sombre pour contraster */
}

/* Responsive V2 */
@media (max-width: 992px) {
    .valeurs-bento-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 2rem;
    }
    .valeur-card { padding: 2rem 1.5rem; }
}

@media (max-width: 768px) {
    .valeurs-bento-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
    }
    .valeur-icon { width: 75px; height: 75px; font-size: 2.2rem; margin-bottom: 1.5rem; }
    .valeur-card h4 { font-size: 1.4rem; }
    .valeur-card p { font-size: 0.95rem; }
    .valeur-card { padding: 2rem; }
}

@media (max-width: 576px) {
    .valeurs-bento-grid {
        grid-template-columns: 1fr; /* Une colonne sur mobile */
        gap: 1.8rem;
    }
     .valeur-card {
        backdrop-filter: blur(12px); /* Moins de flou sur mobile si performance faible */
        -webkit-backdrop-filter: blur(12px);
     }
}

/* Suppression des anciens styles de carousel (confirmé) */
.valeurs-carousel-wrapper,
.valeurs-container,
.valeurs-control,
.valeurs-pagination {
    display: none !important; 
}

/* ============================================= */
/*    FIN Section Valeurs Cristallines V2      */
/* ============================================= */

/* ============================================= */
/*          STYLES PAGE SERVICE EXPERTISE        */
/* ============================================= */

body {
    /* Ajout de padding-top pour compenser la navbar fixe */
    padding-top: 70px; /* Ajustez cette valeur si la hauteur de votre navbar change */
}

.service-hero {
    padding: 100px 0 60px 0; /* Ajustement du padding */
    /* Suggestion: Ajoutez une image de fond pertinente ici via CSS */
    /* background: linear-gradient(rgba(17, 152, 213, 0.05), rgba(255, 255, 255, 0)), url('../images/expertise-bg.jpg') no-repeat center center; */
    background-color: var(--light-bg); /* Fallback si pas d'image */
    background-size: cover;
    color: var(--dark-color);
    text-align: center;
    border-bottom: 1px solid #eee;
}

.service-hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.service-hero p.lead {
    font-size: 1.3rem;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto 1rem auto;
}

.breadcrumb-nav {
    background-color: var(--white);
    padding: 0.75rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    position: sticky; /* Optionnel: rendre le fil d'ariane collant */
    top: 70px; /* Doit correspondre au padding-top du body si sticky */
    z-index: 999;
}

.breadcrumb-nav .breadcrumb {
    margin-bottom: 0;
}
.breadcrumb-nav .breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}
.breadcrumb-nav .breadcrumb-item a:hover {
    text-decoration: underline;
}
.breadcrumb-nav .breadcrumb-item.active {
    color: var(--text-color);
}


.service-section {
    padding: 70px 0; /* Espacement augmenté */
}
.service-section.bg-light {
    background-color: var(--light-bg);
}
.service-section.bg-white {
    background-color: var(--white);
}

.service-section h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 45px; /* Espacement augmenté */
    text-align: center;
    position: relative;
    padding-bottom: 20px; /* Espacement augmenté */
}

.service-section h2::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    bottom: 0;
    left: calc(50% - 30px);
 }

 .service-content img.img-fluid {
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12); /* Ombre améliorée */
    margin-bottom: 20px;
    transition: transform 0.3s ease;
 }
 .service-content img.img-fluid:hover {
    transform: scale(1.03); /* Léger zoom au survol */
 }

 .key-points-list {
    list-style: none;
    padding-left: 0;
 }
 .key-points-list li {
    display: flex;
    align-items: flex-start; /* Align icon top */
    margin-bottom: 1.8rem; /* Espacement augmenté */
    font-size: 1.05rem;
    color: var(--text-color);
    line-height: 1.7; /* Ligne height augmentée */
 }
.key-points-list i {
    font-size: 1.7rem; /* Icon size */
    color: var(--secondary-color);
    margin-right: 18px; /* Espacement augmenté */
    margin-top: 2px; /* Align icon vertically */
    flex-shrink: 0; /* Prevent icon shrinking */
    transition: transform 0.3s ease;
}
.key-points-list li:hover i {
    transform: scale(1.1) rotate(-5deg); /* Animation icône */
}

.call-to-action-service {
    background-color: var(--primary-color-light);
    padding: 60px 0;
    text-align: center;
}
 .call-to-action-service h3 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.8rem; /* Taille augmentée */
    margin-bottom: 1rem;
 }
 .call-to-action-service p {
    font-size: 1.1rem; /* Taille augmentée */
    color: var(--text-color);
 }
 .btn-contact-service {
    background-color: var(--secondary-color);
    color: white;
    padding: 14px 30px; /* Padding augmenté */
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block; /* Needed for transform */
    font-size: 1.1rem; /* Taille augmentée */
 }
 .btn-contact-service:hover {
     background-color: #3a8f40; /* Darker secondary color */
     color: white;
     transform: translateY(-4px) scale(1.02); /* Effet hover amélioré */
     box-shadow: 0 8px 20px rgba(var(--secondary-rgb), 0.3); /* Ombre hover améliorée */
 }

 /* Ajustements responsives pour la page service */
 @media (max-width: 991px) {
    .service-content .row .col-lg-5 img,
    .service-content .row .col-lg-6 img {
         margin-top: 30px;
    }
    .key-points-list li {
        margin-bottom: 1.5rem;
    }
 }

 @media (max-width: 768px) {
    body {
        padding-top: 60px; /* Ajuster si la navbar mobile est plus petite */
    }
    .service-hero {
        padding: 80px 0 50px 0;
    }
    .service-hero h1 {
        font-size: 2.5rem;
    }
    .service-hero p.lead {
        font-size: 1.2rem;
    }
    .service-section {
        padding: 50px 0;
    }
     .service-section h2 {
        font-size: 1.8rem;
        margin-bottom: 35px;
     }
    .key-points-list li {
        font-size: 1rem;
    }
    .call-to-action-service h3 {
        font-size: 1.6rem;
    }
    .call-to-action-service p {
        font-size: 1rem;
    }
    .btn-contact-service {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .service-hero h1 {
        font-size: 2.2rem;
    }
    .service-hero p.lead {
        font-size: 1.1rem;
    }
 } 

/* ============================================= */
/*      Section Services Interactifs V1        */
/* ============================================= */

.services-interactive-section {
    /* Utilise bg-light par défaut, peut être surchargé */
    overflow: hidden; /* Pour les ombres colorées */
    position: relative;
}

.services-interactive-section::before { /* Effet de fond subtil */
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.05) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.7;
    z-index: 0;
}
.services-interactive-section::after { /* Effet de fond subtil */
    content: '';
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.05) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.7;
    z-index: 0;
}


.services-interactive-section .container {
    position: relative;
    z-index: 1;
}

.service-card-interactive {
    background-color: var(--white);
    border-radius: 15px;
    padding: 35px 30px;
    text-align: center;
    transition: transform 0.4s var(--navbar-hover-easing),
                box-shadow 0.4s var(--navbar-hover-easing);
    position: relative;
    overflow: hidden; /* Pour l'ombre interne */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%; /* Assure que toutes les cartes ont la même hauteur */
}

.service-card-interactive .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permet au contenu de remplir la carte */
    align-items: center; /* Centre le contenu horizontalement */
    position: relative;
    z-index: 2; /* Au-dessus de l'ombre interne */
}

.service-icon-wrapper {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: transform 0.4s var(--navbar-hover-easing),
                background-color 0.4s ease;
    position: relative; /* Pour le pseudo-élément brillant */
}

.service-icon {
    font-size: 2.2rem;
    transition: color 0.4s ease;
}

/* Couleurs spécifiques par carte */
.service-card-interactive.card-1 .service-icon-wrapper { background-color: var(--primary-color-light); }
.service-card-interactive.card-1 .service-icon { color: var(--primary-color); }
.service-card-interactive.card-1:hover { box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.18); }

.service-card-interactive.card-2 .service-icon-wrapper { background-color: var(--secondary-color-light); }
.service-card-interactive.card-2 .service-icon { color: var(--secondary-color); }
.service-card-interactive.card-2:hover { box-shadow: 0 20px 40px rgba(var(--secondary-rgb), 0.18); }

/* Ajouter des couleurs pour card-3 et card-4 (peut être des variations) */
.service-card-interactive.card-3 .service-icon-wrapper { background-color: rgba(255, 193, 7, 0.1); } /* Jaune léger */
.service-card-interactive.card-3 .service-icon { color: #ffc107; }
.service-card-interactive.card-3:hover { box-shadow: 0 20px 40px rgba(255, 193, 7, 0.18); }

.service-card-interactive.card-4 .service-icon-wrapper { background-color: rgba(108, 117, 125, 0.1); } /* Gris léger */
.service-card-interactive.card-4 .service-icon { color: #6c757d; }
.service-card-interactive.card-4:hover { box-shadow: 0 20px 40px rgba(108, 117, 125, 0.18); }

.service-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 15px;
    transition: color 0.4s ease;
}

.service-description {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px; /* Espace avant le lien */
    flex-grow: 1; /* Pousse le lien en bas */
}

.service-link-indicator {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.service-link-indicator i {
    transition: transform 0.3s ease;
}

/* Effets Hover */
.service-card-interactive:hover {
    transform: translateY(-12px) scale(1.03);
}

.service-card-interactive:hover .service-icon-wrapper {
    transform: scale(1.1) rotate(-8deg);
}
.service-card-interactive.card-1:hover .service-icon-wrapper { background-color: var(--primary-color); }
.service-card-interactive.card-2:hover .service-icon-wrapper { background-color: var(--secondary-color); }
.service-card-interactive.card-3:hover .service-icon-wrapper { background-color: #ffc107; }
.service-card-interactive.card-4:hover .service-icon-wrapper { background-color: #6c757d; }

.service-card-interactive:hover .service-icon {
    color: var(--white);
}

.service-card-interactive:hover .service-title {
    color: var(--primary-color); /* Ou une couleur spécifique par carte */
}

.service-card-interactive:hover .service-link-indicator {
    opacity: 1;
    transform: translateY(0);
}

.service-card-interactive:hover .service-link-indicator i {
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1199px) { /* Ajustement pour XL */
    .service-card-interactive { padding: 30px 25px; }
    .service-title { font-size: 1.3rem; }
}
@media (max-width: 767px) { /* Ajustement pour MD */
    .service-card-interactive { padding: 25px 20px; }
    .service-title { font-size: 1.2rem; }
    .service-icon-wrapper { width: 65px; height: 65px; margin-bottom: 20px;}
    .service-icon { font-size: 2rem; }
    .service-description { font-size: 0.9rem; }
}

/* ============================================= */
/*    FIN Section Services Interactifs V1      */
/* ============================================= */

/* ============================================= */
/*      Section Constellation Projets V1       */
/* ============================================= */

.constellation-projets-section {
    background-color: var(--primary-color-dark); /* Utiliser le bleu foncé pour plus de profondeur */
    padding: 100px 0;
    color: var(--white);
    z-index: 1; /* Pour être au-dessus des éléments standards */
}

/* --- Fond Animé --- */
.constellation-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Derrière le contenu mais devant le fond de base */
    pointer-events: none; /* Ne pas interférer avec la souris */
}
.constellation-background path {
    stroke-dasharray: 1000; /* Pour animation potentielle de dessin */
    stroke-dashoffset: 1000;
    animation: draw-line 20s linear infinite alternate; /* Animation lente de dessin/effacement */
}
@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}

/* Particules Lumineuses */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(var(--secondary-rgb),0.5) 100%);
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.6);
    z-index: -1;
    pointer-events: none;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    /* Utilisation de offset-path pour suivre les chemins SVG */
    offset-rotate: auto; /* Orienter la particule selon le chemin */
}
.sparkle1 {
    offset-path: path('M0 20 C 20 40, 80 60, 100 80');
    animation-name: move-sparkle1;
    animation-duration: 15s;
    animation-delay: -7s; /* Décalage initial */
}
.sparkle2 {
    offset-path: path('M100 10 C 80 30, 20 70, 0 90');
    animation-name: move-sparkle2;
    animation-duration: 18s;
    animation-delay: -3s;
}

@keyframes move-sparkle1 {
    0% { offset-distance: 0%; opacity: 0.5; }
    25% { opacity: 1; }
    75% { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0.5; }
}
@keyframes move-sparkle2 {
     0% { offset-distance: 0%; opacity: 0.4; }
    30% { opacity: 0.9; }
    70% { opacity: 0.9; }
    100% { offset-distance: 100%; opacity: 0.4; }
}
/* Note: offset-path peut nécessiter un support navigateur variable ou un polyfill */

/* En-tête */
.constellation-projets-section .text-secondary { color: var(--secondary-color) !important; } /* Forcer la couleur secondaire */

/* Grille Asymétrique */
.projets-grid {
    display: grid;
    /* 3 colonnes par défaut, ajustement pour la mosaïque */
    grid-template-columns: repeat(3, 1fr); 
    grid-auto-rows: minmax(200px, auto); /* Hauteur de ligne minimale */
    gap: 2rem;
}

/* Style pour créer la mosaïque (exemple: certains éléments plus grands) */
.projets-grid .carte-nebuleuse:nth-child(4n+1) {
    grid-column: span 2; /* Prend 2 colonnes */
    grid-row: span 1;
}
.projets-grid .carte-nebuleuse:nth-child(4n+3) {
    grid-row: span 2; /* Prend 2 lignes */
    grid-column: span 1;
}
/* Styles par défaut pour les autres */
.projets-grid .carte-nebuleuse {
    grid-column: span 1;
    grid-row: span 1;
}


/* Carte Nébuleuse */
.carte-nebuleuse {
    position: relative;
    border-radius: 15px; /* Arrondi standard */
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.5s var(--navbar-hover-easing), box-shadow 0.5s var(--navbar-hover-easing);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background-color: rgba(var(--primary-rgb), 0.1); /* Fond très léger */
     min-height: 280px; /* Hauteur minimale pour éviter l'écrasement */
     display: flex; /* Pour s'assurer que l'image remplit bien */
     flex-direction: column;
}

.carte-nebuleuse::before { /* Pseudo-élément pour l'effet "bord coupé" (optionnel) */
    /* content: '';
    position: absolute;
    bottom: -30px; right: -30px;
    width: 80px; height: 80px;
    background-color: var(--primary-color-dark);
    transform: rotate(45deg);
    z-index: 0; */
}

.carte-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1s ease-out, filter 0.5s ease;
    transform: scale(1.05); /* Léger zoom initial */
    z-index: 1;
    filter: brightness(0.8) saturate(1.1); /* Assombrir légèrement */
}

.carte-nebuleuse:hover .carte-image {
    transform: scale(1); /* Dézoomer légèrement */
    filter: brightness(0.5); /* Assombrir plus pour voir le contenu */
}

.carte-overlay { /* Dégradé pour la lisibilité du texte */
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 70%;
    background: linear-gradient(to top, rgba(var(--primary-rgb), 0.85) 0%, transparent 100%);
    z-index: 2;
    transition: opacity 0.5s ease;
}
.carte-nebuleuse:hover .carte-overlay {
    opacity: 0.95; /* Renforcer au survol */
}


.carte-contenu-superpose {
    position: absolute;
    bottom: 0; left: 0;
    padding: 1.8rem 1.5rem; /* Padding */
    z-index: 3;
    color: var(--white);
    width: 100%;
    transition: transform 0.5s var(--navbar-hover-easing);
}

.statut-projet {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute; /* Positionner en haut à droite */
    top: 1rem;
    right: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.carte-nebuleuse.status-en-cours .statut-projet {
    background-color: rgba(var(--secondary-rgb), 0.8);
    color: var(--white);
    box-shadow: 0 0 10px rgba(var(--secondary-rgb), 0.5);
}
.carte-nebuleuse.status-acheve .statut-projet {
    background-color: rgba(108, 117, 125, 0.8); /* Gris */
    color: #e9ecef;
}
.carte-nebuleuse:hover .statut-projet {
     background-color: var(--white);
     color: var(--primary-color-dark);
     box-shadow: none;
}

.titre-projet {
        font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.description-projet-court {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    display: -webkit-box; /* Troncature multi-lignes */
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.icone-principale {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.4s ease, transform 0.4s var(--navbar-hover-easing);
}
.carte-nebuleuse:hover .icone-principale {
    color: rgba(var(--secondary-rgb), 0.5);
    transform: scale(1.2) rotate(10deg);
}

/* Liens spécifiques (Hover) */
.liens-projet {
    position: absolute;
    top: 50%; /* Centré verticalement */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    display: flex;
    gap: 1.5rem;
    opacity: 0;
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
    pointer-events: none; /* Non cliquable initialement */
}

.carte-nebuleuse:hover .liens-projet {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1.1);
}

.lien-icon {
    color: var(--white);
    background-color: rgba(var(--secondary-rgb), 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.lien-icon:hover {
    background-color: var(--secondary-color);
    transform: scale(1.15) rotate(-5deg);
    color: var(--white);
}
/* Styles spécifiques si besoin pour actu, rapport, pub */
.lien-icon.lien-rapport { background-color: rgba(255, 193, 7, 0.8); } /* Jaune */
.lien-icon.lien-rapport:hover { background-color: #ffc107; }
.lien-icon.lien-pub { background-color: rgba(108, 117, 125, 0.8); } /* Gris */
.lien-icon.lien-pub:hover { background-color: #6c757d; }

/* Cacher les liens non pertinents par défaut (via HTML ou ici) */
.carte-nebuleuse.status-en-cours .lien-rapport,
.carte-nebuleuse.status-en-cours .lien-pub {
    display: none;
}
/* Assurer que les liens Achevé sont visibles (si pas géré en HTML) */
.carte-nebuleuse.status-acheve .lien-rapport,
.carte-nebuleuse.status-acheve .lien-pub {
    /* display: flex; /* Ou inline-flex selon le besoin */
}


/* Responsive pour la grille projet */
@media (max-width: 992px) {
    .projets-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes */
        gap: 1.8rem;
    }
    /* Réinitialiser la mosaïque pour 2 colonnes */
    .projets-grid .carte-nebuleuse:nth-child(4n+1),
    .projets-grid .carte-nebuleuse:nth-child(4n+3),
    .projets-grid .carte-nebuleuse {
        grid-column: span 1;
        grid-row: span 1;
    }
    /* Option: Rendre certains éléments pleine largeur */
     .projets-grid .carte-nebuleuse:nth-child(3n+1) {
        grid-column: span 2;
    }
    .titre-projet { font-size: 1.3rem; }
}

@media (max-width: 767px) {
    .projets-grid {
        grid-template-columns: 1fr; /* 1 colonne */
        gap: 2rem;
    }
     /* Réinitialiser la mosaïque pour 1 colonne */
    .projets-grid .carte-nebuleuse:nth-child(3n+1) {
        grid-column: span 1;
    }
    .constellation-projets-section .display-4 { font-size: 2.5rem; } /* Ajuster titre section */
    .carte-contenu-superpose { padding: 1.5rem 1.2rem; }
    .titre-projet { font-size: 1.2rem; }
    .liens-projet { gap: 1rem; }
    .lien-icon { width: 45px; height: 45px; font-size: 1.1rem; }
}

/* ============================================= */
/*    FIN Section Constellation Projets V1     */
/* ============================================= */

/* ============================================= */
/*        Section Portail Cinétique V1         */
/* ============================================= */

.kinetic-portal-section {
    background-color: #1198D5; /* Couleur Resiwell conservée */
    min-height: 70vh; /* Hauteur minimale */
    padding: 120px 0; /* Espacement vertical */
    display: flex; /* Centrage vertical/horizontal */
    align-items: center;
    justify-content: center;
    color: var(--white);
}

/* --- Formes animées en arrière-plan --- */
.background-shapes {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Lignes fines blanches */
    background-color: rgba(255, 255, 255, 0.02); /* Très léger fond */
    border-radius: 30%; /* Formes organiques */
    animation: float 20s ease-in-out infinite alternate;
}
.shape-1 {
    width: 300px; height: 300px;
    top: 10%; left: 5%;
    transform: rotate(45deg);
    animation-duration: 22s;
}
.shape-2 {
    width: 200px; height: 200px;
    bottom: 15%; right: 10%;
    transform: rotate(-30deg);
     animation-duration: 18s;
     animation-delay: -5s;
}
.shape-3 {
    width: 150px; height: 150px;
    top: 20%; right: 25%;
    transform: rotate(60deg);
    animation-duration: 25s;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(var(--initial-rotate, 0deg)); opacity: 0.5; }
    100% { transform: translateY(-40px) rotate(calc(var(--initial-rotate, 0deg) + 20deg)); opacity: 0.8; }
}
/* Ajuster la rotation initiale via style inline ou plus de classes si besoin */
.shape-1 { --initial-rotate: 45deg; }
.shape-2 { --initial-rotate: -30deg; }
.shape-3 { --initial-rotate: 60deg; }

/* Contenu centré */
.kinetic-portal-section .container {
    z-index: 1;
}

/* Titre Cinétique */
.kinetic-title {
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}
.kinetic-title .word {
    display: inline-block; /* Nécessaire pour transform */
    opacity: 0;
    transform: translateY(30px) rotateX(-40deg);
    animation: word-appear 0.8s cubic-bezier(0.215, 0.610, 0.355, 1) forwards;
    animation-delay: calc(var(--word-index) * 0.15s + 0.3s); /* Délai basé sur l'index du mot + délai global AOS */
}

@keyframes word-appear {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* Description */
.description {
    /* Apparition gérée par AOS (fade-up) */
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

/* --- Appel à l'Action "Portail" --- */
.cta-portal {
    display: inline-flex; /* Pour centrer et gérer la taille */
    align-items: center;
    justify-content: center;
    position: relative;
    width: 70px; /* Taille initiale du cercle */
    height: 70px;
    background-color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    transition: width 0.5s cubic-bezier(0.77, 0, 0.175, 1), /* Transition largeur rapide */
                background-color 0.3s ease,
                box-shadow 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden; /* Cacher le texte initialement */
    animation: pulse-portal 2.5s ease-in-out infinite; /* Pulsation légère */
}

@keyframes pulse-portal {
    0% { transform: scale(1); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); }
    50% { transform: scale(1.05); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2); }
    100% { transform: scale(1); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); }
}

.cta-icon {
    color: var(--primary-color);
        font-size: 1.8rem;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1),
                opacity 0.3s ease;
    position: absolute; /* Pour permettre au texte de prendre la place */
    opacity: 1;
}

.cta-text {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0; /* Caché initialement */
    white-space: nowrap; /* Empêcher le retour à la ligne */
    transition: opacity 0.3s ease 0.2s; /* Apparaît avec délai */
    position: absolute; /* Pour ne pas affecter la taille initiale */
}

/* --- Hover State du CTA --- */
.cta-portal:hover {
    width: 280px; /* Largeur étendue en pilule */
    border-radius: 50px; /* Rayon pour la pilule */
    background-color: var(--white);
    animation-play-state: paused; /* Arrêter la pulsation */
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.cta-portal:hover .cta-icon {
    opacity: 0; /* Cacher l'icône */
    transform: scale(0.5) rotate(-45deg); /* Animation de disparition */
}

.cta-portal:hover .cta-text {
    opacity: 1; /* Afficher le texte */
    position: relative; /* Le texte prend sa place normale */
}

/* Responsive */
@media (max-width: 767px) {
    .kinetic-portal-section {
        min-height: 60vh;
        padding: 80px 0;
    }
    .kinetic-title {
        font-size: 2.5rem; /* Ajuster taille titre */
    }
    .description {
        font-size: 1rem;
    }
    .cta-portal {
        width: 60px; height: 60px;
    }
    .cta-icon { font-size: 1.5rem; }
    .cta-portal:hover {
        width: 240px;
    }
    .cta-text { font-size: 1rem; }

    .shape-1 { width: 200px; height: 200px; }
    .shape-2 { width: 150px; height: 150px; }
    .shape-3 { width: 100px; height: 100px; }
}

/* ============================================= */
/*       FIN Section Portail Cinétique V1      */
/* ============================================= */

/* Style pour le bouton "Voir Tous les Projets" */
.btn-voir-projets {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-width: 2px;
}

.btn-voir-projets:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(var(--secondary-rgb), 0.2);
}

/* ============================================= */
/*              Styles Section Footer          */
/* ============================================= */

.footer-section {
    background-color: #f8f9fa; /* Gris très clair */
    color: var(--text-color);
    padding: 60px 0 20px 0;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
    padding: 0 15px; /* Pour petits écrans */
}

.footer-logo {
    flex-basis: 150px; /* Base pour le logo */
    margin-bottom: 20px;
}

.footer-logo-img {
    max-width: 100%;
    height: auto;
}

.footer-text {
    flex: 1;
    min-width: 250px; /* Empêche d'être trop écrasé */
}

.footer-text h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 15px;
}

.footer-text p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    flex-basis: 180px; /* Base pour les liens */
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin: 0 15px 40px 15px; /* Pour petits écrans */
    max-width: 600px; /* Limiter la largeur */
    margin-left: auto;
    margin-right: auto;
}

.footer-contact-form h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: var(--heading-color);
}

.footer-contact-form input[type="text"],
.footer-contact-form input[type="email"],
.footer-contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.footer-contact-form input[type="text"]:focus,
.footer-contact-form input[type="email"]:focus,
.footer-contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
    outline: none;
}

.footer-contact-form textarea {
    resize: vertical; /* Permet redimensionnement vertical */
    min-height: 100px;
}

.footer-contact-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: block;
    width: 100%;
    font-size: 1rem;
}

.footer-contact-form button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

.footer-responsibility {
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 20px;
    padding: 0 15px;
}

.footer-bottom {
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #6c757d;
}

/* Media Queries pour le Footer */
@media (min-width: 768px) {
    .footer-content, .footer-contact-form, .footer-responsibility {
        padding: 0; /* Supprimer padding latéral sur grand écran */
        margin-left: auto;
        margin-right: auto;
        max-width: 1140px; /* Correspond au container Bootstrap xl */
    }
    .footer-content {
         max-width: 1140px;
         padding: 0 15px; /* Utilisation du container */
    }
    .footer-contact-form {
         margin-left: auto;
         margin-right: auto;
         max-width: 600px;
    }
}

@media (max-width: 767px) {
    .footer-content {
        flex-direction: column; /* Empiler sur mobile */
        align-items: center; /* Centrer les items */
        text-align: center;
    }
    .footer-logo,
    .footer-text,
    .footer-links {
        flex-basis: auto; /* Reset flex-basis */
        width: 100%;
        max-width: 400px; /* Limiter largeur contenu texte */
        margin-bottom: 30px;
    }
    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
     .footer-links li {
         margin-bottom: 0;
     }
} 

/* ============================================= */
/*      Styles Section Communication Condensée   */
/*                 (V2 - "500x" Design)        */
/* ============================================= */

.communication-condensed-section {
    position: relative;
    overflow: hidden; /* Pour les effets de fond */
    padding-top: var(--ec-section-padding, 6rem); /* Assurer un padding cohérent */
    padding-bottom: var(--ec-section-padding, 6rem);
    background-color: var(--light-bg, #f8f9fa); /* Fond clair */
}

/* Effet de fond subtil (Optionnel) */
.communication-condensed-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--primary-rgb, 17, 152, 213), 0.04) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.8;
    z-index: 0;
}

.communication-condensed-section .container {
    position: relative; /* Pour être au-dessus du ::before */
    z-index: 1;
}

/* Utiliser les styles .section-tagline et .section-title-ec définis précédemment */
/* Si non définis, ajouter ici : */
.section-tagline {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--primary-color-light);
    padding: 6px 15px;
    border-radius: 50px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.section-title-ec {
    font-size: calc(1.8rem + 0.8vw); /* Responsive */
    font-weight: 700;
    color: var(--heading-color, #222);
    line-height: 1.3;
}

.condensed-card {
    background: var(--white);
    border-radius: 20px; /* Arrondi plus prononcé */
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05); /* Ombre plus douce */
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
                box-shadow 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid transparent; /* Bordure transparente initialement */
    transform-style: preserve-3d; /* Pour effet 3D */
    perspective: 1500px; /* Perspective pour l'effet 3D */
    cursor: pointer;
}

.condensed-card:hover {
    transform: translateY(-12px) rotateX(4deg) rotateY(-3deg) scale(1.03); /* Effet 3D plus marqué */
    box-shadow: 0 20px 50px rgba(var(--primary-rgb, 17, 152, 213), 0.18); /* Ombre colorée au survol */
    border-color: rgba(var(--primary-rgb, 17, 152, 213), 0.3); /* Bordure subtile au survol */
}

.card-category {
    position: absolute;
    top: 18px;
    left: -5px; /* Légèrement décalé pour effet ruban */
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--white);
    padding: 6px 15px 6px 20px;
    z-index: 3; /* Au-dessus de l'image */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-top-right-radius: 50px;
    border-bottom-right-radius: 50px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.4s ease;
}

.condensed-card:hover .card-category {
    transform: translateX(5px); /* Petit mouvement au survol */
}

/* Couleurs spécifiques des catégories */
.card-category.category-actualite { background: linear-gradient(135deg, var(--primary-color, #1198D5), var(--primary-color-dark, #0a7cb5)); }
.card-category.category-publication { background: linear-gradient(135deg, var(--tertiary-color, #ffc107), #e0a800); color: var(--heading-color, #222); }
.card-category.category-rapport { background: linear-gradient(135deg, var(--secondary-color, #4CAF50), #3e8e41); }

.card-img-top-condensed {
    height: 210px; /* Légèrement plus haut */
    width: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.5s ease;
    filter: brightness(1); /* Image normale par défaut */
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* Ligne fine sous l'image */
}

.condensed-card:hover .card-img-top-condensed {
    transform: scale(1.1); /* Zoom plus prononcé */
    filter: brightness(0.95); /* Assombrir légèrement */
}

/* Suppression de l'overlay ::after sur l'image, géré par filter */
/* .card-img-top-condensed::after { ... } */

.card-body-condensed {
    padding: 1.8rem; /* Plus d'espace interne */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, var(--white) 95%, #fdfdfd 100%); /* Très léger dégradé */
}

.card-date {
    font-size: 0.78rem; /* Plus petit */
    color: #aaa; /* Plus discret */
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.card-title-condensed {
    font-family: var(--font-primary, 'Montserrat', sans-serif); /* Utiliser police primaire */
    font-size: 1.25rem; /* Plus impactant */
    font-weight: 700; /* Plus gras */
    color: var(--heading-color, #222);
    margin-bottom: 0.8rem;
    line-height: 1.35;
    transition: color 0.3s ease;
}

.condensed-card:hover .card-title-condensed {
    color: var(--primary-color, #1198D5);
}

.card-text-condensed {
    font-size: 0.92rem; /* Légèrement plus grand */
    color: var(--text-color, #555);
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 1.5rem; /* Plus d'espace avant footer */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limiter à 3 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer-condensed {
    padding: 1rem 1.8rem;
    background-color: transparent; /* Intégré au body */
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: auto; /* Pousse le footer en bas */
}

.btn-voir-plus {
    font-size: 0.9rem;
    font-weight: 700; /* Plus affirmé */
    color: var(--primary-color, #1198D5);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    position: relative; /* Pour le pseudo-élément */
    padding-right: 20px; /* Espace pour l'icône animée */
}

.btn-voir-plus i {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0; /* Supprimé */
    transition: transform 0.3s cubic-bezier(0.215, 0.610, 0.355, 1), opacity 0.3s ease;
    opacity: 0.8;
}

.btn-voir-plus:hover {
    color: var(--primary-color-dark, #0a7cb5);
}

.btn-voir-plus:hover i {
    transform: translateY(-50%) translateX(5px) scale(1.1); /* Animation plus complexe */
    opacity: 1;
}


/* Bouton principal de la section - Amélioré */
.communication-condensed-section .btn-primary {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color, #1198D5), var(--primary-color-dark, #0a7cb5));
    border: none;
}

.communication-condensed-section .btn-primary:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 25px rgba(var(--primary-rgb, 17, 152, 213), 0.3);
    background: linear-gradient(135deg, var(--primary-color-dark, #0a7cb5), var(--primary-color, #1198D5));
}

.communication-condensed-section .btn-primary i {
    transition: transform 0.3s ease;
}

.communication-condensed-section .btn-primary:hover i {
    transform: rotate(10deg) scale(1.1);
}


/* Responsive (Ajustements fins) */
@media (max-width: 991px) {
    .card-img-top-condensed {
        height: 190px;
    }
    .card-title-condensed {
        font-size: 1.15rem;
    }
}

@media (max-width: 767px) {
    .condensed-card {
        margin-bottom: 1.5rem;
    }
    .card-img-top-condensed {
        height: 180px;
    }
    .card-body-condensed {
        padding: 1.5rem;
    }
    .card-footer-condensed {
        padding: 0.8rem 1.5rem;
    }
    .btn-voir-plus {
        font-size: 0.85rem;
    }
    .section-title-ec {
        font-size: calc(1.6rem + 0.8vw); /* Ajuster pour mobile */
    }
}

/* ... (Styles après) ... */