/* ==========================================
   PAGE : SITE.PHP (css/site.css)
   ========================================== */

:root {
    /* --- STRUCTURE & FONDS --- */
    --site-card-bg: #faf5e5;             /* Fond du conteneur de la fiche */
    --site-border-color: #130101;        /* Bordures du bloc, image et séparateurs */

    /* --- TYPOGRAPHIE & TEXTES --- */
    --site-title-color: #1f2937;         /* Titres H1 et H2 */
    --site-text-color: #1f2937;          /* Corps du texte de description */
    --site-text-muted: #6b7280;          /* Chapeau (intro) et URL sous l'image */

    /* --- BOUTON EN SAVOIR PLUS / LIRE LA SUITE --- */
    --site-btn-more-bg: #000000;         /* Fond noir du bouton */
    --site-btn-more-border: #000000;     /* Bordure du bouton */
    --site-btn-more-text: #ffffff;       /* Texte blanc du bouton */
    --site-btn-more-hover-bg: #222222;   /* Survol noir/gris très foncé */

    /* --- DÉGRADÉ DE FOND (TRONCATURE) --- */
    --site-fade-color: #faf5e5;          /* Doit être identique à --site-card-bg */
}

/* Espacement sur la balise HTML main */
main {
    margin-bottom: 4rem;
    padding-bottom: 1rem;
}

/* Règle plus spécifique que les règles globales */
main .fiche-container {
    background-color: var(--site-card-bg);
    border-width: 5px;
    border-style: solid;
    border-color: var(--site-border-color);
    border-radius: 8px;
    padding: 2rem;
    max-width: 800px;
    margin: 2rem auto 4rem auto;
    box-sizing: border-box;
}

.fiche-container h1 {
    font-size: 2rem;
    color: var(--site-title-color);
    margin: 0.5rem 0;
}

.fiche-chapeau {
    font-size: 1.1rem;
    color: var(--site-text-muted);
    margin-bottom: 1.5rem;
}

.fiche-card-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    width: 100%;
}

.fiche-img-box {
    width: 100%;
    max-width: 450px;
    height: 250px;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--site-border-color);
}

.fiche-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fiche-actions-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: 450px;
    margin-top: 0.5rem;
}

.url-texte {
    font-size: 0.85rem;
    color: var(--site-text-muted);
    word-break: break-all;
}

.fiche-texte-block {
    border-top: 1px solid var(--site-border-color);
    padding-top: 1.5rem;
}

.fiche-texte-block h2 {
    font-size: 1.3rem;
    color: var(--site-title-color);
    margin-bottom: 1rem;
}

/* Système "Lire la suite / En savoir plus" */
.fiche-texte-block .fiche-body-text {
    line-height: 1.7;
    color: var(--site-text-color);
    transition: max-height 0.3s ease;
}

.fiche-texte-block .fiche-body-text.truncated {
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.fiche-texte-block .fiche-body-text.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--site-fade-color));
    pointer-events: none;
}

/* Ciblage précis sans !important uniquement pour ce bouton */
main .fiche-texte-block button.btn-read-more,
main .fiche-container button.btn-read-more {
    margin-top: 1rem;
    background-color: var(--site-btn-more-bg);
    border: 1px solid var(--site-btn-more-border);
    color: var(--site-btn-more-text);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

main .fiche-texte-block button.btn-read-more:hover,
main .fiche-container button.btn-read-more:hover {
    background-color: var(--site-btn-more-hover-bg);
    border-color: var(--site-btn-more-hover-bg);
    color: var(--site-btn-more-text);
}

@media (max-width: 600px) {
    .fiche-actions-box {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}