
.page-id-6 div#header, .page-id-6 hr, .page-id-6 #footer {
    display: none;
}

html {
  overflow-y: scroll;
  z-index: 100000;
}

/* Désactiver les tooltips natifs du navigateur pour éviter les doublons avec les tooltips CSS personnalisés */
/* Les tooltips natifs sont désactivés en JavaScript via removeAttribute('title') au mouseenter */


/****************
Authentification
****************/

.iai-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF9F8 0% 0% no-repeat padding-box;
    padding: 20px;
}

.iai-login-card {
    max-width: 450px;
    width: 100%;
    padding: 48px;
    text-align: center;
    background: #FEFEFE 0% 0% no-repeat padding-box;
    box-shadow: 0px 10px 24px #362B190A;
    border: 1px solid #E6E3DE;
    border-radius: 10px;
}

.iai-login-card .iai-form-group input, .iai-login-card .iai-form-group select {
    width: 100%;
    padding: 10px 14px;
    transition: all 0.2s;
    border: 1px solid #B3B1AE;
    font-size: 12px;
    max-width: 100%;
    font-family: Inter;
    color: #7E7975;
    background: #FEFEFE 0% 0% no-repeat padding-box;
    border: 1px solid #E6E3DE;
    border-radius: 5px;
}

.iai-login-card .iai-form-group {
    margin-bottom: 0;
}

.iai-login-card .iai-form-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    font-size: 12px;
    font-family: Inter;
    margin-top: 20px;
}

.nsl-container.nsl-container-block {
    text-align: center !important;
}

.iai-login-card .iai-form-submit {
    width: 100%;
    padding: 10px;
    color: white;
    border: none;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    background: #50190F 0% 0% no-repeat padding-box;
    border-radius: 5px;
}

a#iai-back-to-login, a#iai-back-to-login-2, a#iai-forgot-password-link {
    width: 100%;
    padding: 10px;
    justify-content: center;
    color: #50190F;
    display: flex;
    font-size: 12px!important;
    font-weight: 400;
    font-family: 'Inter';
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 5px;
    border: 1px solid #50190F;
}

.logincardheader a svg {
    max-width: 140px;
    margin-bottom: 20px;
}

form#iai-verify-form {
    font-size: 14px;
    padding: 0 30px 0 30px;
}
form#iai-verify-form p,
form#iai-forgot-form p {
    color: #141414 !important;
    font-family: 'Inter';
    margin-bottom: 30px !important;
    font-size: 12px !important;
}

        .iai-login-buttons {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 24px;
        }
        .iai-login-btn {
            display: block;
            padding: 16px 24px;
            text-decoration: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 15px;
            transition: all 0.2s;
            border: none;
            cursor: pointer;
        }
        .iai-login-btn-primary {
            background: #222;
            color: #fff;
        }
        .iai-login-btn-primary:hover {
            background: #333;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }
        .iai-login-btn-secondary {
            background: #ff6b35;
            color: #fff;
        }
        .iai-login-btn-secondary:hover {
            background: #ff8555;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255,107,53,0.3);
        }
        .iai-login-divider {
            position: relative;
            margin: 24px 0;
            text-align: center;
            color: #999;
            font-size: 13px;
        }
        .iai-login-divider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 1px;
            background: #e0e0e0;
            z-index: 0;
        }
        .iai-login-divider span {
            position: relative;
            background: white;
            padding: 0 16px;
            z-index: 1;
        }
        .iai-login-features {
            margin-top: 32px;
            padding-top: 32px;
            border-top: 1px solid #e0e0e0;
            text-align: left;
        }
        .iai-login-feature {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
            font-size: 14px;
            color: #666;
        }
        .iai-login-feature-icon {
            font-size: 20px;
            flex-shrink: 0;
        }

        .iai-auth-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 24px;
            border-bottom: 2px solid #f0f0f0;
        }
        .iai-auth-tab {
            flex: 1;
            padding: 12px;
            background: none;
            border: none;
            border-bottom: 2px solid transparent;
            cursor: pointer;
            font-size: 15px;
            font-weight: 600;
            color: #999;
            transition: all 0.2s;
        }
        .iai-auth-tab.active {
            color: #151515;
            border-bottom-color: #50190F;
        }
        .iai-auth-form {
            display: none;
        }
        .iai-auth-form.active {
            display: block;
        }
        .iai-form-submit:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }
        .iai-form-error {
            background: #ffebee;
            color: #c62828;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 16px;
            font-size: 13px;
            display: none;
        }
        .iai-form-error.show {
            display: block;
        }
        .iai-form-success {
            background: #e8f5e9;
            color: #2e7d32;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 16px;
            font-size: 13px;
            display: none;
        }
        .iai-form-success.show {
            display: block;
        }
        .iai-form-checkbox {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 16px;
        }
        .iai-form-checkbox input {
            width: auto;
        }


/* === LAYOUT GLOBAL === */
.iai-app {
    font-family: DM Sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    display: flex;
    min-height: 100vh;
    background: #FAF9F8;
    color: #222;
}

/* Classe pour cacher les sections */
.hidden {
    display: none !important;
}
.iai-app h2 {
    font-weight: 600;
    color: #222;
}

/* Animation du contenu quand le submenu est actif - v2.0 */
main.iai-main {
    position: relative;
    padding-top: 80px;
    transition: padding-top 0.3s ease;
}

main.iai-main.submenu-active {
    padding-top: 170px !important;
}

.iai-section {
    padding: 24px 32px;
}

.iai-main>svg {
    position: absolute;
    width: 200px;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    fill: #eeeeee;
    z-index: 0;
}
.iai-main section {
    z-index: 1;
}

/* === SIDEBAR FIXE (100% HAUTEUR) === */

:focus-visible {
    outline: -webkit-focus-ring-color auto 0px!important;
}

.iai-sidebar {
    width: 260px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    align-items: center;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
}

/* Logo */
.iai-logo {
    font-weight: 700;
    font-size: 16px;
    margin: 20px 20px 30px 20px;
    max-width: 109px;
    display: block;
}
.iai-logo svg {
    width: 109px;
    height: auto;
}

/* Menus */
.iai-menu {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    gap: 6px;
}

.iai-menu.secondary {
    margin-top: 32px;
    font-size: 13px;
}

/* Boutons du menu */
.iai-menu-item {
    text-align: left;
    padding: 3px 15px;
    border-radius: 999px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #343230;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 32px;
}

.iai-menu-item.allAssets {
    margin-top: 35px;
    text-decoration: underline;
    font-weight: bold;
}

.iai-menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.iai-menu-item:hover {
    background: rgba(0,0,0,0.04);
}

.iai-menu-item.active {
    background-color: #343230 !important;
    color: #FAF9F8;
}

/* Titre de section dans le menu */
.iai-menu-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #999;
    text-transform: uppercase;
    padding: 16px 10px 8px 10px;
    margin-top: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* === MAIN (DÉCALÉE PAR RAPPORT À LA SIDEBAR) === */
.iai-main {
    flex: 1;
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 24px;
    margin-left: 220px; /* laisse la place à la sidebar fixe */
}

/* === TOP BAR (barre de prompt) === */
.iai-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.iai-topbar-input-wrapper {
    flex: 1;
    display: flex;
    align-items: stretch;
    background: #FFFFFF 0% 0% no-repeat padding-box;
    box-shadow: 0px 10px 24px #362B190A;
    border: 1px solid #E5E1DA;
    border-radius: 9px;
    padding-right: 5px;
    min-height: 50px;
    opacity: 1;
}

.iai-topbar-image-button {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #343230;
    transition: color 0.2s;
    background: transparent;
    border: none;
    border-radius: 9px 0px 0px 9px;
    opacity: 1;
}

.iai-topbar-image-button:hover {
    color: #111;
}

.iai-topbar-input {
    width: 100%;
    border: none;
    font-family: Inter;
    border-radius: 9px;
    padding: 16px 16px 16px 67px;
    cursor: text;
    font-size: 13px;
    color: #000;
    resize: none;
    overflow: hidden;
    /*min-height: 50px;*/
    line-height: 1.3;
}

.iai-topbar-input::placeholder {
    color: #7E7975;
}

.iai-topbar-input:hover {
    border-color: rgba(0,0,0,0.2);
}

.iai-topbar-input.drag-over {
    background: #f0f9ff;
    outline: none;
}

.iai-topbar-actions {
    display: flex;
    gap: 8px;
}

.iai-icon-button {
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.1);
    background: #fff;
    padding: 6px 10px;
    cursor: pointer;
}

/* === HEADER + FILTRES === */
.iai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.iai-header h2 {
    margin: 0;
    font-size: 20px;
}

.iai-filters {
    display: flex;
    gap: 8px;
}

.iai-filter {
    border-radius: 999px;
    padding: 8px 16px;
    border: 2px solid rgba(0,0,0,0.12);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.iai-filter:hover {
    border-color: rgba(0,0,0,0.3);
    background: #f8f6f1;
}

.iai-filter.active {
    background: #222;
    color: #fff;
    border-color: #222;
}

.iai-filter.active:hover {
    background: #333;
    border-color: #333;
}

span.iai-product-type {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* === GALERIE === */

/* Card Image Create - Style Product */
.iai-gallery-item {
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iai-gallery-item img {
    object-fit: cover;
    width: 100%;
    height: 100%!important;
}

.iai-gallery-item.placeholder span {
    font-size: 13px;
    color: rgba(0,0,0,0.6);
}

/* === VOLET DÉROULANT DE PROMPT === */

.iai-prompt-modal[aria-hidden="true"] {
    opacity: 0;
    pointer-events: none;
}

.iai-prompt-modal[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.iai-prompt-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.iai-prompt-modal-content {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 600px;
    max-width: 95vw;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: #111;
    border-radius: 16px;
    padding: 20px 22px 18px;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.iai-prompt-modal[aria-hidden="true"] .iai-prompt-modal-content {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
}

.iai-prompt-modal[aria-hidden="false"] .iai-prompt-modal-content {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

div#iai-dropzone p svg path {
    fill: #555;
}

.iai-prompt-modal-content h2 {
    margin: 10px 0 10px;
    font-size: 22px;
    color: #fff;
}

.iai-prompt-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.iai-prompt-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.iai-prompt-textarea {
    width: 100%;
    min-height: 90px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 14px;
    color: #fff;
    background: #222;
}

/* === UPLOAD AREA === */
.iai-upload-area {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

/* === DROPZONE === */
.iai-dropzone {
    border-radius: 16px;
    border: 1px dashed #555;
    padding: 10px;
    text-align: center;
    color: #666;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
    background: #f5f5f5;
}

.iai-dropzone:hover {
    border-color: #000;
    background: #fff;
}

.iai-dropzone.dragover {
    border-color: #000;
    background: #f0f0f0;
    transform: scale(1.05);
}

/* Animation quand le bouton topbar reçoit une image */
.iai-topbar-receiving {
    animation: topbarPulse 0.8s ease;
}

@keyframes topbarPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(242, 51, 13, 0.6);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Thumbnails dans la preview */
.iai-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    margin: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.iai-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iai-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: white;
    border: 2px solid white;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.iai-preview-remove:hover {
    background: #cc0000;
}

#iai-upload-preview {
    flex: 1;
    min-height: 50px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 8px;
    border-radius: 12px;
}

.iai-gallery {
    gap: 4px !important;
}

/* Galerie d'images */
.iai-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

/* Overlay pour afficher le prompt - Caché sur Create */
#section-create .iai-gallery-overlay {
    display: none;
}

.iai-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 12px;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.2s;
}

.iai-gallery-item:hover .iai-gallery-overlay {
    opacity: 1;
}

.iai-gallery-prompt {
    color: white;
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    cursor: pointer;
    transition: color 0.2s;
}

.iai-gallery-prompt:hover {
    color: #ff9966;
    text-decoration: underline;
}

/* Bouton delete Moodboard */
.iai-moodboard-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iai-moodboard-item:hover .iai-moodboard-delete {
    opacity: 1;
}

.iai-moodboard-delete:hover {
    background: #ff4444;
}

/* Bouton like Organize */
.iai-like-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iai-like-button:hover {
    transform: scale(1.1);
}

.iai-like-button.liked {
    background: #ffece5;
}

/* Dragover state */
.iai-dropzone.dragover {
    background: #ffe8d6;
    border-color: #ff9966;
}

/* === ÉTATS DE CHARGEMENT ET ERREUR === */

/* Image en cours de génération - Nouvelle animation smooth */
.iai-gallery-item-generating {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.iai-generating-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Effet de flou animé qui simule l'apparition progressive d'une image */
.iai-generating-blur {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(242, 51, 13, 0.05) 0%,
        rgba(242, 51, 13, 0.02) 25%,
        rgba(99, 102, 241, 0.02) 50%,
        rgba(242, 51, 13, 0.02) 75%,
        rgba(242, 51, 13, 0.05) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite, pulseBlur 3s ease-in-out infinite;
    filter: blur(60px);
    opacity: 0.6;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseBlur {
    0%, 100% { 
        filter: blur(60px);
        opacity: 0.6;
    }
    50% { 
        filter: blur(80px);
        opacity: 0.8;
    }
}

/* Spinner moderne */
.iai-generating-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(242, 51, 13, 0.1);
    border-top-color: #f2330d;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 20px rgba(242, 51, 13, 0.1);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Texte de génération */
.iai-generating-text {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-top: 16px;
    position: relative;
    z-index: 2;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Animation d'apparition quand l'image est complétée */
.iai-gallery-item-generating.completed {
    animation: fadeInImage 0.8s ease-out forwards;
}

@keyframes fadeInImage {
    from {
        filter: blur(20px);
        opacity: 0;
    }
    to {
        filter: blur(0);
        opacity: 1;
    }
}

/* Ancienne animation (legacy) */
.iai-gallery-item-loading {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.iai-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-top-color: #111;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.iai-loading-text {
    font-size: 11px;
    color: rgba(255,255,255,0.9);
    margin-top: 4px;
}

/* Image en erreur */
.iai-gallery-item-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.iai-error-icon {
    font-size: 40px;
}

.iai-error-text {
    font-size: 11px;
    color: #c62828;
    margin-top: 4px;
}

/* Bouton Generate désactivé */
.iai-primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === GROUPEMENT PAR DATE === */

.iai-date-group {
    margin-bottom: 40px;
}

/* Grille Create - 4 colonnes format portrait avec marge droite */
section#section-create {
    padding: 24px 13% 0 32px;
}

#section-create .iai-date-group .iai-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
}

#section-create .iai-gallery-item {
    aspect-ratio: 3/4;
}

/* === ORGANIZE LAYOUT === */
.iai-organize-layout {
    display: grid;
    grid-template-columns: 1fr 204px;
    gap: 32px;
}

.iai-organize-content {
    flex: 1;
    overflow-y: auto;
}

/* Date groups pour Organize */
#section-organize .iai-date-group {
    margin-bottom: 32px;
}

#section-organize .iai-date-group .iai-organize-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

#section-organize .iai-organize-grid .iai-gallery-item {
    aspect-ratio: 1/1;
}

#section-organize .iai-date-label {
    font-size: 13px;
    font-weight: 600;
    color: #343230;
    margin-bottom: 16px;
    padding-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Actions en bas pour Organize section (identique à Create) */
#section-organize .iai-gallery-actions {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #B3B1AE;
    border-radius: 0 0 3px 3px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

#section-organize .iai-gallery-item:hover .iai-gallery-actions {
    transform: translateY(0);
}

#section-organize .iai-gallery-hover-actions {
    opacity: 1;
}

#section-organize .iai-gallery-item:hover .iai-gallery-hover-actions {
    background: transparent;
    padding: 0;
}

/* Date groups et grille pour All Assets (identique à Organize) */
#section-all-feature .iai-date-group {
    margin-bottom: 32px;
}

#section-all-feature .iai-date-group .iai-gallery {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

#section-all-feature .iai-gallery-item {
    aspect-ratio: 1/1;
}

/* Lazy Loading - Transition fluide */
.iai-gallery-image.lazy-load {
    opacity: 0.3;
    transition: opacity 0.3s ease-in-out;
}

.iai-gallery-image.lazy-loaded {
    opacity: 1;
}

#section-all-feature .iai-date-label {
    font-size: 13px;
    font-weight: 600;
    color: #343230;
    margin-bottom: 16px;
    padding-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Actions en bas pour All Assets (identique à Organize) */
/*#section-all-feature .iai-gallery-actions {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}*/

#section-all-feature .iai-gallery-item:hover .iai-gallery-actions {
    transform: translateY(0);
}

#section-all-feature .iai-gallery-hover-actions {
    opacity: 1;
}

#section-all-feature .iai-gallery-item:hover .iai-gallery-hover-actions {
    background: transparent;
    padding: 0;
}

/* Sidebar Organize */
.iai-organize-sidebar {
    position: fixed;
    top: 140px;
    right: 12%;
    width: 183px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: fit-content;
}

.iai-organize-filters {
    background: white;
    padding: 20px;
    box-shadow: 0px 10px 24px #362B190A;
    border: 1px solid #E5E1DA;
    border-radius: 9px;
    margin-top: 6px;
}

/* Champ de recherche Organize */
.iai-organize-search {
    position: relative;
    margin-bottom: 24px;
    display: flex;
}

.iai-organize-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
    pointer-events: none;
}

.iai-organize-search-input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    border: 1px solid #343230;
    border-radius: 999px;
    font-size: 11px;
    font-family: inherit;
    transition: all 0.2s;
}

.iai-organize-search-input:focus {
    border-color: #f2330d;
}

/* Filtre Section */
.iai-organize-filter-section {
    margin-top: 16px;
}

.iai-organize-filter-item {
    width: 100%;
    padding: 12px 0;
    background: white;
    border: none;
    border-top: 1px solid #E5E1DA;
    border-bottom: 1px solid #E5E1DA;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    margin-bottom: 16px;
    color: #362B19;
}

.iai-organize-filter-item svg {
    width: 18px;
    height: 18px;
    stroke: #666;
}

.iai-organize-filter-item.active {
    color: #343230;
}

.iai-organize-filter-item.active svg {
    stroke: #343230;
    fill: #343230;
}

section#section-organize, section#section-all-feature {
    position: relative;
    padding: 24px 12% 0 32px;
}

.iai-organize-sidebar h3, .iai-organize-sidebar h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #362B19;
}

.iai-organize-filter-section.type button {
    border: none;
}

.iai-organize-filter-section.type button.iai-organize-filter-item.active {
    font-weight: 500;
    background: #F0EDE8 0% 0% no-repeat padding-box;
    border: 1px solid #E5E1DA;
}

.iai-organize-filter-section.type button.iai-organize-filter-item {
    padding: 4px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #7E7975;
    text-align: left;
    width: fit-content;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grille Moodboard - Style Product */
#iai-moodboard-grid.iai-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.iai-date-label {
    font-size: 13px;
    font-weight: 600;
    color: #343230;
    margin-bottom: 16px;
    padding-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === BOUTONS SUR LES IMAGES === */

.iai-gallery-item {
    position: relative;
}

/* Container pour toutes les actions */
.iai-gallery-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

/* Actions en bas pour Create section */
.iai-gallery-actions {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: center;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border: 1px solid #B3B1AE;
    border-radius: 0 0 3px 3px;
}

.iai-gallery-item:hover .iai-gallery-actions {
    transform: translateY(0);
}

/* Actions au hover (edit, download, delete) - cachées par défaut, à gauche */
.iai-gallery-hover-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: all 0.3s ease;
}

.iai-gallery-hover-actions {
    opacity: 1;
}

.iai-gallery-item:hover .iai-gallery-hover-actions {
    opacity: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 4px;
}

.iai-gallery-item:hover .iai-gallery-hover-actions {
    background: transparent;
    padding: 0;
}

button.iai-like-btn {
    background: transparent;
    border-radius: 100%;
    border-radius: 100% !important;
    overflow: hidden;
}

button.iai-like-btn.liked svg {
    fill: #fff;
    background: transparent !important;
}

/* Boutons Edit, Download et Delete avec blur blanc */
.iai-edit-btn,
.iai-download-btn,
.iai-delete-btn {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 100%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #343230;
}

.iai-edit-btn svg,
.iai-download-btn svg,
.iai-delete-btn svg {
    stroke: #343230;
    transform: scale(0.9);
    width: 20px;
    height: 20px;
}

.iai-edit-btn:hover,
.iai-download-btn:hover,
.iai-delete-btn:hover {
    background: #f9f9f9;
}

button.iai-edit-btn:hover {
    background: #f9f9f9;
    border-radius: 3px;
}

button.iai-like-btn svg {
    stroke: #343230;
    width: 20px;
    height: 20px;
}

.iai-edit-btn:hover svg,
.iai-download-btn:hover svg,
.iai-delete-btn:hover svg {
    stroke: #343230;
}

/* Tooltips personnalisés pour les boutons de la grille */
.iai-edit-btn[data-title]::after,
.iai-download-btn[data-title]::after,
.iai-delete-btn[data-title]::after,
.iai-like-btn[data-title]::after {
    content: attr(data-title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #343230;
    color: white;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
}

.iai-edit-btn:hover::after,
.iai-download-btn:hover::after,
.iai-delete-btn:hover::after,
.iai-like-btn:hover::after {
    opacity: 1;
}

/* Bouton Like (toujours visible à droite) */
.iai-like-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #343230;
}

#section-create .iai-like-btn {
    background: transparent;
}

.iai-like-btn.liked {
    background: transparent;
    color: #343230;
}

.iai-like-btn.liked svg {
    fill: #343230 !important;
}

.iai-like-btn:hover {
    background: transparent;
    color: #343230;
}

.iai-gallery-image {
    cursor: pointer;
}

/* === STYLES ADDITIONNELS POUR NOUVELLES FONCTIONNALITÉS === */

/* === TOPBAR STYLE MIDJOURNEY === */
.iai-topbar-fixed {
    position: fixed;
    top: 0;
    left: 292px;
    padding: 20px 12% 0 0;
    right: 0;
    z-index: 1000;
    background: transparent linear-gradient(180deg, #FAF9F8 0%, #FAF9F8 50%, #FAF9F800 100%) 0% 0% no-repeat padding-box;
    opacity: 1;
}

.iai-topbar-inner {
    display: flex;
}

/* === LIGHTBOX STYLE MIDJOURNEY === */

.iai-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iai-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.iai-lightbox-content {
    position: relative;
    display: flex;
    width: 90vw;
    height: 90vh;
    max-width: 1400px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.iai-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iai-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.iai-lightbox-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #0a0a0a;
}

.iai-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.iai-lightbox-sidebar {
    width: 400px;
    background: #1a1a1a;
    border-left: 1px solid #333;
    padding: 32px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.iai-lightbox-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0 0 28px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
}

.iai-lightbox-section {
    margin-bottom: 28px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.iai-lightbox-section h4 {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.iai-lightbox-section h4::before {
    content: '';
    width: 3px;
    height: 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c61 100%);
    border-radius: 2px;
}

.iai-lightbox-prompt {
    font-size: 14px;
    line-height: 1.7;
    color: #e8e8e8;
    margin: 0;
    word-wrap: break-word;
    font-weight: 400;
}

.iai-lightbox-date {
    font-size: 15px;
    color: #c8c8c8;
    margin: 0;
    font-weight: 500;
}

.iai-lightbox-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #333;
}

.iai-lightbox-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.iai-lightbox-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s;
    z-index: 0;
}

.iai-lightbox-action-btn:hover::before {
    width: 100%;
}

.iai-lightbox-action-btn:hover {
    background: #333;
    border-color: #555;
    transform: translateX(4px);
}

.iai-lightbox-action-btn svg {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.iai-lightbox-action-btn span {
    position: relative;
    z-index: 1;
}

/* Bouton Download - Vert */
.iai-lightbox-action-btn[data-action="download"] {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    border-color: #4CAF50;
}

.iai-lightbox-action-btn[data-action="download"]:hover {
    background: linear-gradient(135deg, #45a049 0%, #5cb860 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Bouton Like */
.iai-lightbox-action-btn.liked {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c61 100%);
    border-color: #ff6b35;
    color: white;
}

.iai-lightbox-action-btn.liked:hover {
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Bouton Pinterest */
.iai-lightbox-action-btn[data-action="pinterest"] {
    background: linear-gradient(135deg, #E60023 0%, #BD081C 100%);
    border-color: #E60023;
}

.iai-lightbox-action-btn[data-action="pinterest"]:hover {
    background: linear-gradient(135deg, #BD081C 0%, #9C0717 100%);
    box-shadow: 0 4px 12px rgba(230, 0, 35, 0.3);
}

/* Bouton Delete - Rouge */
.iai-lightbox-action-btn[data-action="delete"] {
    background: #2a2a2a;
    border-color: #f44336;
    color: #f44336;
}

.iai-lightbox-action-btn[data-action="delete"]:hover {
    background: #f44336;
    color: white;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Responsive lightbox */
@media (max-width: 768px) {
    .iai-lightbox-content {
        flex-direction: column;
        width: 95vw;
        height: 95vh;
    }
    
    .iai-lightbox-sidebar {
        width: 100%;
        max-height: 40%;
        border-left: none;
        border-top: 1px solid #333;
    }
}
