/* ============================================================
   PAGES « CONSEILS » — liste des articles et page d'un article
   Chargée après styles.css : reprend ses couleurs (variables
   --primaire, --accent…) et ne contient que ce qui est propre
   aux articles.
   ============================================================ */

/* Lien de la navigation correspondant à la page en cours */
.nav-liens a.lien-actif {
    color: var(--primaire);
    font-weight: 700;
}

/* ============================================================
   BANDEAU D'EN-TÊTE (liste et article)
   Dégradé aux couleurs du bandeau de l'accueil, en plus compact
   ============================================================ */
.bandeau-conseils {
    background: linear-gradient(135deg, var(--primaire), #2a5298);
    color: var(--blanc);
    padding: 48px 0 44px;
}

.bandeau-conseils h1 {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 12px;
}

.bandeau-conseils p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.88);
    max-width: 720px;
}

/* Fil d'Ariane : Accueil › Conseils › Article
   (c'est une balise <nav> : on annule l'espacement « space-between » et le padding
   que styles.css applique à toutes les <nav> pour la barre de navigation) */
.fil-ariane {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    padding: 0;
    font-size: 0.85rem;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.75);
}
.fil-ariane a { color: var(--blanc); text-decoration: none; }
.fil-ariane a:hover { text-decoration: underline; }

/* ============================================================
   LISTE DES ARTICLES (cartes)
   ============================================================ */
.section-articles { background: var(--fond); padding: 56px 0 72px; }

.grille-articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.carte-article {
    background: var(--blanc);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    border-top: 4px solid var(--primaire);
    transition: transform 0.2s, box-shadow 0.2s;
}
.carte-article:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }

/* Toute la carte est cliquable : plus pratique au doigt sur téléphone */
.carte-article-lien {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 26px 24px 22px;
    color: inherit;
    text-decoration: none;
}

.carte-article-icone { font-size: 2rem; margin-bottom: 10px; }

.carte-article-categorie {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 6px;
}

/* Les titres des cartes ne doivent pas reprendre le grand titre centré de styles.css */
.carte-article-titre {
    text-align: left;
    font-size: 1.15rem;
    line-height: 1.35;
    color: var(--primaire);
    margin-bottom: 10px;
}

.carte-article-resume {
    font-size: 0.92rem;
    color: #555;
    flex: 1;
    margin-bottom: 16px;
}

.carte-article-pied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 0.82rem;
    color: #888;
    margin-top: auto;
}

.carte-article-lire { color: var(--primaire); font-weight: 700; }

/* ============================================================
   PAGE D'UN ARTICLE
   ============================================================ */

/* Colonne de texte étroite : une ligne trop longue est pénible à lire */
.conteneur-article { max-width: 780px; }

.article-categorie {
    display: inline-block;
    background: var(--accent);
    color: var(--blanc);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.bandeau-conseils .article-infos { font-size: 0.88rem; color: rgba(255, 255, 255, 0.75); }

/* --- Texte de l'article --- */
.article-corps {
    padding: 44px 0 12px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

/* Paragraphe d'introduction, mis en avant */
.article-corps .chapo {
    font-size: 1.15rem;
    color: var(--sombre);
    font-weight: 500;
    margin-bottom: 28px;
}

.article-corps p { margin-bottom: 18px; }

/* Les intertitres de l'article sont alignés à gauche (styles.css centre tous les <h2>) */
.article-corps h2 {
    text-align: left;
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 40px 0 14px;
    padding-left: 14px;
    border-left: 4px solid var(--accent);
}

.article-corps h3 {
    color: var(--primaire);
    font-size: 1.15rem;
    margin: 26px 0 10px;
}

.article-corps ul,
.article-corps ol { margin: 0 0 20px 24px; }
.article-corps li { margin-bottom: 8px; }

.article-corps a { color: var(--primaire); font-weight: 600; }
.article-corps a:hover { color: var(--accent); }

.article-corps strong { color: var(--sombre); }

/* Tableaux (ex. fréquences de lavage) : défilement horizontal sur petit écran */
.article-corps .tableau-defilant {
    overflow-x: auto;
    margin: 8px 0 22px;
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}

.article-corps table {
    width: 100%;
    border-collapse: collapse;
    background: var(--blanc);
    font-size: 0.95rem;
}

.article-corps th {
    background: var(--primaire);
    color: var(--blanc);
    text-align: left;
    padding: 12px 16px;
}

.article-corps td {
    padding: 11px 16px;
    border-bottom: 1px solid #eee;
}
.article-corps tr:nth-child(even) td { background: var(--fond); }

/* Encadré « à retenir » ou avertissement dans le texte */
.article-corps .encadre {
    background: rgba(45, 122, 58, 0.08);
    border-left: 4px solid var(--accent);
    border-radius: var(--rayon);
    padding: 16px 20px;
    margin: 0 0 22px;
    font-size: 0.97rem;
}
.article-corps .encadre p:last-child { margin-bottom: 0; }

/* Photo d'illustration (avant / après) */
.article-illustration {
    margin: 32px auto 8px;
    max-width: 520px;
    text-align: center;
}
.article-illustration img {
    width: 100%;
    height: auto;
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}
.article-illustration figcaption {
    font-size: 0.85rem;
    color: #777;
    margin-top: 8px;
}

/* --- Encadré « Demander un devis » en fin d'article --- */
.encart-devis {
    background: var(--blanc);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    border-top: 4px solid var(--accent);
    padding: 28px 28px 30px;
    margin: 28px 0 56px;
    text-align: center;
}

.encart-devis h2 { font-size: 1.4rem; margin-bottom: 10px; }
.encart-devis p  { color: #555; margin-bottom: 20px; }

.encart-devis-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.encart-devis .btn:first-child { background: var(--accent); }
.encart-devis .btn:first-child:hover { background: #1e5a28; }

/* --- Articles liés --- */
.articles-lies { background: var(--blanc); }
.articles-lies h2 { margin-bottom: 28px; }
.articles-lies .carte-article { background: var(--fond); }

/* --- Page « article introuvable » --- */
.article-introuvable { text-align: center; padding: 40px 20px; }
.article-introuvable h1 { color: var(--primaire); margin-bottom: 12px; }
.article-introuvable p  { margin-bottom: 24px; color: #555; }

/* ============================================================
   RESPONSIVE MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .bandeau-conseils { padding: 36px 0 32px; }
    .bandeau-conseils h1 { font-size: 1.6rem; }
    .bandeau-conseils p { font-size: 0.98rem; }

    .article-corps { padding-top: 32px; font-size: 1rem; }
    .article-corps .chapo { font-size: 1.05rem; }
    .article-corps h2 { font-size: 1.3rem; }

    .encart-devis { padding: 24px 18px; }
}

@media (max-width: 480px) {
    .grille-articles { grid-template-columns: 1fr; gap: 16px; }
    .carte-article-lien { padding: 22px 18px 18px; }
    .encart-devis-actions .btn { width: 100%; }
}
