/*
Theme Name: TWAL Contemplateur
Description: Thème enfant de Twal Builder pour Le Contemplateur.
Author: Twal Media
Template: twal
Version: 0.4.4
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: twal-contemplateur
*/

/*=========================================================
 A — ARTICLES : IMAGES ET LÉGENDES
 =========================================================*/

/* A.1 — Les figures conservent leur largeur, sans dépasser le texte. */
.tw-post .tw-layout_content figure.wp-caption,
.ct-oeuvre .tw-layout_content figure.wp-caption,
.ct-lieu .tw-layout_content figure.wp-caption {
    max-width: 100%;
    box-sizing: border-box;
}

/* A.2 — Les images restent proportionnées. */
.tw-post .tw-layout_content figure.wp-caption img,
.ct-oeuvre .tw-layout_content figure.wp-caption img,
.ct-lieu .tw-layout_content figure.wp-caption img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* A.3 — WordPress peut demander un centrage de la figure. */
.tw-post .tw-layout_content figure.wp-caption.aligncenter,
.ct-oeuvre .tw-layout_content figure.wp-caption.aligncenter,
.ct-lieu .tw-layout_content figure.wp-caption.aligncenter {
    margin-right: auto;
    margin-left: auto;
}

/* A.4 — Légendes. */
.tw-post .tw-layout_content figure.wp-caption figcaption,
.ct-oeuvre .tw-layout_content figure.wp-caption figcaption,
.ct-lieu .tw-layout_content figure.wp-caption figcaption {
    margin-top: 0.5rem;
    font-size: 0.85em;
    line-height: 1.45;
    text-align: center;
}

/*=========================================================
 B — FICHE ŒUVRE
 =========================================================*/

/* B.1 — Cartouche des informations de l'œuvre. */
.ct-fiche_infos {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--tw-bordure-discrete, #ded9d2);
    border-radius: 0.5rem;
}
.ct-fiche_infos h2 { margin: 0 0 0.75rem; }
.ct-fiche_infos dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.35rem 1rem;
    margin: 0;
}
.ct-fiche_infos dt { font-weight: 600; }
.ct-fiche_infos dd { margin: 0; overflow-wrap: anywhere; }
.ct-oeuvre .tw-layout_content img { max-width: 100%; height: auto; }

/* B.2 — Informations discrètes sur les cartes d'œuvres. */
.ct-oeuvre_card-meta { font-size: 0.9em; }

/*=========================================================
 C — FICHE LIEU
 =========================================================*/
.ct-lieu_itineraire { display: inline-flex; align-items: center; gap: 0.3rem; }
.ct-lieu_itineraire svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; }

/*=========================================================
 D — SÉLECTIONS DU CONTEMPLATEUR
 =========================================================*/
.ct-fiche_more { margin-top: 1.25rem; }
.ct-fiche_more > summary { cursor: pointer; }
.ct-fiche_more > .tw-grid { margin-top: 1.25rem; }
.ct-fiche_cartes .tw-card_accroche { display: none; }

/*=========================================================
 * PAGE CONTENT CORRECTION RESPONSIVE
 * =======================================================*/
@media (max-width: 900px) {
    .tw-editorial-content {
        order: 1 !important;
        width: 100%;
    }
}
