/* ===== VARIABLES GLOBALES ===== */
:root {
    --primary: #095f75;
    --primary-dark: #074a5d;
    --secondary: #e07a5f;
    --accent: #ffffff;
    --text: #333333;
    --text-light: #f8f9fa;
    --bg-light: #f8f9fa;
    --bg-dark: #233545;
    --shadow: rgba(9, 95, 117, 0.12);
    --font-title: 'Newsreader', serif;
    --font-body: 'Lora', serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --cta-shadow: 0 6px 12px rgba(224, 122, 95, 0.3);
    --cta-hover: 0 8px 16px rgba(224, 122, 95, 0.4);
    --like-color: #e63946;
    --comment-color: #457b9d;
}

/* ===== RESET & BASE ===== */
body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
}

main {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1rem;
}

/* ===== TITRE PRINCIPAL ===== */
#article-details h1 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 2rem;
    font-family: var(--font-title);
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

#article-details h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary);
}

/* ===== CARTE D'ARTICLE PRINCIPAL ===== */
article.card {
    background: var(--bg-dark);
    border-radius: 20px;
    box-shadow: 0 12px 20px var(--shadow);
    padding: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    color: var(--text-light);
    transition: var(--transition);
}

article.card:hover {
    box-shadow: 0 16px 30px rgba(9, 95, 117, 0.2);
    transform: translateY(-3px);
}

article.card img {
    width: 100%;
    max-height: 350px;
    border-radius: 15px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    filter: brightness(0.95);
}

article.card:hover img {
    transform: scale(1.03);
    filter: brightness(1);
}

/* ===== BOUTON LIKE SIMPLIFIÉ ===== */
.like-link {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--secondary);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: var(--cta-shadow);
    z-index: 10;
}

.like-link:hover {
    background: #d16c4f;
    transform: scale(1.05);
    box-shadow: var(--cta-hover);
}

.like-link i.fa-heart {
    animation: heartbeat 1.5s infinite;
}

.like-link:hover i.fa-heart {
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* ===== CONTAINER DE PARTAGE ===== */
.share-container {
    position: absolute;
    top: 20px;
    right: 90px;
    z-index: 10;
}

/* ===== BOUTON PRINCIPAL DE PARTAGE ===== */
.share-cta {
    background: var(--primary);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: var(--cta-shadow);
    cursor: pointer;
}

.share-cta:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ===== OPTIONS DE PARTAGE ===== */
.share-options {
    position: absolute;
    right: 0;
    top: 50px;
    background: white;
    border-radius: 12px;
    padding: 0.8rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    width: 200px;
    border: 1px solid #eee;
    z-index: 100;
}

.share-options.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== OPTIONS INDIVIDUELLES ===== */
.share-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.share-option.facebook {
    background: #3b5998;
}

.share-option.twitter {
    background: #1da1f2;
}

.share-option.linkedin {
    background: #0077b5;
}

.share-option.whatsapp {
    background: #25d366;
}

.share-option.copy {
    background: #333;
}

.share-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== NOTIFICATION DE COPIE ===== */
.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.copy-notification.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== META INFORMATIONS ===== */
.article-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: var(--secondary);
    margin-top: 1.5rem;
    align-items: center;
}

.article-meta i {
    margin-right: 0.3rem;
    color: var(--secondary);
}

/* ===== SECTION COMMENTAIRES ===== */
.comments-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow);
}

.comments-section h2 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid var(--primary);
    padding-bottom: 0.3rem;
    color: var(--primary-dark);
    font-family: var(--font-title);
}

/* Liste des commentaires */
.comments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Style de base pour chaque commentaire */
.comments-list li {
    background: white;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.6rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px var(--shadow);
    border-left: 2px solid var(--comment-color);
    color: var(--text);
    /* Assure que le texte est visible (noir) */
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Effet au survol */
.comments-list li:hover {
    transform: translateX(1px);
    box-shadow: 0 2px 6px var(--shadow);
}

/* Style pour les commentaires enfants (réponses) */
.comments-list li ul {
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 1px dashed #a8c8ec;
}

.comments-list li ul li {
    border-left: 2px solid #a8c8ec;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.4rem;
    background: #f9f9f9;
    /* Fond légèrement gris pour distinguer les réponses */
}

/* Contenu du commentaire */
.comments-list li p {
    margin: 0.2rem 0;
    color: var(--text);
    /* Texte en noir */
}

.comments-list li strong {
    color: var(--primary-dark);
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Date du commentaire */
.comment-date {
    display: block;
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.2rem;
}

/* Formulaire de réponse */
.comments-list form {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px dashed #ddd;
}

.comments-list textarea {
    width: 100%;
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    resize: vertical;
    min-height: 40px;
    font-family: var(--font-body);
    margin-bottom: 0.4rem;
    color: var(--text);
    /* Texte visible */
}

.comments-list textarea:focus {
    border-color: var(--comment-color);
    box-shadow: 0 0 0 1px rgba(69, 123, 157, 0.2);
    outline: none;
}

.comments-list button[type="submit"] {
    background: var(--comment-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(69, 123, 157, 0.2);
    font-size: 0.75rem;
}

.comments-list button[type="submit"]:hover {
    background: #3a6b8f;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(69, 123, 157, 0.2);
}

/* Message "Aucun commentaire" */
.no-comments {
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    background-color: #f5f5f5;
    padding: 0.5rem;
    border-radius: 5px;
    text-align: center;
    margin: 0.8rem 0;
}

.no-comments::before {
    content: "💬";
    margin-right: 0.3rem;
}

.no-comments a {
    color: var(--primary);
    font-weight: 600;
    margin-left: 0.3rem;
}

.no-comments a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .comments-section {
        padding: 0.8rem;
    }

    .comments-list li {
        padding: 0.5rem 0.7rem;
    }

    .comments-list li ul li {
        padding: 0.4rem 0.6rem;
    }

    .comments-list textarea {
        min-height: 35px;
    }
}


/* ===== CTA "Répondre" ===== */
.reply-cta {
    display: inline-block;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.reply-cta:hover {
    background: var(--primary);
    color: white;
}

/* ===== FORMULAIRE DE COMMENTAIRE ===== */
.article-actions {
    margin-top: 2rem;
    position: relative;
}

.article-actions::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.article-actions textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 1rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-body);
    color: var(--text);
    transition: var(--transition);
    border: 1px solid #e0e0e0;
}

.article-actions textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(224, 122, 95, 0.2);
    outline: none;
}

.article-actions button {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--cta-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.article-actions button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--cta-hover);
}

.article-actions button i {
    font-size: 1rem;
}

.article-actions p {
    color: #555;
    margin: 1rem 0;
    font-style: italic;
    text-align: center;
}

.article-actions p a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    background: rgba(9, 95, 117, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    transition: var(--transition);
}

.article-actions p a:hover {
    background: var(--primary);
    color: white;
}

/* ===== CTA "S'inscrire" ===== */
.signup-cta {
    display: block;
    background: var(--secondary);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    margin: 1rem auto;
    width: fit-content;
    transition: var(--transition);
    box-shadow: var(--cta-shadow);
}

.signup-cta:hover {
    background: #d16c4f;
    transform: translateY(-2px);
    box-shadow: var(--cta-hover);
}

/* ===== ARTICLES DE CATÉGORIE ===== */
#category-article {
    margin-top: 4rem;
    position: relative;
}

#category-article::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

#category-article h1 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
    text-align: center;
    font-family: var(--font-title);
    position: relative;
}

#category-article h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary);
}

.read-more-cta {
    display: inline-block;
    background-color: orange;
    /* couleur vive */
    color: white;
    /* texte lisible */
    font-weight: bold;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s ease;
}

.read-more-cta:hover {
    background-color: darkorange;
    /* effet au survol */
    transform: scale(1.05);
    /* petit zoom sexy */
}

/* ===== CTA "Voir tous les articles" ===== */
.see-all-cta {
    display: block;
    text-align: center;
    margin: 2rem auto 0;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.7rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    width: fit-content;
}

.see-all-cta:hover {
    background: var(--primary);
    color: white;
}

/* ===== DERNIERS ARTICLES ===== */
#last-articles {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--primary);
    position: relative;
}

#last-articles::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

#last-articles h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-dark);
    font-family: var(--font-title);
    position: relative;
}

#last-articles h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary);
}

#last-articles ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

#last-articles li {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

#last-articles li:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(9, 95, 117, 0.15);
}

#last-articles li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary);
    transform: scaleX(0);
    transition: var(--transition);
}

#last-articles li:hover::before {
    transform: scaleX(1);
}

#last-articles li p {
    color: #555;
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

/* STYLES POUR LES LIKES ET COMMENTAIRES DANS LES DERNIERS ARTICLES */
#last-articles p i.fa-heart {
    color: var(--like-color);
    margin-right: 5px;
}

#last-articles p i.fa-comment {
    color: var(--comment-color);
    margin-right: 5px;
}

#last-articles li a {
    color: var(--primary-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-title);
    transition: var(--transition);
}

#last-articles li a:hover {
    color: var(--secondary);
}

#last-articles img {
    width: 100%;
    max-height: 200px;
    border-radius: 10px;
    object-fit: cover;
    margin-top: 0.5rem;
    transition: var(--transition);
}

#last-articles li:hover img {
    transform: scale(1.03);
}

/* ===== CTA "Lire l'article" ===== */
.read-article-cta {
    display: block;
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-align: center;
    margin-top: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.read-article-cta:hover {
    background: #d16c4f;
    transform: translateY(-2px);
}

/* ===== MESSAGE "AUCUN COMMENTAIRE" ===== */
.no-comments {
    color: var(--text);
    font-weight: 600;
    font-size: 18px;
    background-color: #f0f0f0;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.no-comments::before {
    content: "💬";
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
}

.no-comments a {
    color: var(--primary);
    font-weight: 700;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.no-comments a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    main {
        margin: 2rem auto;
        padding: 0 0.5rem;
    }

    #article-details h1 {
        font-size: 2rem;
    }

    article.card {
        padding: 1.5rem;
    }

    .like-link {
        top: 15px;
        right: 15px;
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .share-container {
        right: 80px;
    }

    .share-cta {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .share-options {
        width: 180px;
    }

    .comments-list li {
        padding: 1rem;
    }

    #last-articles ul {
        grid-template-columns: 1fr;
    }

    .article-actions textarea {
        min-height: 80px;
    }

    .article-actions button {
        padding: 0.7rem 1.5rem;
    }
}