/* custom.css - Styles personnalisés inspirés de Notion */

/* -------------------- RESET & BASE -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #ffffff;
    color: #1f1f1f;
    line-height: 1.5;
}

/* Style spécifique pour la page de connexion */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

/* -------------------- COMPOSANTS COMMUNS -------------------- */
.notion-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #1f1f1f;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notion-button:hover {
    background-color: #3d3d3d;
}

.notion-button.secondary {
    background-color: transparent;
    color: #1f1f1f;
    border: 1px solid #e1e1e1;
}

.notion-button.secondary:hover {
    background-color: #f5f5f5;
}

/* Styles de formulaire génériques */
.notion-form {
    max-width: 600px;
    margin: 0 auto;
}

.notion-form .field {
    margin-bottom: 1.5rem;
}

.notion-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #1f1f1f;
}

.notion-form input,
.notion-form textarea {
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid #e1e1e1;
    background: transparent;
    transition: border-color 0.2s;
    border-radius: 0;
}

.notion-form input:focus,
.notion-form textarea:focus {
    outline: none;
    border-bottom-color: #1f1f1f;
}

.notion-form input::placeholder,
.notion-form textarea::placeholder {
    color: #b9b9b9;
}

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

.notion-form .two.fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Messages de succès */
.notion-success {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 2rem;
}

/* Reset des styles Semantic UI pour les formulaires */
.ui.form input:not([type="checkbox"]):not([type="radio"]),
.ui.form textarea {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #e1e1e1 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.ui.form .field {
    margin-bottom: 1.5rem !important;
}

.ui.form .field>label {
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
}

.ui.container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* -------------------- PAGE D'ACCUEIL (INDEX) -------------------- */
.notion-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.notion-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.notion-header h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #1f1f1f;
}

.notion-header p {
    font-size: 1.25rem;
    color: #5e5e5e;
    margin-bottom: 2rem;
}

.notion-header .privacy-note {
    font-size: 0.875rem;
    color: #a1a1a1;
    margin-top: 1rem;
}

.notion-header .privacy-note a {
    color: #1f1f1f;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.notion-form altcha-widget {
    margin: 2rem 0 1.5rem 0;
}

.notion-footer {
    text-align: center;
    margin-top: 4rem;
    color: #a1a1a1;
    font-size: 0.875rem;
}

.notion-footer span {
    font-weight: 500;
    color: #1f1f1f;
}

/* -------------------- PAGE DE CONNEXION ADMIN -------------------- */
.notion-login-container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.notion-login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.notion-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.notion-login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.notion-login-header p {
    color: #5e5e5e;
    font-size: 0.95rem;
}

.notion-error {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    color: #b71c1c;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

/* -------------------- PANEL ADMIN -------------------- */
.notion-admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.notion-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.notion-admin-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1f1f1f;
}

.notion-admin-header .notion-logout {
    background: transparent;
    border: 1px solid #e1e1e1;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1f1f1f;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.notion-admin-header .notion-logout:hover {
    background-color: #f5f5f5;
    border-color: #1f1f1f;
}

.notion-search {
    margin-bottom: 2rem;
}

.notion-search form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.notion-search .field {
    flex: 1;
}

.notion-search label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #1f1f1f;
}

.notion-search input {
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid #e1e1e1;
    background: transparent;
    transition: border-color 0.2s;
    border-radius: 0;
}

.notion-search input:focus {
    outline: none;
    border-bottom-color: #1f1f1f;
}

.notion-search input::placeholder {
    color: #b9b9b9;
}

.notion-table-wrapper {
    overflow-x: auto;
    margin-top: 2rem;
}

.notion-table {
    width: 100%;
    border-collapse: collapse;
}

.notion-table th {
    text-align: left;
    padding: 1rem 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #5e5e5e;
    border-bottom: 1px solid #e1e1e1;
}

.notion-table td {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.notion-table tr:hover td {
    background-color: #fafafa;
}

.notion-table .message-content {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notion-delete {
    color: #d32f2f;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.notion-delete:hover {
    text-decoration: underline;
}

.notion-pagination {
    margin-top: 2rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.notion-pagination a {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    color: #1f1f1f;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.notion-pagination a:hover,
.notion-pagination a.active {
    background-color: #1f1f1f;
    color: white;
    border-color: #1f1f1f;
}

.notion-empty {
    text-align: center;
    padding: 3rem;
    color: #a1a1a1;
    font-size: 1rem;
}

/* -------------------- MEDIA QUERIES -------------------- */
@media (max-width: 600px) {
    .notion-container {
        padding: 2rem 1rem;
    }
    .notion-header h1 {
        font-size: 2.5rem;
    }
    .notion-form .two.fields {
        grid-template-columns: 1fr;
        gap: 0;
    }
    body.login-page {
        padding: 1rem;
    }
}
