
/*  STYLES GENERAUX */
body {
    font-family: 'NCLNeovibes', sans-serif;
    background: #f4f6f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html, body {
    height: 100%;
}

.titre {
    margin-left: 4rem;
    color: #0d47a1;
}

.texte {
    margin-left: 2rem;
    font-family: 'NCLNeovibes', sans-serif;
}

h1 {
    font-size: 36px;
    color: #0d47a1;
    margin-bottom: 1.5rem;
}

.container {
    max-width : 2500px;
    width: 90%;
}

/* NAVIGATION */

/* Espacement menu */
.navbar-nav .nav-link {
    font-family: Arial, sans-serif;
    letter-spacing: 0.2px;
}

.nav-link {
    font-weight: 700;
    color: white;
}

.navbar-nav {
    font-weight: 400;
}

/* Gère la couleur du menu burger sur mobile */
.navbar-toggler {
    border-color: rgba(255,255,255,0.5);
}

.navbar-toggler-icon {
    filter: invert(1);
}

.navbar.navbar-dark.navbar-custom .navbar-nav .nav-link:hover {
    color: #d0d6e2 !important; /* color: #2c3e60;  gris bleuté profond */
}

/* Bouton Donner (fond rouge) */
.btn-donner{
    --bs-btn-bg: #c62828;
    --bs-btn-border-color: #c62828;
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #a51e1e;
    --bs-btn-hover-border-color: #a51e1e;
}

.btn-donner:hover {
    background-color: #a51e1e;
    color: #fff;
}

/* Bouton Adherer (fond bleu) */
.btn-adherer {
    --bs-btn-bg: #1565c0;
    --bs-btn-border-color: #1565c0;
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #0d47a1;
    --bs-btn-hover-border-color: #0d47a1;
}

.btn-espace {
    border-radius: 50px;
    padding: 0.45rem 0.9rem;
    font-weight: 500;
}

.btn-espace i {
    font-size: 0.95rem;
}

.navbar .btn-circle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    max-width: 40px;
    border-radius: 50%;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.navbar .btn-circle i {
    font-size: 16px;
}

/* Menu burger pour mobile */

.navbar .btn-circle.dropdown-toggle::after {
    display: none;
}

.navbar-custom .navbar-toggler {
    border-color: rgba(255,255,255,0.6);
}

.navbar-custom .navbar-toggler-icon {
    background-image: var(--bs-navbar-toggler-icon-bg);
    filter: brightness(0) invert(1);
}


/* navbar  responsive sur mobile */ 
@media (max-width: 576px) {

    .navbar .dropdown-menu {
        position: absolute;
        right: 0;
        left: auto;
        width: 240px;
        flex: 0 0 auto;
    }

}

.btn-adherer:hover {
    background-color: #0d47a1 !important;
    color: #fff;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 6px;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.navbar.navbar-custom {
    background-color: #12348F; /* bleu CPE */
    max-width :2500px;
    width: 100%;
}

.navbar-custom .nav-link {
    color: #ffffff !important;
}

.logo-navbar {
    height: 55px;  /* hauteur idéale navbar */
    width: auto;   /* conserve proportions */
    object-fit: contain;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.main-layout {
    max-width: 1400px;   /* largeur plus grande */
}

.main-layout .row {
    margin-left: 0;
    margin-right: 0;
}

.main-layout .col-lg-5,
.main-layout .col-lg-6,
.main-layout .col-lg-4,
.main-layout .col-lg-3 {
    padding-left: 8px;
    padding-right: 8px;
}

/* Dégradé bleu-blanc-rouge sur toute la page */
.page-prez {
    min-height: 100vh;
    background: linear-gradient(to bottom, #0055A4 0%, #ffffff 50%, #EF4135 100%);
    color: #fff; /* texte clair par défaut */
    padding: 60px 15px;
    display: flex;
    flex-direction: column;
    justify-content: start;
}

/* Texte foncé sur la zone blanche centrale */
.page-prez .texte-blanc {
    color: #222;
}

/* Card principale */
.page-prez .intro-card {
    background-color: rgba(255, 255, 255, 0.85);
    color: #222;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    max-width: 900px;
    margin: 30px auto;
}

/* CTA en majuscule */
.page-prez .cta {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.3rem;
}

/* Bloc inférieur avec 3 colonnes bleu / blanc / rouge */
.page-prez .blocs-bdr {
    display: flex;
    flex-wrap: wrap;
    margin-top: 50px;
    gap: 15px;
    justify-content: center;
}

.page-prez .blocs-bdr .bloc {
    flex: 1 1 250px;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.page-prez .blocs-bdr .bloc-bleu { background-color: #0055A4; }
.page-prez .blocs-bdr .bloc-blanc { background-color: #ffffff; color: #222; }
.page-prez .blocs-bdr .bloc-rouge { background-color: #EF4135; }

.page-prez .blocs-bdr i { font-size: 2rem; margin-bottom: 10px; }


/* Trombinoscope */

/* trombinoscope contrées */

.rep-card {
    width: 90px;
    cursor: pointer;
    transition: transform .15s;
}
.rep-card:hover {
    transform: scale(1.05);
}

.rep-card img {
    width: 64px;
    height: 64px;
    object-fit: cover;
}

.trombino-wrap {
    display: flex;
    flex-direction: column;
    align-items: center; /* centre horizontal */
    width : 100%
}

.trombino-row {
    display: flex;
    flex-wrap: wrap;  /* autorise retour ligne */
    justify-content: center;
    gap: 50px;   /* rapprochement horizontal */
    width: 100%;
    margin-top:10px;
    padding-top:10px;
    border-top:1px solid #eee;

}

.trombino-row.row-2 {
    margin-top: 0px; /* rapprochement vertical */
}

/* Trombinoscope instances */
.trombi{
display:flex;
flex-direction:column;
gap:12px;
margin-top:10px;
}

.trombi-title{
font-size:1.1rem;
font-weight:600;
color:#6c757d;
margin-top:18px;
margin-bottom:12px;
padding-left: 10px;
}


.membre{
display:flex;
align-items:center;
gap:10px;
}

.membre img{
width:55px;
height:55px;
border-radius:50%;
object-fit:cover;
}

.membre-info{
font-size:14px;
}

.membre-card{
display:flex;
align-items:center;
gap:10px;
padding:6px 4px;
transition:0.2s;
}

.membre-card:hover{
background:#f8f9fa;
border-radius:6px;
}

.membre-card img{
width:54px;
height:54px;
border-radius:50%;
object-fit:cover;
border:2px solid #f0f0f0;
}

.membre-text strong{
display:block;
font-size:0.95rem;
}

.membre-text span{
font-size:0.85rem;
color:#6c757d;
}

.membre-card img{
width:52px;
height:52px;
border-radius:50%;
object-fit:cover;
border:2px solid #f0f0f0;
}

.membre-text strong{
display:block;
font-size:0.95rem;
}

.membre-text span{
font-size:0.85rem;
color:#6c757d;
}




/*Trombinoscope responsive */

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .trombino-row {
        gap: 14px;
    }

    .rep-card {
        width: 72px;     /* cartes plus petites */
    }

    .rep-card img {
        width: 52px;
        height: 52px;
    }

    .rep-card .small {
        font-size: 0.72rem;
        line-height: 1.1;
    }
}




/* padding interne contrôlé */
.intro-card .card-body-prez {
  background:#12348F;
  color:white;
  padding:2rem 2.5rem;
}

/* texte */
.section-prez p {
  font-size:1.6rem;
  line-height:2;
  text-align:left;
  margin-bottom:1.5rem;
}


/* titre aligné sur texte */
.titre-prez {
  font-size:4rem;
  font-weight:700;
  color:white;
  text-align:left;
  padding-left:2.5rem;   /* = padding card */
  margin-bottom:1.5rem;
}

/* CTA */
.cta {
  text-align:center;
  font-weight:700;
  font-size:36px;
  margin-top:2rem;
}




/* FOOTER */

.footer {
   background-color: #12348F !important; 
   max-width :2500px;
    width: 100%;   
    bottom:0; 
    position: relative;
    margin-top:0;
    padding-top:2rem;
    padding-bottom:1rem;
}

/* liens dans la liste de navigation du footer */
.footer-links li a {
    text-decoration: none !important; /* Supprime le soulignement */
    color:  #6c757d; /* Gris clair */
    transition: color 0.3s ease;
    display: inline-block;
    padding: 3px 0;
}

/* État au survol : on change la couleur mais on ne souligne pas */
.footer-links li a:hover {
    text-decoration: none !important; /* Sécurité anti-soulignement */
    color: #1565c0; /* Le bleu clair au survol */
}

/* Force la couleur grise pour les liens autres que menu*/
.footer .text-center.small a {
    color: #6c757d !important;
    text-decoration: none !important;
}

.footer a {
    color:#6c757d;
}

.footer .col-lg-4 {
    margin-bottom: 1rem !important;
}

.footer hr {
    margin-top: 0.5rem;   /* Rapproche le trait du contenu au-dessus */
    margin-bottom: 1rem;  /* Rapproche le texte "Copyright" du trait */
    opacity: 0.2;         /* rend le trait plus discret */
}

.footer i {
    font-size: 1.2rem;
    color: #6c757d;
    transition: transform 0.2s ease, color 0.2s ease;
}

.footer i:hover {
    color: #1565c0;
    transform: translateY(-2px);
}


/* PAGE de CONTACT */

.contact-page {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.contact-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 35px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.contact-card h1 {
    text-align: center;
    margin-bottom: 25px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 18px;
    margin-bottom: 20px;
}

.info-item {
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.info-item i {
    color: #2c7be5;
    width: 22px;
    text-align: center;
    margin-right: 15px;
}

.contact-separator {
    border: 0;
    border-top: 1px solid #e3e3e3;
    margin: 25px 0;
}

/* PAGE INTRODUCTION (QUI SOMMES NOUS) */
/* bloc intro */
.intro-card {
    padding: 0.5rem 0.5rem;
}

/* bloc tableau : marges internes plus grandes */
.table-card .card-body {
    padding: 1.8rem 2rem;
}





/* MOBILE */
@media (max-width: 600px) {
    .contact-card {
        padding: 25px 20px;
    }

    .contact-card h1 {
        font-size: 1.5rem;
    }

    .info-item {
        font-size: 0.95rem;
    }
}


/* RESEAUX SOCIAUX */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-links a {
    color: #555;
    text-decoration: none;
    font-size: 1.5rem;
    transition: transform 0.2s ease, color 0.3s ease;
}

.social-links a:hover {
    color: #2c7be5;
    transform: scale(1.2);
}

/* Couleurs spécifiques aux réseaux sociaux */
.fa-facebook { color: #1877F2; }
.fa-instagram { color: #E4405F; }
.fa-whatsapp { color: #25D366; }
.fa-telegram { color: #0088cc; }
.fa-x-twitter { color: #000000; }
.fa-youtube { color:#FF0000 ; }
.fa-linkedin { color:#0A66C2 ; }
.fa-tiktok { color:#69C9D0 ; }

/* Widget Réseaux sociaux */
.instagram-box {
    max-height: 70vh;
    overflow-y: auto; /* scroll vertical */
    overflow-x:hidden;
}

/* Forcer largeur widget Elfsight */
.instagram-box .elfsight-app,
.instagram-box iframe,
.instagram-box > div {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.instagram-wrapper {
    width: 100%;
}



.map {
max-width: 66%;
height: auto;
}

.card {
    border-radius: 14px;
    border: none;
    width: 100%;
}

#mapContainer {
    min-height: 420px;
    height:600px;
    width:100%;
    border-radius:8px;
}

.table-active{
    outline:2px solid #ff6600;
    background-color:#ffe082 !important;
    transition:background-color 0.3s;
}


#contreeDetail {
    min-height: 420px;
}

.contree-card {
    min-height: 420px;
}

#contreeCommunes li {
    line-height: 1.3;
}

.active-contree{
    transform:scale(1.05);
    box-shadow:0 0 8px rgba(0,0,0,0.25);
}

.btn-reset-contree {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;   /* ← agrandit le symbole */
    line-height: 1;
    padding: 0;
}


/* RESPONSIVE */
@media (max-width: 991px) {
.logo-navbar {
height: 40px;
}
.navbar .btn {
width: 100%;
text-align: center;
}   

.dataTables_wrapper .dt-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

.trombino-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        justify-items: center;
    }

    .rep-card {
        width: 100% !important;
        max-width: 120px;
        padding: 10px;
        border-radius: 12px;
        transition: transform 0.1s ease, box-shadow 0.1s ease;
    }

    .rep-card img {
        width: 72px;
        height: 72px;
    }

    .rep-card .small {
    font-size: 0.75rem;
}

  .rep-card:active {
        transform: scale(0.97);
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }


}


/* DATABASE */

table.dataTable#communesTable {
width: 100% !important;
}

#communesTable {
    white-space: nowrap;
}

/* Largeur des colonnes */
#communesTable th:nth-child(1),
#communesTable td:nth-child(1) { width: 150px; }

#communesTable th:nth-child(2),
#communesTable td:nth-child(2) { width: 150px; }

#communesTable th:nth-child(3),
#communesTable td:nth-child(3) { width: 30px; }

#communesTable th:nth-child(4),
#communesTable td:nth-child(4) { width: 35px; text-align: center; }

#communesTable th:nth-child(5),
#communesTable td:nth-child(5) { width: 130px;}

#communesTable th:nth-child(6),
#communesTable td:nth-child(6) { width: 100px; }


.dataTables_wrapper .dataTables_filter input {
    border-radius: 6px;
}

table.dataTable thead th {
    white-space: nowrap;
}

table.dataTable tbody td {
    vertical-align: middle;
}


/* espace autour DataTables */
.dataTables_wrapper {
    margin-top: 1rem;
}

/* espace pagination */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

/* entête du tableau */
#communesTable thead th {
    background-color: #0d56c4;
    color: #e3f2fd;
    font-weight: 700;
    border-bottom: 3px solid #adb5bd;
}

 table.dataTable tbody tr {
        cursor: pointer;
    }


#communesTable tbody tr.dtrg-group > * {
    background: #0d6efd !important;
    color: #fff !important;
    font-size: 1.15rem;
    font-weight: 700;
}

#communesTable tbody tr.dtrg-group a {
    color: #fff !important;
    text-decoration: none;
}

#communesTable tbody tr.dtrg-group a:hover {
    color: #e3f2fd !important;
    text-decoration: underline;
}

.commune-link {
        display: inline-block;
        padding: 6px 4px;
    }


.commune-link,
.contree-link {
    touch-action: manipulation; /* fonctionnement des liens sur mobile */
}

/*Couleur des lignes conditionnées */
#communesTable tbody tr.ligne-gauche > * { background:#fde2e4 !important; }
#communesTable tbody tr.ligne-centre > * { background:#fff3cd !important; }
#communesTable tbody tr.ligne-droite > * { background:#e3f2fd !important; }

.dataTables_filter input::placeholder {
    color: #adb5bd;   /* gris Bootstrap discret */
    opacity: 1;
}

/* Légende couleurs tableau */
.dt-legend{
    text-align:center;
    opacity:0.9;
}

.dt-legend:hover{
    opacity:1;
    transform: translateY(-1px);
}

.dt-legend:hover .legend-item{
    transform:scale(1.15);
    box-shadow:0 0 6px rgba(0,0,0,0.25);
}

.legend-item{
    display:inline-block;
    width:14px;
    height:14px;
    border-radius:3px;
    margin-right:6px;
    vertical-align:middle;
    transition:all 0.2s ease;
}

/* Couleurs identiques aux lignes */

.legend-droite{
    background:#e3f2fd;
}

.legend-centre{
    background:#fff3cd;
}

.legend-gauche{
    background:#fde2e4;
}

.legend-entry{
    cursor:pointer;
    padding:2px 6px;
    border-radius:4px;
}

.legend-entry:hover{
    background:#f5f7fa;
}

.legend-fade{
    opacity:0.25;
}

.legend-highlight{
    transform:scale(1.01);
}


/* pattern Highlight Carte  */
#communesTable tbody tr {
    transition: background-color 0.15s ease;
}

#communesTable tbody tr:hover > * {
    background: #eef4ff !important;
}

#communesTable tbody tr.table-active > * {
    background: #dbe7ff !important;
    font-weight: 600;
}

/* Pattern Barre latterale carte */
#communesTable tbody tr.table-active {
    position: relative;
}

#communesTable tbody tr.table-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #2c5aa0;
    border-radius: 2px;
}

#communesTable tbody tr.table-active > * {
    background: #eef4ff !important;
    font-weight: 600;
}

/* Pattern Flash visuel Carte */
@keyframes highlightFlash {

    0% { background:#ffeaa7; }
    100% { background:inherit; }

}

#communesTable tbody tr.flash {
    animation: highlightFlash 1s ease;
}




tr:hover {
  background-color: #eef4ff;
}

tr.selected {
  background-color: #dbe7ff;
  border-left: 4px solid #3b82f6;
  background-color: #f5f9ff;
}

tr.selected td {
  font-weight: 600;
}

tr.group-header:hover td{
    background:#dbeafe !important;
    color: #0d6efd;
}

tr {
  transition: background-color 0.15s ease;
}

.carte-tableau-row > [class*="col"] {
    padding-left: 6px;
    padding-right: 6px;
}

/* Rendu mobile des ongles Contrées */
@media (max-width: 991px) {

    /* On affiche le tableau dans l’onglet Communes */
    #tabListe .card-body {
        padding: 0;
    }

    .nav-tabs .nav-link {
        font-weight: 600;
        border: none;
        color: #555;
    }

    .nav-tabs .nav-link.active {
        color: #1f3fa3;
        border-bottom: 3px solid #1f3fa3;
    }

    .card {
        border-radius: 16px;
    }

}

.table-responsive {    /* Meilleure lisibilité du tableau sur mobile */
    font-size: 0.9rem;
}


/* 🇫🇷 Desktop : afficher les 3 sections côte à côte */
@media (min-width: 992px) {
    #tabCarte.d-lg-none,
    #tabListe.d-lg-none,
    #tabInfos.d-lg-none {
        display: none !important;
        }

    /* Force l’affichage des pane */
    .tab-content > .tab-pane {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        transform: none !important;
    }

    /* Réaligner les 3 blocs côte à côte */
    #tabCarte .card,
    #tabListe .card,
    #tabInfos .card {
        margin-bottom: 0 !important; /* retire les espacements mobiles */
    }

    /* Conteneur carte : 33% */
    #tabCarte > .row > .col-12 {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }

    /* Conteneur tableau : 42% */
    #tabListe > .row > .col-12 {
        flex: 0 0 41.6667%;
        max-width: 41.6667%;
    }

    /* Conteneur fiche : 25% */
    #tabInfos > .row > .col-12 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}



/* Videos Youtube Revue de presse */

.videos-grid {
    display: grid;
    gap: 1rem; /* espacement uniforme */
    margin-top: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* colonnes adaptatives */
    justify-items: start; /* alignement à gauche */
}

/* Carte vidéo */
.video-card {
    background: linear-gradient(135deg,#ffffff,#f0f0f0);
    border-radius:0.75rem;
    box-shadow:0 6px 18px rgba(0,0,0,0.1);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    width: 100%;
    max-width: 360px; /* largeur uniforme */
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow:0 10px 25px rgba(0,0,0,0.15);
}

.video-card h3 {
    font-size:1.1rem;
    margin:0.75rem;
    text-align:center;
    color:#222;
}

/* Video responsive */
.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
}

.video-responsive iframe {
    position: absolute;
    top:0; left:0;
    width:100%; height:100%;
    border:none;
}

/* Lazy-loading déjà activé dans les iframes */
.video-link {
    margin:0.5rem 1rem 1rem;
    text-align:center;
}

.video-link a {
    text-decoration:none;
    color:#1a73e8;
    font-weight:500;
}

.video-link a:hover {
    text-decoration:underline;
}

/* Onglets */
.nav-tabs .nav-link {
    color:#000;
    border:1px solid #dee2e6; /* contour léger pour visibilité */
    border-bottom: none;
}

.nav-tabs .nav-link.active {
    background:#1a73e8;
    color:#fff;
    border-color:#1a73e8;
    font-weight:600;
}

/* Responsive */
@media(max-width:768px){
    .video-card h3 { font-size:1rem; margin:0.5rem; }
}

.dt-toolbar {
    margin-bottom: 8px;
}

/* bouton reset */
.btn-reset-contree {
    width:32px;
    height:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    padding:0;
    transition: all 0.2s ease;
}

.btn-reset-contree:hover {
    background-color:#e9ecef;
    transform: rotate(90deg);
}

/* champ recherche clean */
.dataTables_filter input {
    border-radius:20px;
    padding:4px 10px;
    width: 260px;
}

.dataTables_filter input::placeholder {
    color:#adb5bd;
}

/* input 'Rechercher' du tableau contrées */
.dt-search-input {
    padding-left: 28px;
    font-size: 0.9rem;
}

.dt-search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: #999;
    pointer-events: none;
}