
/*  STYLES GENERAUX */
@font-face {
  font-family: 'NextArt';
  src: url('./fonts/NEXT_ART/NEXT_ART_Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'NextArt';
  src: url('./fonts/NEXT_ART/NEXT_ART_Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'NextArt';
  src: url('./fonts/NEXT_ART/NEXT_ART_Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'NextArt';
  src: url('./fonts/NEXT_ART/NEXT_ART_Heavy.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
}

@font-face {
  font-family: 'CPE';
  src: url('./fonts/CPE_FONT2.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


body {
    font-family: system-ui;
    background: #f4f6f9;
    display: flex; 
    flex-direction: column;
    min-height: 100vh;
    margin:0;
    padding:0;
}

html, body {
    height: 100%;
}

:root {
    --section-bg: #e9e9e9;
    --section-inner: #d9d9d9;
}


titre {
    font-family: sans-serif;
    color: #0d47a1;
    font-weight: 700;
}

.titre-cpe {
    font-family: 'CPE', sans-serif;
    text-transform: uppercase;
}

.titre-cpe h1{
    font-family: 'CPE';
    text-transform: uppercase;
    padding-top : 20px;
}

/* force l'occupation de la page pour fixer la position du footer */
 .page-wrapper {
        flex: 1 0 auto;
    }

.texte {
    margin-left: 2rem;
}

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

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

.degrade-cpe {
padding:30px 10px;
background: linear-gradient(
    to bottom,
    #1D4FDC 0%,
    #12348F 100%
);
border-radius:16px;
color:white;
}

 .elections
        { display:block !important;
          clear: both !important;
          font-family: NextArt;
          color: #EE1313;  
          padding-top: 12px;
          width: 100% !important;
         float: none !important;
         position: static !important;
    }


/* NAVIGATION */

.titre-logo {
    font-family: 'NextArt';
    font-size: 0.8rem;
    color: white;
}
/* 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;
}



.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-adherer:hover {
    background-color: #0d47a1 !important;
    color: #fff;
}

.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);
}

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


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

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

}


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

.navbar.navbar-custom {
   background: linear-gradient(
    to bottom,
    #12348F 0%,
    #1D4FDC 100%
);
    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;
}


/* PAGE ACCUEIL / INDEX */

.section{
padding:35px 0;
background-color: white;
margin-bottom: 30px;
}

/* HERO */

.hero{
background:white;
border-radius:16px;
padding:40px;
box-shadow:0 10px 30px rgba(0,0,0,0.06);
}

.hero-image{
position:relative;
overflow: hidden;
}

.hero-image:after{
content:"";
position:absolute;
top:0;
right:0;
width:30%;
height:100%;
background:linear-gradient(to right, transparent, #f5f7fb);
}
.hero-image img{
width:100%;
height: 100%;
object-fit: cover;
clip-path: polygon( /* Decoupe diagonale */
0 0,
100% 0,
85% 100%,
0% 100%
);
border-radius:16px;
}



.hero h1{ 
font-size:2.5rem;
font-weight:700;
color:#1c355e;
margin-bottom:10px;
}

.hero-premium{
padding:80px 0;
background:#f5f7fb;
}

.hero-text h1{
font-family: 'CPE';   
font-size:2.8rem;
font-weight:700;
color:#12348F;
line-height:1.2;
margin-bottom:15px;
text-transform: uppercase;
}

.subtitle{
font-family: 'NextArt';    
color:#d32f2f;
font-weight:600;
font-size:1.3rem;
margin-bottom:15px;
}

.hero-description{
color:#5a6b7b;
font-size:1.1rem;
max-width:500px;
}

.badge-soft{
background:white;
padding:10px 18px;
border-radius:30px;
font-weight:500;
display:inline-flex;
align-items:center;
gap:8px;
box-shadow:0 3px 10px rgba(0,0,0,0.05);
}

.badge-soft i{
color:#2f5fa7;
}

.badge-soft:hover{
background:#e2e8f0;
transform:translateY(-1px);
transition:all 0.2s;
}

/* BOUTONS */

.btn-main{
background:#2f5fa7;
color:white;
padding:10px 22px;
border-radius:8px;
font-weight:600;
border:none;
}

.btn-main:hover{
background:#254a84;
}

.btn-outline-main{
border:1px solid #2f5fa7;
color:#2f5fa7;
padding:10px 22px;
border-radius:8px;
font-weight:600;
}

.btn-outline-main:hover{
background:#2f5fa7;
color:white;
}

/* TITRES */

.section-title{   
font-size:1.7rem;
font-weight:700;
color:white;
margin-bottom:15px;
padding-left:20px;
}

.section-title h1{
font-weight:700;
font-size: 2.2rem;
text-align: center;
padding-bottom: 20px;
color: white;
}

.section-title p{   
font-family: 'CPE';
text-transform: uppercase;
color : white;
}

.title-divider{
width:60px;
height:4px;
background:#d32f2f;
margin:15px auto 30px auto;
border-radius:2px;
}

.about-title {   
font-family: 'CPE';
color : white;
text-transform: uppercase;
}

.about-text{    
font-size:1.2rem;
line-height:1.7;
color:white;
margin-bottom:15px;
}

.about-foot{
font-family: 'NextArt', Sans-Serif;        
font-size:1.5rem;
font-weight:700;
line-height:1.7;
color: white;
}


.section-tag{
display:inline-block;
background:#eef2f6;
color:white;
padding:6px 14px;
border-radius:20px;
font-weight:600;
font-size:0.85rem;
margin-bottom:25px;
}


.about-section .section-tag{
background: rgba(255,255,255,0.15);
color: white;
}

/* VALEURS */

.values-box{
background:white;
padding:20px;
border-radius:12px;
box-shadow:0 5px 20px rgba(0,0,0,0.05);
margin-bottom:15px;
display:flex;
gap:15px;
}


.values-section h5,
.values-section p{
color:#1d2b3a; /* reste sombre dans les cards blanches */
}

.values-bar{
width:6px;
border-radius:10px;
}

.bar-blue{background:#2f6fe4;}
.bar-red{background:#e53935;}
.bar-white{background:#e9ecef;}

.values-box h5{
font-family : 'NextArt';
margin:0;
font-weight:600;
color:#1d2b3a;
}

.values-title{
font-family: 'CPE';    
text-align:left;
padding-left: 18px;
font-weight: bold;
font-size: 1.9rem;
color: white;
text-transform: uppercase;
}

/* EVENTS */

.event-card{
position:relative;
border-radius:12px;
overflow:hidden;
}

.event-card img{
width:100%;
height:100%;
object-fit:cover;
}

.event-overlay{
position:absolute;
bottom:0;
left:0;
right:0;
padding:20px;
background:linear-gradient(transparent,rgba(0,0,0,0.8));
color:white;
}

/* WHY JOIN */

.why-card{
background:white;
padding:20px;
border-radius:12px;
box-shadow:0 5px 20px rgba(0,0,0,0.06);
text-align:center;
height:100%;
margin: 0 20px;
color:#1d2b3a; /* reste sombre dans les cards blanches */
}

.why-card i{
font-size:28px;
color:#2f6fe4;
margin-bottom:10px;
}

@media (max-width:992px){

.hero-premium{
padding:50px 0;
}

.hero-text{
margin-bottom:30px;
}

.hero-text h1{
font-size:2.1rem;
}

 .why-section{
        padding: 30px 10px; /* moins de padding global */
    }

    .why-card{
        margin: 0 5px; /* réduit encore les espaces */
        padding: 20px; /* légèrement plus compact */
    }

    .row.g-4{
        --bs-gutter-x: 10px; /* réduit espace horizontal Bootstrap */
        --bs-gutter-y: 15px; /* réduit espace vertical */
    }


}

@media (max-width:768px){
   
    .hero-image{
    margin-bottom: 10px;
}

    .values-title{
    padding-left: 0;    
    text-align: center;    
    }

    .about-section{    
    padding-left : 15px;
    padding-right: 15px;
    }
}





/* ==== VIDEO HYMNE UNION */ 

.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;
}


/* === TOMBINOSCOPE === */

/* 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;
background-color: var(--section-inner);
gap:8px;
margin-top:10px;
}

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

.congres-section,
.instances-section,
.trombinoscope-section {
    background-color: var(--section-bg);
}

.membre-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    transition: 0.2s;
}

/*
.membre-card:hover {
    background: #f8f9fa;
    border-radius: 8px;
}
*/

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

.trombi-text {
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: center;
}




/*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;
    }
}


/* 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 */
    color : #fafafa;
    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; /* bleu clair au survol */
}

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

.footer a {
    color:#fafafa;
}

.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 */
}

/* Chevrons verticaux des menus déroulants */
.footer i {
    font-size: 1.2rem;
    color: #fafafa;
    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: linear-gradient(
    to bottom,
    #1D4FDC 0%,
    #12348F 100%
);
    border-radius: 12px;
    padding: 30px 35px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    color:white;
}

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

.contact-card a {
    color: #D1CDCD;
}

.contact-title {  
   font-family: 'CPE';
    text-transform: uppercase;
    color : #fff;
}

.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;
}

.text-delay {
    color: #D1CDCD;
}

.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 !important;
    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 TABLEAU COMMUNES */

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%;
    }
}


.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;
}

/* === PAGE INSTANCES === */

 .banner { background-color: #e9e9e9; padding: 30px 0; text-align: center; }
        .instances { display: flex; justify-content: space-around; padding: 10px; background-color: #e9e9e9; }
        .instances .column { width: 30%; text-align: center; }
        .instances img { max-width: 100%; height: auto; }
        .congres { padding: 20px; background-color: #d9d9d9; text-align: center; }
        .congres-content {  max-width: 800px; margin: 0 auto; text-align: left;}
        .congres img { width: 100%; height: auto; margin-bottom: 15px;}
        .card-img-top{ width: 100%; height: auto; object-fit: cover;}

        .card-body p:last-child{
        margin-bottom:0;
        }
  
        .directoire-title { margin-top: -24px; padding:0; }

        /*  Harmonisation des Background des 3 blocs */
        .congres-inner,
        .instances-inner,
        .trombi {
            background-color: var(--section-inner);
            border-radius: 8px;
}
      
        /* Alignement identique aux colonnes */
        .congres-wrapper {
            margin-left: 0;
            margin-right: 0;
        }

        /* Bloc interne */
        .congres-inner {
            background-color: #d9d9d9;
            border-radius: 8px;
        }

        .congres-inner .col-md-6 {
            display: flex;
        }

        .congres-inner img {
            height: 100%;
            width: 100%;
            object-fit: cover;
        }


        /* CENTRAGE VERTICAL DU TEXTE */
        .congres-inner .col-md-6:last-child {
            align-items: center;
        }


/* ===== PAGE VIDEOS PATRIOTES ===== */

.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; }
}


/* ===== PAGE AGIR ===== */

.agir-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    align-items: stretch;
}

.agir-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: transparent;
}

.agir-preview {
    width: 100%;
    height: 180px;              /* taille vignette */
    background:  transparent;
    color : inherit;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agir-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;        /* IMPORTANT : pas de zoom excessif */
}

.agir-name {
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
}

.agir-titre {
    font-family: 'CPE';
    text-transform: uppercase;
    text-align: center;
    padding-top : 18px;
    padding-bottom: 18px;
    
}


/* Mobile */
@media (max-width: 768px) {
    .agir-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .agir-grid {
        grid-template-columns: 1fr;
    }
}
