/*-----------------------------------------------------------------------------
[Myt] content.css — styles de `<div id="content">`, partagé par les 5 fiches
publiques qui l'utilisent : periode.php, article.php, myt.php, marque.php,
artiste.php. Toutes peuvent recevoir, via l'admin (éditeur Trumbowyg,
templates FAQ/Guide/titre/contenu/figure, ou contenu collé à la main), des
images/figures/pictures et des blocs FAQ/HowTo — d'où la mutualisation ici
plutôt que la duplication qui existait avant (2026-07-26, demande utilisateur)
dans le `<style>` inline de chacune des 5 pages, quasi identique à la copie
près (seuls les commentaires différaient d'une page à l'autre).

Ce que ce fichier NE couvre PAS : les variables CSS dynamiques dépendant de
données PHP par fiche (`--img-bkgd-*`/`.bg1`, `--width-myt-gallery-column`)
restent forcément inline dans chaque page (elles embarquent des valeurs
`<?php echo ...; ?>` — impossible à extraire dans un fichier statique).
-----------------------------------------------------------------------------*/

/* <a> et <picture> restent en display:inline par défaut (aucune règle ne les
   stylait), alors que myt.css met déjà <img> en display:block. Un bloc (img)
   à l'intérieur d'une boîte inline (a > picture) force le navigateur à
   scinder l'inline en boîtes anonymes autour de l'image, ce qui ajoute une
   ligne (vide) au-dessus et en dessous — d'où la marge visible en haut et en
   bas de l'image. Correctif : passer <a> et <picture> en display:block, comme
   fait pour x-cross-sell.php et .posts .post dans article.css. */
#content figure {
    position: relative;
}
#content figure a,
#content figure picture {
    display: block;
}
/* Les <source> restent en display:inline par défaut (pas display:none comme
   on pourrait le croire) : sans cette règle, les 6 <source> de la <picture>
   (avec les retours à la ligne/texte blanc autour) forment encore une boîte
   de ligne au-dessus de <img>, donc la marge persistait même après le
   display:block ci-dessus. Même correctif que catalog.css/article.css/
   x-cross-sell.php. */
#content figure picture source {
    display: none;
}
/* Reste ~20px en haut/bas même après ce qui précède : myt.css applique
   "* { padding: var(--main-body-padding) }" à TOUT élément par défaut,
   <picture> y compris — d'où la marge résiduelle malgré le display:block et
   le masquage des <source>. line-height:0 en prime, comme x-cross-sell.php,
   pour éviter tout espacement de ligne résiduel. */
#content figure picture {
    padding: 0;
    line-height: 0;
}

/* Pastille Vendu/Réservé (texte simple, <div>/<p class="inner">, distincte du
   sticker SVG de product.css). */
#content figcaption .inner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    /* myt.css a "h1, h2, h3, h4, p { width:100% }" — sans effet tant que
       .inner reste un <div> (généré par PHP), mais si ce markup est collé/
       réutilisé en <p class="inner"> (rencontré sur article.php, contenu
       collé à la main), la pastille prendrait toute la largeur sans cette
       règle. width:auto annule ce cas par précaution — sans effet sur le
       <div> (déjà auto par défaut), donc sûr dans les deux cas. */
    width: auto;
    padding: 0 0.2em 0 0.2em;
    margin: 0;
    line-height: normal;
    cursor: pointer;
    background-color: hsla(225,100%,100%,0.5);
    color: var(--black);
    user-select: none;
    border-width: 1px;
    border-style: solid;
    border-color: var(--color-gray-700);
    place-content: center;
}
/* Cartel produit : myt.css met les figcaption en blanc-sur-noir italique ;
   ici on veut un bandeau titre lisible, noir sur blanc (même esprit que les
   cartels du catalogue). */
#content figcaption {
    background-color: #fff;
    color: #111;
    font-style: normal;
    padding: 6px 8px;
}
#content figcaption .post-title a {
    color: #111;
    text-decoration: none;
}
#content figcaption .post-title a:hover,
#content figcaption .post-title a:focus-visible {
    text-decoration: underline;
}
/* Produits vendus (img.image-scale.sold) : noir et blanc comme sur le
   catalogue (.posts .post .sold), retour en couleur au survol de la figure. */
#content figure .sold {
    filter: grayscale(90%);
    transition: filter .5s ease-out;
}
#content figure:hover .sold {
    filter: grayscale(0);
}

/* Titres */
#content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin: 40px 0 20px;
    padding-bottom: 15px;
    line-height: 1.2;
}

#content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #000;
    margin: 50px 0 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

#content h2:first-of-type {
    border-top: none;
    margin-top: 30px;
}

#content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #333;
    margin: 30px 0 15px;
}

/* Introduction */
#content .intro {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #444;
    margin: 30px 0;
    padding: 25px;
    background-color: #f9f9f9;
    border-left: 4px solid #000;
}

/* Sommaire */
#content .table-of-contents {
    background-color: #f5f5f5;
    padding: 30px;
    margin: 40px 0;
    border: 1px solid #ddd;
}

#content .table-of-contents h2 {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

#content .table-of-contents ul {
    list-style: none;
    padding: 0;
}

#content .table-of-contents li {
    margin: 10px 0;
}

#content .table-of-contents a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 8px 12px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

#content .table-of-contents a:hover,
#content .table-of-contents a:focus {
    background-color: #fff;
    border-left-color: #000;
    padding-left: 20px;
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* ==========================================
   ACCORDÉONS FAQ & HOW TO
   ========================================== */

#content .faq-item,
#content .how-to {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 0;
    overflow: hidden;
    background-color: #fff;
}

/* En-tête accordéon */
#content .faq-item h3,
#content .how-to h3 {
    margin: 0;
    padding: 0;
}

#content .accordion-header {
    background-color: #f9f9f9;
    border: none;
    width: 100%;
    text-align: left;
    padding: 18px 50px 18px 20px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    font-family: inherit;
    display: block;
}

#content .accordion-header:hover {
    background-color: #f0f0f0;
}

#content .accordion-header:focus {
    outline: 3px solid #000;
    outline-offset: -3px;
    background-color: #f0f0f0;
}

/* Icône + / - */
#content .accordion-header::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.75rem;
    font-weight: 300;
    color: #000;
    line-height: 1;
    transition: transform 0.3s ease;
}

#content .accordion-header[aria-expanded="true"]::after {
    content: '−';
    transform: translateY(-50%) rotate(0deg);
}

/* Contenu accordéon */
#content .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
    background-color: #fff;
}

#content .accordion-content.active {
    max-height: 1000px;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

#content .accordion-content p,
#content .accordion-content ol {
    margin: 10px 0;
}

/* ==========================================
   SECTION EXPERTISE
   ========================================== */

#content .expertise {
    background-color: #f9f9f9;
    padding: 40px;
    margin: 60px 0;
    border-top: 3px solid #000;
    border-bottom: 3px solid #000;
}

#content .expertise h2 {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

#content .expertise h3 {
    margin-top: 30px;
}

#content .expertise ul {
    list-style: none;
    padding-left: 0;
}

#content .expertise li {
    padding-left: 25px;
    position: relative;
    margin: 12px 0;
}

#content .expertise li::before {
    content: '▪';
    position: absolute;
    left: 0;
    font-weight: bold;
}

#content .expertise strong {
    font-weight: 700;
}

/* ==========================================
   ACCESSIBILITÉ & FOCUS
   ========================================== */

#content a {
    color: #000;
    text-decoration: underline;
    transition: all 0.2s ease;
}

#content a:hover {
    color: #444;
    text-decoration-thickness: 2px;
}

#content a:focus {
    outline: 3px solid #000;
    outline-offset: 2px;
    background-color: #f0f0f0;
}

/* Skip to content (accessibilité) */
#content .skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

#content .skip-to-content:focus {
    top: 0;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    #content h1 {
        border-bottom: 3px solid #000;
    }
    #content .table-of-contents,
    #content .expertise {
        padding: 20px;
    }

    #content .intro {
        padding: 20px;
        font-size: 1rem;
    }

    #content .accordion-header {
        padding: 15px 45px 15px 15px;
        font-size: 1rem;
    }

    #content .accordion-header::after {
        right: 15px;
        font-size: 1.5rem;
    }
}

@media print {
    #content .table-of-contents {
        display: none;
    }

    #content .accordion-content {
        max-height: none !important;
        padding: 20px !important;
        display: block !important;
    }

    #content .accordion-header::after {
        display: none;
    }
}
