/* ============================================
   DEEPLOYER PORTFOLIO — CSS
   ============================================ */

/* --- Layout --- */
.dpf-portfolio {
    width: 100%;
}

/* --- Bouton Filtrer flottant --- */
.dpf-filter-toggle-wrap {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10001;
}

.dpf-filter-toggle {
    display: none !important;
    align-items: center;
    gap: 8px;
    padding: 10px 18px !important;
    border: 2px solid black;
    border-radius: 0 50px 50px 0;
    background: white !important;
    color: black;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Lexend', sans-serif;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.dpf-filter-toggle:hover,
.dpf-filter-toggle:focus {
    opacity: 1;
    background: white !important;
    background-color: white !important;
    color: black !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

.dpf-filter-toggle.dpf-toggle-visible {
    display: inline-flex !important;
}

/* --- Layout flex sidebar + grille --- */
.dpf-layout {
    display: flex;
    gap: 0;
    position: relative;
}

.dpf-grid-wrap {
    flex: 1;
    min-width: 0;
    padding-left: 0;
}

.dpf-grid-wrap.dpf-animate {
    transition: none;
}

.dpf-layout.dpf-sidebar-is-closed .dpf-grid-wrap {
    padding-left: 0;
}

/* --- Sidebar --- */
.dpf-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    z-index: 10000;
    background: #111;
    color: #fff;
    transform: translateX(0);
    pointer-events: auto;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
}

/* La transition ne s'active qu'après le premier clic (classe ajoutée par JS) */
.dpf-sidebar.dpf-animate {
    transition: transform .4s cubic-bezier(.22,.68,0,1.1);
}

.dpf-sidebar.dpf-sidebar-closed {
    transform: translateX(-100%);
    pointer-events: none;
}

.dpf-sidebar-inner {
    width: 100%;
    position: relative;
}

.dpf-sidebar-header {
    position: absolute;
    top: 7px;
    right: 0;
    z-index: 2;
}

.dpf-sidebar-title {
    display: none;
}

.dpf-sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    opacity: 1;
    padding: 0;
    line-height: 1;
}

.dpf-sidebar-close:hover,
.dpf-sidebar-close:focus {
    opacity: 1;
    background: none !important;
    background-color: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
}

.dpf-filter-btn:hover,
.dpf-filter-btn:focus {
    background-color: transparent !important;
    box-shadow: none !important;
}

.dpf-sidebar-filters {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dpf-sidebar-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    padding: 16px 16px 6px;
    margin-top: 8px;
}

.dpf-sidebar-section-title:first-of-type {
    margin-top: 0;
}

.dpf-sidebar-separator {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin: 16px 0;
}

/* --- Bouton remonter en haut du filtre --- */
.dpf-sidebar-scroll-top {
    position: sticky;
    bottom: 0;
    right: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #523cea !important;
    border: none !important;
    border-radius: 0 !important;
    color: #fff !important;
    cursor: pointer;
    margin: 0 0 0 auto;
    padding: 0;
}
.dpf-sidebar-scroll-top.dpf-visible {
    display: flex;
}
.dpf-sidebar-scroll-top:hover,
.dpf-sidebar-scroll-top:focus {
    background: #523cea !important;
    background-color: #523cea !important;
    color: #fff !important;
    box-shadow: none !important;
    opacity: 1 !important;
}
.dpf-sidebar-scroll-top svg {
    pointer-events: none;
    stroke: #fff !important;
    fill: none !important;
    color: #fff !important;
    stroke-width: 2.5 !important;
}

/* --- Recherche métiers --- */
.dpf-job-search-wrap {
    padding: 0 6px 8px;
}

.dpf-job-search {
    width: 100% !important;
    padding: 8px 36px 8px 12px !important;
    border: none !important;
    border-radius: 100px !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(0,0,0,0.35)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat right 12px center !important;
    background-size: 16px 16px !important;
    color: #000 !important;
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}

.dpf-job-search::placeholder {
    color: rgba(0,0,0,0.4);
}

.dpf-job-search:focus {
    background: #fff;
}

/* --- Grille --- */
.dpf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    transition: all .4s cubic-bezier(.22,.68,0,1.1);
}

.dpf-item {
    transition: opacity .4s ease, transform .4s ease;
}

.dpf-item.dpf-hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

/* --- Boutons filtre sidebar --- */
.dpf-filter-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all .2s ease;
    text-align: left;
    white-space: nowrap;
}

.dpf-filter-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.dpf-filter-btn.dpf-active {
    background: #2563eb;
    color: #fff;
}
.dpf-card {
    cursor: pointer;
    position: relative;
    border-radius: 0;
    overflow: hidden;
}

.dpf-card-image {
    position: relative;
    overflow: hidden;
}

.dpf-card-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .5s ease;
}

.dpf-card:hover .dpf-card-image img {
    transform: scale(1.08);
}

.dpf-card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    opacity: 0;
    transition: opacity .4s ease;
    gap: 12px;
}

.dpf-card-overlay-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.dpf-card:hover .dpf-card-overlay {
    opacity: 1;
}

.dpf-card-number {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dpf-card-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.dpf-card-demo {
    background: transparent;
    border: 2px solid #ffffff;
    border-radius: 4px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .3s ease, color .3s ease;
    flex-shrink: 0;
    line-height: 1.3;
}

.dpf-card-demo:hover {
    background: #ffffff;
    color: #1a1a1a;
}

.dpf-card-buy {
    background: transparent;
    border: 2px solid #ffffff;
    border-radius: 4px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .3s ease, color .3s ease;
    flex-shrink: 0;
    line-height: 1.3;
}

.dpf-card-buy:hover {
    background: #ffffff;
    color: #1a1a1a;
}

/* --- Carte / Image + Overlay --- */

/* ============================================
   LIGHTBOX
   ============================================ */
.dpf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.dpf-lightbox.dpf-lightbox-open {
    opacity: 1;
    pointer-events: auto;
}

.dpf-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dpf-lightbox-container {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 1100px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    transform: scale(0.9) translateY(20px);
    transition: transform .4s cubic-bezier(.22,.68,0,1.1);
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
}

.dpf-lightbox-open .dpf-lightbox-container {
    transform: scale(1) translateY(0);
}

.dpf-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}

.dpf-lightbox-close:hover {
    background: rgba(0,0,0,0.8);
}

/* --- Lightbox layout --- */
.dpf-lightbox-content {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-height: 90vh;
}

.dpf-lightbox-media {
    flex: 0 0 55%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.dpf-lightbox-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dpf-lightbox-media iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
}

.dpf-lightbox-info {
    flex: 1;
    padding: 40px 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Lightbox contenu --- */
.dpf-lightbox-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dpf-lightbox-cat {
    display: inline-block;
    background: #f0f4ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 3px;
}

.dpf-lightbox-job {
    background: #f0fdf4;
    color: #16a34a;
}

.dpf-lightbox-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    color: #1a1a1a;
}

.dpf-lightbox-description {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

.dpf-lightbox-description p:first-child { margin-top: 0; }
.dpf-lightbox-description p:last-child { margin-bottom: 0; }

/* --- Détails --- */
.dpf-lightbox-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.dpf-lightbox-details:empty {
    display: none;
}

.dpf-lightbox-detail {
    display: flex;
    gap: 8px;
    font-size: 13px;
}

.dpf-lightbox-detail-label {
    font-weight: 600;
    color: #333;
    flex-shrink: 0;
}

.dpf-lightbox-detail-value {
    color: #666;
}

/* --- Tags --- */
.dpf-lightbox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dpf-lightbox-tags:empty {
    display: none;
}

.dpf-lightbox-tag {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all .2s;
}

.dpf-lightbox-tag:hover {
    background: #e8e8e8;
    color: #333;
}

/* --- Boutons --- */
.dpf-lightbox-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.dpf-lightbox-buttons:empty {
    display: none;
}

.dpf-lightbox-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all .3s;
    cursor: pointer;
    border: none;
}

.dpf-lightbox-btn-primary {
    background: #2563eb;
    color: #fff;
}

.dpf-lightbox-btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.dpf-lightbox-btn-buy {
    background: #16a34a;
    color: #fff;
}

.dpf-lightbox-btn-buy:hover {
    background: #15803d;
    color: #fff;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .dpf-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .dpf-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .dpf-sidebar.dpf-sidebar-open {
        width: 220px;
    }

    .dpf-layout.dpf-sidebar-is-open .dpf-grid-wrap {
        padding-left: 0;
    }

    .dpf-lightbox-content {
        flex-direction: column;
    }

    .dpf-lightbox-media {
        flex: 0 0 auto;
        min-height: 250px;
        max-height: 40vh;
    }

    .dpf-lightbox-info {
        padding: 24px 20px;
    }

    .dpf-lightbox-title {
        font-size: 20px;
    }

    .dpf-lightbox-container {
        width: 95vw;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .dpf-grid {
        grid-template-columns: 1fr !important;
    }

    .dpf-filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}

/* ============================
   IFRAME LIVE PREVIEW CARDS
   ============================ */
.dpf-card-iframe-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 62.5%;
    overflow: hidden;
    background: #f0f0f0;
}

.dpf-card-iframe-scaler {
    position: absolute;
    top: 0;
    left: 0;
    width: 1440px;
    height: 900px;
    transform-origin: 0 0;
    transform: scale(0.3);
}

.dpf-card-iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    display: block;
}

/* JS appliquera le scale exact via inline style sur .dpf-card-iframe-scaler */

.dpf-card-image:has(.dpf-card-iframe-wrap) {
    aspect-ratio: auto;
}

.dpf-card:hover .dpf-card-iframe {
    pointer-events: none;
}

.dpf-card-image:has(.dpf-card-iframe-wrap) .dpf-card-overlay {
    z-index: 2;
}

/* Highlight card quand scroll-to via hash */
.dpf-item-highlight {
    animation: dpf-highlight 3s ease;
}

.dpf-item-highlight .dpf-card {
    position: relative;
}

.dpf-item-highlight .dpf-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(85, 54, 171, 0.55);
    z-index: 5;
    pointer-events: none;
    border-radius: 8px;
    animation: dpf-overlay-fade 3.5s ease forwards;
}

@keyframes dpf-highlight {
    0% { transform: scale(1); }
    10% { transform: scale(1.03); }
    30% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes dpf-overlay-fade {
    0% { opacity: 0; }
    15% { opacity: 1; }
    60% { opacity: 1; }
    100% { opacity: 0; }
}

/* Sidebar model links */
.dpf-sidebar-models {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.dpf-model-link {
    display: block;
    padding: 8px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all .2s ease;
    cursor: pointer;
}

.dpf-model-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.1);
}

.dpf-model-link.dpf-model-active {
    color: #ffffff;
    background: rgba(255,255,255,0.15);
    font-weight: 600;
}

.dpf-model-link.dpf-model-hidden {
    display: none;
}

.dpf-model-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 8px;
    outline: none;
}

.dpf-model-search::placeholder {
    color: rgba(255,255,255,0.4);
}

.dpf-model-search:focus {
    border-color: rgba(255,255,255,0.4);
}

/* ============================
   PORTFOLIO LOADER
   ============================ */
.dpf-loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.dpf-loader.dpf-loader-hidden {
    opacity: 0;
    pointer-events: none;
}

.dpf-loader-content {
    text-align: center;
    width: 300px;
}

.dpf-loader-brand {
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
    font-size: 25px;
    font-style: italic;
    text-transform: uppercase;
    color: #000000;
    margin-bottom: 12px;
}

.dpf-loader-text {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dpf-loader-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.dpf-loader-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #5636ab, #7c5ce0);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.dpf-loader-percent {
    font-size: 14px;
    color: #6b7280;
    margin-top: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@keyframes dpf-loader-sweep {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Toggle label mobile/desktop */
.dpf-toggle-label-mobile { display: none; }

@media (max-width: 768px) {
    .dpf-toggle-label-desktop { display: none; }
    .dpf-toggle-label-mobile { display: inline; }
}

@media (max-width: 768px) {
    .dpf-filter-toggle {
        padding: 10px 18px !important;
    }
}

@media (max-width: 768px) {
    button.dpf-filter-toggle.dpf-toggle-visible {
        padding: 10px 18px !important;
    }
}
