/* ==========================================================
   B612 — RUBRIQUE INFOS PRATIQUES
   templates/infos-pratiques.php
   Desktop d'abord, puis tablette (≤ 1000px) et mobile (≤ 700px)
========================================================== */

.b612-infos {

    --b612-infos-ink: var(--b612-next-color-text, #25283a);
    --b612-infos-muted: var(--b612-next-color-text-muted, #626577);
    --b612-infos-primary: var(--b612-next-color-primary, #28367f);
    --b612-infos-yellow: #ffd500;
    --b612-infos-line: #e6e0d6;

    max-width: 1280px;

    margin: 0 auto;

    padding: 40px 40px 110px;

    box-sizing: border-box;

    color: var(--b612-infos-ink);

    font-family: var(--b612-next-font-body, "Filson Pro", sans-serif);
}


/* Fil d'Ariane */

.b612-infos__breadcrumb {

    display: flex;

    flex-wrap: wrap;

    gap: 6px 10px;

    margin-bottom: 44px;

    color: var(--b612-infos-muted);

    font-size: 13px;
}

.b612-infos__breadcrumb a {

    color: inherit;

    text-decoration: none;
}

.b612-infos__breadcrumb a:hover {

    color: var(--b612-infos-primary);

    text-decoration: underline;
}

.b612-infos__breadcrumb [aria-current] {

    color: var(--b612-infos-ink);
}


/* Titres */

.b612-infos__eyebrow {

    display: block;

    margin-bottom: 12px;

    color: #726b68;

    font-size: 13px;

    font-weight: 600;

    letter-spacing: .18em;

    text-transform: uppercase;
}

.b612-infos__title {

    margin: 0;

    color: #1a1a1a;

    font-family: var(--b612-next-font-heading, "Formiga", sans-serif);

    font-size: clamp(2.2rem, 4.5vw, 3.6rem);

    font-weight: 900;

    line-height: 1;

    letter-spacing: -.02em;
}


/* ==========================================================
   PAGE PARENTE — cartes
========================================================== */

.b612-infos__header {

    max-width: 760px;

    margin-bottom: 48px;
}

.b612-infos__intro {

    margin-top: 22px;
}

.b612-infos__cards {

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;

    margin: 0;

    padding: 0;

    list-style: none;
}

.b612-infos__card {

    position: relative;

    display: flex;

    flex-direction: column;

    gap: 10px;

    height: 100%;

    padding: 26px 24px 22px;

    box-sizing: border-box;

    border: 1px solid var(--b612-infos-line);

    border-radius: 16px;

    background: #ffffff;

    color: inherit;

    text-decoration: none;

    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.b612-infos__card::before {

    content: "";

    position: absolute;

    left: 24px;

    top: 0;

    width: 34px;

    height: 4px;

    border-radius: 0 0 4px 4px;

    background: var(--b612-infos-yellow);
}

.b612-infos__card:hover,
.b612-infos__card:focus-visible {

    transform: translateY(-4px);

    border-color: transparent;

    box-shadow: 0 16px 36px rgba(18, 31, 58, .10);
}

.b612-infos__card:focus-visible {

    outline: 2px solid var(--b612-next-color-focus, #28367f);

    outline-offset: 3px;
}

.b612-infos__card-number {

    color: #c4bdb3;

    font-size: 13px;

    font-weight: 600;

    letter-spacing: .08em;
}

.b612-infos__card-title {

    color: #1a1a1a;

    font-family: var(--b612-next-font-heading, "Formiga", sans-serif);

    font-size: 22px;

    font-weight: 900;

    line-height: 1.15;
}

.b612-infos__card-text {

    color: var(--b612-infos-muted);

    font-size: 14px;

    line-height: 1.55;
}

.b612-infos__card-link {

    margin-top: auto;

    padding-top: 8px;

    color: var(--b612-infos-primary);

    font-size: 14px;

    font-weight: 600;
}


/* ==========================================================
   PAGE ENFANT — navigation + contenu
========================================================== */

.b612-infos__layout {

    display: grid;

    grid-template-columns: 280px minmax(0, 1fr);

    gap: 56px;

    align-items: start;
}

.b612-infos__aside {

    position: sticky;

    top: 24px;
}

.b612-infos__nav {

    padding: 22px 0 10px;

    border-radius: 16px;

    background: #ffffff;

    box-shadow: 0 6px 20px rgba(18, 31, 58, .05);
}

/* Ordinateur : la liste est toujours dépliée, sans en-tête cliquable */
.b612-infos__nav summary {

    display: block;

    padding: 0 22px 12px;

    list-style: none;

    pointer-events: none;
}

.b612-infos__nav summary::-webkit-details-marker {

    display: none;
}

.b612-infos__nav-label {

    display: block;

    padding-left: 14px;

    border-left: 4px solid var(--b612-infos-yellow);

    color: #1a1a1a;

    font-family: var(--b612-next-font-heading, "Formiga", sans-serif);

    font-size: 20px;

    font-weight: 900;
}

.b612-infos__nav-current {

    display: none;
}

.b612-infos__nav ul {

    margin: 0;

    padding: 0;

    list-style: none;
}

.b612-infos__nav li + li {

    border-top: 1px solid #f1ede6;
}

.b612-infos__nav a {

    position: relative;

    display: block;

    padding: 13px 22px;

    color: var(--b612-infos-ink);

    font-size: 15px;

    line-height: 1.35;

    text-decoration: none;

    transition: background .2s ease, color .2s ease;
}

.b612-infos__nav a:hover {

    background: #faf7f0;

    color: var(--b612-infos-primary);
}

.b612-infos__nav a.is-current {

    background: #fbf6e2;

    color: #1a1a1a;

    font-weight: 600;
}

.b612-infos__nav a.is-current::before {

    content: "";

    position: absolute;

    left: 0;

    top: 8px;

    bottom: 8px;

    width: 4px;

    border-radius: 0 4px 4px 0;

    background: var(--b612-infos-yellow);
}

.b612-infos__nav a:focus-visible {

    outline: 2px solid var(--b612-next-color-focus, #28367f);

    outline-offset: -2px;
}

.b612-infos__article {

    max-width: 760px;

    min-width: 0;
}

.b612-infos__article-header {

    margin-bottom: 34px;

    padding-bottom: 26px;

    border-bottom: 1px solid var(--b612-infos-line);
}

.b612-infos__empty {

    color: var(--b612-infos-muted);

    font-style: italic;
}


/* Précédent / suivant */

.b612-infos__pager {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;

    margin-top: 56px;

    padding-top: 28px;

    border-top: 1px solid var(--b612-infos-line);
}

.b612-infos__pager-link {

    display: flex;

    flex-direction: column;

    gap: 6px;

    padding: 16px 18px;

    border: 1px solid var(--b612-infos-line);

    border-radius: 12px;

    background: #ffffff;

    color: inherit;

    text-decoration: none;

    transition: border-color .2s ease, box-shadow .2s ease;
}

.b612-infos__pager-link--next {

    text-align: right;
}

.b612-infos__pager-link:hover,
.b612-infos__pager-link:focus-visible {

    border-color: var(--b612-infos-primary);

    box-shadow: 0 8px 20px rgba(18, 31, 58, .06);
}

.b612-infos__pager-dir {

    color: var(--b612-infos-muted);

    font-size: 12px;

    font-weight: 600;

    letter-spacing: .06em;

    text-transform: uppercase;
}

.b612-infos__pager-title {

    color: #1a1a1a;

    font-weight: 600;
}


/* ==========================================================
   CONTENU RÉDIGÉ DANS WORDPRESS (.b612-prose)
   Titres, paragraphes, listes, tableaux, liens, citations…
========================================================== */

.b612-prose {

    color: var(--b612-infos-ink);

    font-size: 17px;

    line-height: 1.7;
}

.b612-prose > :first-child {

    margin-top: 0;
}

.b612-prose h2 {

    margin: 2.2em 0 .6em;

    color: #1a1a1a;

    font-family: var(--b612-next-font-heading, "Formiga", sans-serif);

    font-size: 28px;

    font-weight: 900;

    line-height: 1.15;
}

.b612-prose h3 {

    margin: 1.8em 0 .5em;

    color: #1a1a1a;

    font-family: var(--b612-next-font-heading, "Formiga", sans-serif);

    font-size: 21px;

    font-weight: 700;

    line-height: 1.2;
}

.b612-prose h4 {

    margin: 1.6em 0 .4em;

    font-size: 15px;

    font-weight: 700;

    letter-spacing: .06em;

    text-transform: uppercase;
}

.b612-prose p,
.b612-prose ul,
.b612-prose ol,
.b612-prose table,
.b612-prose blockquote {

    margin: 0 0 1.1em;
}

.b612-prose ul,
.b612-prose ol {

    padding-left: 1.3em;
}

.b612-prose li {

    margin-bottom: .35em;
}

.b612-prose ul li::marker {

    color: var(--b612-infos-primary);
}

.b612-prose a {

    color: var(--b612-infos-primary);

    text-decoration: underline;

    text-decoration-color: rgb(40 54 127 / 30%);

    text-underline-offset: 3px;
}

.b612-prose a:hover {

    text-decoration-color: currentColor;
}

.b612-prose strong {

    font-weight: 700;
}

.b612-prose blockquote {

    padding: 18px 22px;

    border-left: 4px solid var(--b612-infos-yellow);

    border-radius: 0 12px 12px 0;

    background: #fbf6e2;
}

.b612-prose blockquote > :last-child {

    margin-bottom: 0;
}

/* Tableaux (horaires, tarifs…) */
.b612-prose table {

    width: 100%;

    border-collapse: collapse;

    border-radius: 12px;

    overflow: hidden;

    background: #ffffff;

    font-size: 15px;
}

.b612-prose th,
.b612-prose td {

    padding: 12px 16px;

    border-bottom: 1px solid #f1ede6;

    text-align: left;

    vertical-align: top;
}

.b612-prose th {

    background: #f7f3ea;

    font-weight: 600;
}

.b612-prose tr:last-child td {

    border-bottom: 0;
}

.b612-prose img {

    max-width: 100%;

    height: auto;

    border-radius: 12px;
}

.b612-prose iframe {

    max-width: 100%;

    border: 0;

    border-radius: 12px;
}

.b612-prose hr {

    margin: 2.2em 0;

    border: 0;

    border-top: 1px solid var(--b612-infos-line);
}


/* ==========================================================
   TABLETTE
========================================================== */

@media (max-width: 1000px) {

    .b612-infos {

        padding: 32px 30px 90px;
    }

    .b612-infos__cards {

        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .b612-infos__layout {

        grid-template-columns: 230px minmax(0, 1fr);

        gap: 36px;
    }
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 700px) {

    .b612-infos {

        padding: 22px 16px 70px;
    }

    .b612-infos__breadcrumb {

        margin-bottom: 26px;
    }

    .b612-infos__cards {

        grid-template-columns: 1fr;

        gap: 14px;
    }

    .b612-infos__card {

        padding: 22px 18px 18px;
    }

    .b612-infos__layout {

        display: block;
    }

    /* Navigation de la rubrique : bloc repliable en haut de page */
    .b612-infos__aside {

        position: static;

        margin-bottom: 28px;
    }

    .b612-infos__nav {

        padding: 0;
    }

    .b612-infos__nav summary {

        position: relative;

        padding: 16px 48px 16px 18px;

        pointer-events: auto;

        cursor: pointer;
    }

    .b612-infos__nav summary::after {

        content: "";

        position: absolute;

        right: 20px;

        top: 50%;

        width: 8px;

        height: 8px;

        margin-top: -6px;

        border-right: 2px solid var(--b612-infos-primary);

        border-bottom: 2px solid var(--b612-infos-primary);

        transform: rotate(45deg);

        transition: transform .2s ease;
    }

    .b612-infos__nav[open] summary::after {

        margin-top: -2px;

        transform: rotate(-135deg);
    }

    .b612-infos__nav-label {

        font-size: 12px;

        font-family: var(--b612-next-font-body, "Filson Pro", sans-serif);

        font-weight: 600;

        letter-spacing: .12em;

        text-transform: uppercase;

        color: var(--b612-infos-muted);
    }

    .b612-infos__nav-current {

        display: block;

        margin-top: 4px;

        padding-left: 18px;

        color: #1a1a1a;

        font-weight: 600;
    }

    .b612-infos__nav ul {

        border-top: 1px solid #f1ede6;
    }

    /* Le bloc repliable affiche déjà « Infos pratiques » */
    .b612-infos__article-header .b612-infos__eyebrow {

        display: none;
    }

    .b612-prose {

        font-size: 16px;
    }

    .b612-prose h2 {

        font-size: 24px;
    }

    /* Tableaux larges : défilement horizontal */
    .b612-prose table {

        display: block;

        overflow-x: auto;
    }

    .b612-infos__pager {

        grid-template-columns: 1fr;
    }

    .b612-infos__pager-link--next {

        text-align: left;
    }
}


/* ==========================================================
   PAGE SANS NAVIGATION DE RUBRIQUE (Déclaration d'accessibilité,
   templates/accessibilite.php) : article seul, centré
========================================================== */

.b612-infos--single .b612-infos__article {
    max-width: 820px;
    margin: 0 auto;
}

.b612-infos--single .b612-infos__updated {
    margin: 8px 0 0;
    color: #6d6d6d;
    font-size: 14px;
}

/* ==========================================================
   PLAN D'ACCÈS (page « Venir au B612 », 12 nov. 2026)
   Image fixe (tuiles OpenStreetMap assemblées, assets/img/infos/),
   cliquable vers l'itinéraire Google Maps. Aucun appel extérieur.
========================================================== */
.b612-prose .b612-carte {
    margin: 24px 0 8px;
}

.b612-prose .b612-carte a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(37, 40, 58, 0.12);
}

.b612-prose .b612-carte img {
    display: block;
    width: 100%;
    border-radius: 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.b612-prose .b612-carte figcaption {
    margin-top: 6px;
    font-size: 13px;
    color: #6d6d6d;
    text-align: right;
}

/* Mobile : carte recadrée (4/3) autour de la médiathèque plutôt que
   réduite, pour garder les noms de rue lisibles */
@media (max-width: 600px) {
    .b612-prose .b612-carte img {
        aspect-ratio: 4 / 3;
    }
}

/* Photo en tête de page (« Venir au B612 », 12 nov. 2026) :
   toute la largeur de la colonne de texte */
.b612-prose .b612-photo-entete {
    margin: 0 0 24px;
}

.b612-prose .b612-photo-entete img {
    display: block;
    width: 100%;
    aspect-ratio: 750 / 200;
    object-fit: cover;
}

@media (max-width: 600px) {
    /* Bandeau trop fin sur téléphone : un peu plus haut, centré sur l'entrée */
    .b612-prose .b612-photo-entete img {
        aspect-ratio: 5 / 2;
        object-position: 40% 50%;
    }
}

/* Variante : photo gardée dans ses proportions d'origine
   (« Inscriptions et tarifs », 12 nov. 2026) */
.b612-prose .b612-photo-entete--naturelle img,
.b612-prose .b612-photo-entete--naturelle img[src] {
    aspect-ratio: auto;
    height: auto;
}

/* Photo en encart dans le texte (automate de prêt, « Conditions de prêt »,
   12 nov. 2026) : coins arrondis, largeur limitée, pas pleine largeur */
.b612-prose .b612-photo-encart {
    margin: 16px 0 24px;
    max-width: 240px;
}

.b612-prose .b612-photo-encart img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(37, 40, 58, 0.12);
}

@media (max-width: 600px) {
    .b612-prose .b612-photo-encart {
        max-width: 200px;
        margin-inline: auto;
    }
}
