:root {
    --primary: #2165a4; /* Bleu ajusté pour correspondre au logo */
    --secondary: #2165a4; /* Bleu ajusté pour correspondre au logo */
    --light: #f5f5f5;
    --dark: #293241;
    --grey: #e0fbfc;
    --accent: #7fa9d1; /* Version plus claire du bleu logo */
    --button: #008ec2; /* Nouvelle couleur des boutons */
    --apple-green: #8bc34a; /* Vert pomme pour le label */
    --header-height: 60px; /* Hauteur approximative de l'en-tête */
}

html {
    scroll-padding-top: calc(var(--header-height) + 40px); /* Espace pour le header fixe */
    scroll-behavior: smooth; /* Animation douce du défilement */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    font-size: 15px; /* Taille typo globale réduite de 1px */
    padding-top: var(--header-height);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--dark); /* Même couleur que le footer */
    color: white;
    padding: 12px 0; /* Padding réduit */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 128px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

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

.footer-logo {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.footer-logo img {
    width: 100px;
    height: auto;
    margin-right: 10px;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent);
}

nav ul li a.active {
    color: var(--accent);
    position: relative;
    font-weight: 600;
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.hero {
    height: calc(100vh - var(--header-height));
    min-height: 500px; /* Ensure minimum height */
    background-image: url('images/EN-TETE-Site-Carticipe-NB-V13.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(33, 101, 164, 0.8) 0%, rgba(127, 169, 209, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 900px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: normal;
}

.hero-title strong {
    font-weight: 700;
}

.hero p {
    font-size: 1rem;
    margin: 0 auto;
}

section {
    padding: 80px 0;
}



.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.section-logo {
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 1.15rem;
    overflow: hidden;
}

.section-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

h2 {
    font-size: 1.6rem;
    position: relative;
    color: var(--primary);
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    height: 4px;
    width: 60px;
    background-color: var(--secondary);
    bottom: 0;
    left: 0;
}

.fusion {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fusion-content-wrapper {
    display: flex;
    align-items: center;
    padding: 30px;
}

.fusion-image {
    width: 233px;
    min-width: 233px;
    height: 248px;
    overflow: hidden;
    margin-right: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fusion-image img {
    max-width: 100%;
    height: auto;
}

.fusion-content {
    flex: 1;
}

.fusion-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #008ec2;
    font-size: 24px;
    line-height: 1.3;
}

.fusion-footer {
    height: 40px;
    background-color: var(--primary);
    position: relative;
}

.fusion-label {
    position: absolute;
    top: -10px;
    right: 30px;
    background-color: var(--apple-green);
    color: white;
    padding: 5px 15px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.services-grid, .domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item, .domain-item {
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
}

.service-item:hover, .domain-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-icon, .domain-icon {
    width: 50px;
    height: 50px;
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    color: white;
    font-size: 1.2rem;
    overflow: hidden;
}

.service-icon img, .domain-icon img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.services-list, .domains-list {
    list-style: none;
    columns: 2;
    column-gap: 30px;
    margin-top: 20px;
}

.services-list li, .domains-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
    line-height: 1.3;
}

.services-list li::before, .domains-list li::before {
    content: '•';
    color: var(--secondary);
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
}

.references {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.reference-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.reference-card:hover {
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.reference-logo {
    height: 150px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.reference-logo .no-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background-color: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 5px;
    color: #666;
    font-size: 14px;
    text-align: center;
    padding: 15px;
    font-weight: 500;
}

.reference-logo img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.reference-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    font-size: 13px; /* Taille de police réduite de 2px pour les contenus de carte */
}

.reference-content h3 {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 16px; /* Taille de police ajustée pour les titres */
}

.reference-content h3:hover {
 color: black;
}

.reference-content .date {
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
    font-size: 12px;
}

.reference-content p {
    flex-grow: 1;
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    background-color: var(--button);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--dark);
}

.center-btn {
    text-align: center;
    margin-top: 40px;
}

.other-sites {
    display: flex;
    gap: 30px;
    width: 100%;
}

.site-card {
    width: 50%;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

.site-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 4px;
    background-color: var(--primary);
}

.site-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 16px; /* Taille de police ajustée pour les titres */
}

.site-logo {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 0 auto 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.site-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.site-card p {
    margin-bottom: 15px;
}

.site-card .btn {
    background-color: var(--apple-green); /* Changement pour vert pomme comme le label "News" */
}

.site-card .btn:hover {
    background-color: #7ab33e; /* Version plus foncée du vert pomme */
}

.other-sites-slider {
    width: 100%;
}

.other-sites-slider .swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
}

.other-sites-slider .site-card {
    width: 95%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.press-mentions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.press-item {
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    font-size: 13px; /* Taille de police réduite de 2px pour les contenus de carte */
}

.press-item h3 {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 16px; /* Taille de police ajustée pour les titres */
}

.press-item .source {
    color: var(--dark);
    font-style: italic;
    margin-bottom: 10px;
    display: block;
    font-size: 12px;
}

.press-item .date {
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 15px;
    display: block;
    font-size: 12px;
}

.press-logo {
    width: 70px;
    height: 50px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.press-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.press-content {
    flex-grow: 1;
}

.press-actions {
    margin-top: 10px;
}


.press-actions a.page-link {
    text-decoration: none;
}

.press-actions a.page-link:hover strong {
   color: black !important;
}

footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column--secondary {
    gap: 32px;
}

.footer-column h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    height: 3px;
    width: 40px;
    background-color: var(--secondary);
    bottom: 0;
    left: 0;
}

.footer-logo {
    margin-top: 20px; /* Déplacer le logo sous le titre */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

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

.footer-column ul {
    list-style: none;
}

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

.footer-column ul li a {
    color: var(--grey);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .header-content {
        position: relative;
        flex-direction: row;
        align-items: center;
        min-height: 48px;
    }
    
    header nav {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        width: 100%;
        margin-top: 0;
        padding: 18px 20px 22px;
        background-color: var(--dark);
        border-radius: 0 0 12px 12px;
        box-shadow: 0 12px 30px rgba(0,0,0,0.2);
        z-index: 150;
        max-height: calc(100vh - var(--header-height) - 20px);
        overflow-y: auto;
    }
    
    header nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    header nav ul li {
        margin-left: 0;
        margin-bottom: 0;
    }
    
    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
    }
    
    header nav.active {
        display: block;
    }
    
    .hero {
        height: auto;
        min-height: 80vh;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .services-list, .domains-list {
        columns: 1 !important;
        column-count: 1 !important;
    }
    
    section {
        padding: 60px 0;
    }
    
    .fusion-content-wrapper {
        flex-direction: column;
    }
    
    .fusion-image {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .other-sites {
        flex-direction: column;
    }
    
    .site-card {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Style pour les icônes dans les boutons */
.btn i {
    margin-left: 5px;
    font-size: 12px;
}

/* Styles du visualiseur d'articles ont été déplacés vers css/components/viewer.css */

.debatomap-link {
    background-color: #42bce2;
    color: white !important;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.debatomap-link:hover {
    background-color: #2da8ce;
    color: white !important;
}

.footer-column .debatomap-link {
    display: inline-block;
    margin-top: 5px;
}

.footer-column--primary .footer-brochure-btn {
    margin-top: 8px !important;
    align-self: flex-start;
    width: fit-content;
}

.scroll-top-btn {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 999px;
    background-color: var(--button);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
    z-index: 180;
}

.scroll-top-btn:hover {
    background-color: var(--secondary);
}

.scroll-top-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Styles pour les carrousels Swiper */
.swiper {
    width: 100%;
    margin-bottom: 2rem;
    padding-bottom: 45px; /* Espace pour les bullets de pagination en dessous */
    overflow: hidden; /* Contenir le carrousel dans sa boîte */
    position: relative; /* Nécessaire pour positionner les flèches correctement */
}

.swiper-wrapper {
    display: flex;
    align-items: stretch; /* S'assurer que tous les slides ont la même hauteur */
}

.swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
}

/* Redimensionner les cartes à l'intérieur des slides pour l'espacement des flèches */
.references-slider .reference-card,
.press-slider .press-item {
    width: 95%; /* Augmenté car les flèches sont maintenant en dehors */
    margin: 0 auto;
    height: 100%; /* S'assurer que toutes les cartes ont la même hauteur */
}

/* Style pour les flèches de navigation */
.swiper-button-next,
.swiper-button-prev {
    color: #008ec2;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    top: 40%; /* Repositionner au milieu des cartes plutôt qu'au bord */
    margin-top: 0;
    z-index: 20; /* S'assurer qu'elles sont au-dessus du contenu */
}

.swiper-button-next {
    right: 0; /* À la limite droite du conteneur */
}

.swiper-button-prev {
    left: 0; /* À la limite gauche du conteneur */
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

/* Style pour la pagination */
.swiper-pagination {
    position: absolute;
    bottom: 10px !important; /* S'assurer qu'il est bien en bas */
    left: 0;
    width: 100%;
}

.swiper-pagination-bullet {
    background-color: #008ec2;
}

.swiper-pagination-bullet-active {
    background-color: #008ec2;
    opacity: 1;
}

/* Ajustements responsifs pour les carrousels */
@media (max-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px;
    }
    
    .references-slider .reference-card,
    .press-slider .press-item {
        width: 85%; /* Encore plus réduit sur mobile pour éviter les chevauchements */
    }
}

/* Styles pour les sections avec images de fond */
.services-container,
.domains-container {
    position: relative;
    display: flex;
    margin-top: 40px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Variante avec image à gauche */
.services-container.image-left {
    flex-direction: row-reverse;
}

.section-image {
    width: 40%;
    position: relative;
    overflow: hidden;
}

.section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.services-container:hover .section-image img,
.domains-container:hover .section-image img {
    transform: scale(1.05);
}

.section-content {
    width: 60%;
    background-color: white;
    padding: 30px;
}

/* Modifier les listes pour s'adapter au nouveau layout */
.services-list,
.domains-list {
    list-style: none;
    columns: 2;
    column-gap: 30px;
    margin: 0;
    padding: 0;
}

.services-list li,
.domains-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
    line-height: 1.3;
    break-inside: avoid; /* Éviter de couper un élément entre deux colonnes */
}

.services-list li::before,
.domains-list li::before {
    content: '•';
    color: var(--secondary);
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
}

/* Ajustement responsive pour les sections avec images */
@media (max-width: 992px) {
    .services-container,
    .domains-container,
    .services-container.image-left {
        flex-direction: column;
    }
    
    .section-image,
    .section-content {
        width: 100%;
    }

    .services-container.image-left .section-image {
        order: -1;
    }
    
    .section-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .services-list,
    .domains-list {
        columns: 1 !important;
        column-count: 1 !important;
    }
    
    .section-image {
        height: 250px;
    }

    .section-content {
        padding: 24px 20px;
    }
}

/* Ajouter un espace supplémentaire aux sections avec ID (ciblées par ancres) */
section[id] {
    padding-top: 50px;
    margin-top: 0;
    scroll-margin-top: 50px;
}

/* Classe pour les bannières héro réduites */
.hero-small {
    height: 25vh;
    min-height: 150px;
    padding-top: 50px !important
}
