/**
 * Styles pour le plugin Gestion de Reportages
 * Grille responsive moderne et optimisée
 */

/* ========================================
   RESET & BASE
======================================== */

* {
    box-sizing: border-box;
}

/* ========================================
   COMPATIBILITÉ ELEMENTOR - RESPONSIVE
======================================== */

/* Classes de visibilité Elementor */
@media (max-width: 767px) {
    .elementor-hidden-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .elementor-hidden-tablet {
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .elementor-hidden-desktop {
        display: none !important;
    }
}

/* ========================================
   CONTENEUR PRINCIPAL
======================================== */

.reportages-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   GRILLE RESPONSIVE
======================================== */

.reportages-grid {
    display: grid;
    gap: 30px;
    width: 100%;
    margin: 40px 0;
}

/* Configuration des colonnes */
.reportages-cols-1 {
    grid-template-columns: 1fr;
}

.reportages-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.reportages-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.reportages-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive breakpoints */
@media screen and (max-width: 1200px) {
    .reportages-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 900px) {
    .reportages-cols-3,
    .reportages-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reportages-grid {
        gap: 20px;
    }
}

@media screen and (max-width: 600px) {
    .reportages-cols-2,
    .reportages-cols-3,
    .reportages-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .reportages-container {
        padding: 0 15px;
    }
    
    .reportages-grid {
        gap: 20px;
        margin: 20px 0;
    }
}

/* ========================================
   MESSAGE VIDE
======================================== */

.reportages-empty {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    font-size: 18px;
    background: #f9f9f9;
    margin: 40px 0;
}

.reportages-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.reportages-empty p {
    margin: 0;
    font-weight: 500;
}

/* ========================================
   CARTE REPORTAGE
======================================== */

.reportage-card {
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.reportage-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.reportage-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.reportage-link:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* ========================================
   MINIATURE & IMAGE
======================================== */

.reportage-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    display: flex;
}

.reportage-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reportage-card:hover .reportage-thumbnail img {
    transform: scale(1.1);
}

/* Placeholder pour vidéos sans miniature */
.reportage-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.reportage-placeholder-icon {
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.6;
}

/* ========================================
   OVERLAY & BOUTON PLAY
======================================== */

.reportage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transition: background 0.3s ease;
    pointer-events: none;
    padding: 20px;
    opacity: 1;
}

.reportage-card:hover .reportage-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.reportage-overlay-content {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 1;
}

.reportage-play-icon {
    width: 60px;
    height: 60px;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.reportage-card:hover .reportage-play-icon {
    opacity: 1;
    transform: scale(1);
}

.reportage-overlay-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
    opacity: 1;
    transform: none;
}

.reportage-card:hover .reportage-overlay-title {
    transform: none;
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reportage-card {
    animation: fadeIn 0.5s ease-out;
}

/* Délai progressif pour les cartes */
.reportage-card:nth-child(1) { animation-delay: 0s; }
.reportage-card:nth-child(2) { animation-delay: 0.1s; }
.reportage-card:nth-child(3) { animation-delay: 0.2s; }
.reportage-card:nth-child(4) { animation-delay: 0.3s; }
.reportage-card:nth-child(5) { animation-delay: 0.4s; }
.reportage-card:nth-child(6) { animation-delay: 0.5s; }

/* ========================================
   RESPONSIVE
======================================== */

@media screen and (max-width: 600px) {
    .reportage-play-icon {
        width: 50px;
        height: 50px;
    }
    
    .reportage-overlay-title {
        font-size: 16px;
    }
    
    .reportage-overlay {
        padding: 15px;
    }
}

/* ========================================
   DARK MODE SUPPORT
======================================== */

@media (prefers-color-scheme: dark) {
    .reportages-empty {
        background: #1a1a1a;
        color: #999;
    }
    
    .reportage-card {
        background: #2a2a2a;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    }
}

.reportage-placeholder .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   PAGE SINGLE REPORTAGE - LAYOUT 2 COLONNES
======================================== */

.reportage-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.reportage-single {
    background: #ffffff;
}

/* HEADER avec titre */
.reportage-header {
    padding: 40px 40px 30px;
    background: #ffffff;
    border-bottom: 3px solid #C00016;
}

.reportage-header-top {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.back-to-list-top {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #ffffff;
    color: #C00016;
    text-decoration: none;
    border: 2px solid #C00016;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.back-to-list-top:hover {
    background: #C00016;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 0, 22, 0.3);
}

.back-to-list-top::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23C00016"%3E%3Cpath d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

.back-to-list-top:hover::before {
    transform: translateX(-3px);
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"%3E%3Cpath d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/%3E%3C/svg%3E');
}

.all-projects-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #ffffff;
    color: #C00016;
    border: 2px solid #C00016;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 100px;
}

.all-projects-btn:hover {
    background: #C00016;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 0, 22, 0.3);
}

.reportage-single .reportage-title {
    font-size: 42px;
    font-weight: 800;
    margin: 0;
    color: #C00016;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

/* LAYOUT 2 COLONNES */
.reportage-two-columns {
    display: grid;
    grid-template-columns: 30% 70%;
    gap: 0;
    min-height: 500px;
}

/* COLONNE GAUCHE - Informations */
.reportage-left-column {
    padding: 50px 40px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid #e9ecef;
}

.reportage-meta {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.reportage-meta-item {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border-left: 4px solid #C00016;
    transition: all 0.3s ease;
}

.reportage-meta-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(192, 0, 22, 0.1);
}

.reportage-meta-item strong {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #C00016;
    font-weight: 700;
    margin-bottom: 8px;
}

.reportage-meta-item span {
    display: block;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 500;
}

/* Description */
.reportage-content {
    margin-top: 30px;
    line-height: 1.8;
    font-size: 16px;
    color: #495057;
}

.reportage-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #C00016;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reportage-content p {
    margin-bottom: 1em;
}

/* COLONNE DROITE - Vidéo */
.reportage-right-column {
    padding: 40px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 30px;
    position: relative;
}

.reportage-video {
    margin: 0;
    width: 100%;
}

.reportage-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.reportage-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.reportage-no-video {
    padding: 80px 20px;
    text-align: center;
    background: #f8f9fa;
    color: #999;
    font-size: 18px;
    border: 2px dashed #dee2e6;
}

/* GALERIE D'IMAGES */
.reportage-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.reportage-gallery-item {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.reportage-gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(192, 0, 22, 0.2);
}

.reportage-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.reportage-gallery-item:hover img {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .reportage-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .reportage-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* NAVIGATION - Bouton retour */
.reportage-navigation {
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #ffffff;
    color: #C00016;
    text-decoration: none;
    border: 2px solid #C00016;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.back-to-list:hover {
    background: #C00016;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 0, 22, 0.3);
}

.back-to-list::before {
    content: "←";
    font-size: 20px;
    font-weight: bold;
}

/* ========================================
   RESPONSIVE - SINGLE REPORTAGE
======================================== */

@media (max-width: 1024px) {
    .reportages-grid-2 {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .reportage-two-columns {
        grid-template-columns: 1fr;
    }
    
    .reportage-right-column {
        order: -1;
        padding: 30px;
        min-height: 400px;
    }
    
    .reportage-left-column {
        border-right: none;
        border-top: 1px solid #e9ecef;
    }
}

@media (max-width: 768px) {
    .reportages-grid,
    .reportages-grid-2,
    .reportages-grid-3,
    .reportages-grid-4 {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .reportage-single-container {
        padding: 30px 15px;
    }

    .reportage-header {
        padding: 30px 25px 20px;
    }
    
    .reportage-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .back-to-list-top,
    .all-projects-btn {
        padding: 8px 16px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }

    .reportage-single .reportage-title {
        font-size: 32px;
    }

    .reportage-left-column,
    .reportage-right-column {
        padding: 30px 25px;
    }

    .reportage-meta {
        gap: 16px;
        margin-bottom: 30px;
    }
    
    .reportage-meta-item {
        padding: 16px;
    }
    
    .reportage-meta-item span {
        font-size: 16px;
    }

    .reportage-content {
        font-size: 15px;
        margin-top: 20px;
    }
    
    .reportage-content h2 {
        font-size: 20px;
    }

    .reportage-navigation {
        padding: 30px 25px;
    }

    .reportage-overlay .reportage-title {
        font-size: 18px;
    }

    .play-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .reportages-grid,
    .reportages-grid-2,
    .reportages-grid-3,
    .reportages-grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .reportage-single-container {
        padding: 20px 10px;
    }
    
    .reportage-header {
        padding: 25px 20px 15px;
    }
    
    .back-to-list-top,
    .all-projects-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .reportage-single .reportage-title {
        font-size: 26px;
    }
    
    .reportage-left-column,
    .reportage-right-column {
        padding: 25px 20px;
    }
    
    .reportage-meta-item {
        padding: 14px;
    }
    
    .reportage-meta-item strong {
        font-size: 11px;
    }
    
    .reportage-meta-item span {
        font-size: 15px;
    }
    
    .reportage-navigation {
        padding: 25px 20px;
    }
    
    .back-to-list {
        padding: 14px 24px;
        font-size: 14px;
    }

    .reportage-overlay .reportage-title {
        font-size: 16px;
    }

    .play-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .reportage-content h2 {
        font-size: 22px;
    }
    
    .reportage-overlay-title {
        font-size: 15px;
    }
}
