/* Les variables CSS sont héritées de styles.css */

/* Modal Container */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

/* Modal Box */
.modal-box {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    min-width: 400px;
    max-width: 600px;
    animation: slideIn 0.2s ease;
    overflow: hidden;
}

/* Modal Header */
.modal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Modal Body */
.modal-body {
    padding: 24px;
    color: white;
    font-size: 14px;
    line-height: 1.6;
}

.modal-body p {
    margin: 0;
    white-space: pre-wrap;
    color: #cbd5e1;
}

/* Modal Input */
.modal-input {
    width: 100%;
    padding: 10px 14px;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.modal-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.05);
}

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

/* Modal Footer */
.modal-footer {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Modal Buttons */
.modal-btn {
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.modal-btn-primary {
    background: #3b82f6;
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.modal-btn-primary:hover {
    background: #2563eb;
}

.modal-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

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

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

/* Share List Modal */
.share-list-modal {
    min-width: 600px;
    max-width: 800px;
    max-height: 80vh;
}

.share-list-body {
    padding: 0;
    max-height: 500px;
    overflow-y: auto;
}

.share-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.share-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

.share-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.share-item:last-child {
    border-bottom: none;
}

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

.share-name {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.share-details {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #94a3b8;
}

.share-map,
.share-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.share-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.share-btn {
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.share-btn-open {
    background: #3b82f6;
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.share-btn-open:hover {
    background: #2563eb;
}

.share-btn-copy {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}

.share-btn-copy:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.share-btn-copy.copied {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: #06b6d4;
}

/* Scrollbar pour la liste */
.share-list-body::-webkit-scrollbar {
    width: 8px;
}

.share-list-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.share-list-body::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.share-list-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.90);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(59, 130, 246, 0.15);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .modal-box {
        min-width: 90%;
        max-width: 90%;
        margin: 20px;
    }

    .share-list-modal {
        min-width: 90%;
        max-width: 90%;
    }

    .modal-header h3 {
        font-size: 15px;
    }

    .modal-body {
        padding: 20px;
        font-size: 14px;
    }

    .modal-footer {
        padding: 12px 20px;
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }

    .share-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .share-actions {
        width: 100%;
        margin-left: 0;
    }

    .share-btn {
        flex: 1;
    }

    .share-details {
        flex-direction: column;
        gap: 4px;
    }
}
