/* =================================================================
   Pages légales : mentions légales, confidentialité et cookies (table
   `pages_statiques`, D-032 ; design nv2, prompt 027, maquette
   page-legale.html, DESIGN.md § 5). Feuille à la demande, déclarée par
   pages/page-statique.php ; tout passe par la classe .legal-content, posée
   sur le seul contenu légal.
   Contenu aligné à gauche dans une colonne de 880 px ; titres Anton marine
   plus petits que sur les autres pages, avec une petite barrette bleue ;
   listes à puces carrées bleues ; tableaux à en-tête marine.
   ================================================================= */
.legal-content {
    max-width: 880px;
    color: var(--color-text-body);
    font-size: 17px;
    line-height: 1.7;
}

.legal-content > :first-child {
    margin-top: 0;
}

.legal-content h2 {
    margin: 52px 0 0;
    color: var(--color-navy);
    font-family: var(--font-heading);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 400;
    line-height: 1.08;
    text-transform: uppercase;
    overflow-wrap: break-word;
}

/* Petite barrette bleue à pans coupés sous chaque titre (48 × 5 px). */
.legal-content h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 5px;
    margin-top: 12px;
    background-color: var(--color-blue);
    clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

.legal-content h3 {
    margin: 36px 0 0;
    color: var(--color-navy);
    font-family: var(--font-condensed);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.legal-content p {
    margin: 16px 0 0;
}

.legal-content strong {
    color: var(--color-navy);
}

.legal-content a {
    color: var(--color-link);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    overflow-wrap: anywhere;
}

.legal-content a:hover {
    color: var(--color-navy);
}

/* Listes : puces carrées bleues (comme les caractéristiques des ancrages). */
.legal-content ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    line-height: 1.65;
}

.legal-content li {
    position: relative;
    padding-left: 22px;
}

.legal-content li::before {
    content: "";
    position: absolute;
    top: 0.66em;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--color-blue);
}

/* Noms techniques (cookies, clés de stockage) : chasse fixe, fond gris clair.
   break-word et non anywhere : la colonne d'un tableau garde la largeur du
   nom (coupure aux tirets seulement), sans quoi elle serait écrasée. */
.legal-content code {
    padding: 2px 7px;
    border-radius: var(--radius-tiny);
    background-color: var(--color-section-alt);
    color: var(--color-navy);
    font-family: var(--font-mono);
    font-size: 14px;
    overflow-wrap: break-word;
}

.legal-translation,
.legal-update {
    color: var(--color-text-mention);
    font-size: 15px;
}

.legal-content .legal-update {
    margin-top: 40px;
}

/* Tableaux (durées, traceurs). Mobile (sous 760 px) : chaque ligne devient
   un bloc, intitulé de colonne à gauche (attribut data-label, calculé au
   rendu par PageStatiqueRepository::labelTableCells()), valeur à droite ;
   en-tête masqué visuellement mais lu par les lecteurs d'écran. */
.legal-table {
    margin-top: 22px;
}

.legal-content table {
    display: block;
    width: 100%;
    border-top: 3px solid var(--color-navy);
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.6;
}

.legal-content thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.legal-content tbody,
.legal-content tr {
    display: block;
}

.legal-content tr {
    padding: 12px 0;
    border-bottom: 2px solid var(--color-border-strong);
}

/* Intitulé en position absolue (et non grille) : un <code> au milieu du
   texte d'une cellule reste dans le fil du texte. */
.legal-content td {
    position: relative;
    display: block;
    padding: 6px 0 6px 108px;
    overflow-wrap: break-word;
}

.legal-content td[data-label]::before {
    content: attr(data-label);
    position: absolute;
    top: 6px;
    left: 0;
    width: 96px;
    color: var(--color-navy);
    font-family: var(--font-condensed);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Dès 760 px : vrai tableau, bandeau marine en tête (texte blanc), traits
   horizontaux seulement. */
@media (min-width: 760px) {
    .legal-content table {
        display: table;
        border-top: 0;
    }

    .legal-content thead {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip-path: none;
        white-space: normal;
        display: table-header-group;
        background-color: var(--color-navy);
    }

    .legal-content tbody {
        display: table-row-group;
    }

    .legal-content tr {
        display: table-row;
        padding: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .legal-content thead tr {
        border-bottom: 0;
    }

    .legal-content th {
        padding: 14px 18px;
        color: var(--color-white);
        font-family: var(--font-condensed);
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-align: left;
        text-transform: uppercase;
    }

    .legal-content td {
        position: static;
        display: table-cell;
        padding: 16px 18px;
        vertical-align: top;
    }

    .legal-content td[data-label]::before {
        content: none;
    }
}
