/* ============================================================
 * IFLISS GAMES — pages juridiques (/mentions-legales, /cgu, /politique-confidentialite)
 * Même thème que l'accueil : ce fichier s'ajoute à accueil.css, qui fournit les couleurs
 * (.acc / .acc-home : blanc cassé, taupe, violet, bordeaux, --strip-blue), .acc-wrap et
 * .acc-mark (trait fait main). Gabarit : src/Views/juridique/_gabarit.php.
 * CSS simple, sans compilation. Icônes : Bootstrap Icons.
 * ============================================================ */

/* .acc coupe ce qui dépasse avec overflow: hidden, ce qui empêche le sommaire de rester collé :
   overflow: clip coupe pareil sans gêner position: sticky. */
.jr-page { overflow: clip; }

/* ── Bandeau taupe ── */
.jr-hero {
    padding: 22px 0 26px;
    border-bottom: 1px solid #cdbfae;
    background:
        radial-gradient(760px 460px at 82% 45%, rgb(255 250 243 / 0.45), transparent 70%),
        radial-gradient(560px 340px at 0% 100%, rgb(255 250 243 / 0.25), transparent 70%),
        linear-gradient(135deg, #ddd1c3, #cfc0ae 55%, #c3b19d);
}
.jr-fil {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--taupe-ink);
    font-size: 0.8rem;
    font-weight: 600;
}
.jr-fil a { color: var(--taupe-ink); text-decoration: none; }
.jr-fil a:hover { color: var(--strip-blue-solid); }
.jr-fil .bi { font-size: 0.7rem; opacity: 0.7; }
.jr-hero h1 {
    position: relative;
    z-index: 0;
    margin: 0 0 8px;
    color: var(--ink);
    font-size: clamp(1.75rem, 3.8vw, 2.6rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.jr-sous { margin: 0; color: var(--taupe-ink); font-size: 0.98rem; line-height: 1.6; }
.jr-maj {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 14px 0 0;
    padding: 6px 12px;
    border: 1px solid #dccfbf;
    border-radius: 999px;
    background: rgb(251 248 243 / 0.7);
    color: var(--taupe-ink);
    font-size: 0.8rem;
    font-weight: 600;
}
.jr-maj .bi { color: var(--violet-800); }

/* Onglets entre les trois pages (bleu du bandeau « Jeux populaires » pour la page en cours) */
.jr-onglets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.jr-onglet {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 16px;
    border: 1px solid #cdbfae;
    border-radius: 999px;
    background: var(--card);
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.18s, transform 0.18s;
}
.jr-onglet .bi { color: var(--bordeaux); }
.jr-onglet:hover { border-color: var(--strip-blue-solid); transform: translateY(-2px); }
.jr-onglet[aria-current="page"] {
    border-color: var(--strip-blue-solid);
    background: var(--strip-blue);
    box-shadow: 0 12px 22px -14px rgb(28 25 72 / 0.9);
    color: #fff;
}
.jr-onglet[aria-current="page"] .bi { color: #fff; }

/* ── Sommaire collé à gauche + texte ── */
.jr-corps { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; padding: 30px 0 52px; }

.jr-sommaire {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 110px);
    overflow: auto;
    padding: 16px 12px;
    border: 1px solid #dccfbf;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 16px 32px -26px rgb(70 50 35 / 0.6);
    scrollbar-width: thin;
}
.jr-sommaire summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 4px 10px;
    color: var(--bordeaux);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    list-style: none;
    cursor: default;
}
.jr-sommaire summary::-webkit-details-marker { display: none; }
.jr-sommaire-fleche { display: none; margin-left: auto; transition: transform 0.2s; }
.jr-sommaire ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.jr-sommaire a {
    display: block;
    padding: 7px 10px;
    border-left: 3px solid transparent;
    border-radius: 0 10px 10px 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color 0.18s, border-color 0.18s, color 0.18s;
}
.jr-sommaire a:hover { background: var(--paper); color: var(--ink); }
.jr-sommaire a[aria-current="location"] { border-left-color: var(--violet-600); background: var(--violet-50); color: var(--violet-800); }

.jr-colonne { min-width: 0; }
.jr-texte {
    padding: 32px 40px;
    border: 1px solid #dccfbf;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 20px 40px -30px rgb(70 50 35 / 0.6);
    color: #3f3650;
    font-size: 0.98rem;
    line-height: 1.8;
}
.jr-texte p { max-width: 75ch; margin: 0 0 14px; }
.jr-texte h2 {
    scroll-margin-top: 96px;
    margin: 34px 0 12px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 1.22rem;
    font-weight: 900;
    line-height: 1.3;
}
.jr-texte > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.jr-texte strong { color: var(--ink); }
.jr-texte ul { display: grid; gap: 8px; max-width: 75ch; margin: 0 0 16px; padding: 0; list-style: none; }
.jr-texte li { position: relative; padding-left: 22px; }
.jr-texte li::before {
    content: "";
    position: absolute;
    top: calc(0.9em - 3.5px);
    left: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--violet-400);
}
.jr-texte a {
    color: var(--violet-800);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgb(74 47 148 / 0.3);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
.jr-texte a:hover { color: var(--red); text-decoration-color: currentColor; }

/* ── Encadré contact sous le texte ── */
.jr-aide {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid var(--violet-100);
    border-radius: 18px;
    background: var(--violet-50);
}
.jr-aide > .bi {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--violet-100);
    color: var(--violet-800);
    font-size: 1.15rem;
}
.jr-aide-texte { flex: 1 1 240px; margin: 0; line-height: 1.5; }
.jr-aide-texte strong { display: block; color: var(--ink); font-size: 0.98rem; }
.jr-aide-texte span { display: block; color: var(--ink-soft); font-size: 0.86rem; overflow-wrap: anywhere; }
.jr-aide-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.jr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 18px;
    border: 2px solid transparent;
    border-radius: 999px;
    font: 700 0.88rem 'Lexend', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.18s, border-color 0.18s;
}
.jr-btn-primary { background: var(--strip-blue); box-shadow: 0 12px 22px -14px rgb(28 25 72 / 0.9); color: #fff; }
.jr-btn-primary:hover { background: var(--strip-blue-hover); transform: translateY(-2px); }
.jr-btn-outline { border-color: rgb(42 33 115 / 0.35); background: var(--card); color: var(--strip-blue-solid); }
.jr-btn-outline:hover { border-color: var(--strip-blue-solid); transform: translateY(-2px); }

@media (prefers-reduced-motion: no-preference) {
    html:has(.jr-page) { scroll-behavior: smooth; }
}

/* ── Écrans étroits : sommaire replié au-dessus du texte ── */
@media (max-width: 960px) {
    .jr-corps { grid-template-columns: 1fr; gap: 14px; padding-top: 20px; }
    .jr-sommaire { position: static; max-height: none; padding: 0; }
    .jr-sommaire summary { margin: 0; padding: 14px 16px; cursor: pointer; font-size: 0.8rem; }
    .jr-sommaire-fleche { display: inline-block; }
    .jr-sommaire[open] .jr-sommaire-fleche { transform: rotate(180deg); }
    .jr-sommaire ol { padding: 0 10px 12px; }
}
@media (max-width: 640px) {
    .jr-hero { padding: 16px 0 20px; }
    .jr-onglets { gap: 6px; margin-top: 14px; }
    .jr-onglet { min-height: 40px; padding: 7px 12px; font-size: 0.8rem; }
    .jr-corps { padding-bottom: 36px; }
    .jr-texte { padding: 20px 18px; border-radius: 18px; font-size: 0.94rem; line-height: 1.75; }
    .jr-texte h2 { margin-top: 26px; padding-top: 20px; font-size: 1.08rem; }
    .jr-aide-actions { width: 100%; }
    .jr-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .jr-onglet, .jr-btn, .jr-sommaire a, .jr-sommaire-fleche { transition: none; }
}
