/* ============================================
   STYLES GÉNÉRAUX ET SÉCURITÉ
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* SÉCURITÉ: Empêcher la sélection de texte */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* SÉCURITÉ: Empêcher le glisser-déposer */
    -webkit-user-drag: none;
    -moz-user-drag: none;
    user-drag: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* SÉCURITÉ: Empêcher la copie d'images */
img {
    pointer-events: none;
    -webkit-user-drag: none;
    -moz-user-drag: none;
    user-drag: none;
}

/* SÉCURITÉ: Watermark overlay */
.watermark-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 120px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    letter-spacing: 20px;
}

/* ============================================
   PAGE DE CONNEXION
   ============================================ */

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lock-icon {
    font-size: 60px;
    text-align: center;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.login-box h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-loader {
    font-size: 20px;
}

.error-message {
    margin-top: 15px;
    padding: 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 14px;
    text-align: center;
}

.success-message {
    margin-top: 15px;
    padding: 12px;
    background: #efe;
    border: 1px solid #cfc;
    border-radius: 8px;
    color: #3c3;
    font-size: 14px;
    text-align: center;
}

.security-notice {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.security-notice p {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.security-notice ul {
    list-style: none;
    padding-left: 0;
}

.security-notice li {
    padding: 5px 0;
    color: #666;
    font-size: 14px;
}

/* ============================================
   PAGE ADMIN
   ============================================ */

.admin-page {
    background: #f5f7fa;
}

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.session-timer {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.btn-logout {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: white;
    color: #667eea;
}

.admin-content {
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.welcome-section p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.security-status h3 {
    color: #333;
    margin-bottom: 15px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #e0e0e0;
}

.status-item.active {
    background: #e8f5e9;
    border-color: #4caf50;
}

.status-icon {
    font-size: 24px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.content-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e0e0e0;
}

.content-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.protected-text {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.protected-text p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.protected-image-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

#protectedCanvas {
    width: 100%;
    height: auto;
    display: block;
}

.image-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 48px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.image-note {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.protected-media {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.media-placeholder {
    padding: 60px 20px;
    text-align: center;
    color: white;
}

.media-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 15px;
}

.media-info {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.info-card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    padding: 8px 0;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.info-card li:last-child {
    border-bottom: none;
}

.admin-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.admin-footer p {
    font-size: 14px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .content-grid,
    .info-grid,
    .status-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SÉCURITÉ SUPPLÉMENTAIRE
   ============================================ */

/* Empêcher l'impression */
@media print {
    body {
        display: none !important;
    }
}

/* Masquer le contenu lors de la capture d'écran (tentative) */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    body::after {
        content: "CAPTURE D'ÉCRAN INTERDITE";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.9);
        color: white;
        display: none;
        justify-content: center;
        align-items: center;
        font-size: 48px;
        font-weight: bold;
        z-index: 99999;
    }
}
