/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 5px;
}

.subtitle {
    color: #888;
    font-size: 1.1em;
}

/* Actions bar */
.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-info {
    background: #e3f2fd;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #1976d2;
}

/* Boutons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1em;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #764ba2;
    color: white;
}

.btn-secondary:hover {
    background: #653a8a;
}

.btn-light {
    background: #f5f5f5;
    color: #333;
}

.btn-light:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    text-decoration: none;
}

.btn-delete:hover {
    transform: scale(1.2);
}

/* Notes list */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.note-card {
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 15px 20px;
    transition: all 0.3s;
}

.note-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.note-header h2 {
    font-size: 1.4em;
    color: #333;
    margin: 0;
    flex: 1;
}

.note-header h2 a {
    color: #333;
    text-decoration: none;
}

.note-header h2 a:hover {
    color: #667eea;
}

.note-actions {
    display: flex;
    gap: 10px;
}

.note-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #999;
    flex-wrap: wrap;
}

.note-preview {
    color: #666;
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

/* Formulaires */
.note-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-textarea {
    resize: vertical;
    min-height: 300px;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.note-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 0.9em;
    color: #666;
}

.note-info p {
    margin: 5px 0;
}

/* Suppression */
.delete-confirmation {
    max-width: 600px;
    margin: 0 auto;
}

.warning-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 25px;
    text-align: center;
}

.warning-box h2 {
    color: #856404;
    margin-bottom: 15px;
}

.warning-box p {
    margin: 10px 0;
    color: #856404;
}

.note-title-preview {
    font-size: 1.2em;
    padding: 15px;
    background: white;
    border-radius: 6px;
    margin: 15px 0;
}

.warning-text {
    font-weight: bold;
    color: #d32f2f !important;
}

.delete-form .form-actions {
    justify-content: center;
}

/* Erreurs */
.errors {
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
}

.errors p {
    color: #c62828;
    margin: 5px 0;
}

/* Footer */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .actions {
        flex-direction: column;
    }

    .search-form {
        width: 100%;
        min-width: auto;
    }

    .note-header {
        flex-direction: column;
        gap: 10px;
    }

    .note-actions {
        align-self: flex-end;
    }
}
