/* 📜 LA PEAU CLAIRE - Module Droit */
/* Interdiction : Dimensions, Positionnement */

body {
    background: #f2eee6; /* Beige Officiel */
    color: #492e1c; /* Marron Officiel */
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, .btn-retour-inside, .legal-tabs div {
    font-family: 'Outfit', sans-serif;
}

#stars-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at center, #1a1b23 0%, #0f0f11 100%);
    pointer-events: none; /* Ne bloque pas le scroll */
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.3;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* === BOUTON RETOUR (Dans la Modale) === */
.btn-retour-inside {
    position: absolute;
    top: 25px;
    left: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: #492e1c;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(73, 46, 28, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.btn-retour-inside:hover {
    background: #492e1c;
    color: #f2eee6;
    transform: translateX(-3px);
    box-shadow: 0 5px 15px rgba(73, 46, 28, 0.2);
}

/* === LAYOUT DROIT : MONOLITHE CENTRÉ === */

.legal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 60px 20px;
    box-sizing: border-box;
}

/* Onglets de Navigation Supérieurs */
.legal-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    background: #ffffff;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(73, 46, 28, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid #492e1c;
}

.legal-tabs a, .legal-tabs div {
    text-decoration: none;
    color: #492e1c;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-tabs a i, .legal-tabs div i {
    font-size: 1.2rem;
    opacity: 0.8;
}

.legal-tabs a:hover, .legal-tabs div:hover {
    background: rgba(73, 46, 28, 0.08);
    transform: translateY(-2px);
}

.legal-tabs a.active, .legal-tabs div.active {
    background: #492e1c;
    color: #f2eee6;
    box-shadow: 0 8px 20px rgba(73, 46, 28, 0.4);
}

/* Conteneur du Document Principal */
.legal-container {
    background: #f2eee6; /* Beige Solcia Officiel */
    width: 100%;
    max-width: 950px;
    border-radius: 20px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(73, 46, 28, 0.15);
    position: relative;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Piliers de Prestige (Sommaire) - Passage à 5 colonnes */
.legal-pillars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 30px;
    background: #F6F3ED;
    border-bottom: 1px solid rgba(73, 46, 28, 0.08);
    margin-top: 40px;
}

/* Chapitres Juridiques (Tomes) */
.legal-content {
    padding: 0;
}

.legal-chapter {
    margin-top: 0;
    padding: 30px;
    border: 1px solid rgba(73, 46, 28, 0.1);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
}

.legal-chapter:last-of-type {
    margin-bottom: 20px;
}

.chapter-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.chapter-header span {
    font-size: 0.8rem;
    font-weight: 800;
    color: #492e1c;
    text-transform: uppercase;
    letter-spacing: 4px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.7;
}

.chapter-header h2 {
    font-size: 1.8rem !important;
    color: #492e1c !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    text-transform: uppercase;
    display: block;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    line-height: 1.25;
}

.chapter-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #492e1c;
    margin: 20px auto 0;
}

.pillar-card {
    text-decoration: none;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(73, 46, 28, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(73, 46, 28, 0.15);
    border-color: #492e1c;
    background: #ffffff;
}

.pillar-card.active::after {
    width: 100%;
}

.pillar-card i {
    font-size: 1.5rem;
    color: #492e1c;
    margin-bottom: 5px;
}

.pillar-card span.pillar-num {
    font-size: 0.75rem;
    font-weight: 800;
    color: #5c4030;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 1;
}

.pillar-card h3 {
    font-size: 0.95rem;
    color: #492e1c;
    margin: 0;
    font-weight: 700;
}

.pillar-card p {
    font-size: 0.75rem !important;
    color: #492e1c !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    text-align: left !important;
    opacity: 0.7;
}

.pillar-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: #492e1c;
    transition: width 0.3s ease;
}

.pillar-card:hover::after {
    width: 100%;
}

.legal-content {
    padding: 0 100px 0 100px;
}

@media screen and (max-width: 1024px) {
    .legal-content {
        padding: 0 16px;
    }
}

header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(73, 46, 28, 0.1);
    margin-bottom: 30px;
}

header .shield-logo {
    width: 180px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 5px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

header h1 {
    font-size: 2.5rem;
    color: #492e1c;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 800;
    margin-top: 0;
}

header p {
    color: #492e1c;
    font-style: italic;
    margin-top: 15px;
    font-size: 1.1rem;
    opacity: 0.8;
}

section {
    margin-bottom: 50px;
    scroll-margin-top: 30px;
}

section:last-child {
    margin-bottom: 0;
}

section h2 {
    color: #492e1c;
    font-size: 1.6rem;
    border-bottom: 1px solid rgba(73, 46, 28, 0.3);
    padding-bottom: 12px;
    margin-bottom: 25px;
    font-weight: 700;
}

.article-body p {
    line-height: 1.8;
    color: #492e1c;
    text-align: start;
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.article-body p:last-child {
    margin-bottom: 0;
}

.legal-chapter:last-child {
    margin-bottom: 0;
}

/* Footer Minimaliste & Raffiné */
footer {
    padding: 30px 40px 0 40px;
    background: transparent;
    border-top: 1px solid rgba(73, 46, 28, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #492e1c;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.footer-top span {
    opacity: 1;
    color: #5c4030;
}

.footer-bottom {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-bottom p {
    margin: 0 !important;
    font-size: 0.75rem !important;
    color: #5c4030 !important;
    letter-spacing: 1px;
    opacity: 1;
}

.footer-bottom .separator {
    width: 1px;
    height: 12px;
    background: #492e1c;
    opacity: 0.2;
}

.disclaimer {
    font-size: 0.75rem !important;
    color: #5c4030 !important;
    font-style: italic !important;
    text-align: center !important;
    line-height: 1.6 !important;
    max-width: 600px;
    margin-bottom: 0 !important;
}

/* === Charte : mode simple / technique === */
.legal-mode-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    background: #ffffff;
    padding: 8px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(73, 46, 28, 0.1);
    border: 1px solid #492e1c;
    max-width: 520px;
    width: 100%;
}

.legal-mode-bar div {
    flex: 1;
    text-align: center;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    color: #492e1c;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.legal-mode-bar div:hover {
    background: rgba(73, 46, 28, 0.08);
}

.legal-mode-bar div.active {
    background: #492e1c;
    color: #f2eee6;
    box-shadow: 0 8px 20px rgba(73, 46, 28, 0.35);
}

.charte-mode {
    display: none;
    width: 100%;
    max-width: 950px;
}

.charte-mode--active {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.legal-container--simple {
    padding-bottom: 20px;
}

.charte-simple-body {
    padding: 0 40px 30px;
}

.charte-simple-notice {
    margin: 0 40px 24px;
    padding: 1rem 1.25rem;
    border: 2px solid #492e1c;
    border-radius: 12px;
    background: rgba(242, 238, 230, 0.85);
    font-size: 0.92rem;
    line-height: 1.55;
    color: #492e1c;
}

.charte-simple-section {
    margin-bottom: 2.5rem;
}

.charte-simple-section h2 {
    font-size: 1.35rem;
    color: #492e1c;
    margin: 0 0 1rem;
    border-bottom: 2px solid rgba(73, 46, 28, 0.2);
    padding-bottom: 0.5rem;
}

.charte-simple-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    color: #492e1c;
    margin: 0 0 1rem;
}

.charte-simple-list {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    line-height: 1.7;
    color: #492e1c;
}

.charte-simple-list li {
    margin-bottom: 0.5rem;
}

.charte-schema {
    border: 1px solid rgba(73, 46, 28, 0.2);
    border-radius: 14px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.55);
    margin: 1rem 0;
}

.charte-schema-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #5c4030;
    opacity: 1;
    margin: 0 0 1rem;
    text-align: center;
}

.charte-schema-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
}

.charte-schema-node {
    flex: 1 1 120px;
    max-width: 200px;
    min-width: 100px;
    padding: 0.85rem 0.75rem;
    border-radius: 10px;
    border: 2px solid #492e1c;
    background: #fff;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #492e1c;
    line-height: 1.35;
}

.charte-schema-node small {
    display: block;
    font-weight: 400;
    font-size: 0.72rem;
    opacity: 0.75;
    margin-top: 0.35rem;
}

.charte-schema-node--hub {
    background: #492e1c;
    color: #f2eee6;
    flex: 1 1 100%;
    max-width: 220px;
}

.charte-schema-arrow {
    font-size: 1.25rem;
    color: #5c4030;
    opacity: 1;
    flex-shrink: 0;
}

.charte-schema-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.charte-schema-zone {
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.88rem;
    line-height: 1.5;
}

.charte-schema-zone--forbidden {
    border: 2px solid #a93226;
    background: rgba(169, 50, 38, 0.08);
    color: #3a2418;
}

.charte-schema-zone--allowed {
    border: 2px solid #1e7a45;
    background: rgba(30, 122, 69, 0.08);
    color: #3a2418;
}

.charte-schema-zone h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: inherit;
}

.charte-shield-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.charte-shield-card {
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
}

.charte-shield-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: #fff;
}

.charte-shield-card ul {
    margin: 0;
    padding-left: 1rem;
}

/* Fonds assombris pour contraste AA (≥ 4.5:1) avec texte blanc */
.charte-shield-card--blue { background: #1e6fa5; }
.charte-shield-card--green { background: #1e7a45; }
.charte-shield-card--brown { background: #492e1c; }

.charte-vigikid-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 1rem;
}

.charte-vigikid-col {
    flex: 1 1 200px;
    max-width: 280px;
    border: 2px solid #3498da;
    border-radius: 12px;
    padding: 1rem;
    background: rgba(52, 152, 218, 0.08);
}

.charte-vigikid-col h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: #492e1c;
}

.charte-vigikid-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #492e1c;
    opacity: 0.8;
    min-width: 80px;
}

.charte-accounts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.charte-account-card {
    border: 1px solid rgba(73, 46, 28, 0.25);
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    font-size: 0.85rem;
    line-height: 1.45;
}

.charte-account-card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: #492e1c;
}

.charte-simple-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    padding: 12px 22px;
    border-radius: 10px;
    border: 2px solid #492e1c;
    background: transparent;
    color: #492e1c;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.25s ease;
}

.charte-simple-cta:hover {
    background: #492e1c;
    color: #f2eee6;
}

.tech-schema-overview {
    margin: 0 40px 24px;
    padding: 1.25rem;
    border: 1px solid rgba(73, 46, 28, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.4);
}

.charte-complet-lead {
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    color: #492e1c;
}

.charte-complet-sources {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px dashed rgba(73, 46, 28, 0.35);
    background: rgba(246, 241, 234, 0.85);
    font-size: 0.82rem;
    line-height: 1.45;
}

.charte-complet-sources p {
    margin: 0;
}

.tech-schema-overview h2 {
    font-size: 1.1rem;
    text-align: center;
    margin: 0 0 1rem;
    color: #492e1c;
    border: none;
    padding: 0;
}

.tech-schema-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.tech-schema-map {
    grid-column: 1 / -1;
}

.charte-mode--active .legal-tabs {
    margin-left: auto;
    margin-right: auto;
}

.simple-category-container {
    display: none;
}

.simple-category-container.active {
    display: block;
}

.charte-simple-cta--inline {
    display: inline-flex;
    margin-top: 0;
    padding: 4px 12px;
    font-size: 0.85rem;
    vertical-align: middle;
}

#pillars-pro.legal-pillars {
    grid-template-columns: repeat(5, 1fr);
}

@media screen and (max-width: 1024px) {
    #pillars-pro.legal-pillars {
        grid-template-columns: repeat(2, 1fr);
    }
}

#simple-legal-tabs.legal-tabs,
#tech-legal-tabs.legal-tabs {
    max-width: 950px;
    flex-wrap: wrap;
    justify-content: center;
}

.charte-topic-block {
    margin-bottom: 1.35rem;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(73, 46, 28, 0.15);
    background: rgba(255, 255, 255, 0.45);
}

.charte-topic-block h3 {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    color: #492e1c;
    font-family: 'Outfit', sans-serif;
}

.charte-topic-block ul {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.65;
    font-size: 0.92rem;
    color: #492e1c;
}

.charte-topic-block li {
    margin-bottom: 0.35rem;
}

.charte-checklist {
    list-style: none;
    padding-left: 0;
}

.charte-checklist li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.4rem;
}

.charte-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: 700;
}

.charte-tech-sommaire {
    margin: 0 40px 1.5rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    border: 1px dashed rgba(73, 46, 28, 0.35);
    background: rgba(255, 255, 255, 0.35);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #492e1c;
}

.charte-tech-sommaire h3 {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.charte-tech-sommaire ul {
    margin: 0;
    padding-left: 1.15rem;
}

.charte-tech-sommaire li {
    margin-bottom: 0.3rem;
}

