/* ---- Couleurs & thème ---- */
:root {
    --thumb:   rgb(81, 83, 86);
    --bg:      rgb(239, 238, 232);
    --surface: #f8f7f2;
    --text:    #1b1a17;
    --muted:   #57544d;
    --faint:   #8b887f;
    --line:    #c3c2bc;
    --accent:  #226b63;
    --sun:     #d9962b;
    --moon:    #4b5563;

    --display: "Space Grotesk", sans-serif;
    --body:    "Source Serif 4", Georgia, serif;
    --mono:    "IBM Plex Mono", monospace;
}

[data-theme="dark"] {
    --thumb:   rgb(164, 164, 162);
    --bg:      rgb(18, 21, 23);
    --surface: #191d20;
    --text:    #eae8e2;
    --muted:   #a7a49c;
    --faint:   #6f6d66;
    --line:    #4c5154;
    --accent:  #79bcce;
    --sun:     #e7b24d;
    --moon:    #c7ccd4;
}

/* ---- Base ---- */
* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.8;
    transition: background 0.3s, color 0.3s;
}

.wrap {
    max-width: 70vw;
    margin: 0 auto;
    padding: 5.5rem 2rem 7rem;
}

p { color: var(--muted); }

/* ---- Titre ---- */
.eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

h1 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(2.4rem, 7vw, 3.6rem);
    line-height: 1.05;
    margin: 1.25rem 0 0;
}

.lede {
    font-size: 1.2rem;
    font-style: italic;
    margin-top: 1.25rem;
}

/* ---- Sections ---- */
.section { margin-top: 6rem; }
.section-title { margin-top: 0; }

h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.6rem;
    margin: 0 0 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.section-intro { margin: -0.75rem 0 2.5rem; }

/* ---- Principes ---- */
.principle {
    padding: 0.25rem 0 0.25rem 1.5rem;
    border-left: 2px solid var(--line);
    margin: 3rem 0 3rem 0;
}
.principle + .principle { margin-top: 1rem; }

.principle-title {
    display: block;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.principle-body p { margin: 0 0 0.1rem; }
.principle-body p:last-child { margin-bottom: 0; }

.principle-guard {
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-right: 0.5rem;
    border-radius: 4px;
    border-left-color: var(--accent);
    background: var(--surface);
}
.principle-guard p { color: var(--text); opacity: 0.8; }
.principle-guard p:first-child { font-weight: 500; opacity: 1; }

/* ---- Diptyque HORS-IA / FULL-IA ---- */
.diptych {
    margin-top: 6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

.panel {
    margin-top: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2rem;
}

.panel h2 { border-top: none; padding-top: 0; }
.panel p { margin: 0 0 0.75rem; }
.panel strong { color: var(--text); }
.panel ul { margin: 0 0 0.9rem; padding-left: 1.1rem; color: var(--muted); }
.panel li { margin-bottom: 0.5rem; }

.panel-tag {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ---- Sceau ---- */
.seal {
    margin-top: 6rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
    text-align: right;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--faint);
}

/* ---- Switch jour / nuit ---- */
.theme-toggle {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.toggle-track {
    position: relative;
    display: block;
    width: 62px;
    height: 30px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--thumb);
    transition: transform 0.3s;
}
[data-theme="dark"] .toggle-thumb { transform: translateX(32px); }

.icon {
    position: absolute;
    top: 7px;
    width: 16px;
    height: 16px;
}
.icon-sun  { left: 7px;  color: var(--sun); }
.icon-moon { right: 7px; color: var(--moon); }
[data-theme="dark"]  .icon-sun  { opacity: 0.7; }
[data-theme="light"] .icon-moon { opacity: 0.7; }

/* ---- Divers ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- Mobile : plus de largeur, un peu moins de marges ---- */
@media (max-width: 640px) {
    .wrap {
        max-width: 90%;
        padding: 4rem 1.25rem 5rem;
    }
    .diptych { grid-template-columns: 1fr; }
    .seal { text-align: left; }
    .lede{
        font-size: 1rem;
    }
    h1{
        font-size: 2rem;
    }
}