:root {
  --fond: #0E1424;
  --carte: #161E33;
  --carte-2: #1C2540;
  --trait: #222B45;
  --trait-2: #2E3858;
  --texte: #E8E4D8;
  --texte-2: #B4BBCC;
  --texte-3: #98A0B5;
  --futur: #8088A0;
  --ambre: #E8B86B;
  --ambre-clair: #F3D29A;
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--ambre); }
a:hover { color: var(--ambre-clair); }
button { font: inherit; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ambre); outline-offset: 2px; }

/* ---------- en-tête ---------- */
.entete { display: flex; align-items: center; justify-content: space-between; padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 12px; }
.marque { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--texte); text-decoration: none; }
.entete nav { display: flex; gap: 4px; align-items: center; font-size: 14px; }
.entete nav a { text-decoration: none; padding: 10px 14px; border-radius: 20px; color: var(--texte-2); }
.entete nav a.actif { background: var(--carte-2); color: var(--ambre); }
.icone { width: 44px; height: 44px; border: none; background: none; color: var(--texte-2); display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; }
.icone:hover { color: var(--texte); background: var(--carte); }

main { display: flex; flex-direction: column; align-items: center; padding: 0 16px 64px; }
.colonne { width: 100%; max-width: 800px; display: flex; flex-direction: column; gap: 22px; margin-top: 24px; }

/* ---------- semaine ---------- */
.semaine { display: flex; gap: 8px; justify-content: center; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding: 2px; }
.semaine a { text-decoration: none; flex: 0 0 auto; width: 56px; height: 64px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--carte); color: var(--texte); }
.semaine a .j { font-size: 11px; letter-spacing: .06em; }
.semaine a .n { font-family: var(--serif); font-size: 20px; }
.semaine a .p { width: 4px; height: 4px; border-radius: 2px; background: transparent; }
.semaine a.plein .p { background: var(--ambre); }
.semaine a.futur { background: none; color: var(--futur); pointer-events: none; }
.semaine a.vide { background: none; color: var(--texte-2); }
.semaine a.courant { background: var(--ambre); color: var(--fond); }
.semaine a.courant .p { background: var(--fond); }
.semaine .fleche { width: 36px; background: none; color: var(--texte-3); font-size: 20px; }

/* ---------- illustration ---------- */
figure.illu { margin: 0; display: flex; flex-direction: column; gap: 8px; }
figure.illu img, figure.illu svg { width: 100%; aspect-ratio: 800 / 230; object-fit: cover; border-radius: 20px; display: block; background: #2A2547; }
figcaption { font-size: 12px; color: var(--texte-3); }

/* ---------- titre et puces ---------- */
.titre-jour { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.titre-jour h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 6vw, 44px); line-height: 1.15; }
.titre-jour .nb { font-size: 13px; color: var(--texte-3); }
.puces { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -8px; }
.puce { padding: 6px 12px; border-radius: 16px; border: 1px solid var(--trait-2); font-size: 13px; background: none; }
.puce.humeur { background: var(--ambre); color: var(--fond); font-weight: 600; border-color: var(--ambre); }
.puces .aide { font-size: 12px; color: var(--texte-3); }
.lien-bouton { align-self: flex-start; background: none; border: none; color: var(--ambre); font-size: 13px; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }
.edition { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 14px 16px; border-radius: 14px; background: var(--carte); }
.edition label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--texte-3); flex: 1 1 200px; }
.edition input { font: inherit; font-size: 15px; color: var(--texte); background: var(--fond); border: 1px solid var(--trait-2); border-radius: 10px; padding: 10px 12px; }
.bouton { border: none; border-radius: 22px; padding: 11px 18px; background: var(--ambre); color: var(--fond); font-weight: 600; font-size: 14px; }
.bouton.discret { background: none; color: var(--texte-2); border: 1px solid var(--trait-2); }

/* ---------- cartes ---------- */
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.carte { padding: 16px 18px; border-radius: 14px; background: var(--carte); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.carte h2, .sur-titre { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .08em; color: var(--ambre); text-transform: uppercase; }
.sur-titre.gris { color: var(--texte-3); }
.entete-carte { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.entete-carte span { font-size: 12px; color: var(--texte-3); }
.meteo-ligne { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.meteo-ligne .temp { font-family: var(--serif); font-size: 30px; }
.meteo-ligne .desc { font-size: 14px; }
.petit { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--texte-2); }
.liste-fetes { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.liste-fetes .ligne { display: flex; justify-content: space-between; gap: 12px; }
.liste-fetes .src { font-size: 12px; color: var(--texte-3); }
.carte ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; }
.carte ul a { color: var(--texte); text-decoration: none; }
.carte ul a:hover { color: var(--ambre-clair); text-decoration: underline; }
.a-venir { font-size: 13px; color: var(--texte-3); line-height: 1.5; }
.section { display: flex; flex-direction: column; gap: 10px; }

.vignette { position: relative; display: block; border-radius: 8px; overflow: hidden; }
.vignette img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.vignette .plus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(14,20,36,.6); font-size: 15px; font-weight: 600; color: var(--texte); }
.carte-lieux { height: 180px; border-radius: 8px; overflow: hidden; background: #1A2340; }
.carte-lieux .leaflet-tile-pane { filter: invert(.9) hue-rotate(200deg) saturate(.5) brightness(.9); }

/* ---------- ce jour-là ---------- */
.cjl { padding: 14px 18px; border-radius: 14px; border: 1px dashed var(--trait-2); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cjl .t { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ambre); }
.cjl .d { font-size: 14px; color: var(--texte-2); flex: 1 1 300px; }
.cjl a.souvenir { display: block; color: var(--texte); text-decoration: none; padding: 6px 0; }
.cjl a.souvenir b { color: var(--ambre); font-weight: 500; }

/* ---------- notes ---------- */
.notes { display: flex; flex-direction: column; border-top: 1px solid var(--trait); }
.note { display: flex; gap: 20px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--trait); }
.lecture { flex-shrink: 0; width: 48px; height: 48px; border-radius: 24px; border: 1.5px solid var(--ambre); background: none; color: var(--ambre); display: flex; align-items: center; justify-content: center; }
.note:first-child .lecture, .lecture.en-cours { background: var(--ambre); color: var(--fond); }
.lecture:disabled { opacity: .4; cursor: default; }
.note-corps { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.note-meta { font-size: 12px; color: var(--texte-3); letter-spacing: .06em; text-transform: uppercase; }
.note-texte { font-family: var(--serif); font-size: 20px; line-height: 1.6; }
.note-texte p { margin: 0 0 12px; }
.note-texte p:last-child { margin: 0; }
.note-texte.replie { font-style: italic; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.barre { height: 3px; border-radius: 2px; background: var(--trait-2); overflow: hidden; }
.barre i { display: block; height: 100%; width: 0; background: var(--ambre); }
.bandeau-demo { padding: 10px 14px; border-radius: 12px; background: #3A2E14; color: var(--ambre-clair); font-size: 13px; line-height: 1.5; }
.vide-jour { padding: 28px 22px; border-radius: 14px; background: var(--carte); text-align: center; color: var(--texte-2); line-height: 1.6; }
.vide-jour .t { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--texte); display: block; margin-bottom: 6px; }
.nav-jours { display: flex; justify-content: space-between; font-size: 14px; }
.nav-jours a { text-decoration: none; padding: 10px 0; }

/* ---------- calendrier ---------- */
.mois { display: flex; flex-direction: column; gap: 10px; }
.mois h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .jsem { font-size: 11px; color: var(--texte-3); text-align: center; letter-spacing: .06em; padding-bottom: 4px; }
.cal a, .cal span.c { aspect-ratio: 1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; font-family: var(--serif); font-size: 18px; color: var(--texte-2); }
.cal a.plein { background: var(--carte); color: var(--texte); }
.cal a.plein::after { content: ""; width: 4px; height: 4px; border-radius: 2px; background: var(--ambre); }
.cal a.aujourdhui { outline: 1.5px solid var(--ambre); }
.liste-jours { display: flex; flex-direction: column; border-top: 1px solid var(--trait); }
.liste-jours a { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--trait); color: var(--texte); text-decoration: none; }
.liste-jours .d { font-size: 12px; color: var(--texte-3); letter-spacing: .06em; text-transform: uppercase; }
.liste-jours .x { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.5; }

.bandeau-faceid { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin: 0 16px 8px; padding: 12px 16px; border-radius: 14px; background: var(--carte-2); font-size: 14px; }

/* ---------- verrou ---------- */
.verrou { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: max(72px, 12vh) 32px 40px; gap: 24px; }
.verrou-titre { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.verrou h1 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; }
.verrou p { margin: 0; font-size: 14px; color: var(--texte-2); max-width: 300px; }
.points { display: flex; gap: 16px; min-height: 14px; }
.points span { width: 14px; height: 14px; border-radius: 7px; border: 1.5px solid #5A6380; }
.points span.on { background: var(--ambre); border-color: var(--ambre); }
.verrou-erreur { min-height: 18px; color: #F0A08A !important; }
.pave { display: grid; grid-template-columns: repeat(3, 72px); gap: 16px 28px; }
.pave button { width: 72px; height: 72px; border-radius: 36px; border: none; background: var(--carte); font-family: var(--serif); font-size: 26px; }
.pave button:active { background: var(--trait-2); }
.pave button.texte { background: none; font-family: var(--sans); font-size: 14px; color: var(--texte-2); }
.verrou-rappel { margin-top: auto !important; font-size: 12px !important; color: var(--texte-3) !important; text-align: center; }

@media (max-width: 700px) {
  .grille-2, .grille-3 { grid-template-columns: minmax(0, 1fr); }
  .entete nav a { padding: 10px 10px; }
  .note { gap: 14px; }
  .note-texte { font-size: 18px; }
  .semaine { width: 100%; gap: 4px; }
  .semaine a { flex: 1 1 0; width: auto; min-width: 0; height: 58px; }
  .semaine .fleche { flex: 0 0 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .vue-entree { animation: apparition .25s ease-out; }
  @keyframes apparition { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
