/* ===== MODAL STYLES ===== */
/* Styles pour toutes les modales */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.modal-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
}

.modal {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.modal-overlay.closing .modal {
    animation: modalSlideOut 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.5), 
        transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    transform: rotate(90deg);
}

/* Formulaires dans les modales */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.form-group input {
    padding: 1rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus {
    border: 1px solid rgba(100, 150, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(100, 150, 255, 0.08);
    transform: translateY(-2px);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-cancel:active {
    transform: translateY(0);
}

.btn-submit {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.3), rgba(80, 120, 255, 0.3));
    color: white;
    border: 1px solid rgba(100, 150, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(100, 150, 255, 0.2);
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.4), rgba(80, 120, 255, 0.4));
    border: 1px solid rgba(100, 150, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(100, 150, 255, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Styles spécifiques pour la modale d'informations */
.info-modal {
    max-width: 550px;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-color-alpha);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.info-step strong {
    color: rgba(255, 255, 255, 0.95);
}

.extension-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.5rem;
    background: var(--accent-color-alpha);
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-self: flex-start;
}

.extension-link:hover {
    background: var(--accent-color-alpha);
    border: 1px solid var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-color-alpha);
    filter: brightness(1.3);
}

.url-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.url-input {
    flex: 1;
    padding: 0.9rem 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.copy-btn {
    padding: 0.9rem 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 1rem;
}

.copy-btn:hover {
    background: rgba(100, 255, 150, 0.15);
    border: 1px solid rgba(100, 255, 150, 0.3);
    color: rgba(100, 255, 150, 1);
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: rgba(100, 255, 150, 0.2);
    border: 1px solid rgba(100, 255, 150, 0.4);
    color: rgba(100, 255, 150, 1);
}

/* Styles spécifiques pour la modale de personnalisation */
.customize-modal {
    max-width: 700px;
    width: 95%;
}

.customize-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    grid-template-areas: 
        "animation animation"
        "theme accent"
        "colors colors"
        "reset reset";
}

.customize-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.customize-section:nth-child(1) {
    grid-area: animation;
}

.customize-section:nth-child(2) {
    grid-area: theme;
}

.customize-section:nth-child(3) {
    grid-area: accent;
}

.customize-section:nth-child(4) {
    grid-area: colors;
}

.customize-section h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Options de thème */
.theme-options {
    display: flex;
    gap: 1rem;
}

.theme-btn {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: var(--glass-bg);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-btn i {
    font-size: 1.5rem;
}

.theme-btn:hover {
    background: var(--glass-bg-hover);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.theme-btn.active {
    background: var(--accent-color-alpha);
    border: 1px solid var(--accent-color);
    color: white;
}

/* Sélecteur de couleur */
.color-picker-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.color-picker {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.color-label {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

/* Couleurs de l'animation */
.animation-colors {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.color-option {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-option label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Sélecteur d'animation */
.animation-select-container {
    position: relative;
}

.animation-select {
    width: 100%;
    padding: 1rem 1.3rem;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: var(--glass-bg);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='rgba(255,255,255,0.7)' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.animation-select:hover {
    background-color: var(--glass-bg-hover);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.animation-select:focus {
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-color-alpha);
}

.animation-select option {
    background: rgba(20, 20, 30, 0.98);
    color: rgba(255, 255, 255, 0.9);
    padding: 1rem;
}

/* Bouton Reset */
.reset-btn {
    grid-area: reset;
    padding: 1rem;
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 14px;
    background: rgba(255, 100, 100, 0.1);
    color: rgba(255, 150, 150, 0.9);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.reset-btn:hover {
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 100, 100, 0.3);
}

/* eCalendar Section */
.ecalendar-input-container {
    display: flex;
    gap: 0.5rem;
}

.ecalendar-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-bg);
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.ecalendar-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-color-alpha);
}

.ecalendar-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ecalendar-save-btn {
    padding: 0.8rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    background: var(--accent-color-alpha);
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.ecalendar-save-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--accent-color-alpha);
    background: var(--accent-color);
    color: white;
}

.ecalendar-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.5rem;
}
