:root {
  color-scheme: light;
  --font-titre: Garamond, "EB Garamond", "Apple Garamond", "Times New Roman", serif;
  --font-texte: Garamond, "EB Garamond", "Apple Garamond", "Times New Roman", serif;
  --ink: #173d31;
  --muted: #52675b;
  --fir: #174936;
  --deep: #10372c;
  --red: #922e35;
  --rose: #f2d7d1;
  --gold: #b78a3d;
  --cream: #fcf8eb;
  --paper: #fffdf5;
  --line: #a9b5a1;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font: 18px/1.5 var(--font-texte);
  background-color: #e9e6d6;
  background-image: radial-gradient(#b7a87955 0.7px, transparent 0.8px), linear-gradient(135deg, #f8eee4, #e7eddf 55%, #f5e0dd);
  background-size: 7px 7px, 100% 100%;
}
a { color: inherit; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #aa4b20; outline-offset: 3px; }
.header, main, footer { width: min(100% - 24px, 1050px); margin-inline: auto; }
.header {
  position: relative;
  margin-top: 12px;
  padding: 22px 18px 18px;
  color: var(--cream);
  background: var(--deep);
  border: 3px solid var(--gold);
  outline: 2px solid var(--deep);
  box-shadow: 5px 5px 0 var(--red), inset 0 0 0 3px #ffffff18;
}
/* Crochets décoratifs pour de futurs effets, actuellement entièrement fixes. */
.garland { display: block; overflow: hidden; margin: -13px 0 12px; color: #e8c77d; font-size: 14px; letter-spacing: .35em; white-space: nowrap; }
.bell { display: inline-block; margin-right: 3px; }
.snowflakes { position: absolute; top: 22px; right: 16px; color: #f0d8a2; font-size: 20px; pointer-events: none; }
.brand { display: block; max-width: 85%; color: #fff9e7; font-size: clamp(25px, 6vw, 38px); font-weight: 900; line-height: 1.08; text-decoration: none; text-shadow: 2px 2px 0 #9c4546; }
.brand span { color: #edc87f; }
.blog-welcome { margin: 9px 0; color: #f3d5ce; font-size: 13px; font-weight: 750; }
.visit-counter { display: inline-block; margin: 0 0 14px; padding: 4px 8px; color: var(--deep); background: #f6e5bd; border: 2px solid #c39a57; font-size: 12px; font-weight: 800; }
.visit-counter strong { padding: 1px 4px; color: #f9e4a7; background: var(--deep); font-family: monospace; letter-spacing: .12em; }
nav { display: flex; flex-wrap: wrap; gap: 7px; }
nav a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 11px; color: var(--deep); background: #f8eed7; border: 2px solid #d4b474; box-shadow: 2px 3px 0 #842f35; font-size: 13px; font-weight: 800; text-align: center; text-decoration: none; }
nav a:hover { background: #f2d7d1; }
main { min-height: 70vh; padding: 28px 0 48px; }
.page-heading { position: relative; margin-bottom: 24px; padding: 22px 20px; background: var(--paper); border: 3px solid var(--red); box-shadow: 5px 5px 0 #c7a258, inset 0 0 0 4px #f5e9d3; }
.page-heading::after { content: '✦  ❄'; position: absolute; top: 16px; right: 18px; color: #a67631; font-size: 17px; }
.eyebrow, .overview-label, .day-label, .attempt-count { color: var(--red); font-size: 11px; line-height: 1.3; letter-spacing: .13em; font-weight: 850; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 900; line-height: 1.12; }
h1 { max-width: 750px; margin: 12px 0 15px; color: var(--fir); font-size: clamp(36px, 9vw, 64px); letter-spacing: -.035em; text-shadow: 2px 2px 0 #e8c0b3; }
h2 { margin-bottom: 12px; color: var(--fir); font-size: clamp(26px, 6vw, 36px); letter-spacing: -.025em; }
h3 { margin: 28px 0 12px; color: var(--red); font-size: 21px; }
.intro, .muted, .helper { color: var(--muted); }
.intro { max-width: 570px; margin-bottom: 0; font-weight: 600; }
.overview { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 34px; padding: 18px; color: var(--cream); background: var(--fir); border: 3px solid #c19a54; box-shadow: 4px 4px 0 #8e3438, inset 0 0 0 3px #ffffff15; }
.overview-label { display: block; color: #f4dba8; }
.overview strong { font-size: 32px; line-height: 1.2; }
.overview small { font-size: 14px; }
.overview .muted { color: #f0ebdc; }
.text-link, .back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; }
.text-link { color: #fff8e7; text-underline-offset: 4px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading .muted { font-size: 12px; font-weight: 700; text-align: right; }
.calendar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.day-card {
  --paper-case: #ffe8a0;
  --edge-case: #9a691c;
  --number-ink: #38250f;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 132px;
  color: var(--number-ink);
  text-decoration: none;
  background-color: var(--paper-case);
  background-image: linear-gradient(135deg, var(--edge-case) 0 8px, transparent 8px), linear-gradient(225deg, var(--edge-case) 0 8px, transparent 8px), radial-gradient(ellipse at center, #fff8d866, transparent 75%);
  border: 4px double var(--edge-case);
  border-radius: 18px 18px 8px 8px;
  box-shadow: 2px 3px 4px #24170f55, 0 0 12px #e8bb4a80;
}
.day-card::before { content: ''; position: absolute; inset: 8px; border: 1px solid var(--edge-case); border-radius: 12px 12px 3px 3px; pointer-events: none; }
.day-card::after { content: 'PARFUM'; position: absolute; top: 18px; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.day-card:hover { filter: brightness(.96); }
.day-card strong { position: relative; z-index: 2; font-size: 40px; line-height: 1; font-weight: 900; }
.day-card.locked { --paper-case: #c9c9bd; --edge-case: #686c5e; --number-ink: #263a30; box-shadow: 2px 3px 4px #24170f55; }
.day-card.solved { --paper-case: #e6d0a0; --edge-case: #79511b; --number-ink: #342313; box-shadow: 2px 3px 4px #24170f55; }
.day-mark { position: absolute; z-index: 3; right: 9px; bottom: 8px; width: 24px; height: 24px; padding: 2px; color: #263a30; background: #e7e7dc; border-radius: 50%; fill: none; stroke: currentColor; stroke-width: 2; }
.solved .day-mark { color: #fff5d8; background: #84272f; fill: #84272f; stroke: #fff5d8; stroke-width: 1.5; }
.solved .day-mark path + path { fill: none; }
.legend { display: flex; gap: 10px 16px; flex-wrap: wrap; margin-top: 20px; color: var(--muted); font-size: 12px; font-weight: 700; }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border: 1px solid var(--fir); background: #f4ded9; }
.dot.pale { background: var(--fir); }
.dot.gray { background: #e8e8dd; border-color: #899588; }
.back { margin: 0 0 16px; padding: 0 10px; color: var(--fir); background: var(--paper); border: 2px solid var(--fir); box-shadow: 2px 2px 0 #c4a25f; text-decoration: none; }
.panel { max-width: 800px; padding: 22px; background: var(--paper); border: 3px solid var(--fir); box-shadow: 5px 5px 0 #c59a58, inset 0 0 0 4px #f5e9d3; }
.panel > p { color: var(--muted); }
.attempt-count { margin: 26px 0 12px; color: var(--red) !important; }
label { display: block; margin: 20px 0 8px; font-weight: 800; }
input { width: 100%; min-height: 52px; padding: 12px; color: var(--ink); background: #fff; border: 2px solid #6d8774; border-radius: 0; }
.input-wrap { position: relative; }
.suggestions { position: absolute; z-index: 2; top: 100%; width: 100%; background: var(--paper); box-shadow: 4px 4px 0 #b89961; }
.suggestions button { display: flex; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); text-align: left; }
.suggestions button:hover { background: #e6eddd; }
.suggestions button span { color: var(--muted); font-size: 12px; }
.helper { margin: 8px 0 22px; font-size: 13px; }
.button, .choice, .tag, .favorite { color: var(--deep); background: #f2d7d1; border: 2px solid var(--fir); box-shadow: 3px 4px 0 var(--fir); font-weight: 800; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 22px; color: #fffaf0; background: var(--red); border-color: #6e252c; box-shadow: 3px 4px 0 #6e252c; font-size: 15px; text-align: center; text-decoration: none; }
.button.secondary { color: var(--fir); background: #e5eddf; border-color: var(--fir); box-shadow: 3px 4px 0 var(--fir); }
.button:hover, .choice:hover, .tag:hover, .favorite:hover { filter: brightness(.95); }
.skip { display: block; min-height: 48px; margin-top: 12px; padding: 14px 0; color: var(--red); background: none; border: 0; font-weight: 800; text-decoration: underline; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { min-height: 48px; margin-bottom: 8px; padding: 8px 12px; background: #e5eddf; }
.feedback { margin: 20px 0; padding: 14px; color: var(--ink) !important; background: #faeae1; border: 2px dashed #a65c50; }
.feedback p:last-child { margin-bottom: 0; }
.result { display: inline-block; margin: 2px; padding: 4px 8px; color: #394d40; background: #fff; border: 1px solid #829488; }
.result.exact { color: #164e32; background: #e1efdf; border-color: #28714a; }
.result.proche { color: #75400e; background: #fff0c8; border-color: #a06a22; }
.hint { color: #873c32; font-weight: 700; }
.choices { display: grid; gap: 12px; margin-top: 24px; }
.choice { min-height: 70px; padding: 16px; background: #edf2e8; text-align: left; }
.choice strong, .choice span { display: block; }
.choice span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.reveal-header { display: flex; justify-content: space-between; gap: 12px; }
.favorite { flex: none; width: 50px; height: 50px; color: var(--red); font-size: 28px; }
.favorite[aria-pressed=true] { background: #e9bcb8; }
.pyramid { border-top: 1px solid var(--line); }
.pyramid > div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pyramid p { margin: 0; }
.ambiance { white-space: pre-line; }
.result-line { padding: 24px 0; color: var(--fir); border-top: 1px solid var(--line); font-weight: 800; }
.word-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 750px; margin-bottom: 30px; }
.letter { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 70px; background: var(--paper); border: 2px solid var(--fir); box-shadow: 2px 2px 0 #c4a25f; }
.letter span { color: var(--muted); font-size: 11px; font-weight: 700; }
.letter strong { color: var(--red); font-size: 28px; }
.word-note, .final-word { margin-bottom: 30px; }
.recap-list { background: var(--paper); border: 2px solid var(--fir); }
.recap-row { display: flex; align-items: center; gap: 12px; min-height: 82px; padding: 14px; border-bottom: 1px solid var(--line); }
.recap-row:last-child { border-bottom: 0; }
.recap-number { width: 36px; color: var(--red); font-size: 24px; font-weight: 900; }
.recap-row div { flex: 1; min-width: 0; }
.recap-row a { color: var(--fir); font-size: 18px; font-weight: 800; }
.recap-row p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.empty-symbol { padding: 50px; color: #a77d3b; font-size: 80px; text-align: center; }
footer { margin-bottom: 12px; padding: 20px; color: #f8edda; background: var(--deep); border: 3px solid var(--gold); box-shadow: 5px 5px 0 var(--red); font-size: 14px; font-weight: 800; text-align: center; }
@media (min-width: 700px) {
  .header { padding: 24px 28px; }
  main { padding-top: 40px; }
  .page-heading { padding: 30px; }
  .calendar { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
  .day-card { min-height: 160px; }
  .day-card strong { font-size: 46px; }
  .panel { padding: 36px; }
  .word-grid { grid-template-columns: repeat(8, 1fr); }
}

/* Salon victorien : décor fixe, sans ressources externes. */
body {
  font-family: var(--font-texte);
  background-color: #321b18;
  background-image:
    radial-gradient(ellipse at 50% 32%, #d58a3c66, transparent 48%),
    radial-gradient(ellipse at 15% 5%, #e7ad5b38, transparent 35%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='160' viewBox='0 0 120 160'%3E%3Cg fill='none' stroke='%23d6ad6b' stroke-opacity='.16' stroke-width='1.5'%3E%3Cpath d='M60 8C54 22 40 24 40 38c0 9 7 14 20 20 13-6 20-11 20-20 0-14-14-16-20-30Zm0 50v22m0-66c-1 15-12 19-12 27 0 5 5 9 12 13 7-4 12-8 12-13 0-8-11-12-12-27ZM60 80c-8 11-23 13-23 27 0 9 8 16 23 23 15-7 23-14 23-23 0-14-15-16-23-27Zm0 5c-3 13-14 15-14 23 0 6 6 10 14 15 8-5 14-9 14-15 0-8-11-10-14-23ZM60 130v22M0 8c6 14 20 16 20 30S7 54 0 58m120-50c-6 14-20 16-20 30s13 16 20 20M0 80c8 11 23 13 23 27S8 124 0 130m120-50c-8 11-23 13-23 27s15 17 23 23'/%3E%3C/g%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, #4b2027 0 120px, #253a2c 120px 240px);
  background-size: auto, auto, 120px 160px, auto;
}
h1, h2, h3, .brand { font-family: var(--font-titre); }
.header, footer {
  background-color: #352019;
  background-image: repeating-linear-gradient(92deg, #ffffff08 0 2px, transparent 2px 17px, #00000014 19px 23px), linear-gradient(135deg, #492820, #241713 55%, #573023);
  border-color: #d0a657;
  outline-color: #2a1713;
  box-shadow: 5px 5px 0 #24120f, inset 0 0 0 3px #f4cf8326, inset 0 0 20px #0008;
}
.header { border-bottom: 8px double #d0a657; }
.garland { color: #f6d889; text-shadow: 0 0 7px #efb34e; }
.snowflakes { color: #f5dfa5; }
.overview {
  background-color: #153b2c;
  background-image: radial-gradient(circle at 50% 50%, #d2ad6b55 0 2px, transparent 3px), repeating-linear-gradient(45deg, transparent 0 25px, #ffffff0b 26px 27px, transparent 28px 54px), repeating-linear-gradient(-45deg, transparent 0 25px, #00000020 26px 27px, transparent 28px 54px);
  background-size: 54px 54px, auto, auto;
  border-color: #d0a657;
  box-shadow: 4px 4px 0 #291511, inset 0 0 0 3px #e8c88038;
}
.page-heading, .panel { border-color: #a67b38; box-shadow: 5px 5px 0 #351b16, inset 0 0 0 4px #ead5ac, inset 0 0 0 6px #b78a3d; }
.section-heading, .legend, .word-note {
  padding: 10px 14px;
  color: #fff8e8;
  background: #213b2e;
  border: 2px solid #c9a258;
  box-shadow: 3px 3px 0 #291511;
}
.section-heading h2, .section-heading .muted, .section-heading .eyebrow { color: #fff8e8; }
.legend { width: fit-content; }
.word-note { width: fit-content; }
footer { position: relative; border-top: 8px double #d0a657; }
footer::before { content: '❧  ✦  ❧'; display: block; color: #f1cf80; letter-spacing: .2em; }
footer::after { content: '🧦  🧦'; display: block; margin-top: 4px; font-size: 20px; }

/* Lumières décoratives, sans interaction avec le contenu. */
.garland {
  display: flex;
  align-items: flex-start;
  height: 25px;
  overflow: visible;
  margin: -13px 0 12px;
  pointer-events: none;
  animation: garland-float 8s ease-in-out infinite alternate;
}
.garland i {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 9px;
  border-bottom: 1px solid #b69a61;
  border-radius: 0 0 50% 50%;
  color: #f5ce76;
}
.garland i::after {
  content: '';
  position: absolute;
  top: 8px;
  left: calc(50% - 3px);
  width: 6px;
  height: 9px;
  border-radius: 50% 50% 45% 45%;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
  transform-origin: 50% 0;
  animation: bulb-twinkle 3.4s ease-in-out infinite alternate,
             bulb-sway 4.8s ease-in-out infinite alternate;
}
.garland i:nth-child(3n + 2) { color: #d46c62; }
.garland i:nth-child(3n) { color: #87b989; }
.garland i:nth-child(3n + 2)::after { animation-delay: -1.2s, -1.4s; animation-duration: 3.4s, 5.6s; }
.garland i:nth-child(3n)::after { animation-delay: -2.3s, -2.8s; animation-duration: 3.4s, 6.2s; }
.garland i:nth-child(4n)::after { animation-delay: -.6s, -3.1s; animation-duration: 3.4s, 5.2s; }
.garland i:nth-child(5n)::after { animation-delay: -1.8s, -2s; animation-duration: 3.4s, 6.6s; }
.sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sparkles i { position: absolute; color: #e7c47b; font-size: 11px; font-style: normal; opacity: .55; animation: star-twinkle 4s ease-in-out infinite alternate; }
.sparkles i:nth-child(1) { top: 35px; right: 12%; }
.sparkles i:nth-child(2) { top: 72px; right: 5%; font-size: 8px; animation-delay: -1.5s; }
.sparkles i:nth-child(3) { bottom: 18px; right: 3%; font-size: 9px; animation-delay: -3s; }
.fireplace-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, #df873b38, transparent 65%);
  animation: hearth-glow 5s ease-in-out infinite alternate;
}
@keyframes garland-float { from { transform: translateY(-.5px); } to { transform: translateY(.5px); } }
@keyframes bulb-sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes bulb-twinkle { from { opacity: .55; } to { opacity: 1; } }
@keyframes star-twinkle { from { opacity: .25; transform: scale(.85); } to { opacity: .75; transform: scale(1); } }
@keyframes hearth-glow { from { opacity: .45; } to { opacity: .85; } }
@media (prefers-reduced-motion: reduce) {
  .garland, .garland i::after, .sparkles i, .fireplace-glow { animation: none; }
}

/* Page unique et panneau du jour. */
.page-section { margin-top: 42px; }
.sheet[hidden] { display: none; }
.sheet { position: fixed; z-index: 10; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: #160c0bbd; }
.sheet-content { position: relative; width: min(100%, 800px); max-height: 92dvh; overflow-y: auto; padding: 16px 16px max(24px, env(safe-area-inset-bottom)); background: #f7eddb; border: 3px solid #c9a258; border-bottom: 0; box-shadow: 0 -8px 30px #0008; animation: sheet-rise .25s ease-out; }
.sheet-close { position: sticky; z-index: 3; top: 0; width: 100%; margin-bottom: 16px; }
.sheet-content .page-heading { margin-bottom: 18px; }
.sheet-content .panel { max-width: none; }
.sheet-open { overflow: hidden; }
@keyframes sheet-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .sheet-content { animation: none; } }
