/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Formulaire de connexion */
.login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 50px auto;
}

.login-form h2 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

/* En-tête de page */
.page-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.page-header h1 {
    color: #333;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.coll-num {
    color: #666;
    font-size: 14px;
}

/* Contenu principal */
.content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-container {
    margin-bottom: 30px;
}

.form-container h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

/* Groupes de formulaire */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Boutons */
.btn-login,
.btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-logout {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-logout:hover {
    background: #c82333;
}

/* Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Section d'informations */
.info-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.info-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.info-section p {
    margin-bottom: 8px;
    color: #666;
}

/* Texte d'aide */
.help-text {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

/* Liste des éléments */
.elements-list {
    margin-top: 30px;
}

.elements-list h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.no-elements {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #666;
}

.no-elements p {
    margin-bottom: 10px;
}

/* Table des éléments */
.elements-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.elements-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

.elements-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.elements-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.elements-table td {
    padding: 12px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: top;
}

.elements-table tbody tr:hover {
    background-color: #f8f9fa;
}

.elements-table tbody tr:last-child td {
    border-bottom: none;
}

.element-id {
    font-family: monospace;
    font-weight: 600;
    color: #667eea;
    text-align: center;
    width: 60px;
}

.element-name {
    font-weight: 600;
    color: #333;
    min-width: 150px;
}

.element-description {
    color: #555;
    line-height: 1.4;
    max-width: 300px;
}

.no-description {
    color: #999;
    font-style: italic;
}

.element-date {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
    text-align: right;
    min-width: 120px;
}

.element-action {
    text-align: center;
    width: 100px;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-delete:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .login-form {
        margin: 20px auto;
        padding: 30px 20px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .content {
        padding: 20px;
    }
    
    .elements-table-container {
        font-size: 12px;
    }
    
    .elements-table th,
    .elements-table td {
        padding: 8px 6px;
    }
    
    .element-description {
        max-width: 200px;
        font-size: 12px;
    }
    
    .element-date {
        font-size: 11px;
    }
}
