/**
 * @copyright (C) 2022, 299Ko, based on code (2010-2021) 99ko https://github.com/99kocms/
 * @license https://www.gnu.org/licenses/gpl-3.0.en.html GPLv3
 * @author Jonathan Coulet <j.coulet@gmail.com>
 * @author Maxence Cauderlier <mx.koder@gmail.com>
 * @author Frédéric Kaplon <frederic.kaplon@me.com>
 * @author Florent Fortat <florent.fortat@maxgun.fr>
 * @author ShevAbam <me@shevarezo.fr>
 * 
 * @package 299Ko https://github.com/299Ko/299ko
 */

/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
progress,
sub,
sup {
    vertical-align: baseline
}

*,
::after,
::before {
    box-sizing: border-box
}

html {
    font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    height: 100%;
}

body {
    margin: 0
}

hr {
    height: 0;
    color: inherit
}

abbr[title] {
    text-decoration: underline dotted
}

b,
strong {
    font-weight: bolder
}

code,
kbd,
pre,
samp {
    font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1em
}

small {
    font-size: 80%
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative
}

sub {
    bottom: -.25em
}

sup {
    top: -.5em
}

table {
    text-indent: 0;
    border-color: inherit
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0
}

button,
select {
    text-transform: none
}

[type=button],
[type=reset],
[type=submit],
button {
    -webkit-appearance: button;
    appearance: button;
}

::-moz-focus-inner {
    border-style: none;
    padding: 0
}

:-moz-focusring {
    outline: ButtonText dotted 1px
}

:-moz-ui-invalid {
    box-shadow: none
}

legend {
    padding: 0
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
    height: auto
}

[type=search] {
    -webkit-appearance: textfield;
    appearance: textfield;
    outline-offset: -2px
}

::-webkit-search-decoration {
    -webkit-appearance: none
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit
}

summary {
    display: list-item
}

:root {
    /* DEFAULT COLORS: MIDNIGHT FOREST & GOLD (Based on Landing) */
    --font-color: #1E2733;
    --font-size: 18px;
    --font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;

    --background-color: #F9F7F2;
    --section-bg-color: #FFFFFF;
    --section-head-bg-color: #F3F1EB;

    --primary-color: #14362E;
    --primary-hover-color: #0D2B24;
    --primary-inverse-color: #fff;

    --accent-color: #D4A373;
    --accent-hover-color: #C39262;

    --header-bg-color: #FFFFFF;
    --header-links-color: #14362E;

    /* Dark Mode Defaults */
    --dark-font-color: #F8F7F4;
    --dark-background-color: #051210;
    --dark-section-bg-color: #0D2B24;
    --dark-section-head-bg-color: #14362E;
    --dark-primary-color: #D4A373;
    --dark-primary-hover-color: #C39262;
    --dark-header-bg-color: #051210;
    --dark-header-links-color: #D4A373;

    /* Original utility variables kept for compatibility */
    --panel-radius: 12px;
    --panel-border: rgba(0, 0, 0, 0.08);
    --panel-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --text-muted: #6B7280;
    --section-radius: 16px;
    --section-padding: 30px;
    --section-inverse-padding: -30px;

    --success-color: #7cb342;
    --alert-color: #e53935;
    --infos-color: #757575;
    --warning-color: #f4511e;

    --header-width-container: 1400px;
    --body-width-container: 1100px;
    --body-bg-color: transparent;

    --form-border-color: #E5E7EB;
    --form-bg-color: #FFFFFF;

    /* Hero Offset Variables */
    --hero-offset-x: -0.1em;
    --hero-offset-y: -0.25em;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
.theme-dark,
.theme-dark body {
    --font-color: var(--dark-font-color);
    --background-color: var(--dark-background-color) !important;
    --section-bg-color: var(--dark-section-bg-color);
    --section-head-bg-color: var(--dark-section-head-bg-color);
    --primary-color: var(--dark-primary-color);
    --primary-hover-color: var(--dark-primary-hover-color);
    --header-bg-color: var(--dark-header-bg-color);
    --header-links-color: var(--dark-header-links-color);
    --form-border-color: rgba(255, 255, 255, 0.1);
    --form-bg-color: var(--dark-section-bg-color);
    background-color: var(--dark-background-color) !important;
}

/* BASIC */

html {
    scroll-padding-top: 48px;
    /* Hauteur du header pour les ancres */
    overflow-anchor: none;
    /* Prévenir les sauts de scroll sur mobile */
    scroll-behavior: auto;
    /* Désactiver scroll-behavior smooth pour éviter les bugs */
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size);
    color: var(--font-color);
    background: var(--background-color);
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    line-height: 1.4;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

a,
a:hover,
a:active,
a:visited {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.4s ease-in-out;
}

a:hover {
    color: var(--primary-hover-color);
}

h1 {
    margin: 0;
    padding: 0;
}

h2 {
    font-size: 30px;
    font-weight: normal
}

h3 {
    font-size: 22px;
    font-weight: normal;
    font-style: italic
}

ul,
ol {
    margin-left: 0;
    list-style: circle outside;
}

hr {
    background: #e9e9e9;
    height: 1px;
    border: 0;
    margin: 30px 0
}

img {
    max-width: 100%;
    height: auto;
}

figure.image {
    background-color: var(--background-color);
    border-radius: var(--section-radius);
    padding: 0;
}

figure.image figcaption {
    padding: 15px;
    border-top: 1px solid rgba(127, 127, 127, 0.1);
    text-align: center;
}

table {
    width: 100%;
    border: 1px solid #e9e9e9
}

tr {
    border-bottom: 1px solid #e9e9e9
}

tr:last-child {
    border-bottom: 0
}

tr:nth-child(even) {
    background: #fefae2
}

th,
td {
    text-align: left;
    padding: 5px
}

/* FORM */

input[type=text],
input[type=email],
input[type=password],
input[type=url],
input[type=number],
input[type=date],
select {
    border: 1px solid var(--form-border-color);
    padding: 15px;
    width: 100%;
    margin: 10px 0;
    border-radius: var(--section-radius);
    color: var(--font-color);
    transition: all 0.5s ease;
    background: var(--form-bg-color);
}

textarea {
    font-size: 18px;
    color: var(--font-color);
    border: 1px solid #d0d0d0;
    padding: 15px;
    width: 100%;
    min-height: 250px;
    border-radius: var(--section-radius);
    transition: all 0.5s ease;
    margin: 10px 0;
}

input:focus,
textarea:focus {
    outline: none;
}

input:not([type="submit"], [type="button"], [type="reset"], [type="range"], [type="file"], [readonly]):focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 4px var(--primary-color);
}

input[type=submit],
input[type=button],
button,
.button,
[type="file"]::file-selector-button,
.button:visited {
    text-decoration: none;
    margin: 0;
    padding: 10px 20px;
    border: 0;
    cursor: pointer;
    background: var(--primary-color);
    color: var(--primary-inverse-color);
    border-radius: var(--section-radius);
    transition: background-color 0.5s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: inline-block;
    line-height: 23px;
}

input[type=submit].small,
input[type=button].small,
button.small,
.button.small,
[type="file"].small::file-selector-button {
    padding: 5px 10px;
    font-size: 0.8em;
}

input[type=submit]:hover,
input[type=button]:hover,
button:hover,
.button:hover,
[type="file"]::file-selector-button:hover {
    background: var(--primary-hover-color);
    color: #fff;
}

input[type=submit].alert,
input[type=button].alert,
button.alert,
.button.alert {
    background: var(--alert-color);
    color: #fff;
}

input[type=submit].alert:hover,
input[type=button].alert:hover,
button.alert:hover,
.button.alert:hover {
    background: var(--alert-hover-color);
}

input[type=submit].success,
input[type=button].success,
button.success,
.button.success {
    background: var(--success-color);
}

input[type=submit].success:hover,
input[type=button].success:hover,
button.success:hover,
.button.success:hover {
    background: var(--success-hover-color);
}


input[type=submit].active,
input[type=button].active,
button.active,
.button.active {
    background: #14161a;
}

[type="file"]::file-selector-button {
    margin: 10px;
}

/* CODE */

pre {
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -o-pre-wrap;
}

code,
pre {
    font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace
}

/* Helpers */

.align-left {
    float: left;
}

.align-right {
    float: right;
}

.align-center {
    text-align: center;
}

.align-justify {
    text-align: justify;
}

/* ALERT */

#alert-msg {
    margin: 0;
    position: absolute;
    width: 100%;
    top: 0;
    padding: 5px;
    text-align: center;
    left: 0;
}

.msg,
.msg.info,
div.info,
div.success,
div.warning,
div.error {
    position: relative;
    margin: 18px auto;
    padding: 25px 20px;
    padding-left: 42px;
    border-radius: 4px;
    border-left: 12px solid var(--infos-hover-color);
    max-width: 800px;
    box-shadow: 0px 0 10px 5px rgba(0, 0, 0, 0.2);
    background-color: var(--infos-color);
    color: #fff;
    font-size: 18px;
}

.msg,
.msg.info {
    z-index: 995;
}

#alert-msg .msg {
    z-index: 996;
}

.msg:before,
.msg.info:before,
div.info:before,
div.success:before,
div.warning:before,
div.error:before {
    font: var(--fa-font-solid);
    content: "\f05a";
    font-size: 23px;
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto 0;
    height: fit-content;
    left: 10px;
    color: #fff;
}

.msg.success,
div.success {
    background-color: var(--success-color);
    border-left-color: var(--success-hover-color);
}

.msg.success:before,
div.success:before {
    content: "\f058";
}

.msg.error,
div.error {
    background-color: var(--alert-color);
    border-left-color: var(--alert-hover-color);
}

.msg.error:before,
div.error:before {
    content: "\f057";
}

.msg.warning,
div.warning {
    background-color: var(--warning-color);
    border-left-color: var(--warning-hover-color);
}

.msg.warning:before,
div.warning:before {
    content: "\f06a";
}

.msg a.msg-button-close {
    display: block;
    width: 16px;
    height: 16px;
    position: absolute;
    right: 8px;
    top: 8px;
    opacity: 1;
    font-size: 15px;
    transition: all 0.4s ease-in-out;
    color: #fff;
}

.msg a.msg-button-close:hover {
    opacity: 0.7;
}

/* STRUCTURE */

#container {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

#header {
    width: 100%;
    position: fixed;
    background: var(--header-bg-color);
    box-shadow: 0px 0px 20px 10px rgba(0, 0, 0, 0.10);
    z-index: 995;
}

#header_content {
    max-width: var(--header-width-container);
    margin: 0 auto;
    padding: 0 20px;
    font-size: var(--header-font-size);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
}

/* Auth Links Alignment */
.nav-auth-links {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.nav-auth-links a {
    padding: 10px 15px !important;
    /* Force padding for better hit area */
    display: inline-block;
}

#header_content a {
    padding: 15px 10px;
    display: inline-block;
    color: var(--header-links-color);
    transition: all 0.4s ease-in-out;
}

#header_content a:hover {
    color: var(--primary-color);
}

#header_content ul {
    list-style: none;
    margin: 0;
}

#header_content li {
    display: inline-block;
}

#body {
    max-width: var(--body-width-container);
    background: var(--body-bg-color);
    margin: 30px auto;
    padding: 0;
    flex: 1 0 auto;
    width: 100%;
}

#content {
    flex-shrink: 3;
    flex-grow: 1;
    max-width: 100%;
}

#body-page {
    display: flex;
    align-items: flex-start;
}

#modulesSidebar {
    min-width: var(--sidebar-min-width);
    max-width: var(--sidebar-max-width);
    order: var(--sidebar-order);
    margin-left: 20px;
    font-size: 16px;
}

.sidebarModuleContent {
    margin: -20px;
}

#modulesSidebar .sidebarModule>header {
    padding: 10px;
}

.sidebarModuleContent ul {
    padding-left: 14px;
}

#footer {
    font-size: 12px;
    text-align: center;
    background: var(--section-head-bg-color);
    padding: 60px 15px;
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid var(--panel-border);
}

#footer_content {
    max-width: var(--body-width-container);
    margin: 0 auto;
}

.footer-inner {
    padding: 0 20px;
}

/* MENU */

/* Unified Navigation CSS in Mobile Menu Section below */


/* Consolidated in Navigation Section */


.brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

#siteName {
    display: block;
    margin: 0;
    font-weight: bold;
    font-size: 1.4rem;
}

.brand-meta {
    font-size: 0.7rem;
    opacity: 0.7;
    font-weight: normal;
}

.hero-inner {
    max-width: var(--body-width-container);
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

#siteDesc {
    flex: 1;
    align-self: center;
    text-align: center;
    text-shadow: #333 0px 0 10px;
    color: #fff;
    max-width: 800px;
    margin: 0 auto;
}

#pageTitle {
    background: var(--section-bg-color);
    border-radius: var(--section-radius);
    box-shadow: 0 1px 0 0 rgba(238, 238, 238, 0.6);
    margin: 30px 5px;
    padding: var(--section-padding);
    border: 1px solid #efefef;
}

/* SITE NAME */

/* Section, Articles and .card */

section,
article,
.card,
.content-panel {
    background: var(--section-bg-color);
    border-radius: var(--section-radius);
    box-shadow: var(--panel-shadow);
    border: 1px solid var(--panel-border);
    margin: 30px 5px;
    padding: var(--section-padding);
}

section>header,
article>header,
.card>header {
    background-color: var(--section-head-bg-color);
    margin: var(--section-inverse-padding);
    margin-bottom: 30px;
    border: 1px solid rgba(100, 100, 100, 0);
    border-bottom: 1px solid var(--panel-border);
    border-radius: var(--section-radius) var(--section-radius) 0 0;
    padding-bottom: var(--section-padding);
}

section>header>div,
article>header>div,
.card>header>div {
    margin-left: var(--section-padding);
    margin-right: var(--section-padding);
}

.user-auth-form {
    max-width: 640px;
    margin: 30px auto;
    padding: 30px;
}

.user-auth-form form p,
.user-auth-form form fieldset {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.user-auth-form input[type="text"],
.user-auth-form input[type="email"],
.user-auth-form input[type="password"] {
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    padding: 12px 16px;
    font-size: 1rem;
}

.user-auth-form fieldset {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 16px;
}

.user-auth-form fieldset legend {
    font-weight: 600;
    padding: 0 6px;
}

.user-auth-form .button {
    align-self: flex-start;
}

.hp-field {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

section>header>.featured,
article>header>.featured,
.card>header>.featured {
    margin: 0 0 30px 0;
    width: 100%;
}

section:after,
article:after,
.card:after {
    content: '';
    display: block;
    clear: both;
}

section>footer,
article>footer,
.card>footer {
    background-color: var(--section-head-bg-color);
    margin: -30px;
    padding: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(100, 100, 100, 0.1);
    border-radius: 0 0 var(--section-radius) var(--section-radius);
}

section+section,
article+article,
.card+.card,
section+article,
section+.card,
article+section,
article+.card,
.card+section,
.card+article {
    margin-top: 50px;
}

/* TOP BANNER */

#banner {
    height: 350px;
    background: url('../img/header.jpg') no-repeat center;
    background-size: cover;
    display: flex;
    position: relative;
}

/* PLUGINS */

/* Commun */

.featured {
    display: block;
    margin: 0 auto;
}

.pagination {
    font-size: 12px;
    margin-left: 0;
    padding-left: 0;
    list-style: none inside;
    float: right;
}

.pagination li {
    float: left;
    margin-right: 5px;
}

.pagination a {
    display: block;
    text-decoration: none;
    margin: 0;
    padding: 15px;
    background: var(--primary-color);
    color: var(--primary-inverse-color);
}

.pagination a:hover {
    background: var(--primary-hover-color);
}

.comments-list:first-child {
    padding-left: 0;
}

.comments-list {
    list-style-type: none;
    padding-left: 25px;
}

article.comment {
    border: none;
    padding: 0;
    margin-top: 30px;
    margin: 50px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(125, 125, 125, 0.3);
    border-bottom-color: rgba(125, 125, 125, 0.3);
    border-radius: 0;
}

.comments-item {
    margin-bottom: 30px;
}

.comment-author {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    padding-top: 2px;
}

.comment-metadata {
    font-size: 15px;
}

.comment-author a,
.comment-metadata a {
    color: var(--header-links-color);
}

.comment-avatar {
    float: left;
    margin-right: 10px;
}

.comment-avatar>img {
    max-width: 50px;
    border-radius: 50%;
}

.comment-content {
    margin: 25px 0;
    font-size: 18px;
}

.comment-recent {
    font-size: 14px;
}

/* Contact */

.contact .acceptation {
    font-size: 12px;
    padding: 15px;
    border: 1px solid #e9e9e9;
    background: #f7f7f7;
}

.contact .acceptation input {
    margin-right: 5px;
}

/* Custom Checkbox & radio */

[type=checkbox],
[type=radio] {
    --border-width: 2px;
    --border-color: #ddd;
    padding: 0;
}

[type=checkbox] {
    --border-width: 3px;
}

[type=checkbox],
[type=radio] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 1.25em;
    height: 1.25em;
    margin-top: -0.125em;
    margin-right: 0.375em;
    margin-left: 0;
    -webkit-margin-start: 0;
    margin-inline-start: 0;
    -webkit-margin-end: 0.375em;
    margin-inline-end: 0.375em;
    border-width: var(--border-width);
    font-size: inherit;
    vertical-align: middle;
    cursor: pointer;
}

[type=checkbox]::-ms-check,
[type=radio]::-ms-check {
    display: none;
}

[type=checkbox]:checked,
[type=checkbox]:checked:active,
[type=checkbox]:checked:focus,
[type=radio]:checked,
[type=radio]:checked:active,
[type=radio]:checked:focus {
    --background-color: var(--primary-color);
    --border-color: var(--primary-color);
}

[type=checkbox]~label,
[type=radio]~label {
    display: inline-block;
    margin-right: 0.375em;
    margin-bottom: 0;
    cursor: pointer;
}

[type=radio] {
    border-radius: 50%;
    border: var(--border-width) solid var(--border-color);
}

[type=radio]:checked,
[type=radio]:checked:active,
[type=radio]:checked:focus {
    --background-color: #fff;
    border-width: 0.35em;
    background-image: none;
}

[type=checkbox] {
    --background-color: #ddd;
    width: 2.25em;
    height: 1.25em;
    border: var(--border-width) solid transparent;
    border-radius: 1.25em;
    background-color: var(--background-color);
    line-height: 1.25em;
    transition: all 0.3s ease-in-out;
}

[type=checkbox]:focus {
    --background-color: #ccc;
    --border-color: #ccc;
}

[type=checkbox]:checked {
    --background-color: var(--primary-color);
    --border-color: var(--primary-color);
}

[type=checkbox]:before {
    display: block;
    width: calc(1.25em - (var(--border-width) * 2));
    height: 100%;
    border-radius: 50%;
    background-color: #fff;
    content: "";
    transition: margin 0.1s ease-in-out;
}

[type=checkbox]:checked {
    background-image: none;
}

[type=checkbox]:checked::before {
    margin-left: calc(1.125em - var(--border-width));
    -webkit-margin-start: calc(1.125em - var(--border-width));
    margin-inline-start: calc(1.125em - var(--border-width));
}

/** Table Of Content */

#content .toc-container {
    float: right;
    max-width: 33%;
    border: 1px solid #efefef;
    border-radius: var(--section-radius);
    margin: 0 0 10px 10px;
}

#content .toc-container h4 {
    padding: 10px;
    background-color: var(--section-head-bg-color);
    margin: 0;
    font-size: 14px;
}

.toc-container summary {
    list-style-type: none;
}

.toc-container summary::marker,
.toc-container summary::-webkit-details-marker {
    display: none;
}

[class^="toc-level-"] {
    font-size: 12px;
    list-style-type: none;
    line-height: 1.5;
    padding-left: 10px;
}

.toc-level-1 {
    font-size: 16px;
}

.toc-level-2 {
    font-size: 15px;
}

.toc-level-3 {
    font-size: 14px;
}

.toc-level-4 {
    font-size: 13px;
}

.toc-level-5 {
    font-size: 12px;
}

.toc-level-6 {
    font-size: 11px;
}

/* MOBILE */

@media only screen and (max-width: 960px) {

    #header {
        position: inherit;
    }

    #header_content {
        display: block;
    }

    #siteName {
        width: 100%;
    }

    /* Consolidated in Navigation Section */


    #banner {
        height: 250px;
    }

    #seo_social a {
        display: none;
    }

    #seo_social a:nth-child(1),
    #seo_social a:nth-child(2),
    #seo_social a:nth-child(3) {
        display: block;
    }

    #body-page {
        display: block;
    }

    #content.galerie #list li {
        width: 50%;
        height: 150px;
    }

    #modulesSidebar {
        max-width: 100%;
        margin-left: 0;
    }

    #content .toc-container {
        float: none;
        max-width: 100%;
    }

}

/* DARK MODE */

/* 1. Define Dark Variables in a mixin-like way (or simply repeat them for the class) 
   To avoid duplication in pure CSS without preprocessor, we can use a strategy:
   - Default :root has light vars
   - @media (prefers-color-scheme: dark) :root overwrites them
   - body.theme-dark overwrites them again (forcing dark)
   - body.theme-light overwrites them back to light (forcing light)
*/

/* FORCE DARK CLASS */
body.theme-dark {
    --header-bg-color: var(--dark-section-bg-color);
    color: var(--dark-font-color);
    background: var(--dark-background-color);
}

body.theme-dark #mobile_menu {
    color: var(--dark-header-links-color);
}

body.theme-dark #container {
    background: var(--dark-background-color);
}

body.theme-dark #header {
    background: var(--dark-section-bg-color);
    box-shadow: 0px 0px 20px 10px rgba(255, 255, 255, 0.10);
}

body.theme-dark #footer {
    background: var(--dark-section-head-bg-color);
}

body.theme-dark input[type=text],
body.theme-dark input[type=email],
body.theme-dark input[type=password],
body.theme-dark input[type=url],
body.theme-dark textarea,
body.theme-dark input[type=number],
body.theme-dark .contact .acceptation {
    background: var(--dark-form-bg-color);
    color: var(--dark-font-color);
    border-color: var(--dark-form-border-color);
}

body.theme-dark hr,
body.theme-dark tr,
body.theme-dark .blog .comment,
body.theme-dark .blog .content,
body.theme-dark .blog .items li.item,
body.theme-dark #content.galerie #list li {
    border-color: var(--dark-form-border-color);
}

body.theme-dark #header_content a {
    color: var(--dark-header-links-color);
}

body.theme-dark #header_content a:hover {
    color: var(--primary-color);
}

body.theme-dark #pageTitle,
body.theme-dark section,
body.theme-dark article,
body.theme-dark .card {
    background: var(--dark-section-bg-color);
    border: none;
    box-shadow: none;
}

body.theme-dark section>header,
body.theme-dark article>header,
body.theme-dark .card>header,
body.theme-dark section>footer,
body.theme-dark article>footer,
body.theme-dark .card>footer {
    background-color: var(--dark-section-head-bg-color);
    border: 1px solid transparent;
}

body.theme-dark figure.image {
    background-color: var(--dark-background-color);
}

body.theme-dark [type=checkbox] {
    background-color: #374956;
}

body.theme-dark [type=checkbox]:checked {
    background-color: var(--primary-color);
}

body.theme-dark #content .toc-container {
    border: 1px solid #18232c;
}

body.theme-dark #content .toc-container h4 {
    background-color: var(--dark-section-head-bg-color);
    color: var(--dark-font-color);
}

body.theme-dark .comment-author a,
body.theme-dark .comment-metadata a {
    color: var(--dark-header-links-color);
}

/* FORCE LIGHT CLASS (Restoring default vars if needed, usually just removing theme-dark is enough, 
but if system is dark and user wants light, we need this) */
body.theme-light {
    --header-bg-color: #fff;
    --background-color: #fafafa;
    color: rgb(65, 84, 98);
}

body.theme-light #container {
    background: #fafafa;
}

body.theme-light #header {
    background: #fff;
    box-shadow: 0px 0px 20px 10px rgba(0, 0, 0, 0.10);
}

body.theme-light #footer {
    background: #e9e9e9;
}




/* ... (We rely on default vars for the rest, but specific overrides might be needed if defaults were overwritten by media query) */


/* MERGED MEDIA QUERY (System Preference) */
@media (prefers-color-scheme: dark) {

    /* Apply same rules as body.theme-dark but ONLY if body doesn't have .theme-light class */
    body:not(.theme-light) {
        --header-bg-color: var(--dark-section-bg-color);
        color: var(--dark-font-color);
    }

    body:not(.theme-light) #mobile_menu {
        color: var(--dark-header-links-color);
    }

    body:not(.theme-light) #container {
        background: var(--dark-background-color);
    }

    body:not(.theme-light) #header {
        background: var(--dark-section-bg-color);
        box-shadow: 0px 0px 20px 10px rgba(255, 255, 255, 0.10);
    }

    body:not(.theme-light) #footer {
        background: var(--dark-section-head-bg-color);
    }

    body:not(.theme-light) input[type=text],
    body:not(.theme-light) input[type=email],
    body:not(.theme-light) input[type=password],
    body:not(.theme-light) input[type=url],
    body:not(.theme-light) textarea,
    body:not(.theme-light) input[type=number],
    body:not(.theme-light) .contact .acceptation {
        background: var(--dark-form-bg-color);
        color: var(--dark-font-color);
    }

    body:not(.theme-light) input[type=text],
    body:not(.theme-light) input[type=email],
    body:not(.theme-light) input[type=password],
    body:not(.theme-light) input[type=url],
    body:not(.theme-light) textarea,
    body:not(.theme-light) input[type=number],
    body:not(.theme-light) hr,
    body:not(.theme-light) tr,
    body:not(.theme-light) .contact .acceptation,
    body:not(.theme-light) .blog .comment,
    body:not(.theme-light) .blog .content,
    body:not(.theme-light) .blog .items li.item,
    body:not(.theme-light) #content.galerie #list li {
        border-color: var(--dark-form-border-color);
    }

    body:not(.theme-light) #header_content a {
        color: var(--dark-header-links-color);
    }

    body:not(.theme-light) #header_content a:hover {
        color: var(--primary-color);
    }

    body:not(.theme-light) #pageTitle,
    body:not(.theme-light) section,
    body:not(.theme-light) article,
    body:not(.theme-light) .card {
        background: var(--dark-section-bg-color);
        border: none;
        box-shadow: none;
    }

    body:not(.theme-light) section>header,
    body:not(.theme-light) article>header,
    body:not(.theme-light) .card>header,
    body:not(.theme-light) section>footer,
    body:not(.theme-light) article>footer,
    body:not(.theme-light) .card>footer {
        background-color: var(--dark-section-head-bg-color);
        border: 1px solid transparent;
    }

    body:not(.theme-light) figure.image {
        background-color: var(--dark-background-color);
    }

    body:not(.theme-light) [type=checkbox] {
        background-color: #374956;
    }

    body:not(.theme-light) [type=checkbox]:checked {
        background-color: var(--primary-color);
    }

    body:not(.theme-light) #content .toc-container {
        border: 1px solid #18232c;
    }

    body:not(.theme-light) #content .toc-container h4 {
        background-color: var(--dark-section-head-bg-color);
        color: var(--dark-font-color);
    }

    body:not(.theme-light) .comment-author a,
    body:not(.theme-light) .comment-metadata a {
        color: var(--dark-header-links-color);
    }
}

/* PORTED FROM LUMIERE THEME */

/* Header Flex Layout */
#header_content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 88px;
    /* Override default */
    padding: 0 24px;
}

/* Brand */
.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--header-links-color);
}

#siteName {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

/* Navigation Wrapper */
.nav-wrapper,
.header-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Navigation Menu */
#navigation {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
    max-height: none;
    overflow: visible;
}

#navigation>li {
    position: relative;
}

#navigation>li>a {
    display: block;
    padding: 10px 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    color: var(--font-color);
}

#navigation>li>a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

/* Dropdown */
#navigation>li>ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--header-bg-color);
    color: var(--font-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: block;
    /* Override default hidden */
}

#navigation>li:hover>ul,
#navigation>li:focus-within>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#navigation>li>ul>li {
    width: 100%;
}

#navigation>li>ul>li>a {
    padding: 10px 20px;
    font-size: 14px;
    display: block;
    color: var(--font-color);
}

#navigation>li>ul>li>a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

/* Avatar Menu */
.nav-user-avatar-menu {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #eee;
}

.nav-user-avatar-menu>ul {
    right: 0;
    left: auto;
    min-width: 240px;
}

.user-avatar-img,
.user-avatar-css {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-css {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    color: #fff !important;
    background: #f0f0f0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.nav-badge {
    background: var(--alert-color);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    margin-left: 5px;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none !important;
}

#mobile_menu {
    display: none;
    cursor: pointer;
    padding: 8px;
    font-size: 24px;
}

@media (max-width: 1024px) {
    .nav-toggle {
        display: none;
    }

    #mobile_menu {
        display: flex;
    }

    .header-links {
        display: none;
        position: absolute;
        top: 88px;
        left: 0;
        right: 0;
        background: var(--header-bg-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        align-items: stretch;
        z-index: 999;
    }

    .nav-toggle:checked~.header-links,
    #nav_toggle:checked~.header-links {
        display: flex;
    }

    #navigation {
        flex-direction: column;
        align-items: stretch;
    }

    #navigation>li>ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        display: block;
    }

    .nav-user-avatar-menu {
        border-left: none;
        margin: 0;
        padding: 10px 0;
        border-top: 1px solid #eee;
    }
}


/* Système d'onglets */
.profile-tabs {
    margin-top: 2rem;
}

.profile-tabs-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--form-border-color);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-tab-button {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--font-color);
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: -2px;
}

.profile-tab-button:hover {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.02);
}

.profile-tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.profile-tab-button.profile-tab-danger {
    margin-left: auto;
    color: var(--alert-color);
}

.profile-tab-button.profile-tab-danger:hover {
    color: var(--alert-hover-color);
    background: rgba(239, 68, 68, 0.1);
}

.profile-tab-content {
    display: none;
    padding: 10px 0;
}

.profile-tab-content.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Ensure content has background if needed, but transparent is usually fine */
}

/* Header profil */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    margin-bottom: 2rem;
    padding: 2.5rem;
    background: var(--section-bg-color);
    border-radius: var(--section-radius);
    border: 1px solid var(--form-border-color);
}

.profile-data-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.profile-data-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    font-size: 1rem;
}

.data-label {
    min-width: 80px;
    font-weight: 600;
    color: var(--infos-color);
}

.data-value {
    color: var(--font-color);
    font-weight: 500;
}

.profile-avatar-section {
    flex-shrink: 0;
}

.profile-avatar-img,
.profile-avatar-css {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-avatar-img {
    object-fit: cover;
}

.profile-avatar-css {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 2.5rem;
    text-transform: uppercase;
}

.profile-info {
    flex: 1;
}

.profile-username {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    color: var(--font-color);
}

.profile-email {
    margin: 0;
    color: var(--infos-color);
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-tabs-nav {
        flex-direction: column;
        gap: 0;
    }

    .profile-tab-button {
        width: 100%;
        justify-content: flex-start;
        border-bottom: 1px solid var(--form-border-color);
        border-left: 3px solid transparent;
        margin-bottom: 0;
    }

    .profile-tab-button.active {
        border-left-color: var(--primary-color);
        border-bottom-color: var(--form-border-color);
    }

    .profile-tab-button.profile-tab-danger {
        margin-left: 0;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar-img,
    .profile-avatar-css {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
}

/* Toggle Switches - Unified Flexbox Layout */
.setting-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-info {
    display: flex;
    flex-direction: column;
}

.setting-label {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--font-color);
    line-height: 1.3;
}

.setting-description {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-input:checked+.toggle-slider {
    background-color: #00bcd4;
    /* Cyan teal from image */
}

.toggle-input:focus+.toggle-slider {
    box-shadow: 0 0 2px rgba(0, 188, 212, 0.4);
}

.toggle-input:checked+.toggle-slider:before {
    transform: translateX(22px);
}

/* Grille d'abonnements spécifiques (Cards) */
.notif-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.notif-type-card {
    background: #fff;
    border: 1px solid var(--panel-border, #eee);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.notif-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
    border-color: #00bcd4;
}

.notif-type-card .toggle-slider {
    width: 42px;
    height: 22px;
}

.notif-type-card .toggle-slider:before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
}

.notif-type-card .toggle-input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.notif-type-card .toggle-label {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

/* COMPREHENSIVE LIGHT THEME OVERRIDES - MOVED TO END FOR SPECIFICITY */
body.theme-light {
    --header-bg-color: #fff;
    --background-color: #fafafa;
    --dark-section-bg-color: #fff;
    /* Reset to light */
    --dark-font-color: #415462;
    /* Reset to light text */
    --dark-header-links-color: #415462;
    --dark-form-bg-color: #fff;
    --dark-form-border-color: #ccc;
    --dark-section-head-bg-color: #f5f5f5;

    color: rgb(65, 84, 98);
}

body.theme-light input[type=text],
body.theme-light input[type=email],
body.theme-light input[type=password],
body.theme-light input[type=url],
body.theme-light textarea,
body.theme-light input[type=number],
body.theme-light .contact .acceptation {
    background: #fff;
    color: #415462;
    border-color: #ccc;
}

body.theme-light section,
body.theme-light article,
body.theme-light .card {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

body.theme-light section>header,
body.theme-light article>header,
body.theme-light .card>header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

input:checked+.toggle-switch.small .toggle-slider:before {
    transform: translateX(16px);
}

/* COMPREHENSIVE LIGHT THEME OVERRIDES - MOVED TO END FOR SPECIFICITY */
body.theme-light {
    --header-bg-color: #fff;
    --background-color: #fafafa;
    --dark-section-bg-color: #fff;
    /* Reset to light */
    --dark-font-color: #415462;
    /* Reset to light text */
    --dark-header-links-color: #415462;
    --dark-form-bg-color: #fff;
    --dark-form-border-color: #ccc;
    --dark-section-head-bg-color: #f5f5f5;

    color: rgb(65, 84, 98);
}

body.theme-light input[type=text],
body.theme-light input[type=email],
body.theme-light input[type=password],
body.theme-light input[type=url],
body.theme-light textarea,
body.theme-light input[type=number],
body.theme-light .contact .acceptation {
    background: #fff;
    color: #415462;
    border-color: #ccc;
}

body.theme-light section,
body.theme-light article,
body.theme-light .card {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

body.theme-light section>header,
body.theme-light article>header,
body.theme-light .card>header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

/* COMPREHENSIVE LIGHT THEME OVERRIDES - MOVED TO END FOR SPECIFICITY */
body.theme-light {
    --header-bg-color: #fff;
    --background-color: #fafafa;
    --dark-section-bg-color: #fff;
    /* Reset to light */
    --dark-font-color: #415462;
    /* Reset to light text */
    --dark-header-links-color: #415462;
    --dark-form-bg-color: #fff;
    --dark-form-border-color: #ccc;
    --dark-section-head-bg-color: #f5f5f5;

    color: rgb(65, 84, 98);
}

body.theme-light input[type=text],
body.theme-light input[type=email],
body.theme-light input[type=password],
body.theme-light input[type=url],
body.theme-light textarea,
body.theme-light input[type=number],
body.theme-light .contact .acceptation {
    background: #fff;
    color: #415462;
    border-color: #ccc;
}

body.theme-light section,
body.theme-light article,
body.theme-light .card {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

body.theme-light section>header,
body.theme-light article>header,
body.theme-light .card>header {
    border-bottom: 1px solid #ddd;
}

/* ============================================
   PROFILE TABS (Fix for Gamification/Contributions)
   ============================================ */

.profile-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e9e9e9;
    padding-bottom: 10px;
}

.profile-tab-button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    color: var(--font-color);
    border-radius: 4px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profile-tab-button:hover {
    background: #e9e9e9;
    color: var(--primary-color);
}

.profile-tab-button.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}



.profile-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #e9e9e9;
}

.profile-avatar-img,
.profile-avatar-css {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    background-color: var(--primary-color);
}

.profile-info h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.profile-data-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.profile-data-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Gamification Styles */
.gamification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.gamification-card {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    background: var(--panel-bg, #f9f9f9);
    border: 1px solid var(--panel-border, #eee);
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0.6;
}

.gamification-card.unlocked {
    opacity: 1;
    border-color: var(--primary-color, #00acc1);
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.gamification-card.current {
    border: 2px solid var(--primary-color, #00acc1);
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gamification-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gamification-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.gamification-title {
    margin: 0.5rem 0 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--font-color, #333);
}

.gamification-subtitle {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted, #666);
}

.gamification-badge-unlocked {
    font-size: 0.7rem;
    color: #27ae60;
    margin-top: 0.5rem;
    display: block;
}

/* --- Header App Title (Dynamic Context) --- */
.header-app-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1;
}

.app-name {
    color: var(--primary-color, #4f46e5);
    font-weight: 500;
}

.app-separator {
    color: #94a3b8;
    font-weight: 300;
}

.app-context {
    color: var(--font-color, #1e293b);
    font-weight: 700;
}

@media (max-width: 768px) {
    .header-app-title {
        font-size: 0.9rem;
    }

    .app-name {
        display: none;
    }
}

/* REMOVED DUPLICATE TOGGLE AND CARD STYLES AS THEY ARE NOW UNIFIED ABOVE */

/* ==========================================================================
   LANDING PAGE SAAS — MIDNIGHT FOREST & GOLD
   ========================================================================== */

/* RADICAL RESET FOR LANDING SCOPE */
.landing-scope-active #header,
.landing-scope-active #footer,
.landing-scope-active #alert-msg,
.landing-scope-active #banner,
.landing-scope-active #pageTitle,
.landing-scope-active .brand-meta {
    display: none !important;
}

.landing-scope-active #body,
.landing-scope-active #container,
.landing-scope-active #body-page,
.landing-scope-active #content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    min-height: auto !important;
}

/* THEME SYSTEM */
.landing-scope {
    --bg: #F9F7F2;
    --surface: #FFFFFF;
    --primary: #14362E;
    --accent: #D4A373;
    --text-main: #1E2733;
    --text-dim: #6B7280;
    --border: #E5E7EB;
    --accent-glow: rgba(212, 163, 115, 0.1);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    font-family: 'Instrument Sans', sans-serif !important;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    transition: background var(--transition);
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

html[data-theme="dark"] .landing-scope,
.theme-dark .landing-scope {
    --bg: #051210;
    --surface: #0D2B24;
    --primary: #D4A373;
    --accent: #14362E;
    --text-main: #F8F7F4;
    --text-dim: #94A3B8;
    --border: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(212, 163, 115, 0.15);
}

/* Force Dark Backgrounds */
html[data-theme="dark"] body,
html[data-theme="dark"] #container,
html[data-theme="dark"] .landing-scope {
    background-color: #051210 !important;
    background-image: none !important;
}

/* Landing Specific Overrides to kill white leaks */
.landing-scope .hero,
.landing-scope .l-section,
.landing-scope .google-section,
.landing-scope .pricing-grid,
.landing-scope main {
    background: transparent !important;
}

.landing-scope {
    background-color: var(--bg) !important;
}

/* ORBS */
.landing-scope .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
}

html[data-theme="dark"] .landing-scope .orb {
    opacity: 0.4;
}

.landing-scope .orb-1 {
    width: 800px;
    height: 800px;
    background: #14362E;
    top: -300px;
    right: -200px;
}

.landing-scope .orb-2 {
    width: 600px;
    height: 600px;
    background: #D4A373;
    bottom: 100px;
    left: -200px;
}

/* NAV */
.landing-scope .l-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
    background: rgba(249, 247, 242, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

html[data-theme="dark"] .landing-scope .l-nav {
    background: rgba(5, 18, 16, 0.8);
}

.landing-scope .l-logo {
    font-family: 'Cabinet Grotesk', sans-serif !important;
    font-weight: 900;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.landing-scope .l-logo span {
    color: var(--primary);
}

.landing-scope .nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.landing-scope .nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.landing-scope .nav-links a:hover {
    color: var(--primary);
}

.landing-scope .btn {
    padding: 0.8rem 1.6rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.landing-scope .btn-primary {
    background: var(--primary);
    color: #F9F7F2 !important;
    border: none;
}

.landing-scope .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px var(--accent-glow);
}

.landing-scope .btn-outline {
    border: 2px solid var(--border);
    color: var(--text-main);
}

.landing-scope .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* LANDING PAGE - LIGHT MODE (PEARL & GOLD) */
html[data-theme="light"] .landing-scope {
    --bg-deep: #FDFBF7;
    --primary: #14362E;
    --secondary: #2C5148;
    --accent: #D4AF37;
    --text-main: #14362E;
    --text-dim: #5A716C;
    --border: rgba(20, 54, 46, 0.1);
    --card-bg: #FFFFFF;
    --accent-glow: rgba(212, 175, 55, 0.1);
    background: var(--bg-deep);
    color: var(--text-main);
}

html[data-theme="light"] .landing-scope .orb-1 {
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
}

html[data-theme="light"] .landing-scope .orb-2 {
    background: radial-gradient(circle, rgba(20, 54, 46, 0.08) 0%, transparent 70%);
}

html[data-theme="light"] .landing-scope h1,
html[data-theme="light"] .landing-scope h2,
html[data-theme="light"] .landing-scope h3 {
    color: var(--text-main);
}

html[data-theme="light"] .landing-scope .btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

html[data-theme="light"] .landing-scope .btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

html[data-theme="light"] .landing-scope .bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(20, 54, 46, 0.03);
}

html[data-theme="light"] .landing-scope .p-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
}

html[data-theme="light"] .landing-scope .google-section {
    background: rgba(20, 54, 46, 0.03);
    border: 1px dashed var(--primary);
}

.landing-scope .theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.2rem;
    transition: var(--transition);
}

/* SECTIONS */
.landing-scope .l-section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.landing-scope .section-title {
    text-align: center;
    margin-bottom: 5rem;
}

.landing-scope .section-title h2 {
    font-family: 'Cabinet Grotesk', sans-serif !important;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.landing-scope .section-title p {
    color: var(--text-dim);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.25rem;
}

/* HERO */
.landing-scope .hero {
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 5% 60px;
}

.landing-scope .hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    background: var(--accent-glow);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2.5rem;
}

.landing-scope .hero h1 {
    font-family: 'Cabinet Grotesk', sans-serif !important;
    font-weight: 900;
    font-size: clamp(3rem, 10vw, 6.8rem);
    line-height: 0.88;
    letter-spacing: -0.05em;
    margin-bottom: 2.8rem;
    max-width: 1100px;
}

.landing-scope .hero h1 .accent {
    color: var(--primary);
    font-weight: 400;
    font-style: italic;
    opacity: 0.85;
}

.landing-scope .hero p {
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    color: var(--text-dim);
    max-width: 800px;
    margin: 0 auto 3.8rem;
    font-weight: 400;
}

/* BENTO GRID */
.landing-scope .bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.landing-scope .bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 3.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.landing-scope .bento-card:hover {
    border-color: var(--primary) !important;
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.landing-scope .b1 {
    grid-column: span 7;
}

.landing-scope .b2 {
    grid-column: span 5;
}

.landing-scope .b3 {
    grid-column: span 4;
}

.landing-scope .b4 {
    grid-column: span 4;
}

.landing-scope .b5 {
    grid-column: span 4;
}

.landing-scope .bento-icon {
    width: 160px;
    height: 160px;
    border-radius: 18px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5.8rem;
    color: var(--primary);
    margin-bottom: 2.5rem;
}

.landing-scope .bento-card h3 {
    font-family: 'Cabinet Grotesk', sans-serif !important;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: var(--text-main);
}

.landing-scope .bento-card p {
    color: var(--text-dim);
    font-size: 1.1rem;
    line-height: 1.55;
}

.landing-scope .bento-tag {
    align-self: flex-start;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    background: var(--primary);
    color: #F9F7F2;
    margin-bottom: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* GOOGLE TRANSITION */
.landing-scope .google-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 6rem;
    display: flex;
    align-items: center;
    gap: 5rem;
    margin-top: 6rem;
}

.landing-scope .google-content {
    flex: 1;
}

.landing-scope .google-content h2 {
    font-family: 'Cabinet Grotesk', sans-serif !important;
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    margin-bottom: 1.8rem;
}

.landing-scope .google-content p {
    color: var(--text-dim);
    margin-bottom: 3.5rem;
    font-size: 1.3rem;
    max-width: 650px;
}

.landing-scope .google-features {
    display: flex;
    gap: 3.5rem;
    flex-wrap: wrap;
}

.landing-scope .g-feat {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.landing-scope .g-feat i {
    color: var(--primary);
    font-size: 1.6rem;
}

/* PRICING */
.landing-scope .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.landing-scope .p-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 36px;
    padding: 4rem 3rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.landing-scope .p-card.featured {
    border: 2.5px solid var(--primary);
    transform: scale(1.05);
    z-index: 5;
}

.landing-scope .p-price {
    font-size: 4rem;
    font-weight: 950;
    font-family: 'Cabinet Grotesk', sans-serif !important;
    margin: 1.8rem 0;
    color: var(--text-main);
}

.landing-scope .p-features {
    list-style: none;
    margin: 3rem 0;
    text-align: left;
    padding: 0;
}

.landing-scope .p-features li {
    margin-bottom: 1.4rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 1.05rem;
}

.landing-scope .p-features li i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* FOOTER */
.landing-scope .l-footer {
    padding: 8rem 5%;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-top: 8rem;
}

/* PROSEMIRROR EDITOR FIXES — CRITICAL ANCHORING & VISIBILITY */
.pelleditor-instance .ProseMirror {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    min-height: 400px;
    padding: 40px !important;
    outline: none !important;
    background: #fff !important;
    transition: none !important;
    transform: none !important;
    will-change: auto !important;
    z-index: 10000 !important;
    /* High scoped priority */
    visibility: visible !important;
    opacity: 1 !important;
    color: #000 !important;
    display: block !important;
}

/* Elevate the entire hierarchy to beat any global overlays */
#content,
#body-page,
.tabs-container,
.tabs,
.tab,
.pelleditor-instance {
    position: relative !important;
    z-index: 50 !important;
    overflow: visible !important;
}

/* Kill any possible layout-level obstruction */
#container::before,
#container::after,
body::before,
body::after {
    display: none !important;
}

/* Ensure the "paper" area itself doesn't have a background covering the content */
.pelleditor-instance::before,
.pelleditor-instance::after,
.pelleditor-wrapper::before,
.pelleditor-wrapper::after {
    display: none !important;
    /* Kill any parasitic pseudo-elements creating the covering glow */
}

/* Contrer le drift causé par la stack de layout */
.pelleditor-instance {
    position: relative !important;
    display: block !important;
    overflow: visible !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
}

/* Assurer que le conteneur paper ne "clippe" pas le contenu */
.doc-editor-container {
    overflow: visible !important;
    position: relative;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .landing-scope .bento>div {
        grid-column: span 12 !important;
    }

    .landing-scope .google-section {
        flex-direction: column;
        text-align: center;
        gap: 4rem;
        padding: 4rem 2rem;
    }

    .landing-scope .google-features {
        justify-content: center;
        gap: 2.5rem;
    }
}

/* AVATAR DROPDOWN FIX — PREVENT SCREEN OVERFLOW */
#navigation li ul,
.user-avatar-menu,
.userAvatarDropdown,
.dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

.bento-tag-head-cont {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* ==========================================================================
   V3 ADDITIONS (MARQUEE, SCROLL REVEAL, BLOCK ALTERNATION)
   ========================================================================== */

/* 1. Marquee Strip */
.landing-scope .strip {
    background: var(--primary);
    color: var(--bg);
    overflow: hidden;
    padding: 1.5rem 0;
    white-space: nowrap;
    margin: 4rem 0;
}

.landing-scope .strip-track {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.landing-scope .strip-pill {
    padding: 0 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* 2. Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
/* 3. Block Alternation - FORCED COLORS FOR ALTERNATION (Refined) */

/* DARK SECTION: Always Dark Green background, always light text */
.section-dark {
    background: #14362E !important;
    color: #F9F7F2 !important;
}

.section-dark h2,
.section-dark h3,
.section-dark p,
.section-dark .section-title h2,
.section-dark .section-title p,
.section-dark .bento-card h3,
.section-dark .bento-card p,
.section-dark .g-feat,
.section-dark .google-content h2,
.section-dark .google-content p,
.section-dark .section-eyebrow,
.section-dark .bento-tag,
.section-dark .bento-icon i {
    color: #F9F7F2 !important;
}

.section-dark .bento-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.section-dark .bento-tag {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* --- SECTION ACCENT (OR/PERLE) --- */
.landing-scope-active .l-section.section-accent,
.theme-light .l-section.section-accent,
.l-section.section-accent {
    background-color: #F3F1EB !important;
    color: #14362E !important;
}
.landing-scope-active .l-section.section-accent h1, 
.landing-scope-active .l-section.section-accent h2, 
.landing-scope-active .l-section.section-accent h3,
.landing-scope-active .l-section.section-accent p {
    color: #14362E !important;
}

/* --- SECTION DARK (VERT FORÊT) --- */
.landing-scope-active .l-section.section-dark,
.theme-dark .l-section.section-dark,
.l-section.section-dark {
    background-color: #14362E !important;
    color: #F8F7F4 !important;
}
.landing-scope-active .l-section.section-dark h1, 
.landing-scope-active .l-section.section-dark h2, 
.landing-scope-active .l-section.section-dark h3,
.landing-scope-active .l-section.section-dark p {
    color: #F8F7F4 !important;
}

/* --- BUTTONS HARMONIZATION --- */
.landing-scope-active .btn-outline {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: transparent !important;
    border-radius: 100px !important;
    padding: 10px 25px !important;
}
.landing-scope-active .btn-primary {
    background: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    border-radius: 100px !important;
    padding: 10px 25px !important;
}

/* DARK MODE OVERRIDES */
html[data-theme="dark"] .landing-scope-active .btn-outline {
    border-color: #D4A373 !important;
    color: #D4A373 !important;
}
html[data-theme="dark"] .landing-scope-active .btn-primary {
    background: #D4A373 !important;
    color: #14362E !important;
    font-weight: 800;
}
.section-accent h2,
.section-accent h3,
.section-accent p,
.section-accent .section-title h2,
.section-accent .section-title p,
.section-accent .p-card h3,
.section-accent .p-card p,
.section-accent .p-price,
.section-accent .p-features li,
.section-accent .section-eyebrow,
.section-accent .p-storage,
.section-accent .p-per {
    color: #14362E !important;
}

/* Specific fix for pricing buttons inside cards */
.section-accent .p-card .btn-outline {
    border-color: #14362E !important;
    color: #14362E !important;
}

.section-accent .p-card .btn-outline:hover {
    background: #14362E !important;
    color: #F3F1EB !important;
}

.section-accent .p-card {
    background: #FFFFFF !important;
    border-color: rgba(20, 54, 46, 0.15) !important;
    box-shadow: 0 10px 30px rgba(20, 54, 46, 0.05) !important;
}

/* Security Section Contrast (Light mode fixes) */
#securite h2 span { color: #14362E !important; }
#securite .bento-card h3 { color: #14362E !important; }
#securite .bento-card p { color: #4A5568 !important; }

/* Migration Icons in Dark Section */
.section-dark .g-feat i {
    color: #D4A373 !important; /* Gold icons on dark green */
}

/* Navbar Buttons Contrast Improvement */
.l-nav .btn-outline {
    border: 2px solid #14362E !important;
    color: #14362E !important;
    background: transparent !important;
    border-radius: 100px !important;
}
.theme-light .l-nav .btn-primary {
    background: #14362E !important;
    color: #FFFFFF !important;
    border-radius: 100px !important;
}
html[data-theme="dark"] .l-nav .btn-outline {
    border-color: #D4A373 !important;
    color: #D4A373 !important;
    background: transparent !important;
}
/* --- MOBILE & RESPONSIVE FINAL FIXES --- */
.mobile-burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 10001;
    width: 32px;
    margin-left: auto; /* Push to right */
}
.mobile-burger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}
.mobile-burger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.mobile-burger.active span:nth-child(2) { opacity: 0; }
.mobile-burger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 1024px) {
    .mobile-burger { display: flex !important; }
    .nav-links-wrapper { display: contents !important; } /* Make wrapper transparent */
    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 100% !important;
        height: 100dvh !important;
        background: var(--background-color) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2.5rem !important;
        transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
        z-index: 10000 !important;
        padding: 2rem !important;
    }
    .nav-links.active { right: 0 !important; }
    .nav-links li { display: block !important; width: 100% !important; text-align: center !important; }
    .nav-links a { font-size: 1.8rem !important; font-weight: 800 !important; color: var(--primary-color) !important; }
}

/* Cleanup suspicious section-title blocks */
.section-title i, .section-title span.i-alt {
    display: inline !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
}
