/* ===========================================================
   LEGAL PAGES
   - Mentions légales
   - Politique de confidentialité
   - Politique de cookies (Complianz)
   =========================================================== */

.legal-page {
    background: rgb(var(--backgroundLight));
    color: rgb(var(--textColor));
}

.legal-page .content-page {
    padding-bottom: var(--s8);
}

/* wrapper principal : override du style inline du template */
.legal-page .content-page>.container {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding-top: var(--s8) !important;
    padding-right: var(--gutter) !important;
    padding-bottom: 0 !important;
    padding-left: var(--gutter) !important;
}

/* ===========================================================
   ARTICLE = carte apple-ish
   =========================================================== */

.legal-page .content-page article {
    position: relative;
    isolation: isolate;

    width: 100%;
    margin: 0 auto;
    padding: clamp(22px, 3.4vw, 44px);

    border-radius: 34px;
    background: rgb(var(--backgroundLight) / 0.72);
    border: 1px solid rgb(var(--accentColor) / 0.16);

    -webkit-backdrop-filter: blur(14px) saturate(1.08);
    backdrop-filter: blur(14px) saturate(1.08);

    box-shadow:
        0 28px 80px rgb(0 0 0 / 0.12),
        0 8px 20px rgb(0 0 0 / 0.05),
        inset 0 1px 0 rgb(255 255 255 / 0.22);
}

.legal-page .content-page article::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;

    background:
        radial-gradient(120% 90% at 12% 0%, rgb(255 255 255 / 0.26) 0%, transparent 56%),
        radial-gradient(140% 110% at 88% 100%, rgb(0 0 0 / 0.08) 0%, transparent 58%);
    opacity: 0.75;
}

/* ===========================================================
   PAGE TITLE
   =========================================================== */

.legal-page .content-page article>h1:first-child {
    position: relative;
    z-index: 1;

    margin: 0 0 var(--s6);
    text-align: center;

    font-family: var(--fontAccent);
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 0.98;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-wrap: balance;
    color: rgb(var(--textColor));
}

.legal-page .content-page article>h1:first-child::after {
    content: "";
    display: block;
    width: min(520px, 100%);
    height: 2px;
    margin: var(--s4) auto 0;
    border-radius: var(--radius-cut);
    background: rgb(var(--accentColor) / 0.24);
}

/* ===========================================================
   ENTRY CONTENT = pas de carte interne
   =========================================================== */

.legal-page .entry-content,
.legal-page .wp-block-post-content {
    position: relative;
    z-index: 1;

    width: 100%;
    margin: 0;
    padding: 0;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.legal-page .entry-content::before,
.legal-page .wp-block-post-content::before {
    content: none;
}

/* Complianz : on neutralise son conteneur interne */
.legal-page .cmplz-document,
.legal-page .cmplz-document .cmplz-document-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* ===========================================================
   PROSE BASE
   =========================================================== */

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) {
    font-family: var(--fontText);
    color: rgb(var(--textColor) / 0.88);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document)>*:first-child {
    margin-top: 0 !important;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document)>*:last-child {
    margin-bottom: 0 !important;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) p,
.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) li {
    font-family: var(--fontText);
    font-size: 1rem;
    line-height: 1.75;
    color: rgb(var(--textColor) / 0.88);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) p {
    margin: 0 0 var(--s4);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document)>p:first-of-type {
    font-size: clamp(1.04rem, 1.3vw, 1.16rem);
    line-height: 1.8;
    color: rgb(var(--textColor) / 0.92);
}

/* ===========================================================
   HEADINGS INSIDE CONTENT
   =========================================================== */

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) h2 {
    margin: var(--s7) 0 var(--s4);
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(var(--textColor));
    font-size: clamp(1.2rem, 4vw, 1.55rem);
    line-height: 1.15;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) h3 {
    margin: var(--s6) 0 var(--s3);
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(var(--textColor));
    font-size: clamp(1.02rem, 2.4vw, 1.3rem);
    line-height: 1.18;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) h4,
.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) h5,
.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) h6 {
    margin: var(--s5) 0 var(--s2);
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(var(--textColor));
    line-height: 1.2;
}

/* ===========================================================
   LINKS
   =========================================================== */

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) a {
    color: rgb(var(--textColor));
    text-decoration: none;
    border-bottom: 1px solid rgb(var(--accentColor) / 0.45);
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        opacity 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) a:hover {
        color: rgb(var(--accentColor));
        border-color: rgb(var(--accentColor));
    }
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) a:focus-visible {
    outline: 2px solid rgb(var(--accentColor) / 0.45);
    outline-offset: 3px;
}

/* ===========================================================
   LISTS
   =========================================================== */

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) ul,
.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) ol {
    margin: var(--s3) 0 var(--s5);
    padding: 0;
    display: grid;
    gap: var(--s2);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) ul {
    list-style: none;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) ul li {
    position: relative;
    padding-left: calc(var(--s4) + 10px);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid rgb(var(--accentColor) / 0.9);
    background: rgb(var(--accentColor) / 0.18);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) ol {
    list-style: none;
    counter-reset: legal-item;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) ol li {
    position: relative;
    padding-left: var(--s6);
    counter-increment: legal-item;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) ol li::before {
    content: counter(legal-item) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: 0.05em;
    color: rgb(var(--accentColor));
}

/* ===========================================================
   QUOTES
   =========================================================== */

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) blockquote,
.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) .wp-block-quote {
    margin: var(--s6) 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: center;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) blockquote p,
.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) .wp-block-quote p {
    margin: 0;
    display: inline-block;
    position: relative;

    max-width: min(62ch, 100%);
    padding: clamp(16px, 2.4vw, 26px) clamp(18px, 2.8vw, 34px);

    background: rgb(var(--backgroundLight) / 0.70);
    border: 1px solid rgb(var(--accentColor) / 0.14);
    border-radius: 22px;

    -webkit-backdrop-filter: blur(12px) saturate(1.12);
    backdrop-filter: blur(12px) saturate(1.12);

    box-shadow:
        0 18px 46px rgb(0 0 0 / 0.12),
        0 6px 16px rgb(0 0 0 / 0.06),
        inset 0 1px 0 rgb(255 255 255 / 0.22);

    font-family: var(--fontAccent);
    font-style: italic;
    letter-spacing: 0.02em;
    color: rgb(var(--textColor));
    font-size: clamp(1.05rem, 2.4vw, 1.3rem);
    line-height: 1.35;
}

/* ===========================================================
   IMAGES / GALLERIES GUTENBERG
   =========================================================== */

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) figure.wp-block-image {
    margin: var(--s6) 0;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) figure.wp-block-image a,
.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) figure.wp-block-image img {
    display: block;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) figure.wp-block-image a {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    background: rgb(var(--textColor));
    box-shadow: 0 22px 64px rgb(0 0 0 / 0.14);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) figure.wp-block-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) figure.wp-block-image figcaption {
    margin-top: var(--s2);
    text-align: center;
    font-family: var(--fontTitle);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(var(--textColor) / 0.65);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) :where(figure.wp-block-gallery, ul.wp-block-gallery) {
    margin: var(--s6) 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s4);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) :where(figure.wp-block-gallery, ul.wp-block-gallery) :where(figure, li) {
    margin: 0;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) :where(figure.wp-block-gallery, ul.wp-block-gallery) a {
    display: block;
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    background: rgb(var(--textColor));
    box-shadow: 0 22px 64px rgb(0 0 0 / 0.14);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) :where(figure.wp-block-gallery, ul.wp-block-gallery) img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* ===========================================================
   TABLES
   =========================================================== */

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) table {
    width: 100%;
    margin: var(--s6) 0;
    border-collapse: collapse;
    overflow: hidden;

    border-radius: 22px;
    background: rgb(var(--backgroundLight) / 0.62);
    border: 1px solid rgb(var(--accentColor) / 0.14);
    box-shadow:
        0 18px 46px rgb(0 0 0 / 0.08),
        inset 0 1px 0 rgb(255 255 255 / 0.20);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) th,
.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgb(var(--accentColor) / 0.14);
    font-family: var(--fontText);
    line-height: 1.55;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) th {
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(var(--textColor));
    background: rgb(var(--accentColor) / 0.12);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) tr:last-child td {
    border-bottom: 0;
}

/* ===========================================================
   MISC GUTENBERG
   =========================================================== */

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) hr,
.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) .wp-block-separator {
    margin: var(--s7) auto;
    border: 0;
    height: 2px;
    width: min(520px, 100%);
    border-radius: var(--radius-cut);
    background: rgb(var(--accentColor) / 0.22);
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) strong {
    font-weight: 700;
    color: rgb(var(--textColor));
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) em {
    font-style: italic;
}

.legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) :where(.wp-block-columns, .wp-block-group) {
    margin-bottom: var(--s5);
}

/* ===========================================================
   COMPLIANZ SPECIFIC TWEAKS
   =========================================================== */

.legal-page .cmplz-document {
    font-family: var(--fontText);
    color: rgb(var(--textColor) / 0.88);
}

.legal-page .cmplz-document :where(h2, h3, h4, h5, h6) {
    scroll-margin-top: calc(var(--header-h) + var(--s4));
}

.legal-page .cmplz-document table {
    display: table;
}

.legal-page .cmplz-document p:last-child,
.legal-page .cmplz-document ul:last-child,
.legal-page .cmplz-document ol:last-child,
.legal-page .cmplz-document table:last-child {
    margin-bottom: 0;
}

/* ===========================================================
   FALLBACK SANS BACKDROP-FILTER
   =========================================================== */

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .legal-page .content-page article {
        background: rgb(var(--backgroundLight) / 0.94);
    }
}

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

@media (min-width: 768px) {
    .legal-page .content-page>.container {
        padding-top: var(--s9) !important;
    }

    .legal-page .content-page article {
        padding: clamp(26px, 3vw, 52px);
    }
}

@media (min-width: 1024px) {
    .legal-page .content-page>.container {
        width: min(1080px, calc(100% - 2 * var(--gutter)));
    }

    .legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) :where(figure.wp-block-gallery, ul.wp-block-gallery) {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .legal-page :where(.entry-content, .wp-block-post-content, .cmplz-document) a {
        transition: none;
    }
}