/* Article Styles */
.main-content {
    padding: 6rem 0;
    background: var(--background-color);
    min-height: 100vh;
    overflow: visible;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(0, 52, 89, 0.05);
}

.back-button:hover {
    color: var(--secondary-color);
    transform: translateX(-5px);
    background: rgba(0, 52, 89, 0.1);
}

/* Article Header */
.article-header {
    margin-bottom: 4rem;
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 52, 89, 0.1);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-header .article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.article-header .article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.article-header .article-meta span::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.article-header .article-meta .date::before {
    content: "\f133";
}

.article-header .article-meta .category::before {
    content: "\f02e";
}

.article-header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Article Content */
.article-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.article-main {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 52, 89, 0.1);
    padding: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.article-featured-image {
    width: 100%;
    height: auto;
    display: block;
    padding: 0;
    border-radius: 20px 20px 0 0;
    max-width: 100%;
}

.article-featured-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
    position: relative;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.article-featured-image:hover img {
    transform: scale(1.05);
}

.article-text {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #333;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
}

.article-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.article-text h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.article-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.article-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #444;
    text-align: justify;
    word-spacing: normal;
}

.article-text ul, .article-text ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-text li {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 0.8rem;
    color: #444;
}

/* Article Footer */
.article-footer {
    margin: 0;
    padding: 2rem;
    border-top: 1px solid rgba(0, 52, 89, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-gray);
    width: 100%;
}

.article-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.tag {
    background: #fff;
    color: var(--primary-color);
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.tag:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-share {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.share-btn:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Related Articles Section */
.related-articles-section {
    margin-top: 4rem;
    padding: 3rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 52, 89, 0.1);
    display: block;
}

.related-articles-section h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
    text-align: center;
}

.related-articles-section h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.related-article-card {
    position: relative;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.related-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 52, 89, 0.15);
}

/* Overlay */
.related-article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.related-article-card:hover::before {
    opacity: 1;
}

.related-article-content {
    position: absolute; /* Position over the image */
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    z-index: 2;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    margin: 0;
    box-sizing: border-box;
}

.related-article-card h4 {
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.4;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.related-article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
}

.related-article-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.related-article-meta i {
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .article-content {
        padding: 0 2rem;
}

    .article-featured-image {
         height: 350px;
}

    .related-article-card {
        height: 260px; /* Adjusted fixed height */
    }
}

@media (max-width: 992px) {
    .article-header h1 {
        font-size: 2.5rem;
    }

    .article-featured-image {
        height: 300px;
    }

    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

     .related-article-card {
        height: 220px; /* Adjusted fixed height */
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 4rem 0;
    }

    .container {
        padding: 0;
    }

    .article-content {
        gap: 2rem;
        padding: 0;
        width: 100%;
    }

    .article-header {
        padding: 1.5rem;
        margin: 0 1rem 2rem 1rem;
        width: calc(100% - 2rem);
        max-width: none;
    }

    .article-header h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        padding: 0 0.5rem;
    }

    .article-main {
        border-radius: 15px;
        overflow: visible;
        width: 100%;
        margin: 0;
    }

    .article-featured-image {
        min-height: 200px;
        width: 100%;
    }

    .article-text {
        line-height: 1.7;
        padding: 0 1.5rem;
    }

    .article-text h1 {
        font-size: 2rem;
        margin-bottom: 1.2rem;
    }

    .article-text h2 {
        font-size: 1.75rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    .article-text h3 {
        font-size: 1.35rem;
        margin-top: 1.75rem;
        margin-bottom: 0.9rem;
    }

    .article-text p {
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 1.2rem;
    }

    .article-text li {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .related-articles-section {
        padding: 1.5rem;
        width: 100%;
        margin: 2rem 0;
    }

    .related-articles-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        padding: 0;
    }

    .related-article-card {
        width: 100%;
        height: 250px;
        margin: 0;
    }

    .related-article-content {
        padding: 1.5rem;
    }

    .article-footer {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .article-tags {
        width: 100%;
        justify-content: flex-start;
    }

    .tag {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .article-share {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }

    .article-content {
        padding: 0;
        width: 100%;
    }

    .article-header {
        padding: 1rem;
        margin: 0 0.5rem 1.5rem 0.5rem;
        width: calc(100% - 1rem);
    }

    .article-header h1 {
        font-size: 1.5rem;
        line-height: 1.4;
        padding: 0;
    }

    .article-main {
        border-radius: 10px;
        overflow: visible;
        width: 100%;
        margin: 0;
    }

    .article-featured-image {
        min-height: 180px;
        width: 100%;
    }

    .article-text {
        line-height: 1.6;
        padding: 0 1rem;
    }

    .article-text h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .article-text h2 {
        font-size: 1.5rem;
        margin-top: 1.75rem;
        margin-bottom: 0.9rem;
    }

    .article-text h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .article-text p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
        text-align: left;
    }

    .article-text li {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 0.6rem;
    }

    .related-articles-section {
        padding: 1rem;
        width: 100%;
        margin: 1.5rem 0;
    }

    .related-articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
        padding: 0;
    }

    .related-article-card {
        width: 100%;
        height: 220px;
        margin: 0;
    }

    .related-article-content {
        padding: 1rem;
    }

    .article-footer {
        padding: 1rem;
        gap: 1rem;
    }

    .article-tags {
        gap: 0.8rem;
    }

    .tag {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .article-share {
        gap: 0.8rem;
    }

    .share-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .article-hero {
        margin-bottom: 1.5rem;
    }

    .hero-image {
        border-radius: 12px;
    }

    .hero-caption {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

/* Styles pour les images d'articles */
.article-featured-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    margin: 2rem auto;
    display: block;
}

/* Styles pour les métadonnées d'articles */
.article-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
}

.article-meta span {
    margin: 0 0.5rem;
}

/* Styles pour les citations */
.article-text blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

/* Styles pour les liens dans le texte */
.article-text a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.article-text a:hover {
    border-bottom-color: #007bff;
}

/* Styles pour les cartes et leur conteneur */
.article-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.article-featured-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 12px 12px 0 0;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

/* Styles pour les sections d'interaction */
.interaction-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin: 3rem auto;
    text-align: center;
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
}

.platforms-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.platform-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

/* Styles pour tablette */
@media (max-width: 768px) {
    .article-container {
        padding: 0 0.75rem;
    }

    .article-card {
        margin-bottom: 1.5rem;
    }

    .article-content {
        padding: 1.25rem;
    }

    .interaction-section {
        padding: 1.5rem;
        margin: 2rem auto;
    }

    .platforms-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .platform-card {
        padding: 1.25rem;
    }
}

/* Styles pour mobile */
@media (max-width: 480px) {
    .article-container {
        padding: 0 0.5rem;
    }

    .article-card {
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .article-featured-image {
        border-radius: 8px 8px 0 0;
    }

    .article-content {
        padding: 1rem;
    }

    .interaction-section {
        padding: 1rem;
        margin: 1.5rem auto;
        border-radius: 8px;
    }

    .platforms-info {
        gap: 0.75rem;
    }

    .platform-card {
        padding: 1rem;
        border-radius: 8px;
    }
}

/* Correction pour éviter le débordement horizontal */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Ajustement des marges et paddings pour éviter les débordements */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Ajustement des images pour éviter les espaces indésirables */
img {
    max-width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

/* Ajustement des conteneurs flexibles */
.flex-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

/* Ajustement des grilles */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Styles pour la section hero de l'article */
.article-hero {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    background: #f8f9fa;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 20px 20px 0 0;
}

.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
}

/* Styles pour tablette */
@media (max-width: 768px) {
    .hero-image {
        height: 300px;
    }
    
    .hero-caption {
        padding: 15px;
        font-size: 1rem;
    }
}

/* Styles pour mobile */
@media (max-width: 480px) {
    .article-hero {
        border-radius: 12px 12px 0 0;
    }

    .hero-image {
        height: 200px;
        border-radius: 12px 12px 0 0;
    }

    .hero-caption {
        padding: 10px;
        font-size: 0.9rem;
    }
} 