/* Fenêtre popup de démarrage avec barre de progression */

.startup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-backdrop);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-out;
}

.startup-popup {
    background: var(--secondary-bg);
    border-radius: 0;
    padding: 0px;
    box-shadow: none;
    text-align: center;
    min-width: 500px;
    max-width: 600px;
    border: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.startup-popup::before {
    display: none;
}

.startup-logo {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    margin-top: 0px;
    border-radius: 0;
    transition: none;
    max-width: 100%;
    margin-left: 0px;
    margin-right: 0px;
    /* Logo supprimé */
    min-height: 20px;
}

.app-version {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 30px;
    margin-top: -10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Pas d'effet au survol pour un style minimaliste */

.progress-container {
    margin: 0 !important;
    background: transparent !important;
    padding: 0;
    border-radius: 0;
    border: none;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: transparent !important;
    border-radius: 0;
    overflow: hidden;
    border: none;
}

/* Suppression de l'effet glassmorphisme */

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9, #27ae60);
    border-radius: 0;
    width: 0%;
    transition: width 0.3s ease;
}

/* Suppression de l'animation de brillance */

/* Suppression de l'animation de brillance et des effets */

.progress-text {
    color: var(--text-primary);
    font-size: 14px;
    margin-top: 16px;
    font-weight: 400;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

/* Section de validation email */
.email-section {
    margin: 20px 20px 30px 20px;
    background: var(--secondary-bg);
    border-radius: 8px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.email-header h3 {
    color: var(--text-primary);
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.email-header p {
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.4;
}

.email-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.email-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--primary-bg);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.email-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.email-input::placeholder {
    color: var(--text-secondary);
}

.validate-email-btn {
    padding: 12px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.validate-email-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.validate-email-btn:active {
    transform: translateY(0);
}

.validate-email-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.email-status {
    display: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.email-status.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.email-status.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.email-status.info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Animation pour les boutons déverrouillés */
.startup-button.unlocked {
    animation: unlockGlow 0.8s ease-out;
}

@keyframes unlockGlow {
    0% {
        box-shadow: 0 0 0 rgba(39, 174, 96, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(39, 174, 96, 0.6);
    }
    100% {
        box-shadow: 0 0 0 rgba(39, 174, 96, 0);
    }
}

.startup-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin: 32px 20px 20px 20px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.startup-button {
    padding: 16px 32px;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    background: transparent;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 10;
}

/* Suppression des effets de brillance sur les boutons */

.btn-nouveau {
    background: #171a1f;
    color: #27ae60;
    border: none;
    position: relative;
    z-index: 10;
}

.btn-nouveau:hover {
    box-shadow: 
        -18px 0 20px rgba(52, 152, 219, 0.25),
        0 0 25px rgba(41, 128, 185, 0.2),
        18px 0 20px rgba(39, 174, 96, 0.25) !important;
}

.btn-ouvrir {
    background: #171a1f;
    color: #3498db;
    border: none;
    position: relative;
    z-index: 10;
}

.btn-ouvrir:hover {
    box-shadow: 
        -18px 0 20px rgba(52, 152, 219, 0.25),
        0 0 25px rgba(41, 128, 185, 0.2),
        18px 0 20px rgba(39, 174, 96, 0.25) !important;
}

.startup-button:active {
    opacity: 0.8;
}

.startup-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Animations */
@keyframes waveGlowGreen {
    0% { 
        box-shadow: 
            -20px 0 10px rgba(52, 152, 219, 0.4),
            -10px 0 15px rgba(41, 128, 185, 0.3),
            0 0 20px rgba(39, 174, 96, 0.2);
    }
    50% {
        box-shadow: 
            0 0 15px rgba(52, 152, 219, 0.5),
            10px 0 20px rgba(41, 128, 185, 0.4),
            20px 0 25px rgba(39, 174, 96, 0.3);
    }
    100% { 
        box-shadow: 
            20px 0 10px rgba(52, 152, 219, 0.2),
            30px 0 15px rgba(41, 128, 185, 0.1),
            40px 0 20px rgba(39, 174, 96, 0.05);
    }
}

@keyframes waveGlowBlue {
    0% { 
        box-shadow: 
            -20px 0 10px rgba(39, 174, 96, 0.4),
            -10px 0 15px rgba(41, 128, 185, 0.3),
            0 0 20px rgba(52, 152, 219, 0.2);
    }
    50% {
        box-shadow: 
            0 0 15px rgba(39, 174, 96, 0.5),
            10px 0 20px rgba(41, 128, 185, 0.4),
            20px 0 25px rgba(52, 152, 219, 0.3);
    }
    100% { 
        box-shadow: 
            20px 0 10px rgba(39, 174, 96, 0.2),
            30px 0 15px rgba(41, 128, 185, 0.1),
            40px 0 20px rgba(52, 152, 219, 0.05);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.startup-overlay.closing {
    animation: slideOut 0.5s ease-in forwards;
}

/* Responsive */
@media (max-width: 600px) {
    .startup-popup {
        margin: 20px;
        min-width: auto;
        padding: 0px;
    }
    
    .startup-logo {
        width: 100%;
        max-width: 100%;
        margin-left: 0px;
        margin-right: 0px;
        margin-top: 0px;
        /* Logo supprimé */
        min-height: 40px;
    }
    
    .progress-container {
        margin: 15px 20px;
    }
    
    .startup-buttons {
        flex-direction: column;
        gap: 15px;
        margin: 20px;
        margin-bottom: 30px;
    }
    
    .startup-button {
        min-width: auto;
        padding: 12px 25px;
    }
}

/* ===============================================
   POPUP AVEC COLONNE DE RESTAURATION À DROITE
   =============================================== */

/* Conteneur principal du contenu */
.startup-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    transition: all 0.3s ease;
    background: var(--secondary-bg);
}

/* Popup étendue quand il y a une sauvegarde automatique */
.startup-popup.has-autosave {
    flex-direction: row;
    max-width: 800px;
    min-width: 700px;
    gap: 0;
    align-items: flex-start;
}

.startup-popup.has-autosave .startup-content {
    flex: 1;
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Colonne de restauration à droite */
.autosave-column {
    width: 280px;
    background: transparent;
    border-radius: 0;
    padding: 16px;
    margin-left: 16px;
    border: none;
    display: flex;
    flex-direction: column;
}

.autosave-header {
    text-align: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.autosave-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.autosave-header h3 {
    color: #2c3e50;
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
}

.autosave-header p {
    color: #7f8c8d;
    margin: 0;
    font-size: 13px;
}

.project-card {
    background: var(--secondary-bg);
    border-radius: 0;
    padding: 12px;
    border-left: 2px solid #3498db;
    margin-bottom: 12px;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.project-name {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.file-icon {
    font-size: 16px;
    margin-right: 8px;
}

.project-name strong {
    color: #2c3e50;
    font-size: 14px;
    word-break: break-word;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 24px;
}

.detail-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
}

.detail-icon {
    margin-right: 6px;
    width: 14px;
}

.btn-restore {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    width: 100%;
    font-size: 13px !important;
    padding: 10px 16px !important;
    margin-bottom: 12px;
}

.btn-restore:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.restore-note {
    text-align: center;
    margin-bottom: 16px;
}

.restore-note small {
    color: #6c757d;
    font-size: 11px;
    display: block;
}

.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    margin: 16px 0;
}

.autosave-actions {
    margin-top: auto;
}

.action-label {
    font-size: 12px;
    color: #7f8c8d;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.btn-delete-autosave {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3) !important;
    width: 100%;
    font-size: 12px !important;
    padding: 8px 12px !important;
}

.btn-delete-autosave:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4) !important;
}

/* Dialogue de confirmation */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    /* Doit être supérieure à .startup-overlay (99999) pour apparaître au premier plan */
    z-index: 100200;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.confirm-dialog {
    background: var(--secondary-bg);
    border-radius: 0;
    padding: 24px;
    max-width: 400px;
    border: none;
    box-shadow: none;
    min-width: 320px;
    animation: none;
}

.confirm-header {
    text-align: center;
    margin-bottom: 16px;
}

.confirm-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.confirm-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.confirm-dialog p {
    text-align: center;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 24px;
}

.confirm-buttons {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.confirm-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-yes {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.confirm-no {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.confirm-cancel {
    background: #6c757d;
    color: white;
}

.confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Notifications */
@keyframes slideInRight {
    from { 
        opacity: 0; 
        transform: translateX(100%); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes slideOutRight {
    from { 
        opacity: 1; 
        transform: translateX(0); 
    }
    to { 
        opacity: 0; 
        transform: translateX(100%); 
    }
}

@keyframes scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.8) translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

/* Responsive */
@media (max-width: 900px) {
    .startup-popup.has-autosave {
        flex-direction: column;
        max-width: 500px;
        min-width: 400px;
    }
    
    .startup-popup.has-autosave .startup-content {
        padding-right: 0;
        margin-bottom: 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 20px;
    }
    
    .autosave-column {
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .startup-popup.has-autosave {
        min-width: 350px;
        padding: 20px;
    }
    
    .autosave-column {
        padding: 16px;
    }
    
    .project-details {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .project-name {
        justify-content: center;
    }
    
    .detail-item {
        justify-content: center;
    }
}

/* Animation de secousse pour indiquer que le clic à l'extérieur est ignoré */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
