/* STYLES COMMUNS - Mobile & Desktop */

/* Particules flottantes pour effet liquid glass */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 40% 60%, rgba(103, 126, 234, 0.06) 0%, transparent 30%),
        radial-gradient(circle at 70% 30%, rgba(118, 75, 162, 0.04) 0%, transparent 35%),
        radial-gradient(circle at 20% 80%, rgba(240, 147, 251, 0.05) 0%, transparent 20%);
    animation: particlesFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes particlesFloat {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.1);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-10px) translateX(-15px) scale(0.9);
        opacity: 1;
    }
    75% {
        transform: translateY(-30px) translateX(8px) scale(1.05);
        opacity: 0.85;
    }
}

/* Animations communes */
@keyframes containerGlow {
    0% { 
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.1),
            0 2px 8px rgba(0, 0, 0, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    100% { 
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.15),
            0 4px 12px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

@keyframes buttonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Styles pour les dialogs/modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1500;
    padding: 24px;
    background: rgba(7, 11, 28, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal[style*="display: flex"] {
    display: flex !important;
}

.modal .modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 24px;
    width: min(520px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: slideIn 0.3s ease;
}

/* Fenêtre modale pour projets - Style unifié mobile/desktop */
.mobile-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.mobile-dialog-content {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 100%);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.mobile-dialog-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-dialog-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mobile-dialog-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-dialog-close:hover {
    background: rgba(255, 70, 70, 0.3);
    color: white;
    transform: scale(1.1);
}

.mobile-dialog-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    max-height: calc(80vh - 100px);
}

/* Mobile adaptations */
@media (max-width: 768px) {
    .mobile-dialog {
        padding: 10px;
    }
    
    .mobile-dialog-content {
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .mobile-dialog-header {
        padding: 16px 20px 12px;
    }
    
    .mobile-dialog-header h3 {
        font-size: 1.2rem;
    }
    
    .mobile-dialog-body {
        padding: 16px 20px 20px;
        max-height: calc(90vh - 80px);
    }
}

/* Classes utilitaires */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pulse {
    animation: buttonPulse 1s infinite;
}

/* Styles pour les listes de projets dans modale */
.projects-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 16px 0;
    padding-right: 8px; /* Space for scrollbar */
}

/* Custom scrollbar pour la liste de projets */
.projects-list::-webkit-scrollbar {
    width: 6px;
}

.projects-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.projects-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.projects-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.project-item {
    padding: 12px 16px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.project-preview-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-preview-img {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-preview-placeholder {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.project-item:active {
    transform: scale(0.98);
}

.project-item.selected {
    background: rgba(0, 122, 255, 0.3) !important;
    border-color: rgba(0, 122, 255, 0.6) !important;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.4) !important;
}

.project-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
}

.project-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Boutons dialog */
.dialog-button {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.dialog-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.dialog-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.dialog-button.secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.dialog-button.danger {
    background: linear-gradient(135deg, rgba(255, 69, 92, 0.9), rgba(255, 45, 85, 0.95));
    border-color: rgba(255, 45, 85, 0.7);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 45, 85, 0.35);
}

.dialog-button.danger:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 104, 124, 0.95), rgba(255, 59, 48, 1));
    box-shadow: 0 10px 24px rgba(255, 59, 48, 0.4);
}

.confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 28, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
    padding: 16px;
}

.confirm-dialog {
    width: min(360px, 100%);
    background: linear-gradient(155deg, rgba(36, 48, 94, 0.95), rgba(28, 38, 80, 0.9));
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    outline: none;
}

.confirm-dialog h3 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
}

.confirm-dialog p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.confirm-dialog-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

/* Sélection de couleur désactivée */
::selection {
    background: transparent;
}

::-moz-selection {
    background: transparent;
}

/* Fenêtre de dialogue de sauvegarde - Centrée au milieu de l'écran */
.save-dialog {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9998 !important;
    padding: 20px !important;
    animation: fadeIn 0.3s ease !important;
}

.save-dialog-content {
    background: linear-gradient(155deg, rgba(36, 48, 94, 0.98), rgba(28, 38, 80, 0.95)) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 24px !important;
    padding: 32px !important;
    width: 100% !important;
    max-width: 420px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
    animation: fadeIn 0.3s ease !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.save-dialog h3 {
    margin: 0 0 20px 0 !important;
    text-align: center !important;
    font-size: 1.3rem !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600 !important;
}

.save-dialog input {
    width: 100% !important;
    padding: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 16px !important;
    font-size: 1rem !important;
    margin-bottom: 20px !important;
    outline: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: white !important;
    box-sizing: border-box !important;
}

.save-dialog input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.save-dialog input:focus {
    border-color: rgba(0, 122, 255, 0.6) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2) !important;
}

.save-dialog .dialog-buttons {
    display: flex !important;
    gap: 12px !important;
    margin-top: 20px !important;
}

.save-dialog .dialog-buttons button {
    flex: 1 !important;
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.save-dialog .dialog-buttons button#dialogSave {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.9), rgba(0, 86, 179, 0.9)) !important;
    color: white !important;
}

.save-dialog .dialog-buttons button#dialogSave:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 1), rgba(0, 86, 179, 1)) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4) !important;
}

.save-dialog .dialog-buttons button#dialogCancel {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.save-dialog .dialog-buttons button#dialogCancel:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Focus et accessibilité */
button:focus,
input:focus {
    outline: 2px solid rgba(0, 122, 255, 0.6);
    outline-offset: 2px;
}

/* Transitions globales */
* {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* États de boutons génériques */
button {
    border: none;
    cursor: pointer;
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

button:active {
    transform: scale(0.98);
}

/* Input de couleur commun */
input[type="color"] {
    border: none;
    cursor: pointer;
    background: transparent;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
    border-radius: inherit;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Responsive utilities */
@media (max-width: 480px) {
    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .mobile-only {
        display: none !important;
    }
}

/* User Profile Styles */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    margin-right: 10px;
}

.user-profile-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    max-width: 200px;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.user-profile-display:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
}

.user-profile-display:active {
    transform: scale(0.98);
}

.user-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar svg {
    border-radius: 50%;
}

.user-avatar div {
    border-radius: 50% !important;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.user-email {
    font-size: 12px;
    color: #666;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.logout-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .user-profile {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 100;
    }

    .user-email {
        display: none;
    }

    .logout-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
}

.credits-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    padding: 24px;
}

.credits-content {
    width: min(640px, 92vw);
    max-height: 88vh;
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(32, 36, 72, 0.92), rgba(18, 20, 48, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.92);
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.credits-content h2 {
    margin-top: 0;
    font-size: clamp(1.6rem, 2.8vw, 2rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.02em;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.credits-section {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.credits-section h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.credits-section p {
    margin: 8px 0;
    line-height: 1.6;
}

.credits-section ul {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.credits-section ul li {
    line-height: 1.5;
}

.credits-contact {
    font-weight: 600;
    color: #7bd5ff;
}

.creator-story ul li::marker {
    color: #7bd5ff;
}

.acknowledgements p,
.legal p {
    font-size: 0.95rem;
}

.close-credits {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(74, 144, 226, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.close-credits:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(74, 144, 226, 0.45);
}

.close-credits:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.35);
}

@media (max-width: 560px) {
    .credits-content {
        padding: 24px;
        border-radius: 20px;
    }

    .credits-section {
        padding: 16px;
    }
}

.profile-modal .modal-content {
    width: min(520px, 92vw);
    max-height: 88vh;
    overflow: hidden;
    padding: 0;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(28, 33, 68, 0.94), rgba(16, 18, 40, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.92);
}

.profile-modal .modal-header {
    padding: 22px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-modal .modal-body {
    padding: 24px 28px 28px;
    max-height: 70vh;
    overflow-y: auto;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-form-row label {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.profile-form-row select,
.profile-form-row input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s ease;
}

.profile-form-row select:focus,
.profile-form-row input[type="text"]:focus {
    border-color: rgba(123, 213, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(123, 213, 255, 0.18);
}

.profile-form-row select option {
    color: #0f1428;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.profile-form-actions .dialog-button {
    min-width: 140px;
}

@media (max-width: 560px) {
    .profile-modal .modal-body {
        padding: 20px 20px 24px;
    }

    .profile-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .profile-form-actions .dialog-button {
        width: 100%;
    }
}

.profile-intro {
    margin: 0 0 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
}

/* =====================================================
   SHARING SYSTEM STYLES
   ===================================================== */

/* Notification button with badge */
.notification-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff4757;
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Share modal content */
.share-modal-content {
    max-width: 520px;
    min-width: 320px;
}

.share-method-choice h4 {
    margin: 0 0 16px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

.share-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-method-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
}

.share-method-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.share-method-btn.primary {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.2), rgba(88, 86, 214, 0.2));
    border-color: rgba(0, 122, 255, 0.5);
}

.share-method-btn.primary:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.3), rgba(88, 86, 214, 0.3));
    border-color: rgba(0, 122, 255, 0.7);
}

.method-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.method-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.method-content strong {
    font-size: 1rem;
    font-weight: 600;
}

.method-content small {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

/* Share Supabase form */
.share-supabase-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-select option {
    background: #1a1f3a;
    color: white;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.share-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Shared projects modal */
.shared-projects-modal {
    max-width: 720px;
    min-width: 320px;
}

.shared-projects-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;
}

.loading-state,
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* Shared project card */
.shared-project-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: all 0.25s ease;
}

.shared-project-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.shared-project-card.pending {
    border-left: 4px solid #007AFF;
}

.shared-project-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.shared-project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.shared-project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.shared-project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.shared-project-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: white;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-project-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.shared-project-status.pending {
    background: rgba(0, 122, 255, 0.2);
    color: #5AC8FA;
    border: 1px solid rgba(90, 200, 250, 0.3);
}

.shared-project-status.accepted {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.shared-project-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.shared-project-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shared-project-message {
    margin-top: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(0, 122, 255, 0.5);
    border-radius: 6px;
    font-size: 0.9rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.shared-project-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.shared-project-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.shared-project-action-btn.primary {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
}

.shared-project-action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.shared-project-action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.shared-project-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.shared-project-action-btn.danger {
    background: rgba(255, 59, 48, 0.15);
    color: #FF453A;
    border: 1px solid rgba(255, 69, 58, 0.3);
}

.shared-project-action-btn.danger:hover {
    background: rgba(255, 59, 48, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .share-modal-content,
    .shared-projects-modal {
        max-width: 95vw;
    }

    .shared-project-card {
        flex-direction: column;
    }

    .shared-project-thumbnail {
        width: 100%;
        height: 120px;
    }

    .share-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .shared-project-actions {
        flex-direction: column;
    }

    .shared-project-action-btn {
        width: 100%;
    }
}

/* Styles pour les indicateurs de template (Modèles à Réaliser) */
.pixel {
    position: relative !important;
}

.pixel.has-template-indicator {
    position: relative !important;
    overflow: visible !important;
}

.pixel .template-indicator-svg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 100 !important; /* Très élevé pour être au-dessus de tout */
    overflow: visible !important;
    display: block !important;
    visibility: visible !important;
}

.pixel .template-indicator-svg polygon {
    transition: opacity 0.3s ease;
    display: block !important;
    visibility: visible !important;
}

.pixel.has-template-indicator:hover .template-indicator-svg polygon {
    opacity: 1;
    stroke-width: 2;
}

/* Assurer que les indicateurs sont visibles même en cas de conflit */
#pixelGrid .pixel .template-indicator-svg {
    z-index: 100 !important;
}

.pixel.template-completed {
    /* Animation subtile quand le pixel est complété */
    animation: templateCompleted 0.3s ease;
}

@keyframes templateCompleted {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}
