/* ==========================================================================
   PAGES LÉGALES (cgv.html, mentions-legales.html, politique-confidentialite.html) : la notice de la borne.
   Un panneau d'émail en tête (date d'effet à l'afficheur, titre, articles en poussoirs numérotés), puis la
   colonne de lecture (.page-legale de borne.css, 74 caractères), un article par partie, séparés par des filets.
   Les trois pages partagent ce fichier : même gabarit, mêmes pièces.
   Système partagé : borne/css/borne.css.
   ========================================================================== */

/* ---------- Le panneau de tête : la borne en pleine largeur ---------- */
.borne--notice {
    display: block;
    padding: clamp(40px, 5vw, 72px) var(--gouttiere);
}
.borne--notice > .grille { padding-inline: 0; max-width: calc(1440px - 2 * var(--gouttiere)); }
.notice { row-gap: 32px; align-items: center; }
.notice-titre { grid-column: 1 / span 6; display: grid; gap: 18px; justify-items: start; }
.notice-titre .afficheur { align-self: auto; }
.notice-titre h1 { font-size: clamp(2.2rem, 1.2rem + 2.6vw, 4rem); line-height: 0.98; }

/* Le sommaire des articles : les poussoirs numérotés du tableau des programmes, posés sur l'émail */
.notice .tableau {
    grid-column: 7 / span 6;
    padding: 0;
    background: transparent;
    box-shadow: none;
}
.notice .tableau-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.notice .tableau-num { background: var(--marine); }
.notice .tableau-bouton:hover .tableau-num { background: var(--vif); }
.notice .tableau-bouton[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--blanc); }

/* ---------- La colonne de lecture (centrée dans la grille) ---------- */
.page-legale { padding-block: clamp(56px, 6vw, 96px); }
.page-legale .grille > .texte-legal { justify-self: center; width: 100%; }
.article-legal { padding-bottom: 36px; }
.article-legal + .article-legal { padding-top: 44px; border-top: 1px solid var(--inox-2); }
.article-legal:last-child { padding-bottom: 0; }
/* Arrivée par le sommaire : le titre de l'article se pose au tiers haut de l'écran, sur la ligne de lecture
   de l'afficheur de l'auvent (40 % de la hauteur) ; un article court reste ainsi l'article en cours. */
.article-legal { scroll-margin-top: max(calc(var(--auvent) + 16px), calc(40vh - 64px)); }
.texte-legal .article-legal h2 { margin: 0 0 0.75em; }
.texte-legal > .article-intro { padding-bottom: 36px; }
.texte-legal > .article-intro + .article-legal { padding-top: 44px; border-top: 1px solid var(--inox-2); }

/* Clause à retenir (texte en italique sur le site) : l'ampoule des notes de la borne */
.clause { display: flex; align-items: flex-start; gap: 12px; }
.clause svg { flex: none; width: 24px; height: 24px; margin-top: 2px; color: var(--vif); }
.clause span { font-style: italic; }

/* Fiche d'identité (mentions légales) : rubrique en capitales à gauche, valeur à droite, entre filets */
.fiche-legale { margin: 0 0 1.2em; border-top: 1px solid var(--inox-2); }
.fiche-legale > div {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    column-gap: 20px;
    row-gap: 2px;
    align-items: baseline;
    padding: 11px 0;
    border-bottom: 1px solid var(--inox-2);
}
/* Le filet de fin d'article suit : la dernière rubrique n'en porte pas un second */
.article-legal:not(:last-child) .fiche-legale:last-child > div:last-child { border-bottom: 0; }
.fiche-legale dt {
    font-family: var(--condense);
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--marine);
}
.fiche-legale dd { margin: 0; min-width: 0; color: var(--ardoise); overflow-wrap: anywhere; }
.fiche-legale dd a { color: var(--bleu); font-weight: 600; }
.fiche-legale dd strong { color: var(--marine); }

/* Les liens du texte : filet souligné, survol en bleu vif */
.texte-legal a:hover { color: var(--vif); }

/* ==========================================================================
   ÉCRANS INTERMÉDIAIRES ET TÉLÉPHONE
   ========================================================================== */
@media (max-width: 1080px) {
    .notice-titre, .notice .tableau { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    /* Même marge que la borne au téléphone : le texte reste à distance du cadre intérieur (8 px du bord) */
    .borne--notice { padding: 36px 22px 40px; }
    .notice { row-gap: 26px; }
    .notice .tableau-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fiche-legale > div { grid-template-columns: minmax(0, 1fr); }
    .article-legal + .article-legal, .texte-legal > .article-intro + .article-legal { padding-top: 36px; }
    .article-legal { padding-bottom: 28px; }
}
