/* ============================================
   ARTICLE - MOBILE FIRST
   ============================================ */

/* Reset et variables */
.article {
    max-width: 100%;
    margin: 0;
    padding: 1rem;
}

.article-container {
    max-width: 100%;
    margin: 0 auto;
}

/* ===== MOBILE (par défaut) ===== */

/* Fil d'Ariane */
.article-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.75rem;
    color: #7F8C8D;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.article-breadcrumb a {
    color: #7F8C8D;
    text-decoration: none;
}

.article-breadcrumb a:hover {
    color: #C0392B;
}

.article-breadcrumb .separator {
    margin: 0 0.25rem;
}

/* En-tête */
.article-header {
    margin-bottom: 1.5rem;
    text-align: left;
}

.article-category {
    margin-bottom: 0.75rem;
}

.categorie {
    display: inline-block;
    background: #C0392B;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-header h1 {
    font-size: 1.6rem;
    margin: 0.75rem 0;
    line-height: 1.3;
    color: #2C3E50;
}

.article-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #7F8C8D;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item i {
    width: 16px;
    color: #C0392B;
}

/* Image à la une */
.article-figure {
    margin: 1rem 0;
    text-align: center;
}

/* Image à la une - taille réduite */
.article-figure {
    margin: 1rem 0;
    text-align: center;
}

.article-image {
    width: 100%;
    max-width: 700px;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 0 auto;
    display: block;
}

.article-caption {
    font-size: 0.7rem;
    color: #7F8C8D;
    margin-top: 0.5rem;
}

/* Mobile */
@media (max-width: 768px) {
    .article-image {
        max-height: 200px;
    }
}

.article-caption {
    font-size: 0.7rem;
    color: #7F8C8D;
    margin-top: 0.5rem;
}

/* Contenu */
.article-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #2C3E50;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content h2 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
    color: #C0392B;
    border-left: 3px solid #C0392B;
    padding-left: 0.75rem;
}

.article-content h3 {
    font-size: 1.2rem;
    margin: 1.25rem 0 0.5rem;
    color: #2C3E50;
}

.article-content ul,
.article-content ol {
    margin: 0.75rem 0 1rem 1.25rem;
    padding-left: 0.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: #C0392B;
    text-decoration: underline;
    word-break: break-word;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

.article-content blockquote {
    border-left: 3px solid #C0392B;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #7F8C8D;
    background: #F4F1EA;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

/* Tableaux responsives */
.article-content table {
    width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 1rem 0;
}

.article-content th,
.article-content td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
}

.article-content th {
    background: #F4F1EA;
    font-weight: 600;
}

/* Code */
.article-content pre {
    background: #2C3E50;
    color: #F4F1EA;
    padding: 0.75rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
}

.article-content code {
    background: #F4F1EA;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Partage */
.article-share {
    background: #F4F1EA;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: center;
}

.article-share h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    flex: 1;
    min-width: 90px;
}

.share-btn:hover {
    transform: translateY(-1px);
}

.share-btn.facebook {
    background: #3b5998;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn.copy {
    background: #2C3E50;
    color: white;
}

/* Commentaires */
.article-comments {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ECF0F1;
}

.article-comments h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.comments-list {
    margin-bottom: 1.5rem;
}

.comment {
    background: #FFFFFF;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #C0392B;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.comment-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.comment-header strong {
    color: #C0392B;
}

.comment-date {
    color: #7F8C8D;
    font-size: 0.7rem;
}

.comment-content {
    font-size: 0.85rem;
    line-height: 1.5;
}

.no-comments {
    text-align: center;
    padding: 1.5rem;
    background: #F4F1EA;
    border-radius: 8px;
    color: #7F8C8D;
    font-size: 0.85rem;
}

/* Formulaire commentaire */
.comment-form {
    background: #F4F1EA;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.comment-form h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.8rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
}

.btn-primary {
    background: #C0392B;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    background: #A93226;
}

/* Alertes */
.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 0.6rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.6rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

/* Erreur 404 */
.error-container {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.error-container i {
    font-size: 3rem;
    color: #7F8C8D;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.error-container h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ===== TABLETTE (min-width 600px) ===== */
@media (min-width: 600px) {
    .article {
        padding: 1.5rem;
    }
    
    .article-container {
        max-width: 90%;
    }
    
    .article-header {
        text-align: center;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .share-btn {
        flex: none;
        min-width: auto;
        padding: 0.4rem 1rem;
    }
    
    .form-row {
        flex-direction: row;
        gap: 1rem;
    }
    
    .form-row .form-group {
        flex: 1;
    }
    
    .btn-primary {
        width: auto;
    }
    
    .comment-header {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ===== DESKTOP (min-width 900px) ===== */
@media (min-width: 900px) {
    .article {
        padding: 2rem;
    }
    
    .article-container {
        max-width: 860px;
    }
    
    .article-header h1 {
        font-size: 2.5rem;
    }
    
    .article-image {
        max-height: 500px;
    }
    
    .article-content {
        font-size: 1.1rem;
        line-height: 1.8;
    }
    
    .article-content h2 {
        font-size: 1.8rem;
    }
    
    .share-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .comment {
        padding: 1rem;
    }
}

/* ===== GRAND ÉCRAN (min-width 1200px) ===== */
@media (min-width: 1200px) {
    .article-container {
        max-width: 1000px;
    }
}

/* ============================================
   VIDÉO YOUTUBE RESPONSIVE
   ============================================ */

.article-video {
    margin: 1.5rem 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    font-size: 0.8rem;
    color: #7F8C8D;
    text-align: center;
    margin-top: 0.5rem;
}

.article-video {
    margin: 1.5rem 0;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}