/* ====================================
   1. CONFIGURATION GÉNÉRALE
   ==================================== */
:root {
    --ghost-accent-color: #603B93;
    --link-color-dark: #B084EB;
}

/* ====================================
   2. HEADER ET NAVIGATION
   ==================================== */
.gh-head {
    position: relative;
    z-index: 999;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding-bottom: 10px;
}

.gh-head::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100vw;
    height: calc(100% + 20px);
    z-index: -1;
    background: linear-gradient(to bottom, 
        #603B93 0%, 
        #603B93 100px, 
        #ffffff 160px,
        #ffffff calc(160px + 100%));
}

/* Menu burger et recherche sur mobile */
.gh-burger {
    color: #fff;
}

.gh-burger:before,
.gh-burger:after {
    background: currentColor;
}

.gh-search.gh-icon-btn svg {
    color: #fff;
}

/* Menu mobile déplié */
.gh-head-menu {
    background: transparent;
}

@media (max-width: 767px) {
    .gh-head {
        padding-bottom: 5px;
    }

    .gh-head::before {
        background: linear-gradient(to bottom, 
            #603B93 0%, 
            #603B93 80px, 
            #ffffff 120px,
            #ffffff calc(120px + 100%));
    }

    /* Reset des styles par défaut */
    .gh-head-menu,
    .gh-head-menu .nav,
    .gh-head-menu .nav li,
    .gh-head-menu .nav a {
        text-shadow: none !important;
    }

    /* Style du menu déplié sur mobile */
    .gh-head-menu {
        background: #fff !important;
        padding: 20px !important;
        border-radius: 10px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        margin-top: 10px !important;
    }

    /* Style des liens de navigation */
    .gh-head-menu .nav {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Forcer les styles des liens individuels */
    .gh-head-menu .nav li a,
    .gh-head-menu .nav a {
        color: #333333 !important;
        font-weight: 600 !important;
        display: block !important;
        padding: 10px 15px !important;
        margin: 5px 0 !important;
        border-radius: 6px !important;
        background: transparent !important;
        transition: all 0.2s ease !important;
        text-decoration: none !important;
        opacity: 1 !important;
    }

    .gh-head-menu .nav li a:hover,
    .gh-head-menu .nav a:hover {
        color: #603B93 !important;
        background-color: rgba(96, 59, 147, 0.1) !important;
    }

    /* Style du bouton Mon compte */
    .gh-head .gh-head-btn {
        background: #603B93 !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: none !important;
        padding: 10px 20px !important;
        border-radius: 999px !important;
        margin: 10px 20px !important;
        display: block !important;
        text-align: center !important;
        width: calc(100% - 40px) !important;
        text-decoration: none !important;
    }

    .gh-head .gh-head-btn:hover {
        background: #7a52b6 !important;
    }
}

.gh-head-inner {
    padding: 1.5rem 2rem;
    transition: padding 0.3s ease;
}

.gh-head-brand {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.gh-head-logo {
    position: relative;
    transition: transform 0.3s ease;
}

.gh-head-logo:hover {
    transform: translateY(-2px);
}

.gh-head-menu a {
    position: relative;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    text-shadow: none;
    transition: all 0.3s ease;
}

.gh-head-menu a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.gh-head-menu a:hover {
    color: #fff !important;
    transform: translateY(-1px);
}

.gh-head-menu a:hover::after {
    width: 80%;
}

.gh-head .gh-head-btn {
    padding: 0.8rem 1.6rem;
    color: #fff !important;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.gh-head .gh-head-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.gh-head .gh-search.gh-icon-btn {
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.gh-head .gh-search.gh-icon-btn:hover {
    color: #fff;
    transform: translateY(-1px);
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .gh-head::before {
        background: linear-gradient(to bottom, 
            #603B93 0%, 
            #603B93 100px, 
            #1a1a1a 160px,
            #1a1a1a calc(160px + 100%));
    }

    @media (max-width: 767px) {
        .gh-head::before {
            background: linear-gradient(to bottom, 
                #603B93 0%, 
                #603B93 80px, 
                #1a1a1a 120px,
                #1a1a1a calc(120px + 100%));
        }

        /* Style du menu déplié sur mobile en mode sombre */
        .gh-head-menu {
            background: #1a1a1a !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
        }

        /* Forcer les styles des liens en mode sombre */
        .gh-head-menu .nav li a,
        .gh-head-menu .nav a {
            color: #ffffff !important;
            background: transparent !important;
        }

        .gh-head-menu .nav li a:hover,
        .gh-head-menu .nav a:hover {
            color: #B084EB !important;
            background-color: rgba(176, 132, 235, 0.1) !important;
        }

        /* Bouton en mode sombre */
        .gh-head .gh-head-btn {
            background: linear-gradient(135deg, #5e3c8d, #432968) !important;
            color: #ffffff !important;
        }

        .gh-head .gh-head-btn:hover {
            background: linear-gradient(135deg, #7a52b6, #5c3a93) !important;
        }
    }

    /* Fix pour le conteneur du bouton */
    .gh-head .gh-head-actions {
        background: transparent !important;
    }

    /* Style spécifique pour le bouton en mode sombre */
    .gh-head .gh-head-btn {
        background: #ffffff !important;
        color: #603B93 !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        padding: 0.6rem 1.4rem !important;
        border-radius: 12px !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
    }

    .gh-head .gh-head-btn:hover {
        background: #f0f0f0 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }

    .gh-head .gh-head-btn:active {
        transform: translateY(0) !important;
        background: #e0e0e0 !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    }

    @media (max-width: 767px) {
        /* Assurer la transparence du conteneur en mobile */
        .gh-head .gh-head-actions,
        .gh-head-menu .gh-head-actions {
            background: transparent !important;
            padding: 0 !important;
            margin: 0 !important;
        }

        /* Style du bouton en mobile */
        .gh-head .gh-head-btn {
            background: #ffffff !important;
            color: #603B93 !important;
            border: none !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
            padding: 0.6rem 1.4rem !important;
            border-radius: 12px !important;
            margin: 10px 20px !important;
            display: block !important;
            text-align: center !important;
            width: calc(100% - 40px) !important;
            font-weight: 700 !important;
        }

        .gh-head .gh-head-btn:hover {
            background: #f0f0f0 !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
        }

        .gh-head .gh-head-btn:active {
            transform: translateY(0) !important;
            background: #e0e0e0 !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
        }
    }
}

.gh-head-logo img { 
    max-height: 80px;
    margin-top: 10px;
}

/* Navigation Links */
.gh-head-menu .nav a {
    color: #fff !important;
    transition: opacity 0.3s ease;
}

.gh-head-menu .nav a:hover {
    opacity: 0.8;
}

/* ====================================
   3. NEWSLETTER ET LIENS MEMBRES
   ==================================== */

/* Section newsletter */
.cover-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
}

.cover-description {
    font-size: 2.6rem;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--color-darker-gray);
    font-weight: 600;
}

.newsletter-intro {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--color-darker-gray);
    font-weight: 500;
}

/* Formulaire d'inscription */
.cover-form {
    margin: 0 auto;
    max-width: 500px;
}

.cover-form .auth-email {
    height: 54px;
    padding: 0 1.8rem;
    font-size: 1.6rem;
    border: 2px solid var(--ghost-accent-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.cover-form .auth-email:focus {
    border-color: var(--ghost-accent-color);
    box-shadow: 0 0 0 3px rgba(96, 59, 147, 0.2);
}

.cover-form .form-button {
    height: 44px;
    padding: 0 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 8px;
    background: linear-gradient(135deg, #9966cc, #8a63d2);
    transition: transform 0.2s ease, background 0.3s ease;
}

.cover-form .form-button:hover {
    background: linear-gradient(135deg, #8a63d2, #7f4fb8);
    transform: translateY(-1px);
}

/* Description des newsletters */
.newsletter-description {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
    line-height: 1.4;
    color: var(--color-darker-gray);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-description p {
    margin: 0;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
}

.newsletter-description strong {
    font-weight: 700;
    color: #333333;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .cover-description {
        color: #ffffff;
    }

    .newsletter-description {
        color: #ffffff;
    }

    .newsletter-description p {
        background: rgba(26, 26, 26, 0.8);
    }

    .newsletter-description strong {
        color: #ffffff;
    }

    .cover-form .auth-email {
        background: rgba(26, 26, 26, 0.9);
        color: #ffffff;
        border-color: var(--ghost-accent-color);
    }

    .cover-form .auth-email::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }
}

/* Styles pour les membres connectés */
.member-links {
    list-style: none;
    padding: 0;
    margin: 0.8rem 0;
    text-align: center;
}

.member-links li {
    margin: 0.5rem 0;
}

.member-links a {
    display: inline-block;
    font-size: 2.4rem;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    padding: 0.8rem 1.8rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    transition: background 0.3s ease;
}

.member-links a:hover {
    background: rgba(255, 255, 255, 1);
    text-decoration: none;
}

.member-thanks {
    text-align: center;
    font-size: 2.6rem;
    font-weight: 600;
    margin: 1.2rem 0;
    color: inherit;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .member-links a {
        background: rgba(26, 26, 26, 0.8);
        color: #ffffff;
    }

    .member-links a:hover {
        background: rgba(26, 26, 26, 0.9);
    }

    .member-thanks {
        color: #ffffff;
    }
}

/* ====================================
   4. PAYWALL
   ==================================== */
.nostick-paywall-mask {
    position: relative;
    height: 300px;
    margin-top: -300px;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(3px);
    transition: opacity 0.3s ease;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.4) 40%,
        rgba(255, 255, 255, 0.8) 70%,
        rgba(255, 255, 255, 1) 100%
    );
}

.nostick-paywall-mask::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    background: linear-gradient(to right,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0) 5%,
        rgba(255, 255, 255, 0) 95%,
        rgba(255, 255, 255, 1) 100%);
}

/* ====================================
   5. MISE EN PAGE
   ==================================== */
.gh-topic-grid .gh-card-image {
    position: relative;
    flex-shrink: 0;
    width: 128px;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.gh-article-image {
    display: none;
}

.gh-foot {
    padding-top: 5px;
    padding-bottom: 10px;
    background-color: var(--color-darker-gray);
}

body:not(.is-head-stacked) .gh-head-inner {
    border-bottom: 0;
}

/* Footer */
footer.gh-foot.gh-outer {
    padding: 2rem 0;
    text-align: center;
    width: 100%;
}

footer.gh-foot .gh-foot-inner {
    max-width: none;
    width: 100%;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
}

footer.gh-foot .gh-copyright {
    width: auto;
    text-align: center;
}

/* ====================================
   6. MODE SOMBRE
   ==================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --color-primary-text: #ffffff;
        --color-secondary-text: #cccccc;
        --color-light-gray: #444444;
        --color-darker-gray: #ffffff;
        --color-black: #000000;
        --ghost-accent-color: #613B93;
        --link-color-dark: #B084EB;
    }

    /* Fond sombre global */
    body {
        background-color: #1a1a1a;
        color: var(--color-primary-text);
    }

    /* Ajustement des fonds pour les conteneurs */
    .site-content,
    .gh-canvas,
    .gh-outer {
        background-color: #1a1a1a;
    }

    /* Header en mode sombre */
    .gh-head::before {
        background: linear-gradient(to bottom, 
            #603B93 0%, 
            #603B93 100px, 
            #1a1a1a 140px,
            #1a1a1a calc(100px + 100%));
    }

    /* Boutons en mode sombre */
    .gh-head .gh-head-btn {
        background: #ffffff !important;
        color: #603B93 !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        padding: 0.6rem 1.4rem !important;
        border-radius: 12px !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
    }

    .gh-head .gh-head-btn:hover {
        background: #f0f0f0 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }

    .gh-head .gh-head-btn:active {
        transform: translateY(0) !important;
        background: #e0e0e0 !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    }

    /* Liens en mode sombre */
    a {
        color: var(--link-color-dark) !important;
    }

    a:hover {
        color: #D7A1E5;
    }

    /* Paywall en mode sombre */
    .nostick-paywall-mask {
        background: linear-gradient(
            to bottom,
            rgba(26, 26, 26, 0) 0%,
            rgba(26, 26, 26, 0.2) 20%,
            rgba(26, 26, 26, 0.4) 40%,
            rgba(26, 26, 26, 0.8) 70%,
            rgba(26, 26, 26, 1) 100%
        );
    }

    .nostick-paywall-mask::before {
        background: linear-gradient(to right,
            rgba(26, 26, 26, 1) 0%,
            rgba(26, 26, 26, 0) 5%,
            rgba(26, 26, 26, 0) 95%,
            rgba(26, 26, 26, 1) 100%);
    }

    /* Cartes de signets en mode sombre */
    .kg-bookmark-card a.kg-bookmark-container,
    .kg-bookmark-card a.kg-bookmark-container:hover {
        background: #222 !important;
        color: #ffffff !important;
    }

    .kg-bookmark-card .kg-bookmark-title {
        color: #ffffff !important;
    }

    .kg-bookmark-card .kg-bookmark-description {
        color: #cccccc !important;
    }

    .kg-bookmark-card .kg-bookmark-metadata {
        color: #aaaaaa !important;
    }

    /* Section abonnement en mode sombre */
    .gh-subscribe-title {
        color: #ffffff !important;
    }

    .gh-subscribe-description {
        color: #cccccc !important;
    }

    .gh-subscribe-btn {
        color: #ffffff !important;
        background-color: #603B93 !important;
    }

    .gh-subscribe-btn:hover {
        opacity: 0.9;
        background-color: #7a52b6 !important;
    }

    /* Ajustements supplémentaires pour le mode sombre */
    .gh-article-excerpt,
    .gh-article-title,
    .gh-card-title {
        color: var(--color-primary-text) !important;
    }

    .gh-article-meta,
    .gh-card-meta {
        color: var(--color-secondary-text) !important;
    }

    /* Liens spécifiques en mode sombre */
    .gh-foot-menu .nav a,
    .gh-foot-menu a,
    .share-link,
    [class*="share-link-"],
    .author-social-item {
        color: #ffffff !important;
    }

    .gh-foot-menu .nav a:hover,
    .gh-foot-menu a:hover {
        color: rgba(255, 255, 255, 0.8) !important;
    }

    /* Correction des liens sociaux spécifiques */
    .share-link-bluesky,
    .share-link-rss,
    .share-link-twitter,
    .share-link-facebook,
    .share-link-linkedin,
    .share-link-threads,
    .share-link-mastodon,
    .share-link-tiktok,
    .share-link-youtube,
    .share-link-instagram {
        color: #ffffff !important;
    }

    /* Copyright en mode sombre */
    .gh-copyright {
        color: #ffffff !important;
    }

    /* Liens du portail membre en mode sombre */
    .gh-portal-content a,
    .gh-portal-content .gh-portal-links a,
    .gh-portal-detail a,
    .gh-portal-list a,
    .gh-portal-table a,
    .gh-portal-profile a,
    .gh-portal-links a,
    .gh-portal-account-actions a {
        color: #ffffff !important;
    }

    .gh-portal-content a:hover,
    .gh-portal-content .gh-portal-links a:hover,
    .gh-portal-detail a:hover,
    .gh-portal-list a:hover,
    .gh-portal-table a:hover,
    .gh-portal-profile a:hover,
    .gh-portal-links a:hover,
    .gh-portal-account-actions a:hover {
        color: rgba(255, 255, 255, 0.8) !important;
        text-decoration: underline;
    }

    /* Pour les liens dans le contenu du portail */
    .gh-portal-popup a,
    .gh-portal-popup .gh-portal-btn-link,
    .gh-portal-popup .gh-portal-btn-text {
        color: #ffffff !important;
    }

    /* Liens de la section member-links */
    .member-links a {
        color: #ffffff !important;
    }

    .member-links a:hover {
        color: rgba(255, 255, 255, 0.8) !important;
        text-decoration: underline;
    }
}

/* Ajustements pour desktop */
@media (min-width: 768px) {
    .cover-content {
        max-width: 900px;
        padding: 1rem;
    }

    .cover-description {
        font-size: 2.2rem;
        margin-bottom: 2rem;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .cover-form {
        max-width: 600px;
        margin: 0 auto;
    }

    .newsletter-description {
        font-size: 1.6rem;
        margin-top: 1rem;
    }

    .newsletter-description p {
        padding: 1rem;
        max-width: 600px;
        margin: 0 auto;
    }

    .member-links {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        margin: 0.5rem 0;
    }

    .member-links li {
        margin: 0;
    }

    .member-links a {
        font-size: 2rem;
        padding: 0.7rem 1.5rem;
    }

    .member-thanks {
        font-size: 2.2rem;
        margin: 1rem 0;
    }
}

/* Ajustements pour mobile */
@media (max-width: 767px) {
    .single-header {
        margin-top: 2rem;
    }

    .single-meta {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
} 