/* CSS pour la navbar */

.classic-navbar {
  background: rgba(60, 96, 145, 0.85) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid rgba(60, 96, 145, 0.8);
}

.classic-brand {
  font-weight: 600;
  font-size: 1.4rem;
  color: #ffffff !important;
  transition: color 0.2s ease;
}

.classic-brand:hover {
  color: #e3f2fd !important;
}

.brand-text {
  color: #ffffff;
}

.classic-nav .nav-item {
  margin: 0 0.1rem;
}

.classic-link {
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 0.75rem 1rem !important;
  font-weight: 400;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.classic-link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.classic-link.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15);
  border-bottom-color: #ffffff;
  font-weight: 500;
}

.classic-dropdown-menu {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  margin-top: 0;
}

.classic-dropdown-item {
  color: #495057 !important;
  padding: 0.5rem 1.5rem;
  transition: all 0.2s ease;
  font-weight: 400;
}

.classic-dropdown-item:hover {
  background: #f8f9fa;
  color: #2780e3 !important;
}

.classic-dropdown-item.active {
  background: #e3f2fd;
  color: #2780e3 !important;
  font-weight: 500;
}

.classic-divider {
  margin: 0.25rem 0;
  border-color: #dee2e6;
}

.admin-item {
  color: #dc3545 !important;
}

.admin-item:hover {
  background: #fff5f5 !important;
  color: #dc3545 !important;
}

.logout-item {
  color: #dc3545 !important;
}

.logout-item:hover {
  background: #fff5f5 !important;
  color: #dc3545 !important;
}

.classic-toggler {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.classic-toggler:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 991.98px) {
  .classic-navbar {
    background: rgba(60, 96, 145, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* carroussel news */
    .actus {
      padding-left: 1rem;
      padding-right: 1rem;
      padding-bottom: 2rem;
    }
    .actus-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.5rem;
    }
    .actus-header h2 {
      margin: 0;
    }
    .actus-header a {
      font-size: 0.9rem;
      color: #1ea1f2;
      text-decoration: none;
    }

    .carousel-container {
      position: relative;
      overflow: hidden;
    }
    .carousel-track {
      display: flex;
      overflow-x: visible;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 0.5rem;
      margin: 0 -1rem; /* pour que la 1ᵉ et la dernière carte aient un peu de marge latérale */
      transition: transform 0.3s ease-out;
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      cursor: grab;
      position: relative;
      z-index: 10;
    }
    .carousel-track::-webkit-scrollbar {
      display: none;
    }

    .news-card {
      flex: 0 0 80%;
      max-width: 220px;
      margin: 0 1rem;
      border-radius: 8px;
      overflow: hidden;
      scroll-snap-align: start;
      text-decoration: none;
      color: inherit;
    }
    .news-card img {
      display: block;
      width: 100%;
      height: 120px;
      object-fit: cover;
    }
    /* .card-body {
      padding: 0.5rem;
    }
    .card-body small {
      font-size: 0.7rem;
      color: #6e6e73;
    }
    .card-body p {
      margin: 0.25rem 0 0;
      font-size: 0.9rem;
      line-height: 1.2;
      font-weight: 500;
    } */

    /* Styles pendant le drag */
    .carousel-track.dragging {
      cursor: grabbing;
      cursor: -webkit-grabbing;
      transition: none;
      scroll-behavior: auto;
      z-index: 20;
    }

    /* Indicateur visuel quand on est à la fin du carrousel */
    .carousel-track.at-end {
      /* Optionnel : ajouter un effet visuel subtil */
      box-shadow: inset -10px 0 20px -10px rgba(0,0,0,0.1);
    }

    /* Empêcher la sélection de texte sur les cartes */
    .news-card {
      flex: 0 0 80%;
      max-width: 220px;
      margin: 0 1rem;
      border-radius: 8px;
      overflow: hidden;
      scroll-snap-align: start;
      text-decoration: none;
      color: inherit;
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      pointer-events: auto;
    }


@media (max-width: 576px) {
  .sidebar-ordi {
    display: none;
  }
 }

 @media (min-width: 576px) {
   .top-mobile {
     display: none;
   }
  }

/* Navigation mobile en bas d'écran */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  border-top: 1px solid #e9ecef;
  padding: 8px 0;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  width: 100%;
}

.mobile-bottom-nav__item {
  flex: 1;
  text-align: center;
}

.mobile-bottom-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #6c757d;
  padding: 8px 4px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-bottom-nav__link:hover {
  color: #375a7f;
  background-color: #f8f9fa;
}

.mobile-bottom-nav__link.active {
  color: #375a7f;
  background-color: #e3f2fd;
}

.mobile-bottom-nav__icon {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.mobile-bottom-nav__label {
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
}

/* Ajuster le padding du body pour la navigation mobile */
@media (max-width: 991.98px) {
  body {
    padding-bottom: 80px;
  }
}

/* Styles pour le menu latéral mobile */
.offcanvas {
  max-width: 280px;
}

.offcanvas-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.offcanvas-title {
  font-weight: 600;
  color: #375a7f;
}

.offcanvas-body {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px); /* Hauteur totale moins le header */
}

.list-group {
  flex: 1;
}

.list-group-item {
  border: none;
  border-radius: 0;
  padding: 12px 16px;
  transition: background-color 0.2s ease;
}

.list-group-item:hover {
  background-color: #f8f9fa;
}

.list-group-item i {
  width: 20px;
  text-align: center;
  color: #6c757d;
}

.list-group-item.active i {
  color: white;
}

/* Section utilisateur en bas */
.offcanvas-body .mt-auto {
  margin-top: auto !important;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  margin-left: -1rem;
  margin-right: -1rem;
  margin-bottom: -1rem;
  padding: 1rem;
}

/* Styles pour le dropdown utilisateur */
.offcanvas-body .dropdown-menu {
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 1px solid #e9ecef;
}

.offcanvas-body .dropdown-item {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.offcanvas-body .dropdown-item:hover {
  background-color: #f8f9fa;
}

.offcanvas-body .dropdown-item.text-danger:hover {
  background-color: #f8d7da;
}

.offcanvas-body .btn-link {
  text-decoration: none;
  border: none;
}

.offcanvas-body .btn-link:hover {
  color: #375a7f !important;
}

/* Style pour le bouton du bottom menu */
.mobile-bottom-nav__link[data-bs-toggle="offcanvas"] {
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
}

.mobile-bottom-nav__link[data-bs-toggle="offcanvas"]:hover {
  color: #375a7f;
  background-color: #f8f9fa;
}

/* DEBUT CSS ACTIVITY FEED */
.sticky-top { top: 6em; }

.bleuPiou {
  background: #375a7f;
}

.activity-feed {
  padding: 15px;
}
.activity-feed .feed-item {
  position: relative;
  padding-bottom: 20px;
  padding-left: 30px;
  border-left: 2px solid #e4e8eb;
}
.activity-feed .feed-item:last-child {
  border-color: transparent;
}
.activity-feed .feed-item:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: -6px;
  width: 10px;
  height: 10px;
  border-radius: 6px;
  background: #fff;
}

#rouge:after {
  border: 1px solid #f37167;
  background: #f37167;
}

#orange:after {
  border: 1px solid #F39C12;
  background: #F39C12;
}

#vert:after {
  border: 1px solid #48C9B0;
  background: #48C9B0;
}

.activity-feed .feed-item .date {
  position: relative;
  top: -5px;
  color: #8c96a3;
  text-transform: uppercase;
  font-size: 13px;
}
.activity-feed .feed-item .text {
  position: relative;
  top: -3px;
}

/* FIN CSS ACTIVITY FEED */


/* LIGNE AVEC TEXTE (FOND BLEU) */
.text-divider{margin: 2em 0; line-height: 0; text-align: center;}
.text-divider span{background-color: #13273a; padding: 1em;}
.text-divider:before{ content: " "; display: block; border-top: 1px solid #19344D; border-bottom: 1px solid #13273a;}

/* LIGNE AVEC TEXTE (FOND BLANC) */
.text-blanc-divider{margin: 2em 0; line-height: 0; text-align: center;}
.text-blanc-divider span{background-color: white; padding: 1em;}
.text-blanc-divider:before{ content: " "; display: block; border-top: 1px solid #19344D; border-bottom: 1px solid #13273a;}

#myBtn {
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 20px; /* Place the button at the bottom of the page */
  right: 20px; /* Place the button 30px from the right */
  z-index: 99; /* Make sure it does not overlap */
  border: none; /* Remove borders */
  outline: none; /* Remove outline */
  background: rgba(60, 96, 145, 0.85); /* Couleur de la navbar */
  color: white; /* Text color */
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 15px; /* Some padding */
  border-radius: 50%; /* Rounded corners pour faire un bouton rond */
  font-size: 1.125rem; /* 18px en rem */
  width: 60px; /* Largeur fixe pour un cercle parfait */
  height: 60px; /* Hauteur fixe pour un cercle parfait */
  display: flex; /* Pour centrer l'icône */
  align-items: center; /* Centrage vertical */
  justify-content: center; /* Centrage horizontal */
  transition: all 0.3s ease; /* Animation fluide */
  box-shadow: 0 2px 10px rgba(60, 96, 145, 0.3); /* Ombre avec la couleur de la navbar */
}

#myBtn:hover {
  transform: translateY(-2px); /* Effet de survol comme le bouton "afficher toutes les catégories" */
  box-shadow: 0 4px 15px rgba(60, 96, 145, 0.5); /* Ombre plus prononcée au survol */
  background: rgba(60, 96, 145, 1); /* Couleur plus opaque au survol */
}

/* Masquer le bouton sur mobile */
@media (max-width: 768px) {
  #myBtn {
    display: none !important;
  }
}

/* BOUTON ROND */
.btn-circle.btn-xl {
    width: 70px;
    height: 70px;
    padding: 20px;
    border-radius: 35px;
    font-size: 1.5rem; /* 24px en rem */
    line-height: 1.33;
}

/* FIN BOUTON ROND */

/* BOUTON QUI PULSE */

@keyframes pulsate {
    0%   { box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.7); }
    50% { box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0); }
    100%   { box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.7); }
}

.pulsate {
    animation: pulsate 3s infinite;
}

/* FIN BOUTON QUI PULSE */

.shadowQuiz-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(217,84,79,1) !important;
}

.shadowFiche-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(80,122,74,1) !important;
}

.shadowSport-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(242,159,5,1) !important;
}

.shadowDivers-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(70,56,122,1) !important;
}

.nopremium {
  color: transparent !important;
  text-shadow: 0 0 5px rgba(0,0,0,0.5) !important;
  user-select: none;
}

.text-muted {
  color:#A9A9A9 !important;
}

.animcolor {
  color: white;
  animation: colorSlide 1s infinite linear;
}

.tile {
  color: white;
  padding: 2rem;
  text-align: justify;
}

.tile i {
  font-size: clamp(2rem, 4vw, 2.6rem); /* Responsive entre 32px et 42px */
  padding: 1rem;
  border-radius: 30%;
  border: 3px solid white;
  margin: 1rem 0;
}

.tile1 {
  background: #2B3D59;
}

.tile2 {
  background: #1F2C40;
}

.tile3 {
  background: #192333;
}

.tile4 {
  background: #293A54;
}

.tile5 {
  background: #26364F;
}

.tile6 {
  background: #25344C;
}

.tile7 {
  background: #24334A;
}

.tile8 {
  background: #223147;
}
/* FIN Accueil */

.titre {
  color: #FBFBFB;
}

.titrebleu {
  color: #2D5C88;
}

#editor>h2 {
    color: #555;
}

div.blanc {
  color: white;
}

/* Styles de hero communs pour toutes les pages */
.hero-home,
.hero-memento,
.hero-section,
.hero-natinfs {
    background: #f8f9fa !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    margin: 4rem 0 2rem 0 !important;
    border: 1px solid #e9ecef !important;
    text-align: center !important;
    color: #333 !important;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem) !important; /* Entre 28px et 40px */
    font-weight: 800 !important;
    margin-bottom: 1rem !important;
    color: #333 !important;
    line-height: 1.2 !important;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem) !important; /* Entre 16px et 19px */
    margin-bottom: 2rem !important;
    color: #666 !important;
    font-weight: 300 !important;
    line-height: 1.6 !important;
}

.cta-button {
    background: linear-gradient(135deg, #2780e3, #ea6666);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem; /* 16px minimum */
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 128, 227, 0.6);
    color: white;
    text-decoration: none;
}

/* Responsive pour les heros */
@media (max-width: 768px) {
    .hero-home,
    .hero-memento,
    .hero-section,
    .hero-natinfs {
        margin: 1rem 0 !important;
        padding: 1.5rem !important;
    }
    
    /* Garder les boutons côte à côte sur mobile */
    .hero-home .d-flex {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.75rem !important;
    }
    
    .hero-home .cta-button {
        font-size: 0.875rem !important; /* 14px minimum */
        padding: 0.6rem 1rem !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem !important; /* 28px minimum */
    }
    
    .hero-subtitle {
        font-size: 1rem !important; /* 16px minimum */
    }
    
    .cta-button {
        font-size: 0.875rem !important; /* 14px minimum */
        padding: 0.5rem 1rem !important;
    }
}

/* ===== CSS MÉMENTO POLICE JUDICIAIRE ===== */

.search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 2rem 0 0 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2780e3;
    box-shadow: 0 0 0 0.2rem rgba(39, 128, 227, 0.25);
}

.search-btn {
    background: linear-gradient(135deg, #2780e3, #ea6666);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 128, 227, 0.4);
    color: white;
}

.category-card {
    border: none;
    border-radius: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
}

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

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2780e3, #5a9ce6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.article-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.article-card:hover .card-title {
    color: #2780e3 !important;
}

.category-badge {
    background: linear-gradient(135deg, #2780e3, #1a5f9e);
    color: white;
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.favorite-btn {
    background: none;
    border: none;
    color: #ffc107;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    color: #ff8c00;
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #ff8c00;
}

.hidden-categories {
    display: none;
}

.load-more-btn {
    background: linear-gradient(135deg, #2780e3, #1a5f9e);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 128, 227, 0.3);
    color: white;
}

.stats-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination .page-link {
    background: #ffffff;
    border: 1px solid #dee2e6;
    color: #007bff;
    margin: 0 0.25rem;
    border-radius: 10px;
}

.pagination .page-link:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

.pagination .page-item.active .page-link {
    background: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

/* Styles pour mobile - Mémento */
@media (max-width: 767.98px) {
    .category-card .card-body {
        padding: 0.75rem;
    }
    
    .category-card .card-title {
        font-size: 0.9rem;
        line-height: 1.2;
    }
    
    .category-card .card-text {
        font-size: 0.75rem;
    }
    
    .category-card .me-3 {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px;
    }
    
    .category-card .fas.fa-folder {
        font-size: 1rem !important;
    }
    
    .search-form {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .search-input {
        flex: 1;
    }
    
    .search-btn {
        width: auto;
        padding: 0.75rem;
        min-width: 50px;
    }
    
    .search-btn .me-2 {
        margin-right: 0 !important;
    }
    
    .search-btn span {
        display: none;
    }
}

/* ===== STYLES HARMONISÉS POUR LES EN-TÊTES DE SECTIONS ===== */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h2 {
    margin: 0;
    font-weight: 400; /* Réduire le font-weight pour être moins gras */
    color: #2c3e50;
    font-size: 1.75rem; /* Taille fixe pour h3 */
    line-height: 1.4;
}

.section-header a {
    color: #2780e3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.section-header a:hover {
    color: rgb(234, 102, 102);
}

/* Responsive */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 1.25rem;
    }
}
