:root {
    --cnrp-blue: #0088cc;
    --cnrp-dark: #2c3e50;
    --cnrp-light: #f4f7f6;
    --text-grey: #6c757d;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: var(--cnrp-dark);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.text-primary {
    color: #0088cc !important;
}

.bg-primary {
    background-color: #0088cc !important;
}
/* --- NAVBAR CORRIGÉE (VERSION FINALE) --- */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.brand-text {
    color: #1e293b;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.brand-sub {
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cnrp-blue);
}

/* --- GESTION DES LIENS DU MENU --- */
.nav-link {
    font-weight: 600;
    color: #4b5563 !important;
    margin: 0 10px;
    font-size: 0.95rem;
    position: relative;
    padding: 8px 0;
    display: inline-block;
}

    .nav-link:hover,
    .nav-link.active {
        color: var(--cnrp-blue) !important;
    }

    /* CAS 1 : Liens simples (Accueil, Activités...) -> On utilise ::after pour souligner */
    .nav-link:not(.dropdown-toggle)::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: var(--cnrp-blue);
        transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        border-radius: 2px;
    }

    /* Animation au survol pour liens simples */
    .nav-link:not(.dropdown-toggle):hover::after,
    .nav-link:not(.dropdown-toggle).active::after {
        width: 100%;
    }

    /* CAS 2 : Liens Dropdown (Laboratoires...) -> On utilise ::before pour souligner */
    /* Cela évite le conflit avec la flèche qui utilise ::after */
    .nav-link.dropdown-toggle::before {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 0;
        background-color: var(--cnrp-blue);
        transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        border-radius: 2px;
    }

/* Animation au survol pour dropdowns */
.nav-item.dropdown:hover .nav-link.dropdown-toggle::before {
    width: 100%;
    /* Souligne tout le mot */
}

/* --- GESTION DE LA FLÈCHE (ARROW) --- */
.dropdown-toggle::after {
    /* On garde les styles Bootstrap par défaut pour la forme de la flèche */
    display: inline-block;
    margin-left: 0.4em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    /* Seule la rotation est animée ici */
    transition: transform 0.3s ease;
}

/* Rotation propre de la flèche au survol (Desktop seulement) */
@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
        /* Demi-tour propre */
    }
}

/* --- BOUTON CONTACT --- */
.btn-header {
    background-color: var(--cnrp-blue);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    padding: 10px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    line-height: 1;
}

    .btn-header:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
        background-color: #0077b3;
    }

    .btn-header i {
        transition: transform 0.3s;
        margin-left: 8px;
    }

    .btn-header:hover i {
        transform: translateX(4px);
    }


/* --- DROPDOWN MENU (Largeur & Survol) --- */
.dropdown-menu {
    border-radius: 12px;
    padding: 10px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    white-space: normal !important;
}

.dropdown-item {
    padding: 10px 20px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    color: #4b5563;
}

    .dropdown-item:hover {
        background-color: #f0f9ff;
        color: var(--cnrp-blue);
    }

.icon-small-bg {
    width: 35px;
    height: 35px;
    background: #e0f2fe;
    color: var(--cnrp-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* LOGIQUE D'OUVERTURE (PC) */
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        animation: fadeInUp 0.3s ease forwards;
        margin-top: 0;
        /* Colle le menu */
    }

    /* Pont invisible pour éviter la fermeture */
    .dropdown-menu::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 0;
        width: 100%;
        height: 20px;
        background: transparent;
        display: block;
    }

    .dropdown-menu {
        min-width: 420px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* LOGIQUE MOBILE */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 20px;
        margin-top: 15px;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }

    .dropdown-menu {
        border: none;
        box-shadow: none !important;
        background-color: #f8f9fa;
        min-width: 100%;
        margin-top: 10px;
    }

    .nav-link {
        padding: 12px 0;
        display: block;
    }

        /* Block sur mobile pour cliquer facilement */
        .nav-link::after,
        .nav-link.dropdown-toggle::before {
            display: none;
        }

    /* Pas de soulignement animé sur mobile */
    .btn-header {
        width: 100%;
        margin-top: 15px;
    }
}

/* --- HERO & OTHER STYLES (Conservés) --- */
.hero-wow {
    position: relative;
    padding: 70px 0 100px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    overflow: hidden;
}

.hero-blur-shape {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 136, 204, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    top: -100px;
    right: -100px;
    z-index: 0;
    animation: pulseShape 10s infinite alternate;
}

@keyframes pulseShape {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.2);
    }
}

.hero-text-content {
    position: relative;
    z-index: 2;
}

.hero-image-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blob-image {
    width: 100%;
    max-width: 550px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    box-shadow: 0 20px 50px rgba(0, 136, 204, 0.15);
    animation: morphBlob 8s ease-in-out infinite;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 1;
    transition: all 0.5s;
}

@keyframes morphBlob {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 3;
    animation: floatUpDown 6s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 200px;
}

.card-top-right {
    top: 10%;
    right: 0;
    animation-delay: 0s;
}

.card-bottom-left {
    bottom: 10%;
    left: -20px;
    animation-delay: 2s;
}

@keyframes floatUpDown {

    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* CARDS & SECTIONS */
.custom-card {
    background: white;
    border-radius: 16px;
    padding: 35px 30px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    overflow: hidden;
}

    .custom-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 136, 204, 0.12);
        border-color: rgba(0, 136, 204, 0.1);
    }

.icon-circle {
    width: 70px;
    height: 70px;
    background: #eef7fc;
    color: var(--cnrp-blue);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    transition: 0.3s;
}

.custom-card:hover .icon-circle {
    background: var(--cnrp-blue);
    color: white;
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 136, 204, 0.3);
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--cnrp-dark);
    font-weight: 700;
}

.card-text {
    color: var(--text-grey);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.card-link {
    text-decoration: none;
    color: var(--cnrp-dark);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

    .card-link:hover {
        color: var(--cnrp-blue);
        border-bottom: 2px solid var(--cnrp-blue);
    }

    .card-link i {
        margin-left: 8px;
        font-size: 0.8rem;
    }

.expertise-row {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: 0.3s;
    cursor: default;
}

    .expertise-row:hover {
        transform: translateX(10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
        border-left: 5px solid var(--cnrp-blue);
    }

.stat-card {
    background: white;
    color: var(--cnrp-dark);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    border-bottom: 4px solid var(--cnrp-blue);
}

    .stat-card:hover {
        transform: translateY(-5px);
    }

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--cnrp-dark), var(--cnrp-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
}

footer {
    background: #111827;
    color: #9ca3af;
    padding: 80px 0 30px;
}

    footer h5 {
        color: white;
        margin-bottom: 25px;
        font-size: 1.1rem;
    }

        footer h5.text-light {
            color: #0088cc !important;
        }

    footer a {
        color: white;
        text-decoration: none;
        display: block;
        margin-bottom: 12px;
        transition: 0.3s;
    }

        footer a:hover {
            color: #9ca3af;
            transform: translateX(5px);
        }

.social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: white;
    margin-right: 10px;
    transition: 0.3s;
    text-decoration: none !important;
}

    .social-btn:hover {
        background: var(--cnrp-blue);
        transform: translateY(-3px);
    }

/* ANIMATIONS VISUELLES */
.atom-visual {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.atom-nucleus {
    width: 10px;
    height: 10px;
    background: var(--cnrp-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cnrp-blue);
}

.electron-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(0, 136, 204, 0.4);
    transform-style: preserve-3d;
}

    .electron-ring:nth-child(1) {
        animation: atomSpin1 2s linear infinite;
    }

    .electron-ring:nth-child(2) {
        animation: atomSpin2 2s linear infinite;
    }

    .electron-ring:nth-child(3) {
        animation: atomSpin3 2s linear infinite;
    }

@keyframes atomSpin1 {
    0% {
        transform: rotateZ(0deg) rotateX(65deg);
    }

    100% {
        transform: rotateZ(360deg) rotateX(65deg);
    }
}

@keyframes atomSpin2 {
    0% {
        transform: rotateZ(0deg) rotateX(65deg) rotateY(60deg);
    }

    100% {
        transform: rotateZ(360deg) rotateX(65deg) rotateY(60deg);
    }
}

@keyframes atomSpin3 {
    0% {
        transform: rotateZ(0deg) rotateX(65deg) rotateY(-60deg);
    }

    100% {
        transform: rotateZ(360deg) rotateX(65deg) rotateY(-60deg);
    }
}

.dosimeter-visual {
    width: 40px;
    height: 50px;
    background: linear-gradient(135deg, #eef7fc 0%, #ffffff 100%);
    border: 1px solid #d1e7f5;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dosimeter-screen {
    width: 25px;
    height: 15px;
    background: #2c3e50;
    margin-bottom: 5px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

    .dosimeter-screen::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 60%;
        background: #00d2ff;
        animation: measureBar 3s ease-in-out infinite alternate;
    }

@keyframes measureBar {
    0% {
        width: 20%;
        background: #00d2ff;
    }

    100% {
        width: 90%;
        background: #00ff88;
    }
}

/* Animation des liens */
.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #FFF;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 0.9rem;
}

    .footer-links a:hover {
        color: #9ca3af;
        padding-left: 8px;
        /* Effet de glissement */
    }

/* Boutons sociaux */
.social-btn {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

    .social-btn:hover {
        background: var(--cnrp-blue);
        border-color: var(--cnrp-blue);
        transform: translateY(-3px);
        color: white;
    }

/* Hover text simple */
.hover-white:hover {
    color: white !important;
}

/* Espacement lettres */
.ls-1 {
    letter-spacing: 1px;
}

.breadcrumb .breadcrumb-separation {
    position: relative;
}

    .breadcrumb .breadcrumb-separation span {
        display: inline-block;
        position: absolute;
        top: -4px;
    }

/* --- PAGE QUI SOMMES NOUS --- */

/* Hero Page spécifique */
.page-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 100px 0 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Timeline Verticale */
.timeline {
    position: relative;
    padding-left: 50px;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 3px;
        background: #e2e8f0;
    }

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-marker {
    position: absolute;
    left: -50px;
    top: 0;
    width: 34px;
    height: 34px;
    background: white;
    border: 4px solid var(--cnrp-blue);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.1);
}

.timeline-date {
    display: inline-block;
    padding: 6px 15px;
    background: #e0f2fe;
    color: var(--cnrp-blue);
    font-weight: 700;
    border-radius: 50px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

/* Liste Juridique */
.legal-list {
    list-style: none;
    padding: 0;
}

    .legal-list li {
        position: relative;
        padding-left: 30px;
        margin-bottom: 15px;
        color: #4b5563;
        font-size: 0.95rem;
    }

    .legal-list > li::before {
        content: '\f00c'; /* FontAwesome check */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        left: 0;
        top: 2px;
        color: var(--cnrp-blue);
    }

    .legal-list ul li {
        margin: 0;
        margin-top: 4px;
        padding-left: 10px;
    }

.footer-wave {
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
    margin-top: -1px;
}

    .footer-wave svg {
        fill: #111827;
        width: 130%;
        height: 60px;
        transform: rotateY(180deg);
        background-color: #eaedf0;
    }

/* Transitions douces pour l'apparition du logo */

.transition-all {
    transition: all 0.3s ease;
}

.transition-opacity {
    transition: opacity 0.3s ease-in-out;
}

.transition-display {
    transition: display 0.3s ease-in-out;
}

/* Sur Mobile : On force l'affichage du logo dans la navbar car la Top Bar est cachée */
@media (max-width: 991px) {
    #scrollLogo {
        opacity: 1 !important; /* Toujours visible sur mobile */
    }
        /* Ajustement de la taille du logo mobile */
        #scrollLogo img {
            width: 45px;
        }

    #navLinks {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.hide-nav {
    display: none !important;
}

.btn-outline-primary {
    border-color: #0088cc;
    color: #0088cc;
}

.btn-outline-primary:hover {
    border-color: #0088cc;
    background-color: #0088cc;
}

.cursor-pointer {
    cursor: pointer !important;
}

.cursor-default {
    cursor: default !important;
}