/* =====================================================================
   SINGLE PROJET V2 - Nouvelles fonctionnalités
   Description, Plan Viewer, Vidéos, Moodboard, PDF intégré
   ===================================================================== */

/* ============================================
   DESCRIPTION DU PROJET - Layout 2 colonnes
   ============================================ */
.projet-description-section {
    margin-bottom: 100px;
}

.description-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: start;
}

.description-text {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--blue-secondary, #2c3e50);
}

.description-text p {
    margin-bottom: 1.4em;
}

.description-full p:first-child,
.description-editor-content p:first-child {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--blue-primary, #1e3a5f);
    line-height: 1.7;
}

.description-full h2,
.description-full h3,
.description-editor-content h2,
.description-editor-content h3 {
    font-family: var(--font-sans, sans-serif);
    color: var(--blue-primary, #1e3a5f);
    margin-top: 2em;
    margin-bottom: 0.8em;
}

.description-full ul,
.description-full ol,
.description-editor-content ul,
.description-editor-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.4em;
}

.description-full li,
.description-editor-content li {
    margin-bottom: 0.5em;
}

.description-specs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 120px;
}

.description-specs .spec-card {
    display: flex;
    gap: 15px;
    padding: 22px 20px;
    background: white;
    border: 1px solid var(--blue-light, #e2e8f0);
    transition: all 0.3s ease;
}

.description-specs .spec-card:hover {
    border-color: var(--blue-primary, #1e3a5f);
    box-shadow: 0 8px 25px rgba(30, 74, 143, 0.08);
    transform: translateY(-2px);
}

.description-specs .spec-icon {
    flex-shrink: 0;
    color: var(--blue-primary, #1e3a5f);
    opacity: 0.6;
}

.description-specs .spec-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.description-specs .spec-label {
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted, #94a3b8);
}

.description-specs .spec-value {
    font-family: var(--font-sans, sans-serif);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--blue-primary, #1e3a5f);
}

/* ============================================
   PLAN VIEWER - Lecteur intégré
   ============================================ */
.plan-viewer {
    border: 2px solid var(--blue-primary, #1e3a5f);
    background: #fafbfc;
    margin-bottom: 30px;
    overflow: hidden;
}

.plan-viewer:fullscreen {
    background: #1a1a2e;
}

.plan-viewer:fullscreen .plan-viewer-stage {
    height: calc(100vh - 110px);
}

.plan-viewer:fullscreen .plan-viewer-image {
    filter: invert(0);
}

.plan-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--blue-primary, #1e3a5f);
    color: white;
    gap: 15px;
}

.plan-viewer-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.plan-counter {
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    letter-spacing: 1px;
    min-width: 50px;
    text-align: center;
}

.plan-viewer-title {
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.8;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-viewer-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.plan-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.plan-viewer-stage {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(rgba(30, 74, 143, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 74, 143, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    user-select: none;
    -webkit-user-select: none;
}

.plan-viewer-image {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    transition: transform 0.15s ease;
    filter: contrast(110%);
    pointer-events: none;
}

.plan-viewer-strip {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-top: 1px solid rgba(30, 74, 143, 0.15);
    background: #f0f2f5;
}

.plan-strip-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(30, 74, 143, 0.1);
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.25s ease;
    min-width: 100px;
}

.plan-strip-item:hover {
    opacity: 0.8;
    background: rgba(30, 74, 143, 0.05);
}

.plan-strip-item.active {
    opacity: 1;
    background: white;
    box-shadow: 0 -2px 0 var(--blue-primary, #1e3a5f) inset;
}

.plan-strip-item img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border: 1px solid rgba(30, 74, 143, 0.15);
}

.plan-strip-item.active img {
    border-color: var(--blue-primary, #1e3a5f);
}

.strip-label {
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--blue-primary, #1e3a5f);
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   PDF VIEWER INTÉGRÉ (même onglet)
   ============================================ */
.pdf-inline-viewer {
    border: 2px solid var(--blue-primary, #1e3a5f);
    overflow: hidden;
    background: #f5f5f5;
}

.pdf-inline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--blue-primary, #1e3a5f) 0%, #2a4a6b 100%);
    color: white;
}

.pdf-inline-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.pdf-inline-title svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.pdf-inline-controls {
    display: flex;
    gap: 8px;
}

.pdf-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pdf-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.pdf-inline-frame-wrap {
    height: 500px;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdf-inline-frame-wrap.expanded {
    height: 85vh;
}

.pdf-inline-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   VIDÉOS - Grille de players
   ============================================ */
.gallery-videos {
    margin-bottom: 100px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
}

.video-card {
    background: white;
    border: 1px solid var(--blue-light, #e2e8f0);
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: var(--blue-primary, #1e3a5f);
    box-shadow: 0 12px 35px rgba(30, 74, 143, 0.12);
}

.video-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--blue-primary, #1e3a5f);
    color: white;
}

.video-card-header svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.video-card-title {
    flex: 1;
    font-family: var(--font-sans, sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
}

.video-card-badge {
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.video-card-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-card-player iframe,
.video-card-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Une seule vidéo = pleine largeur */
.videos-grid:has(.video-card:only-child) {
    grid-template-columns: 1fr;
}

/* ============================================
   MOODBOARD - Masonry Grid
   ============================================ */
.gallery-moodboard {
    margin-bottom: 100px;
}

.moodboard-note {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 25px 30px;
    background: rgba(30, 74, 143, 0.03);
    border-left: 3px solid var(--blue-primary, #1e3a5f);
    margin-bottom: 40px;
}

.moodboard-note svg {
    flex-shrink: 0;
    color: var(--blue-primary, #1e3a5f);
    opacity: 0.6;
    margin-top: 2px;
}

.moodboard-note p {
    margin: 0;
    font-family: var(--font-sans, sans-serif);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--blue-secondary, #2c3e50);
    font-style: italic;
}

.moodboard-masonry {
    columns: 3;
    column-gap: 16px;
}

.mood-item {
    break-inside: avoid;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    background: white;
    border: 1px solid rgba(30, 74, 143, 0.08);
    transition: all 0.3s ease;
    cursor: default;
}

.mood-item:hover {
    border-color: var(--blue-primary, #1e3a5f);
    box-shadow: 0 10px 30px rgba(30, 74, 143, 0.12);
    transform: translateY(-3px);
}

.mood-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.mood-item:hover img {
    transform: scale(1.03);
}

.mood-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: white;
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
}

.mood-item:hover .mood-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Moodboard wide items spanning 2 columns */
.mood-wide {
    column-span: all;
}

/* ============================================
   CTA MAILLAGE - Style propre
   ============================================ */
.projet-cta-maillage {
    padding: 35px;
    background: rgba(30, 74, 143, 0.03);
    border: 1px solid rgba(30, 74, 143, 0.12);
    margin-bottom: 40px;
}

.cta-maillage-title {
    font-family: var(--font-mono, monospace);
    font-size: 14px;
    color: var(--blue-primary, #1e3a5f);
    margin: 0 0 8px;
    letter-spacing: 0.5px;
}

.cta-maillage-text {
    font-size: 14px;
    color: var(--text-main, #334155);
    margin: 0 0 20px;
    line-height: 1.6;
}

.cta-maillage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cta-btn {
    display: inline-block;
    padding: 10px 20px;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.cta-btn-outline {
    background: transparent;
    border: 1px solid var(--blue-primary, #1e3a5f);
    color: var(--blue-primary, #1e3a5f);
}

.cta-btn-outline:hover {
    background: var(--blue-primary, #1e3a5f);
    color: white;
}

.cta-btn-primary {
    background: var(--blue-primary, #1e3a5f);
    border: 1px solid var(--blue-primary, #1e3a5f);
    color: #fff;
}

.cta-btn-primary:hover {
    background: #2a4a6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.cta-btn-ghost {
    background: transparent;
    border: 1px solid rgba(30, 74, 143, 0.3);
    color: var(--blue-primary, #1e3a5f);
}

.cta-btn-ghost:hover {
    border-color: var(--blue-primary, #1e3a5f);
    background: rgba(30, 74, 143, 0.05);
}

/* ============================================
   RESPONSIVE - TABLET (≤1200px)
   ============================================ */
@media (max-width: 1200px) {
    .description-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .description-specs {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .moodboard-masonry {
        columns: 2;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .plan-viewer-stage {
        height: 50vh;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (≤768px)
   ============================================ */
@media (max-width: 768px) {
    .description-layout {
        gap: 30px;
    }

    .description-text {
        font-size: 1rem;
    }

    .description-full p:first-child,
    .description-editor-content p:first-child {
        font-size: 1.1rem;
    }

    .description-specs {
        grid-template-columns: 1fr;
    }

    .moodboard-masonry {
        columns: 2;
        column-gap: 10px;
    }

    .mood-item {
        margin-bottom: 10px;
    }

    .mood-caption {
        opacity: 1;
        transform: none;
        position: relative;
        background: var(--blue-primary, #1e3a5f);
        padding: 8px 10px;
    }

    .plan-viewer-toolbar {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 8px;
    }

    .plan-viewer-title {
        width: 100%;
        order: -1;
        text-align: left;
        font-size: 0.7rem;
    }

    .plan-viewer-stage {
        height: 40vh;
        min-height: 250px;
    }

    .plan-strip-item {
        min-width: 80px;
        padding: 8px 10px;
    }

    .plan-strip-item img {
        width: 55px;
        height: 40px;
    }

    .strip-label {
        font-size: 0.6rem;
    }

    .pdf-inline-frame-wrap {
        height: 350px;
    }

    .pdf-inline-frame-wrap.expanded {
        height: 70vh;
    }

    .pdf-inline-title span {
        font-size: 0.7rem;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .video-card-player {
        padding-bottom: 56.25%;
    }

    .projet-cta-maillage {
        padding: 20px;
    }

    .cta-maillage-actions {
        flex-direction: column;
    }

    .cta-btn {
        text-align: center;
    }
}

/* ============================================
   RESPONSIVE - PETIT MOBILE (≤480px)
   ============================================ */
@media (max-width: 480px) {
    .moodboard-masonry {
        columns: 1;
    }

    .plan-viewer-controls {
        gap: 4px;
    }

    .plan-ctrl-btn,
    .plan-nav-btn {
        width: 30px;
        height: 30px;
    }
}
