/* ===== CONTENEURS PRINCIPAUX ===== */

.main-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.main-container.wide {
    max-width: 800px;
}

.main-container.extra-wide {
    max-width: 900px;
    margin: 40px auto;
}

/* ===== HEADERS DE PAGE ===== */

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    color: var(--text);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.page-header .subtitle {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.9rem;
}

.app-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text);
    font-size: 2.2rem;
    font-weight: 700;
    opacity: 0.8;
}

.app-title.small {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* ===== SECTIONS ===== */

.section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.section.large-margin {
    margin-bottom: 3rem;
}

.section h2 {
    color: var(--text);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section.danger {
    border-color: #f5c6cb;
    background: #fdf2f2;
}

.section.danger h2 {
    color: #721c24;
}

/* ===== FORMULAIRES ===== */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2196f3;
    background: var(--card);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.form-actions.left {
    justify-content: flex-start;
}

.form-actions.space-between {
    justify-content: space-between;
}

.form-actions button,
.form-actions a {
    flex: 1;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    box-sizing: border-box;
}

.login-button {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 1.1rem;
    border-radius: 8px;
}

/* ===== MESSAGES ===== */

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

.success-message.large {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

.warning-text {
    color: #856404;
    background: #fff3cd;
    padding: 0.75rem;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.current-config {
    background: #e8f4f8;
    border: 1px solid #b8dce8;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #2c5463;
}

/* ===== NAVIGATION ===== */

.back-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.back-link a {
    color: #2196f3;
    text-decoration: none;
    font-size: 1rem;
}

.back-link a:hover {
    text-decoration: underline;
}

.redirect-info {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.7;
    margin-top: 1rem;
    text-align: center;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.6;
}

/* ===== ÉLÉMENTS SPÉCIALISÉS ===== */

.password-requirements {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

.users-list {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.user-item:last-child {
    border-bottom: none;
}

.user-name {
    font-weight: 500;
    color: var(--text);
}

.user-badge {
    background: #e3f1fd;
    color: #1976d2;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.upload-section {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background: var(--card);
}

.upload-section input[type="file"] {
    margin: 1rem 0;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.image-option {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card);
}

.image-option:hover {
    border-color: #2196f3;
    background: #f0f8ff;
}

.image-option.selected {
    border-color: #2196f3;
    background: #e3f1fd;
}

.image-option.no-image {
    border: 2px dashed var(--border);
    padding: 2rem;
    color: var(--text);
    opacity: 0.7;
}

.image-option img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-info {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
}

.opacity-control {
    flex: 1;
    min-width: 200px;
}

.opacity-control label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.opacity-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    margin-bottom: 0.5rem;
}

.opacity-value {
    text-align: center;
    font-weight: bold;
    color: var(--text);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {
    .main-container {
        margin: 20px;
        padding: 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .images-grid {
        grid-template-columns: 1fr;
    }
    
    .app-title {
        font-size: 1.8rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
}
.help-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: #e3f1fd;
    color: #1565c0;
    border: 1.2px solid #b1d5f7;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.help-button:hover {
    background: #bbdefb;
    transform: scale(1.05);
}
