/* Site public de Partagère — style « Papier & encre », comme l'app (client/src/theme.ts). */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/polices/inter-400.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/polices/inter-600.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/polices/inter-700.woff2) format('woff2'); }
@font-face { font-family: Fraunces; font-weight: 700; font-display: swap; src: url(/polices/fraunces-700.woff2) format('woff2'); }

:root {
  --papier: #FBF6EE; --carte: #FFFFFF; --encre: #1E2A3A; --muet: #5B6573; --ligne: #E8E0D2;
  --terracotta: #E07A4F; --terracotta-texte: #B4492A; --douce: #FBE6DD; --sauge: #8FBFA5; --ambre: #E9B44C;
  --bande: #F3EADC; --ombre: 0 10px 30px rgba(30, 42, 58, .08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --papier: #151B24; --carte: #1E2A3A; --encre: #F1EBE0; --muet: #A9B2BF; --ligne: #2E3B4E; --terracotta-texte: #F0A07E; --douce: #3A2A26; --bande: #1A222D; --ombre: 0 10px 30px rgba(0, 0, 0, .3); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--papier); color: var(--encre); font: 400 17px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.01em; overflow-wrap: break-word; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--terracotta-texte); }
a:focus-visible, .bouton:focus-visible, summary:focus-visible { outline: 3px solid #1E6FD9; outline-offset: 3px; border-radius: 6px; }
.largeur { width: min(1120px, 100% - 40px); margin-inline: auto; }
.etroit { width: min(760px, 100% - 40px); }
.section { padding: 64px 0; }
.evitement { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 14px; border-radius: 10px; background: var(--encre); color: var(--papier); font-weight: 700; }
.evitement:focus { top: 12px; }
.ico { flex: none; vertical-align: middle; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--papier) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ligne); }
.entete-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.marque { display: inline-flex; align-items: center; gap: 10px; color: var(--encre); text-decoration: none; font: 700 1.45rem/1 Fraunces, Georgia, serif; }
.marque svg { border-radius: 9px; }
.marque em { font-style: normal; color: var(--terracotta-texte); }
.entete nav { display: flex; gap: 22px; margin-left: auto; }
.entete nav a { color: var(--encre); text-decoration: none; font-weight: 600; font-size: 15px; }
.entete nav a:hover { color: var(--terracotta-texte); }
@media (max-width: 760px) { .entete nav { display: none; } .entete .bouton { margin-left: auto; } }

/* Boutons */
.bouton { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 14px; background: var(--encre); color: var(--papier); font-weight: 700; text-decoration: none; border: 2px solid var(--encre); transition: transform .15s; }
.bouton:hover { transform: translateY(-1px); }
.bouton.petit { min-height: 42px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.bouton.secondaire { background: transparent; color: var(--encre); border-color: var(--ligne); }
/* Sur l'aplat encre de l'appel final : crème fixe, quel que soit le thème (sinon invisible en sombre). */
.bouton.clair { background: #FBF6EE; color: #1E2A3A; border-color: #FBF6EE; }
.lien { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }

/* Héros */
.heros { padding: 56px 0 72px; overflow: hidden; }
.heros-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
@media (max-width: 900px) { .heros-in { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.surtitre { color: var(--terracotta-texte); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; margin-bottom: 12px; }
.chapo { font-size: 1.18rem; color: var(--muet); max-width: 60ch; }
.rassure { color: var(--muet); font-size: 14.5px; }

/* Étagère décorative */
.etagere { position: relative; height: 340px; display: flex; align-items: flex-end; gap: 10px; padding: 0 24px 22px; }
.etagere .planche { position: absolute; left: 0; right: 0; bottom: 6px; height: 16px; border-radius: 4px; background: #DCC9AC; box-shadow: 0 10px 18px -8px rgba(30, 42, 58, .45); }
@media (prefers-color-scheme: dark) { .etagere .planche { background: #3C4C63; } }
.dos { position: relative; z-index: 1; width: 54px; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; color: #FBF6EE; box-shadow: inset -6px 0 0 rgba(0, 0, 0, .18); }
.dos b { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 14px/1 Fraunces, Georgia, serif; }
.d1 { height: 250px; background: #1E2A3A; } .d2 { height: 210px; width: 46px; background: #B4492A; } .d3 { height: 270px; background: #4A3F6B; }
.d4 { height: 200px; width: 62px; background: #3E6B57; } .d5 { height: 236px; background: #E07A4F; }
.penche { transform: rotate(9deg); transform-origin: bottom left; margin-left: 4px; }
.disque { z-index: 1; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #1E2A3A 0 9%, #E9B44C 10% 34%, #2B2B2B 35% 100%); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }
.boite { z-index: 1; width: 104px; height: 104px; border-radius: 12px; background: #7A4A1F; display: grid; grid-template-columns: repeat(3, 1fr); place-items: center; padding: 18px; }
.boite i { width: 12px; height: 12px; border-radius: 50%; background: #FBF6EE; }
.boite i:nth-child(2) { grid-column: 3; } .boite i:nth-child(3) { grid-column: 2; } .boite i:nth-child(4) { grid-column: 1; } .boite i:nth-child(5) { grid-column: 3; }
.pastille { position: absolute; z-index: 2; padding: 8px 14px; border-radius: 999px; background: var(--carte); box-shadow: var(--ombre); font-weight: 700; font-size: 14px; white-space: nowrap; }
.pastille::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.p1 { top: 20px; left: 10px; } .p1::before { background: var(--sauge); }
.p2 { top: 80px; right: 0; } .p2::before { background: var(--ambre); }
/* Petits écrans : l'étagère entière, réduite (zoom : la mise en page suit, rien ne déborde). */
@media (max-width: 1100px) and (min-width: 901px) { .etagere { zoom: .8; } }
@media (max-width: 620px) { .etagere { zoom: .58; } }

/* Bandes, cartes, grilles */
.bande { background: var(--bande); padding: 64px 0; }
.etapes { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 760px) { .etapes { grid-template-columns: 1fr; } }
.etapes li { background: var(--carte); border: 1px solid var(--ligne); border-radius: 20px; padding: 24px; }
.num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--douce); color: var(--terracotta-texte); font-weight: 700; margin-bottom: 12px; }
.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
@media (max-width: 960px) { .grille { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grille { grid-template-columns: 1fr; } }
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: 20px; padding: 24px; }
.carte p, .etapes p { color: var(--muet); margin: 0; }
.rond { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--douce); color: var(--terracotta-texte); margin-bottom: 14px; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 820px) { .deux { grid-template-columns: 1fr; gap: 28px; } }
.coches { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.coches li { background: var(--carte); border: 1px solid var(--ligne); border-radius: 14px; padding: 14px 16px 14px 46px; position: relative; font-weight: 600; }
.coches li::before { content: '✓'; position: absolute; left: 16px; top: 13px; color: #2F6B4F; font-weight: 800; }
@media (prefers-color-scheme: dark) { .coches li::before { color: var(--sauge); } }
.titre-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }

/* Articles */
.carte-article { display: flex; flex-direction: column; gap: 8px; background: var(--carte); border: 1px solid var(--ligne); border-radius: 20px; padding: 24px; color: var(--encre); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.carte-article:hover { transform: translateY(-2px); box-shadow: var(--ombre); }
.carte-article h3 { margin: 0; }
.carte-article p { color: var(--muet); margin: 0; flex: 1; }
.carte-article .lire { color: var(--terracotta-texte); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.date { color: var(--muet); font-size: 14px; }
.fil { color: var(--muet); font-size: 14.5px; }
.fil a { color: var(--muet); }
.article h2 { margin-top: 1.6em; }
.article p, .article li { font-size: 1.06rem; }
.article ul { padding-left: 1.3em; }
.article li { margin-bottom: .4em; }
/* Sources : une carte par référence, numérotée, ouverte dans un nouvel onglet. */
.sources { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: source; }
.sources li { counter-increment: source; margin: 0; }
.source { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--ligne); border-radius: 16px; background: var(--carte); color: var(--encre); text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s; }
.source::before { content: counter(source); grid-row: 1 / 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--douce); color: var(--terracotta-texte); font-weight: 700; font-size: 14px; }
.source:hover { border-color: var(--terracotta); transform: translateY(-1px); box-shadow: var(--ombre); }
.source-titre { font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.source-meta { grid-column: 2; color: var(--muet); font-size: 14px; overflow-wrap: anywhere; }
.source .ico { grid-column: 3; grid-row: 1 / 3; color: var(--terracotta-texte); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.encart { margin: 40px 0; background: var(--douce); border-radius: 20px; padding: 26px; }
.encart h2 { margin-top: 0; }

/* FAQ */
details { background: var(--carte); border: 1px solid var(--ligne); border-radius: 16px; padding: 4px 20px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--terracotta-texte); font-size: 1.3em; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { color: var(--muet); }

/* Appel final, pied */
.appel { background: #1E2A3A; color: #FBF6EE; text-align: center; padding: 72px 0; }
@media (prefers-color-scheme: dark) { .appel { background: #24324A; border-block: 1px solid var(--ligne); } }
.appel p { color: #C9D1DC; }
.pied { border-top: 1px solid var(--ligne); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.pied-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.pied p { color: var(--muet); max-width: 40ch; margin-top: 12px; }
.pied nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 28px; align-content: start; }
.pied nav a { color: var(--encre); text-decoration: none; font-size: 15px; }
.pied nav a:hover { color: var(--terracotta-texte); }

/* Ancienne app installée sur partagere.fr */
.demenage[hidden] { display: none; }
.demenage { background: var(--ambre); color: #1E2A3A; padding: 14px 20px; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.demenage p { margin: 0; max-width: 60ch; }
.demenage .bouton { min-height: 42px; }
