/* ========================================
   STYLES POUR LA PAGE DES ÉCHELLES
   Gestion des droits d'auteur et accès
   ======================================== */

/* ========================================
   AVERTISSEMENT DROITS D'AUTEUR
   ======================================== */

.copyright-warning {
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border-radius: 15px;
    border-left: 5px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.warning-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
}

.warning-content h3 {
    margin: 0 0 0.8rem 0;
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 700;
}

.warning-content p {
    margin: 0.5rem 0;
    color: #495057;
    line-height: 1.6;
    font-size: 1rem;
}

.lock-icon-inline {
    display: inline;
    font-size: 1rem;
}

.login-prompt {
    margin-top: 1rem !important;
    padding-top: 1rem;
    border-top: 1px solid rgba(102, 126, 234, 0.3);
}

.btn-login-small {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.btn-login-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
}

.logged-in-info {
    color: #2e7d32;
    font-weight: 600;
    background: rgba(46, 125, 50, 0.1);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logged-in-info span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.logged-in-info strong {
    color: #1b5e20;
}

.btn-logout {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(198, 40, 40, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(198, 40, 40, 0.5);
}

/* ========================================
   SECTIONS D'ÉCHELLES
   ======================================== */

.scales-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.section-title.free-section {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1) 0%, rgba(76, 175, 80, 0.1) 100%);
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.section-title.protected-section {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
    color: #e65100;
    border-left: 4px solid #ff9800;
}

/* ========================================
   ÉCHELLES LIBRES
   ======================================== */

.scale-cell.free-scale {
    border-left: 3px solid #4caf50;
}

.scale-cell.free-scale::after {
    content: "✓";
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4caf50;
    font-weight: bold;
    opacity: 0.7;
}

/* ========================================
   ÉCHELLES PROTÉGÉES
   ======================================== */

.scale-cell.protected-scale {
    border-left: 3px solid #ff9800;
}

.scale-cell.protected-scale.locked {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(255, 248, 225, 0.9), rgba(255, 236, 179, 0.8));
}

.scale-cell.protected-scale.locked:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.scale-cell.protected-scale.locked:hover .scale-link-locked {
    color: white;
}

.scale-cell.protected-scale.locked:hover .lock-icon {
    animation: shake 0.5s ease-in-out;
}

.scale-cell.protected-scale.unlocked {
    border-left: 3px solid #4caf50;
}

.scale-link-locked {
    display: block;
    color: #5d4037;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lock-icon,
.unlock-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-3px); }
    40%, 80% { transform: translateX(3px); }
}

/* ========================================
   MODAL DE CONNEXION
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.modal-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.modal-restricted-notice {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1.2rem 0;
    text-align: left;
}

.modal-restricted-notice p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: #495057;
}

.modal-restricted-notice p:first-child {
    color: #667eea;
    margin-bottom: 0.8rem;
}

.modal-restricted-notice .modal-small-text {
    font-size: 0.85rem;
    color: #c0392b;
    font-style: italic;
    font-weight: 600;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(192, 57, 43, 0.3);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-modal-login {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: none;
    cursor: pointer;
}

.btn-modal-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-modal-cancel {
    padding: 0.8rem 2rem;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-cancel:hover {
    background: #eee;
    border-color: #ccc;
}

.btn-modal-cancel::after {
    display: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .copyright-warning {
        flex-direction: column;
        padding: 1.2rem;
        margin: 1rem;
        gap: 1rem;
    }
    
    .warning-icon {
        font-size: 2rem;
    }
    
    .warning-content h3 {
        font-size: 1.1rem;
    }
    
    .warning-content p {
        font-size: 0.95rem;
    }
    
    .logged-in-info {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-logout {
        width: 100%;
        text-align: center;
    }
    
    .section-title {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-icon {
        font-size: 3rem;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
    }
    
    .modal-restricted-notice {
        padding: 0.8rem 1rem;
    }
    
    .modal-restricted-notice p {
        font-size: 0.9rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .btn-modal-login,
    .btn-modal-cancel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .copyright-warning {
        padding: 1rem;
    }
    
    .warning-content h3 {
        font-size: 1rem;
    }
    
    .warning-content p {
        font-size: 0.9rem;
    }
    
    .scale-cell.free-scale::after {
        display: none;
    }
}