    
  @media (max-width: 768px) {
    .hero-carousel {
        position: relative;
        height: auto;
        min-height: 400px;padding-top:20px;
    }
news-header h3 {
    color: #f0ebff;
      }
    .news-widget {
        
    order: 4;
    border-radius: 15px;
    margin: 20px;
    width: calc(100% - 40px);
    backdrop-filter: none;
    position: relative;
    }
.carousel-controls {
    position: absolute;
    }
    .news-carousel {
        display: block; /* Empile les items verticalement */
    }

    .news-item {
        min-width: auto;
        margin-bottom: 15px;
    }

    .news-controls {
        display: none; /* Cache les flèches */
    }
}/* Nouvelle structure pour le widget news */
.news-container {
    position: relative;
    z-index: 4;
}

.news-content-wrapper {
    overflow: hidden;
    position: relative;
}

/* Styles pour les petits écrans */
@media (max-width: 768px) {
    .news-container {
        order: 3;
        width: 100%;
    }
    
    .hero-carousel {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    
    .carousel-container {
        order: 1;
        min-height: 350px;
    }
    
    .carousel-indicators {
        order: 2;
        position: relative;
        bottom: auto;
        margin: 15px 0;
    }
    
    .news-widget {
        order: 4;
        border-radius: 15px;
        margin: 20px;
        width: calc(100% - 40px);margin-top: 30vh;
    }
    
    .news-controls {
        margin-top: 15px;
    }
}

/* Pour les très petits écrans */
@media (max-width: 375px) {
    .news-widget {
        margin: 10px;
        width: calc(100% - 20px);
        padding: 15px;backdrop-filter:none;
    }
    
    .news-item {
        min-width: calc(100% - 10px);
        margin: 0 5px;
    }
}
      
     /* Widget News - Styles vidéo */
.video-badge {
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.news-video-container {
    position: relative;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    cursor: pointer;
    background: var(--dark);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-button i {
    font-size: 2rem;
    color: white;
    margin-left: 5px;
}

.video-thumbnail:hover .play-button {
    background: var(--secondary);
    transform: translate(-50%, -50%) scale(1.1);
}

.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.btn-video-watch {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.btn-video-watch:hover {
    background: #144870;
    transform: translateY(-2px);
}

/* Mode Picture-in-Picture */
.pip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.pip-overlay.active {
    display: flex;
}

.pip-container {
    width: 400px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: pipAppear 0.3s ease;
}

@keyframes pipAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pip-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pip-header h4 {
    margin: 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pip-controls {
    display: flex;
    gap: 10px;
}

.pip-control {
    background: transparent;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pip-control:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pip-close:hover {
    background: var(--danger);
}

.pip-video {
    width: 100%;
    height: 225px; /* 16:9 ratio */
    background: black;
}

/* Styles pour le mode sticky/déplaçable */
.pip-container.sticky {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    cursor: move;
    z-index: 10001;
}

.pip-container.sticky .pip-video {
    height: 169px; /* 16:9 ratio */
}

.pip-container.sticky .pip-header {
    padding: 10px 15px;
    cursor: move;
}

.pip-container.sticky .pip-header h4 {
    font-size: 0.9rem;
}

/* Auto-play dans le carousel (miniature) */
.youtube-player-autoplay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .pip-container {
        width: 90%;
        max-width: 400px;
    }
    
    .pip-container.sticky {
        width: 250px;
        right: 10px;
        bottom: 10px;
    }
    
    .pip-container.sticky .pip-video {
        height: 141px;
    }
    
    .video-thumbnail {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .news-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .btn-video-watch {
        width: 100%;
        justify-content: center;
    }
    
    .news-link {
        width: 100%;
        justify-content: center;
    }
} 
 /* Widget News - Version 1 news à la fois */
.news-widget {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px; /* Réduit pour 1 news */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.news-carousel {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    width: 100%;
}

.news-content-wrapper {
    overflow: hidden;
    width: 100%;
    border-radius: 10px;
}

.news-items-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.news-item {
    flex: 0 0 100%;
    width: 100%;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.news-date {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-badge {
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.03);
}

.news-item h4 {
    color: var(--dark);
    font-size: 1.3rem;
    margin: 5px 0;
    line-height: 1.4;
    min-height: 60px;
}

.news-item p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 10px;
}

.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-video-watch {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-video-watch:hover {
    background: #144870;
    transform: translateY(-2px);
}

.news-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.news-link:hover {
    gap: 12px;
    color: #144870;
}

/* Contrôles de navigation améliorés */
.news-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 25px;
}

.news-prev, .news-next {
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(26, 82, 118, 0.3);
}

.news-prev:hover:not(:disabled), .news-next:hover:not(:disabled) {
    background: #144870;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(26, 82, 118, 0.4);
}

.news-prev:disabled, .news-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

.news-counter {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(26, 82, 118, 0.1);
    padding: 8px 20px;
    border-radius: 25px;
    min-width: 80px;
    text-align: center;
}

#current-news {
    font-size: 1.3rem;
    color: var(--dark);
}

/* Indicateurs */
.news-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.news-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-indicator.active {
    background: var(--primary);
    transform: scale(1.2);
}

.news-indicator:hover {
    background: var(--primary);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .news-widget {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin: 20px auto;
        width: calc(100% - 40px);
        order: 3;
        padding: 20px;
    }
    
    .news-item {
        padding: 15px;
    }
    
    .news-item h4 {
        font-size: 1.1rem;
        min-height: auto;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-controls {
        gap: 20px;
    }
    
    .news-prev, .news-next {
        width: 40px;
        height: 40px;
    }
    
    .news-counter {
        font-size: 1rem;
        padding: 6px 15px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .news-widget {
        padding: 15px;
        margin: 15px auto;
        width: calc(100% - 30px);
    }
    
    .news-item {
        padding: 12px;
    }
    
    .news-image {
        height: 160px;
    }
    
    .news-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .btn-video-watch, .news-link {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    
    .news-controls {
        gap: 15px;
    }
    
    .news-prev, .news-next {
        width: 35px;
        height: 35px;
    }
    
    .news-counter {
        font-size: 0.9rem;
        padding: 5px 12px;
    }
}/* États vides/erreurs */
.no-news-message, .error-state {
    flex: 0 0 100%;
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.empty-state, .error-state {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin: 0 auto;
}

.empty-state i {
    color: #e0e0e0;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: var(--gray);
    margin-bottom: 15px;
    font-weight: 600;
}

.empty-state p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.error-state i {
    color: var(--danger);
    margin-bottom: 20px;
}

.error-state h4 {
    color: var(--danger);
    margin-bottom: 15px;
}

.error-state p {
    color: var(--gray);
}
  /* Widget News - Position responsive */
.news-widget {
    position: absolute;
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10;
    
    /* Position par défaut (desktop) */
    right: 5%;
    bottom: 50px;
    left: auto;
    transform: none;
}

/* Grands écrans (≥ 1200px) - Widget plus étroit et à droite */
@media (min-width: 1200px) {
    .news-widget {
        width: 70%;
        max-width: 700px;
        right: 5%;
        left: auto;
        bottom: 60px;
    }
    
    .hero-carousel {
        position: relative;
    }
    
    .carousel-slide .slide-content {
        max-width: 60%; /* Pour laisser de la place au widget */
        padding-right: 40%;
    }
}

/* Très grands écrans (≥ 1400px) */
@media (min-width: 1400px) {
    .news-widget {
        width: 60%;
        max-width: 650px;
        right: 8%;
        bottom: 70px;
    }
}

/* Tablettes (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .news-widget {
        width: 85%;
        max-width: 750px;
        right: 50%;
        left: 50%;
        transform: translateX(-50%);
        bottom: 40px;
    }
}

/* Mobiles (≤ 767px) - Widget en bas avec plus de marge */
@media (max-width: 767px) {
    .news-widget {
        position: relative;
        width: calc(100% - 30px);
        margin: 30px auto 60px auto; /* PLUS BAS sur mobile */
        right: auto;
        left: auto;
        bottom: auto;
        transform: none;
        order: 3; /* S'assure qu'il vient après le hero */
    }
    
    .hero-carousel {
        min-height: 500px;
        display: flex;
        flex-direction: column;
    }
    
    .carousel-container {
        order: 1;
        min-height: 400px;
    }
    
    .carousel-indicators {
        order: 2;
        position: relative;
        bottom: auto;
        margin: 20px 0;
    }
    
    .news-widget {
        order: 3;
        margin-top: 40px; /* Espacement supplémentaire */
    }
    
    /* Ajustement du contenu hero pour mobile */
    .slide-content {
        padding-bottom: 100px !important; /* Laisser de la place en bas */
    }
}

/* Très petits mobiles (≤ 480px) */
@media (max-width: 480px) {
    .news-widget {
        margin: 40px auto 80px auto; /* ENCORE PLUS BAS */
        padding: 20px;
    }
    
    .news-item {
        padding: 15px;
    }
    
    .news-image {
        height: 180px;
    }
    
    .hero-carousel {
        min-height: 450px;
    }
    
    .carousel-container {
        min-height: 350px;
    }
}

/* Ajustements pour le contenu hero pour ne pas être caché */
@media (min-width: 768px) {
    .carousel-slide .slide-content {
        position: relative;
        z-index: 5;
        padding-right: 10%; /* Laisser de la place pour le widget à droite */
    }
    
    /* Sur les slides spécifiques, ajuster les couleurs pour contraste */
    .carousel-slide .slide-content h1,
    .carousel-slide .slide-content p {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Animation douce pour le repositionnement */
.news-widget {
    transition: all 0.3s ease;
}

/* Ajustement de l'overlay hero pour la transparence */
@media (min-width: 768px) {
    .carousel-slide .slide-background {
        background-image: linear-gradient(rgba(26, 82, 118, 0.85), rgba(26, 67, 4, 0.9)), url('...');
    }
    
    /* Créer un dégradé plus fort à droite pour le contraste avec le widget */
    .carousel-slide .slide-background::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 40%;
        background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
        pointer-events: none;
    }
}

/* Pour les écrans larges, réduire la largeur du contenu hero */
@media (min-width: 1200px) {
    .slide-content {
        max-width: 55%;
        padding-right: 45%;
    }
    
    .hero-buttons {
        flex-wrap: nowrap;
    }
}

/* Ajustement des boutons hero pour mobile */
@media (max-width: 767px) {
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Position du widget en bas à droite pour desktop, centré et bas pour mobile */
@media (min-width: 992px) {
    .news-widget {
        animation: slideInRight 0.5s ease-out;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
  .news-counter {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(26, 82, 118, 0.1);
    padding: 8px 20px;
    border-radius: 25px;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.news-counter.updating {
    background: rgba(26, 82, 118, 0.2);
    transform: scale(1.05);
}

#current-news {
    font-size: 1.3rem;
    color: var(--dark);
    font-weight: 700;
    transition: all 0.3s ease;
}

#total-news {
    color: var(--gray);
    font-weight: 500;
}

