/* Déclaration explicite des polices pour assurer la synchro avec Tailwind */
.font-inter { font-family: 'Inter', sans-serif; }
.font-outfit { font-family: 'Outfit', sans-serif; }

/* Masquer les scrollbars pour les sliders (Shorts) */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- ANIMATIONS TAILWIND CUSTOM --- */

/* Scroll dynamique flèche */
@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}
.animate-scrollDown {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* Marquee infini pour les clients */
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}
.animate-marquee {
    animation: marquee 20s linear infinite;
    /* Optimisation GPU */
    will-change: transform;
}

/* --- REVEAL ANIMATIONS (SCROLL) --- */

.reveal {
    visibility: hidden;
}

/* Différents types d'apparitions */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-right {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-zoom {
    opacity: 0;
    transform: scale(0.8);
    filter: blur(10px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Classes ajoutées par le JS (script.js) quand on scrolle */
.reveal.active, .reveal-zoom.active {
    visibility: visible;
    opacity: 1;
    transform: translate(0) scale(1);
    filter: blur(0);
}

/* --- BOUTONS NAV --- */
.nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: all 0.3s ease;
}
.nav-btn.default {
    color: rgba(245, 245, 240, 0.6);
}
.nav-btn.default:hover {
    color: #F5F5F0;
    background-color: rgba(245, 245, 240, 0.1);
}
.nav-btn.active {
    background-color: #FF6B1A;
    color: white;
    box-shadow: 0 0 15px rgba(255, 107, 26, 0.4);
}

/* --- Pages internes --- */
.project-section {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.18fr);
    gap: 4rem;
    align-items: center;
    min-height: 90vh;
    padding: 8rem 3rem;
    scroll-margin-top: 2rem;
}
.project-copy {
    max-width: 36rem;
    position: relative;
    z-index: 1;
}
.project-kicker {
    display: block;
    margin-bottom: 1rem;
    color: #FF6B1A;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.project-copy h2 {
    margin-bottom: 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.4rem, 4.5vw, 4.6rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0;
    text-transform: uppercase;
    max-width: 7.5ch;
    text-wrap: balance;
}
.project-copy p,
.legal-content p {
    color: rgba(245, 245, 240, 0.68);
    line-height: 1.8;
}
.project-copy p + p,
.legal-content p + p {
    margin-top: 1rem;
}
.project-media {
    overflow: hidden;
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1.5rem;
    background: #1f1f1f;
    position: relative;
    z-index: 2;
}
.project-media img {
    display: block;
    width: 100%;
    height: min(68vh, 680px);
    object-fit: cover;
}
.project-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    border: 0;
    background: transparent;
}
.project-media-grid img {
    height: min(64vh, 620px);
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1.5rem;
}
.social-link svg {
    flex: none;
}
.short-slider {
    position: relative;
}
.short-arrow {
    position: absolute;
    top: 42%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(245, 245, 240, 0.14);
    border-radius: 9999px;
    background: rgba(31, 31, 31, 0.86);
    color: #F5F5F0;
    backdrop-filter: blur(8px);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.short-arrow:hover {
    transform: translateY(-1px);
    background: #FF6B1A;
    border-color: #FF6B1A;
}
.short-arrow svg {
    width: 1.2rem;
    height: 1.2rem;
}
.short-arrow-left {
    left: -1.35rem;
}
.short-arrow-right {
    right: -1.35rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem;
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1.5rem;
    background: #2A2A2A;
}
.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.contact-form span {
    color: rgba(245, 245, 240, 0.64);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(245, 245, 240, 0.12);
    border-radius: 1rem;
    background: #1f1f1f;
    color: #F5F5F0;
    padding: 1rem 1.1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: #FF6B1A;
    box-shadow: 0 0 0 4px rgba(255, 107, 26, 0.13);
}
.contact-form textarea {
    resize: vertical;
}
.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 3.5rem;
    border-radius: 9999px;
    background: #FF6B1A;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.contact-submit:hover {
    transform: translateY(-2px);
    background: #F5F5F0;
    color: #3D3D3D;
}
.contact-submit:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}
.contact-status-success {
    color: #F5F5F0;
}
.contact-status-error {
    color: #FF6B1A;
}

.admin-login,
.admin-panel {
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1.5rem;
    background: #2A2A2A;
}
.admin-login {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: min(100%, 28rem);
    padding: 2rem;
}
.admin-login label,
.admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.admin-login label span,
.admin-field span {
    color: rgba(245, 245, 240, 0.64);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.admin-login input,
.admin-field input,
.admin-field textarea {
    width: 100%;
    border: 1px solid rgba(245, 245, 240, 0.12);
    border-radius: 1rem;
    background: #1f1f1f;
    color: #F5F5F0;
    padding: 0.9rem 1rem;
    outline: none;
}
.admin-field input[type="file"] {
    padding: 0.75rem;
}
.admin-error {
    border-radius: 1rem;
    background: rgba(255, 107, 26, 0.12);
    color: #FF6B1A;
    padding: 0.9rem 1rem;
}
.admin-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 1.5rem;
    align-items: start;
}
.admin-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.admin-tab {
    min-height: 2.8rem;
    padding: 0 1rem;
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 9999px;
    background: #2A2A2A;
    color: rgba(245, 245, 240, 0.64);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}
.admin-tab.active {
    background: #FF6B1A;
    color: #fff;
    border-color: #FF6B1A;
}
.admin-tab-panel {
    display: none;
}
.admin-tab-panel.active {
    display: block;
}
.admin-panel {
    padding: 1.5rem;
}
.admin-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.admin-panel h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
}
.admin-save,
.admin-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #FF6B1A;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
}
.admin-save {
    min-height: 2.7rem;
    padding: 0 1rem;
}
.admin-icon-btn {
    width: 2.7rem;
    height: 2.7rem;
}
.admin-icon-btn svg {
    width: 1.1rem;
    height: 1.1rem;
}
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.admin-stats div,
.admin-list-row {
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1rem;
    background: #1f1f1f;
}
.admin-stats div {
    padding: 1rem;
}
.admin-stats span {
    display: block;
    color: #FF6B1A;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 900;
}
.admin-stats small,
.admin-muted {
    color: rgba(245, 245, 240, 0.5);
}
.admin-list,
.admin-editor {
    display: grid;
    gap: 0.8rem;
}
.admin-chart {
    display: grid;
    gap: 0.9rem;
}
.admin-bar-row {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr) 2rem;
    gap: 0.75rem;
    align-items: center;
    color: rgba(245, 245, 240, 0.72);
}
.admin-bar-track {
    height: 0.75rem;
    border-radius: 9999px;
    background: rgba(245, 245, 240, 0.08);
    overflow: hidden;
}
.admin-bar-fill {
    height: 100%;
    border-radius: 9999px;
    background: #FF6B1A;
}
.admin-list-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: rgba(245, 245, 240, 0.72);
}
.admin-list-row strong {
    color: #FF6B1A;
}
.admin-editor {
    max-height: 70vh;
    overflow: auto;
    padding-right: 0.35rem;
}
.admin-visual-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 1.5rem;
}
.admin-media-layout {
    display: block;
}
.admin-inspector {
    position: sticky;
    top: 1.5rem;
}
.admin-visual-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.admin-select {
    min-height: 2.7rem;
    padding: 0 1rem;
    border: 1px solid rgba(245, 245, 240, 0.12);
    border-radius: 9999px;
    background: #1f1f1f;
    color: #F5F5F0;
}
.admin-preview-shell {
    margin-top: 1rem;
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1.25rem;
    overflow: hidden;
    background: #111;
}
.admin-preview-frame {
    display: block;
    width: 100%;
    height: 78vh;
    border: 0;
    background: #fff;
}
.admin-inline-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.admin-size-stepper {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
    gap: 0.5rem;
    align-items: center;
}
.admin-step-btn {
    height: 2.75rem;
    border: 1px solid rgba(245, 245, 240, 0.1);
    border-radius: 0.9rem;
    background: #1f1f1f;
    color: #F5F5F0;
    font-size: 1.2rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.admin-step-btn svg {
    width: 1rem;
    height: 1rem;
}
.admin-tool-btn {
    min-height: 2.5rem;
    padding: 0 0.9rem;
    border: 1px solid rgba(245, 245, 240, 0.1);
    border-radius: 9999px;
    background: #1f1f1f;
    color: rgba(245, 245, 240, 0.75);
    font-weight: 700;
}
.admin-tool-btn.active {
    background: rgba(255, 107, 26, 0.12);
    color: #FF6B1A;
    border-color: rgba(255, 107, 26, 0.35);
}
.admin-selection-empty,
.admin-selection-card {
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1rem;
    background: #1f1f1f;
    padding: 1rem;
}
.admin-selection-card {
    display: grid;
    gap: 0.35rem;
}
.admin-selection-card small {
    color: rgba(245, 245, 240, 0.55);
}
.admin-media-list {
    display: grid;
    gap: 1.25rem;
    max-height: none;
    overflow: auto;
    padding-right: 0;
}
.admin-media-section-title {
    margin: 1.25rem 0 0.8rem;
    color: #FF6B1A;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.admin-empty-state {
    border: 1px dashed rgba(245, 245, 240, 0.16);
    border-radius: 1rem;
    padding: 1.2rem;
    color: rgba(245, 245, 240, 0.62);
    background: rgba(17, 17, 17, 0.42);
}
.admin-media-card {
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1rem;
    background: #1f1f1f;
    padding: 0.85rem;
}
.admin-media-section {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.admin-media-section + .admin-media-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(245, 245, 240, 0.08);
}
.admin-media-section h3 {
    grid-column: 1 / -1;
    color: #FF6B1A;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.admin-media-card.dragging {
    opacity: 0.55;
}
.admin-drag-handle {
    cursor: grab;
}
.admin-drag-handle:active {
    cursor: grabbing;
}
.admin-media-preview {
    overflow: hidden;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1rem;
    background: #111;
}
.admin-media-preview.is-video {
    height: 7rem;
}
.admin-media-preview.is-short {
    width: 100%;
    height: 10rem;
}
.admin-media-preview img,
.admin-media-preview iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}
.admin-media-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.admin-media-card-head strong {
    display: block;
    color: #F5F5F0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
}
.admin-media-card-head small {
    color: rgba(245, 245, 240, 0.48);
}
.admin-media-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}
.admin-field-full {
    grid-column: 1 / -1;
}
.admin-media-card .admin-field span {
    font-size: 0.68rem;
}
.admin-media-card .admin-field input,
.admin-media-card .admin-field textarea {
    min-height: 2.35rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.86rem;
}
.admin-media-card .admin-field textarea {
    max-height: 4.8rem;
}
.admin-media-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-order-control {
    display: inline-grid;
    gap: 0.2rem;
}
.admin-order-control span {
    color: rgba(245, 245, 240, 0.5);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
}
.admin-order-control input {
    width: 3.3rem;
    height: 2.4rem;
    border: 1px solid rgba(245, 245, 240, 0.12);
    border-radius: 0.8rem;
    background: #151515;
    color: #F5F5F0;
    text-align: center;
    font-weight: 800;
}
.admin-client-preview {
    display: block;
    overflow: hidden;
    margin-bottom: 0.8rem;
    color: transparent;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 900;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-text-stroke: 1.4px #FF6B1A;
}

.media-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
}
.media-modal.active {
    display: block;
}
.media-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.78);
    backdrop-filter: blur(6px);
}
.media-modal-dialog {
    position: relative;
    width: min(96vw, 1100px);
    margin: 4vh auto;
    padding: 1.25rem;
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1.5rem;
    background: #1f1f1f;
}
.media-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background: rgba(245, 245, 240, 0.08);
    color: #F5F5F0;
}
.media-modal-head {
    margin-bottom: 1rem;
    padding-right: 3.5rem;
}
.media-modal-platform {
    color: #FF6B1A;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.media-modal-title {
    margin-top: 0.35rem;
    color: #F5F5F0;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.05;
}
.media-modal-note {
    margin-top: 0.6rem;
    color: rgba(245, 245, 240, 0.55);
    font-size: 0.95rem;
}
.media-modal-frame {
    overflow: hidden;
    border-radius: 1rem;
    background: #111;
}
.media-modal-frame.is-wide iframe {
    width: 100%;
    height: min(76vh, 720px);
}
.media-modal-frame.is-vertical {
    width: min(92vw, 430px);
    margin: 0 auto;
    aspect-ratio: 9 / 16;
}
.media-modal-frame.is-vertical iframe {
    width: 100%;
    height: 100%;
}
.media-modal-frame iframe {
    display: block;
    width: 100%;
    height: min(76vh, 720px);
    border: 0;
}

.legal-layout {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 4rem;
}
.legal-nav {
    position: sticky;
    top: 2rem;
    align-self: start;
    display: grid;
    gap: 0.35rem;
    max-height: calc(100vh - 4rem);
    overflow: auto;
    padding: 1rem;
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1.25rem;
    background: #2A2A2A;
}
.legal-nav a {
    padding: 0.55rem 0.75rem;
    border-radius: 9999px;
    color: rgba(245, 245, 240, 0.58);
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.legal-nav a:hover {
    background: rgba(255, 107, 26, 0.12);
    color: #FF6B1A;
}
.legal-content {
    display: grid;
    gap: 1.25rem;
}
.legal-content article {
    scroll-margin-top: 2rem;
    padding: 2rem;
    border: 1px solid rgba(245, 245, 240, 0.08);
    border-radius: 1.25rem;
    background: #2A2A2A;
}
.legal-content h2 {
    margin-bottom: 1rem;
    color: #F5F5F0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .project-section,
    .legal-layout {
        grid-template-columns: 1fr;
    }
    .project-section {
        gap: 2rem;
        min-height: auto;
        padding: 5rem 1.5rem;
    }
    .project-copy h2 {
        max-width: 100%;
    }
    .project-media img,
    .project-media-grid img {
        height: auto;
        min-height: 18rem;
    }
    .project-media-grid {
        grid-template-columns: 1fr;
    }
    .contact-form,
    .legal-content article {
        padding: 1.25rem;
        border-radius: 1rem;
    }
    .legal-nav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }
    .admin-grid,
    .admin-stats {
        grid-template-columns: 1fr;
    }
    .admin-visual-layout {
        grid-template-columns: 1fr;
    }
    .admin-inspector {
        position: static;
    }
    .admin-tabs {
        flex-wrap: wrap;
    }
    .admin-visual-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .admin-panel {
        padding: 1.25rem;
    }
    .admin-media-fields {
        grid-template-columns: 1fr;
    }
    .admin-media-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .short-arrow-left {
        left: 0.25rem;
    }
    .short-arrow-right {
        right: 0.25rem;
    }
}

@media (max-width: 620px) {
    .admin-media-section {
        grid-template-columns: 1fr;
    }
}
