/* ==========================================================
 * poemes-poesie.aepm.fr – feuille de style
 * Refonte 09/10/2026 (même principe que citations / biographie-celebrites) :
 * menu déroulant collé en haut, plus de colonne de gauche,
 * partenaires en pied de page, couleurs rose / framboise du site
 * (#BD164C / #FF6A8A) gardées, avec des teintes plus foncées
 * pour le menu et les titres afin que le texte blanc reste lisible.
 * ========================================================== */
* { margin: 0; padding: 0; }
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1em;
    line-height: 1.6;
    background-color: #D5E3EA;
}

/* ---------- Menu du haut (commande/haut.php + js/menu.js) ---------- */
#menu_haut {
    width: 100%;
    background: linear-gradient(90deg, #8E1039, #BD164C); /* framboise foncé : texte blanc lisible */
    position: sticky;   /* le menu reste en haut de l'écran quand on descend */
    top: 0;
    z-index: 100;
}
#menu_haut .menu-inner {
    max-width: 1053px;
    margin: 0 auto;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}
#menu_haut ul { list-style: none; }
#menu_haut .menu-links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
#menu_haut .menu-links a,
#menu_haut .plus-btn,
#menu_haut .menu-toggle,
#menu_haut .btn-member {
    font-family: tahoma, sans-serif;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 6px;
}
#menu_haut .menu-links a:hover,
#menu_haut .plus-btn:hover,
#menu_haut .menu-toggle:hover,
#menu_haut .btn-member:hover { background: rgba(255, 255, 255, 0.18); }
#menu_haut .menu-toggle { display: none; }
#menu_haut .menu-toggle svg,
#menu_haut .btn-member svg { width: 24px; height: 24px; display: block; }
#menu_haut .menu-toggle .icon-close { display: none; }
#menu_haut .btn-member { margin-left: auto; }
#menu_haut .menu-plus { position: relative; }
#menu_haut .plus-title { display: none; }
#menu_haut .plus-list {
    display: none;
    position: absolute;
    top: 46px;
    left: 0;
    z-index: 50;
    min-width: 230px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
    padding: 6px 0;
}
#menu_haut .menu-plus.plus-ouvert .plus-list { display: block; }
#menu_haut .plus-list a {
    color: #1e293b;
    display: block;
    min-height: 0;
    padding: 10px 18px;
    border-radius: 0;
    font-size: 14px;
}
#menu_haut .plus-list a:hover { background: #fde7ee; color: #8E1039; }

@media (max-width: 768px) {
    #menu_haut .menu-inner { flex-wrap: wrap; padding: 4px 8px; }
    #menu_haut .menu-toggle { display: flex; }
    #menu_haut .btn-member { order: 2; }
    #menu_haut .menu-links {
        display: none;
        order: 3;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: calc(100% + 16px);
        margin: 4px -8px -4px;
        background: #fff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    }
    #menu_haut.menu-ouvert .menu-links {
        display: flex;
        max-height: calc(100vh - 56px); /* la liste défile si elle est trop longue */
        overflow-y: auto;
    }
    #menu_haut.menu-ouvert .menu-toggle .icon-open { display: none; }
    #menu_haut.menu-ouvert .menu-toggle .icon-close { display: block; }
    #menu_haut .menu-links a {
        color: #1e293b;
        min-height: 50px;
        padding: 0 20px;
        border-radius: 0;
        border-bottom: 1px solid #e2e8f0;
        font-size: 16px;
    }
    #menu_haut .menu-links a:hover { background: #fde7ee; color: #8E1039; }
    #menu_haut .plus-btn { display: none; }
    #menu_haut .plus-title {
        display: block;
        padding: 12px 20px 4px;
        font-family: tahoma, sans-serif;
        font-size: 12px;
        font-weight: bold;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #475569;
        background: #f8fafc;
    }
    #menu_haut .plus-list {
        display: block;
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        min-width: 0;
        background: #f8fafc;
    }
}

/* ---------- Page ---------- */
main {
    background-color: white;
    width: 100%;
    max-width: 1053px;
    margin: auto;
    border-bottom: 1px solid #fff;
}
.logo-container { display: block; text-align: center; padding: 5px; }
.logo-visuel {
    height: 150px;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 5px auto;
}
main h1 {
    padding: 0.4rem 0.6rem;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    color: #fff;
    background: linear-gradient(90deg, #A3123F, #D02A5E);
}
main h2 { font-size: 1.1rem; margin: 0.6rem 0.4rem; }
main p { margin: 0.4rem; }
main a { font-weight: bold; color: #BD164C; text-decoration: none; }
main a:hover { text-decoration: underline; }
main ul { margin: 0 10px 14px 0; }
main li { list-style: none; text-align: left; padding-left: 10px; }
.ptitre { margin: 0.4rem; font-size: 1.2rem; font-weight: bold; padding-top: 1.2rem; }
.voir-plus { text-align: right; }

/* Fil d'Ariane */
.breadcrumb { list-style: none; font-size: 0.8em; padding: 0; margin: 0; display: flex; flex-wrap: wrap; line-height: 1.2; }
.breadcrumb li { padding: 5px 0 5px 5px; }
.breadcrumb li + li::before { content: ">"; margin: 0 5px 0 2px; }
.breadcrumb a { color: #BD164C; text-decoration: none; font-weight: normal; }
.breadcrumb a:hover { text-decoration: underline; }

#deuxcol { display: flex; flex-wrap: wrap; align-items: flex-start; }
#article { flex: 1; min-width: 0; padding: 0 10px; box-sizing: border-box; }
#texteunique h2 { margin: 0.4rem; }

/* ---------- Lettres et pages ---------- */
.pagenumero, .alpha {
    background-color: #f3f3f3;
    text-align: center;
    word-spacing: 0.5rem;
    padding: 0.5rem 0;
    border-radius: 6px;
    margin: 6px 0;
}
.pagenumero p, .alpha p { font-size: 0.9em; font-weight: bold; }
.pagenumero a, .alpha a { color: #BD164C; text-decoration: none; font-weight: normal; }
.alpha a.actif { font-weight: bold; text-decoration: underline; }
.alpha .sous-lettres { font-size: 0.9em; margin-top: 4px; }
.alpha .sous-lettres a { display: inline-block; padding: 0 4px; }

/* ---------- Listes de poèmes ---------- */
.liste-poemes { margin: 8px 0 14px; }
.liste-poemes li { padding: 5px 10px; border-bottom: 1px solid #f1e3e8; }
.liste-poemes li:last-child { border-bottom: 0; }
.liste-poemes .de { color: #666; font-size: 0.9em; }
.liste-poemes .lien-auteur, .resultat-titre .lien-auteur { font-weight: normal; color: #1e293b; }
.liste-poemes .marque { font-size: 0.85em; }
.liens-accueil { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.liens-accueil li { padding: 0; }
.liens-accueil a { display: inline-block; padding: 6px 12px; border: 1px solid #BD164C; border-radius: 16px; font-size: 0.95em; }
.liens-accueil a:hover { background: #fde7ee; text-decoration: none; }
.poeme-du-jour { background: #fdf3f6; border-left: 4px solid #BD164C; border-radius: 6px; padding: 4px 10px; margin: 6px 0; }

/* ---------- Listes de poètes (vignettes centrées) ---------- */
.liste-noms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 20px;
}
.box_aut_presentation {
    width: 240px;
    height: 50px;
    border: 1px solid #BD164C;
    border-radius: 8px;
    background-color: white;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0 0 0 5px;
    box-sizing: border-box;
}
.box_aut_presentation:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); }
.photo-aut-mini { display: flex; align-items: center; }
.photo-aut-mini img { width: 40px; height: 40px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.box_aut_presentation .text-container { margin-left: 6px; flex-grow: 1; line-height: 1.2; }
.box_aut_presentation .text-container a { color: #1e293b; }

/* ---------- Poèmes illustrés (grille) ---------- */
.grille-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin: 10px 0;
}
.box_foto_presentation {
    border: 1px solid #BD164C;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.box_foto_presentation:hover { transform: translateY(-4px); }
.box_foto_presentation a { display: block; color: #1e293b; }
.box_foto_presentation img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; display: block; }
.box_foto_presentation .legende { display: block; padding: 4px 6px 6px; font-size: 0.85em; line-height: 1.3; text-align: center; }
.box_foto_presentation .legende small { font-weight: normal; color: #666; }

/* ---------- Page d'un poète ---------- */
.auteur-tete { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.auteur-tete img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; border: 2px solid #f1e3e8; }
.autres-sites { background: #fdf3f6; border-radius: 8px; padding: 4px 10px 8px; margin: 12px 0; }
.autres-sites ul { margin: 0; }

/* ---------- Page d'un poème ---------- */
.photopoe-presentation {
    max-width: 500px;
    width: calc(100% - 20px);
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #BD164C;
    padding: 5px;
    box-sizing: border-box;
}
.photopoe-presentation img { width: 100%; height: auto; display: block; border-radius: 10px; }
.texte-poeme { margin: 10px 0; }
.prefrain { padding-left: 30px; }
audio { margin: 0.4rem; max-width: calc(100% - 0.8rem); }

/* ---------- Recherche ---------- */
.form-recherche {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 480px;
    margin: 10px 0 20px;
    padding: 10px;
    border: 1px solid #BD164C;
    border-radius: 6px;
    background: #f9f9f9;
}
.form-recherche input { flex: 1; min-width: 180px; padding: 8px; border: 1px solid #ccc; border-radius: 4px; font: inherit; }
.form-recherche button { background: #BD164C; color: #fff; border: 0; border-radius: 4px; padding: 8px 14px; cursor: pointer; font-weight: bold; }
.form-recherche button:hover { background: #8E1039; }
.titre-resultats { font-size: 1.05rem; }
.resultat-item { margin-bottom: 14px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.resultat-titre .de { color: #666; font-size: 0.9em; }
.resultat-extrait { color: #555; font-size: 0.9em; line-height: 1.4; }
.pagination-recherche { margin: 16px 0; text-align: center; line-height: 2.4; }
.pagination-recherche a, .pagination-recherche .page-actuelle {
    display: inline-block;
    min-width: 22px;
    padding: 2px 6px;
    margin: 2px;
    font-size: 0.85em;
    border-radius: 3px;
    background: #eee;
    color: #333;
    font-weight: normal;
}
.pagination-recherche .page-actuelle { background: #BD164C; color: #fff; font-weight: bold; }

/* ---------- Atelier d'écriture (sujet.php) ---------- */
.consigne { background: #fdfdfd; padding: 10px 15px; border-left: 4px solid #333; margin: 10px 0 30px; }
.textes-tete { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 20px 0; border-top: 1px solid #ddd; padding-top: 20px; }
#toggle-all-btn { background: #333; color: #fff; border: 0; padding: 8px 15px; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: bold; }
.texte-participant { margin: 0 0 15px 10px; border: 1px solid #ddd; border-radius: 6px; background: #fafafa; }
.texte-participant[open] { background: #f0f0f0; }
.texte-participant summary {
    padding: 12px 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.texte-participant summary::-webkit-details-marker { display: none; }
.fleche-accordeon { transition: transform 0.2s ease; display: inline-block; }
.texte-participant[open] .fleche-accordeon { transform: rotate(90deg); }
.texte-contenu { padding: 15px 20px; background: #fff; border-top: 1px solid #eee; border-radius: 0 0 6px 6px; line-height: 1.6; }
.texte-titre { font-weight: bold; margin: 0 0 15px; font-size: 16px; }
.aucun-texte { font-style: italic; color: #777; margin-left: 10px; }

/* ---------- 404 ---------- */
.image-404 img { max-width: 100%; height: auto; border: 5px solid white; border-radius: 6px; }

/* ---------- Publicité ---------- */
#pub, #encart-local {
    width: 95%;
    max-width: 750px;
    margin: 0.4rem auto;
    font-size: 0.6rem;
    text-align: center;
    border: 2px dashed #BD164C;
    border-radius: 6px;
    background-color: #eee;
}
#pub img, #encart-local img {
    width: 99%;
    max-width: 720px;
    height: auto;
    max-height: 270px;
    object-fit: contain;
    background-color: white;
    margin: 0.5rem auto;
}

/* ---------- Partenaires institutionnels (cbdd/partenaires-pied.php) ---------- */
#partenaires-pied {
    max-width: 1053px;
    text-align: center;
    margin: 0 auto;
    padding: 15px 0;
    background-color: #f9f9f9;
}
#partenaires-pied p {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: bold;
}
#partenaires-pied2 { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; padding: 0 10px; }
#partenaires-pied2 img { height: 50px; width: auto; max-width: 100%; filter: grayscale(100%); opacity: 0.8; transition: all 0.3s ease; }
#partenaires-pied2 img:hover { filter: none; opacity: 1; }

/* ---------- Pied de page ---------- */
#mentions, #reseau {
    background-color: #ddd;
    font-size: 0.8rem;
    padding: 0.4rem;
    margin: 0 auto;
    max-width: 1053px;
    text-align: center;
}
#mentions span a, #reseau span a { font-family: tahoma, sans-serif; font-weight: bold; color: #A3123F; text-decoration: none; }
footer {
    margin: 0 auto;
    padding-top: 1rem;
    max-width: 1053px;
    height: 4rem;
    background-color: #5C5E5F;
    font-size: 0.6rem;
    color: #C8C6C6;
    text-align: center;
}
.clearthis { clear: both; }

/* ---------- Formulaire de contact (contact.php) ---------- */
.contact-note { background: #fdf3f6; border-left: 4px solid #BD164C; border-radius: 6px; padding: 8px 12px; margin: 10px 0; }
.contact-erreurs { background: #fee2e2; color: #991b1b; border-radius: 6px; padding: 8px 12px; margin: 10px 0; }
.contact-erreurs ul { margin: 0; }
.contact-erreurs li { padding-left: 0; }
.contact-ok { background: #dcfce7; color: #166534; font-weight: bold; border-radius: 6px; padding: 10px 12px; margin: 10px 0; }
.form-contact {
    background: #f9f9f9;
    border: 1px solid #BD164C;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    max-width: 640px;
}
.form-contact label { font-weight: bold; display: block; margin: 10px 0 4px; }
.form-contact input[type="text"],
.form-contact input[type="email"],
.form-contact textarea {
    width: 100%;
    padding: 9px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font: inherit;
}
.form-contact button {
    margin-top: 14px;
    background-color: #BD164C;
    color: white;
    padding: 10px 22px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
}
.form-contact button:hover { background-color: #8E1039; }

/* ---------- Petits écrans ---------- */
@media (max-width: 768px) {
    .logo-visuel { height: 100px; }
}
@media (max-width: 480px) {
    .logo-visuel { height: 80px; }
    .grille-images { grid-template-columns: repeat(2, 1fr); }
    .box_aut_presentation { width: 100%; }
}

/* ---------- Rendez-vous poétiques (17/10/2026) : liste et pages ---------- */
.pvm-evt { display: flex; gap: 14px; align-items: stretch; margin: 10px 0.4rem 14px; border: 1px solid #f1d3dd; border-left: 5px solid #BD164C; border-radius: 10px; background: #ffffff; overflow: hidden; }
.pvm-evt-passe { border-left-color: #b8a5ad; }
.pvm-evt-date { flex: 0 0 150px; padding: 12px; background: #fbeef2; color: #8E1039; font-weight: bold; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.pvm-evt-passe .pvm-evt-date { background: #f4f1f2; color: #6b5a61; }
.pvm-evt-date span { font-weight: normal; font-size: 0.9em; }
.pvm-evt-corps { padding: 10px 12px 10px 0; }
.pvm-evt-corps h3 { margin: 0.2rem 0.4rem 0.3rem; font-size: 1.1rem; }
.pvm-evt-lieu { color: #6b5a61; }
.pvm-badge { display: inline-block; padding: 3px 12px !important; border-radius: 999px; background: #e3f4e8; color: #1f7a3c; font-weight: bold; font-size: 0.9em; }
.pvm-badge-passe { background: #f4f1f2; color: #6b5a61; }
.pvm-infos { margin: 10px 0.4rem; padding: 10px 14px; background: #fbeef2; border-radius: 10px; }
.pvm-affiche { text-align: center; }
.pvm-affiche img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid #f1d3dd; }
/* 17/10/2026 : affiche en taille réduite (pas en pleine page), clic = taille réelle */
.pvm-affiche img { width: 420px; }
.pvm-affiche a { display: inline-block; }
.pvm-affiche-note { display: block; font-size: .85em; color: #777; margin-top: 4px; }
@media (max-width: 600px) {
    .pvm-evt { flex-direction: column; gap: 0; }
    .pvm-evt-date { flex: none; flex-direction: row; justify-content: flex-start; gap: 10px; text-align: left; }
    .pvm-evt-corps { padding: 8px 10px; }
}
