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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #F7F5EF;
  color: #1e293b;
  line-height: 1.6;
}

/* ---------- HEADER ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid #e2e8f0;
  background-color: #FFFFFF;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header-content {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
}

/* Logo Section */
.logo-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo{
  height: 50px;
}

/* Desktop Navigation */
.desktop-nav {
  display: none;
    align-items: center;
    gap: 1.5rem;
}

/* --- ALIGNEMENT CONTENUS (VIDÉOS & TWEETS) --- */



/* --- OPTIMISATION PERFORMANCE --- */
/* (Optionnel) Si vous avez des styles spécifiques pour le chargement différé */
.youtube-video {
    background-color: #000; /* Évite un flash blanc avant le chargement */
}


/* --- Styles pour Mercato LDC etc.. --- */

.h1-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.category-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cat-link {
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: #f1f5f9;
    color: #475569;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cat-link:hover {
    background-color: #e2e8f0;
    color: #003484;
}

.cat-link.active {
    background-color: #003484;
    color: white;
    border-color: #003484;
}

/* Ajustement responsive pour mobile */
@media (max-width: 600px) {
    .h1-container {
        align-items: center;
        text-align: center;
    }
    
    .category-links {
        justify-content: center;
    }
}


@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 16px;
}

.nav-link:hover {
  background-color: #f1f5f9;
  color: #2563eb;
}

/* Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 16px;
  border: none;
  background: none;
  cursor: pointer;
}

.dropdown-trigger:hover {
  background-color: #f1f5f9;
  color: #2563eb;
}

.dropdown-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  width: 200px;
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 50;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  list-style-type: none;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.dropdown-item {
  display: block;
  padding: 5px;
  border-radius: 6px;
  text-decoration: none;
  color: #374151;
  margin-bottom: 8px;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f8fafc;
}

.dropdown-item:last-child {
  margin-bottom: 0;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
  color: #64748b;
}

.action-btn:hover {
  background-color: #f1f5f9;
  color: #2563eb;
}

.mobile-menu-btn {
  display: flex;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile Menu */
  .mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e2e8f0;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}

.mobile-nav .nav-link {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 16px;
}

.mobile-nav .nav-link:last-child {
  border-bottom: none;
}

/* SVG Icons */
.icon {
  width: 20px;
  height: 20px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}






/* ---------- NEWS ---------- */
    
.news-container {
  background-color: white;
  margin: 1rem 15% 1rem 15%;
  padding: 1rem 2% 1rem 2%;
  border-radius: 10px;
}

.news-container h1{
  padding-bottom: 12px;
  color: #003484ff;
  font-size: 1.7em;
}

.news-item {
  margin-bottom: 10px;
}

.news-item h2 {
    font-size: 1.14em;
    margin-bottom: 2px;
}

.news-item a {
    text-decoration: none;
    color: #303030;
}

.news-item a:hover {
    text-decoration: underline;
}

.news-item p {
    color: #474747;
}

.news-content {
    display: flex;
    align-items: start;
}

.news-content.stacked {
    display: block;
}

.description-container {
    flex: 1;
}

.description-container p {
    margin-top: 8px;
}

.aspect-ratio-box {
    position: relative;
    width: 125px;
    height: 0;
}

.aspect-ratio-box img {
    position: absolute;
    top: 10px;
    left: 0;
    width: 170px;
    object-fit: cover;
    height: 80px;
}

img.news-image {
    margin-top: 4%;
    max-width: 90%;
    height: 70px;
    margin-right: 20px;
    object-fit: cover;
    border-radius: 10px;
}








/* --- NOUVEAU: Centrage des Tweets --- */
.news-item > blockquote.twitter-tweet {

    max-width: 550px; /* Taille standard d'un Tweet (ajustez si besoin) */
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.tweet-container {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}


/* --- NOUVEAU: Centrage des Vidéos YouTube intégrées --- */
.news-video-embed {
    /* Le conteneur du contenu de la vidéo */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre le contenu horizontalement */
    text-align: center; /* Centre les petits textes (date) */
}


* Conteneur principal de la preview vidéo */

.video-preview-container {

    position: relative;

    width: 100%;

    max-width: 550px;

    margin-top: 10px;

    margin-left: auto;

    margin-right: auto;

}



/* Le lien qui entoure l'image doit être le référentiel */

.video-link-wrapper {

    display: block;

    position: relative; /* Important pour le positionnement du logo */

    width: 100%;

}



.video-link-wrapper .news-image-large {

    width: 100%;

    height: auto;

    display: block;

    border-radius: 8px;

}



/* Centrage parfait du logo YouTube */

.youtube-overlay-icon {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%); /* Décale de moitié sa propre taille vers le haut et la gauche */

    width: 60px; /* Ajustez la taille selon vos besoins */

    height: auto;

    opacity: 0.9;

    transition: transform 0.2s ease, opacity 0.2s ease;

    pointer-events: none; /* Le clic traverse le logo pour activer le lien */

}



/* Effet au survol */

.video-link-wrapper:hover .youtube-overlay-icon {

    transform: translate(-50%, -50%) scale(1.1);

    opacity: 1;

}


/* --- Styles spécifiques au lien YouTube sans iframe --- */

/* Conteneur principal */
.youtube-link-version.full-width-image {
    width: 100%;
    max-width: 600px;
    margin: 15px auto 0 auto; /* Ajout de auto pour le centrage horizontal */
    position: relative;
}

/* L'image principale (la miniature) */
.youtube-link-version .news-image-large {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 8px;
}

/* Lien autour de l'image */
.youtube-link-version.image-overlay a {
    display: block;
    position: relative;
    width: 100%;
}

/* Le logo YouTube en superposition */
.youtube-link-version .youtube-overlay-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: auto;
    transform: translate(-50%, -50%);
    opacity: 0.85;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Effet au survol spécifique à ce bloc */
.youtube-link-version.image-overlay a:hover .youtube-overlay-logo {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

/* Style de la date sous l'image */
.youtube-link-version p small {
    display: block;
    text-align: center;
    margin-top: 5px;
}



/* === Modern YouTube Video Card === */


.video-card {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0; /* Le 'auto' ici centre la vidéo si elle est plus petite que le texte */
    width: 100%;
    max-width: 560px;   /* C'est cette ligne qui réduit la taille */
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    transition: transform .25s ease, box-shadow .25s ease;
}

/* Force l'alignement à gauche même dans le mode 'stacked' */
.news-content.stacked .video-card {
    margin-left: 0;
    margin-right: 0;
}


/* Responsive embed */

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* */
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* Mis à jour selon l'image */
}


.news-content.stacked .video-card {
    margin-left: 0;      /* Au lieu de auto */
    margin-right: auto;  /* Au lieu de auto */
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.video-info {
    padding: 14px 18px;
    color: #fff;
}

.video-info h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
}


.news-separator {
    height: 1px; /* Hauteur de la barre */
    background-color: #e8e3d5; /* Couleur noire */
    margin: 10px 0; /* Espace vertical autour de la barre */
}


/* ---------- BOUTONS DE PAGINATION ---------- */

.boutons-fin {
    width: 60%;
    margin: 25px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#btn-prev,
#btn-next {
    border: 1px solid black;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 5px;
}

#btn-prev {
    margin-right: 20px;
}

#btn-next {
    margin-left: 20px;
}

.btn-primary {
    background-color: #003484ff;
    color: #FFFFFF;
    border: 1px solid #000000;
}

.btn-primary:hover {
    background-color: #fc7e2c;
}

.btn-primary.disabled {
    background-color: #bdc3c7;
    color: #000;
    border: 1px solid #7f8c8d;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
  body {
    font-size: 0.97rem;
  }

  .header-container {
    flex-direction: column;
    margin: 15px 2px 18px 2px;
    padding: 2px 1% 6px 1%;
  }

  .website-logo {
    display: block;
    margin: 0 auto;
    width: 90%;
  }

  .navbar ul {
    text-align: left;
    padding: 0;
  }

  .navbar li {
    float: none;
    display: inline-block;
  }

  .navbar li ul {
    position: absolute;
    left: 0;
    right: 0;
    max-width: 90vw;
    overflow: hidden;
    white-space: normal;
  }

  .navbar li a span {
    padding: 1px 8px 0px 1px;
  }
}

@media (max-width: 600px) {
  .news-container {
    margin: 0px 1px 5px 1px;
    padding: 2% 3% 2px 3%;
  }

  h1 {
    font-size: 1.6em;
    margin-left: 0;
  }

  .news-item h2 {
    font-size: 1rem;
    text-align: justify;
  }

  .news-item p {
    font-size: 0.8rem;
    text-align: justify;
  }

  /* --- MODIFICATION ICI : MASQUER LES IMAGES --- */
  
  /* On masque le conteneur des images classiques */
  .aspect-ratio-box, 
  img.news-image {
    display: none !important;
  }

  /* On masque aussi les miniatures des vidéos YouTube si besoin */
  .youtube-link-version.full-width-image,
  .news-image-large {
    display: none !important;
  }

  /* On s'assure que le contenu textuel prend toute la place */
  .news-content {
    display: block; /* On repasse en bloc simple au lieu de flex */
  }

  .description-container {
    padding-left: 0;
    margin-top: 5px;
  }
}

/* FOOTER */

.footer {
    background-color: #111827;
    color: white;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

/* Main Footer Content */
.footer-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-main {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Logo Section */
.footer-logo-section {
    grid-column: span 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    background-color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.footer-logo h3 {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.footer-description {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Footer Links Sections */
.footer-links-section {
    grid-column: span 1;
}

.footer-section-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #60a5fa;
    font-size: 16px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}
.footer-link:hover {
    color: white;
}

/* Separator */
.footer-separator {
    height: 1px;
    background-color: #374151;
    margin: 2rem 0;
    border: none;
}

/* Bottom Footer */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #9ca3af;
    font-size: 14px;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}