:root {
    --bg: #262626;
    --text: #ffffff;
    --dim: #949494;
    --muted: #666666;
    --accent: #f3d2b3;
    --border: #333333;
    --surface: #1e1e1e;
    --divider: #2e2e2e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    position: relative;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 0 25px;
    position: relative;
    z-index: 1;
}

/* =========================
   HEADER
========================= */

.main-header {
    padding: 30px 0;
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.site-logo {
    height: 35px;
    width: auto;
    display: block;
}

.logo-wrapper {
    display: flex;
    align-items: center;
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-nav .nav-btn-link {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--dim);
}

.auth-nav .btn-orange-pill {
    background: rgba(243, 210, 179, 0.18);
    border: none;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.72rem;
    padding: 5px 12px;
    line-height: 1.4;
}

.auth-nav .btn-orange-pill:hover {
    background: rgba(243, 210, 179, 0.28);
    opacity: 1;
}

.logout-container {
    margin-left: auto;
}

.logout-container .btn-orange-pill {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    color: var(--dim);
    font-weight: 400;
    font-size: 0.78rem;
    text-decoration: none;
}

.logout-container .btn-orange-pill:hover {
    color: var(--text);
    opacity: 1;
}

.nav-btn-link {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
}

/* bouton principal */
.btn-orange-pill {
    background: var(--accent);
    color: black;
    padding: 8px 18px;
    border-radius: 24px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s ease;
}

.btn-orange-pill:hover {
    opacity: 0.85;
}

/* =========================
   ADMIN ELEMENTS
========================= */

.admin-edit-link {
    color: var(--accent);
    font-size: 0.7rem;
    margin-left: 10px;
    text-decoration: none;
    transition: 0.2s ease;
}

.admin-edit-link:hover {
    opacity: 0.7;
}

/* compteur emails */
.admin-email-counter {
    margin-top: 15px;
    color: var(--accent);
    font-size: 0.85rem;
    text-align: right;
    font-family: monospace;
}

/* bouton + article admin */
.admin-create-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s ease;
}

.admin-create-btn:hover {
    background: var(--accent);
    color: black;
}

/* =========================
   MESSAGES
========================= */

.alert {
    padding: 15px;
    border: 1px solid var(--accent);
    background: rgba(243, 210, 179, 0.05);
    color: var(--accent);
    text-align: center;
    margin-bottom: 20px;
    border-radius: 4px;
    transition: opacity 1s ease;
}

/* =========================
   HERO
========================= */

.hero {
    text-align: center;
    padding: 50px 0 25px 0;
}

.main-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2rem, 5.2vw, 2.6rem);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.15;
    margin-bottom: 16px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    color: var(--dim);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 460px;
    margin: 0 auto;
}

/* =========================
   ARTICLES
========================= */

.archive-section {
    margin: 60px 0;
}

.section-title {
    font-family: monospace;
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 3px;
    margin-bottom: 30px;
}

.links-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-item {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 10px;
    border-bottom: 1px solid var(--divider);
    padding-bottom: 12px;
}

.article-item .raw-link {
    min-width: 0;
}

.article-item .member-tag {
    flex-shrink: 0;
    margin-top: 3px;
    margin-left: 0;
    align-self: flex-start;
}

.article-item .admin-edit-link,
.article-item > a[href*="/editing/"] {
    margin-left: 0;
    flex-shrink: 0;
}

.raw-link {
    color: #f0f0f0;
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 400;
    flex: 1;
    transition: 0.2s ease;
}

.raw-link:hover {
    color: var(--accent);
}

.member-tag {
    font-family: monospace;
    font-size: 0.6rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 1px 5px;
    margin-left: 10px;
}

/* =========================
   FORM BOX
========================= */

.newsletter-box {
    border: 1px solid var(--border);
    padding: 40px;
    background: var(--surface);
    margin: 40px 0 80px 0;
    text-align: center;
}

.form-toggle {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: center;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--dim);
    font-weight: 800;
    font-size: 0.7rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    padding-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toggle-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.news-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.news-tagline {
    color: var(--dim);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

/* formulaire plus étroit que le bloc et centré */
.news-form {
    display: flex;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border);
    text-align: left;
}

.news-form input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px;
    color: white;
    outline: none;
    min-width: 0;
    font-size: 0.9rem;
}

.news-form input::placeholder { color: var(--muted); }

.news-form button {
    background: var(--accent);
    color: black;
    border: none;
    padding: 0 25px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================
   FOOTER
========================= */

.footer {
    padding: 60px 0;
    border-top: 1px solid var(--border);
    width: 100%;
}

.footer-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.footer-link {
    color: var(--dim);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 650px) {

    .news-form {
        flex-direction: column;
        border: none;
        gap: 10px;
        max-width: 100%;
    }

    .news-form input {
        border: 1px solid var(--border);
        width: 100% !important;
    }

    .news-form button {
        width: 100% !important;
        padding: 15px;
        border-radius: 4px;
    }

    .article-item {
        align-items: flex-start;
        gap: 8px;
    }

    .main-header {
        padding: 20px 0;
    }
}
