@charset "UTF-8";
/*
 * Kluk — charte graphique, feuille de style réutilisable.
 * Extraite de assets/css/style.scss (site kluk.fr), en CSS pur, sans Sass.
 * Copie de charte/css/kluk.css : seuls les chemins des polices changent, ils
 * pointent vers app/assets/fonts/ (Propshaft les réécrit avec l'empreinte).
 * Ne pas modifier ici : les compléments propres à l’application sont dans app.css.
 *
 * Palette : la porcelaine du matin, l'encre du thé, le chêne de la table,
 * et les quatre couleurs des tasses en accent.
 *
 * Sommaire
 *   1. Polices
 *   2. Variables (couleurs, typographies, mise en page)
 *   3. Base
 *   4. Liens, focus, lien d'évitement
 *   5. Boutons
 *   6. En-tête et navigation
 *   7. Colonne de texte et titres
 *   8. Illustration « tasses »
 *   9. Calendrier d'humeurs
 *  10. Photos
 *  11. Formulaire
 *  12. Pied de page
 *  13. Impression
 */
/* ---------- 1. Polices ---------- */
@font-face {
  font-family: "Young Serif";
  src: url("/assets/young-serif-400-0282673f.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Fichier variable : couvre toutes les graisses de 200 à 800 */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/atkinson-hyperlegible-next-400-c30cdd7a.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/atkinson-hyperlegible-next-400-italic-803b25a5.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
/* ---------- 2. Variables ---------- */
:root {
  /* Fonds et texte */
  --porcelaine: #F5F6F0;
  --porcelaine-fonce: #E9ECE2;
  --encre: #2E2A26;
  --encre-douce: #5A534C;
  --chene: #D9BC94;
  --chene-fonce: #B48D5F;
  /* Humeurs (les quatre tasses) */
  --gris: #8D97A8;
  --orange: #EDA33D;
  --vert: #5F9B59;
  --rouge: #D8573F;
  --vert-lien: #3F7A3B;
  /* Teintes utilitaires (écrites en dur dans le site d'origine) */
  --encre-survol: #45403A;
  --surface: #FBFCF8;
  --bordure-champ: #8A8279;
  --erreur-fond: #FBE9E5;
  --blanc: #fff;
  /* Typographies */
  --serif: "Young Serif", Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  /* Mise en page */
  --colonne: 36rem;
  --gouttiere: 1.25rem;
  --largeur-entete: 64rem;
  /* Arrondis */
  --arrondi-petit: 0.5rem;
  --arrondi: 0.75rem;
  --arrondi-pilule: 999px;
}

/* ---------- 3. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--porcelaine);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1.1875rem;
  line-height: 1.65;
  font-kerning: normal;
  hyphens: manual;
}

main {
  flex: 1;
  outline: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ---------- 4. Liens, focus, lien d'évitement ---------- */
a {
  color: var(--encre);
  text-decoration-line: underline;
  text-decoration-color: var(--vert);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--encre);
}

:focus-visible {
  outline: 3px solid var(--encre);
  outline-offset: 3px;
  border-radius: 4px;
}

.evitement {
  position: absolute;
  left: var(--gouttiere);
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--encre);
  color: var(--porcelaine);
  z-index: 10;
}

.evitement:focus {
  top: 0.75rem;
}

/* ---------- 5. Boutons ---------- */
.bouton {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: var(--arrondi-pilule);
  background: var(--encre);
  color: var(--porcelaine);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.bouton:hover {
  background: var(--encre-survol);
  color: var(--porcelaine);
}

.bouton:focus-visible {
  outline-offset: 4px;
  border-radius: var(--arrondi-pilule);
}

.bouton-petit {
  padding: 0.45rem 1rem;
  font-size: 1rem;
}

/* Un bouton seul dans son paragraphe respire davantage */
p:has(> .bouton:only-child) {
  margin: 2rem 0;
}

/* ---------- 6. En-tête et navigation ---------- */
.entete {
  max-width: var(--largeur-entete);
  margin: 0 auto;
  padding: 1.25rem var(--gouttiere);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  width: 100%;
}

.logo {
  display: inline-block;
  padding: 0.05rem 0.55rem 0.15rem;
  border: 2.5px solid var(--encre);
  border-radius: var(--arrondi-petit);
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.35rem;
  font-size: 1rem;
}

.nav a:not(.bouton) {
  text-decoration-color: transparent;
}

.nav a:not(.bouton):hover,
.nav a[aria-current=page]:not(.bouton) {
  text-decoration-color: var(--vert);
}

.nav a.bouton[aria-current=page] {
  background: var(--porcelaine);
  color: var(--encre);
  box-shadow: inset 0 0 0 2px var(--encre);
}

/* ---------- 7. Colonne de texte et titres ---------- */
.texte {
  max-width: calc(var(--colonne) + 2 * var(--gouttiere));
  margin: 0 auto;
  padding: 2rem var(--gouttiere) 5rem;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 1.6rem + 3.6vw, 3.75rem);
  margin: 1.5rem 0 1.5rem;
}

h2 {
  font-size: clamp(1.6rem, 1.35rem + 1vw, 2rem);
  margin: 4.5rem 0 1.25rem;
}

p {
  margin: 0 0 1.15rem;
}

/* Le chapeau : paragraphe entièrement en italique juste sous le titre */
h1 + p:has(> em:only-child) {
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--encre-douce);
}

.note {
  margin-top: 2.5rem;
  color: var(--encre-douce);
  font-size: 1.0625rem;
}

.exergue {
  margin: 2.25rem 0;
  padding-left: 1.25rem;
  border-left: 4px solid var(--orange);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.4;
}

code {
  font-size: 0.9em;
  background: var(--porcelaine-fonce);
  padding: 0.05em 0.3em;
  border-radius: 3px;
}

/* ---------- 8. Illustration « tasses » ---------- */
.tasses {
  margin: 1.5rem 0 0;
}

/* L'illustration déborde légèrement de la colonne sur grand écran */
@media (min-width: 48rem) {
  .tasses {
    margin-inline: -4rem;
  }
}
.tasses svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.table {
  fill: var(--chene);
}

.table-fil,
.tasse-corps,
.tasse-anse,
.kluk-socle,
.vapeur path {
  stroke: var(--encre);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tasse-anse {
  fill: none;
  stroke-width: 6;
}

.tasse-corps {
  fill: currentColor;
}

.tasse-reflet {
  fill: none;
  stroke: var(--blanc);
  stroke-opacity: 0.45;
  stroke-width: 4;
  stroke-linecap: round;
}

.kluk-socle {
  fill: var(--chene-fonce);
}

.kluk-voyant {
  fill: var(--porcelaine);
}

.vapeur path {
  fill: none;
  stroke-width: 2.5;
  stroke: var(--encre-douce);
}

.humeur-gris {
  color: var(--gris);
}

.humeur-orange {
  color: var(--orange);
}

.humeur-rouge {
  color: var(--rouge);
}

.humeur-vert {
  color: var(--vert);
}

@media (prefers-reduced-motion: no-preference) {
  .vapeur path {
    animation: vapeur 5s ease-in-out infinite;
  }
  .vapeur path + path {
    animation-delay: 2.5s;
  }
}
@keyframes vapeur {
  0%, 100% {
    opacity: 0.25;
    transform: translateY(6px);
  }
  50% {
    opacity: 0.9;
    transform: translateY(-6px);
  }
}
/* ---------- 9. Calendrier d'humeurs (décoratif) ---------- */
.calendrier {
  display: grid;
  grid-template-rows: repeat(7, auto);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  margin: 2.25rem 0 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border-radius: var(--arrondi);
  box-shadow: inset 0 0 0 1px var(--porcelaine-fonce);
}

.jour {
  aspect-ratio: 1;
  border-radius: 2px;
}

.jour-g {
  background: var(--gris);
}

.jour-o {
  background: var(--orange);
}

.jour-v {
  background: var(--vert);
}

.jour-r {
  background: var(--rouge);
}

@media (max-width: 30rem) {
  .calendrier {
    gap: 3px;
    padding: 0.9rem;
  }
}
/* ---------- 10. Photos ---------- */
.photo {
  margin: 2rem 0;
}

.photo img {
  width: 100%;
  height: auto;
  border-radius: var(--arrondi);
}

.photo figcaption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--encre-douce);
}

.photo-attente {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  aspect-ratio: 3/2;
  padding: 1.5rem;
  border: 2px dashed var(--chene-fonce);
  border-radius: var(--arrondi);
  background: var(--porcelaine-fonce);
  color: var(--encre-douce);
  font-size: 1rem;
  line-height: 1.5;
}

.photo-attente svg {
  flex: none;
  width: 2.75rem;
  fill: none;
  stroke: var(--chene-fonce);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.photo-attente p {
  margin: 0;
}

.photo-attente strong {
  color: var(--encre);
}

/* ---------- 11. Formulaire ---------- */
.formulaire {
  margin: 2.5rem 0 1rem;
  padding: 1.75rem 1.25rem;
  background: var(--surface);
  border-radius: var(--arrondi);
  box-shadow: inset 0 0 0 1px var(--porcelaine-fonce);
}

@media (min-width: 40rem) {
  .formulaire {
    padding: 2.25rem 2.5rem;
  }
}
.champ {
  margin: 0 0 1.75rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.champ > label,
.champ > legend {
  display: block;
  padding: 0;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.precision {
  font-weight: 400;
  color: var(--encre-douce);
}

.formulaire input[type=email],
.formulaire textarea {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--bordure-champ);
  border-radius: var(--arrondi-petit);
  background: var(--blanc);
  color: var(--encre);
  font: inherit;
  line-height: 1.4;
}

.formulaire textarea {
  resize: vertical;
  min-height: 8rem;
}

.formulaire input[type=email]:focus-visible,
.formulaire textarea:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: 1px;
  border-color: var(--encre);
}

.choix {
  list-style: none;
  margin: 0;
  padding: 0;
}

.choix li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.choix input {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0.2rem 0 0;
  accent-color: var(--vert-lien);
  cursor: pointer;
}

.choix label {
  cursor: pointer;
}

/* Champ piège anti-robots, invisible */
.piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.formulaire-erreur {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--rouge);
  background: var(--erreur-fond);
  font-size: 1rem;
}

.formulaire .bouton {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.formulaire .bouton:disabled {
  opacity: 0.6;
  cursor: progress;
}

.formulaire-secours {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--encre-douce);
}

/* ---------- 12. Pied de page : la table en bois ---------- */
.pied {
  background: var(--chene);
  border-top: 3px solid var(--encre);
  font-size: 1rem;
}

.pied-interieur {
  max-width: calc(var(--colonne) + 2 * var(--gouttiere));
  margin: 0 auto;
  padding: 2rem var(--gouttiere) 2.5rem;
}

.pied-phrase {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.pied-liens {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.pied a {
  text-decoration-color: var(--encre);
  text-decoration-thickness: 1px;
}

.pied a:hover {
  text-decoration-thickness: 2px;
}

/* ---------- 13. Impression ---------- */
@media print {
  .entete .nav, .pied, .tasses, .calendrier {
    display: none;
  }
  body {
    background: var(--blanc);
  }
}
/*
 * Styles propres à l'application, construits sur la charte (charte.css).
 * La couleur d'un mode est choisie par l'utilisateur : elle arrive dans la variable
 * --humeur, posée en style en ligne. Le reste de l'interface reste neutre
 * (porcelaine, encre, chêne) pour que les humeurs soient les seules couleurs.
 *
 * Sommaire
 *   1. Compléments à la charte (boutons, champs, navigation)
 *   2. Messages flash
 *   3. Carte d'humeur (illustration posée sur la Kluk)
 *   4. Légende
 *   5. Calendrier des humeurs
 *   6. Tableau de bord
 *   7. Page publique
 *   8. Page d'un jour (journal)
 *   9. Impression
 */
/* ---------- 1. Compléments à la charte ---------- */
/* La charte ne prépare les <button class="bouton"> que dans un .formulaire */
button.bouton,
input.bouton {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Bouton d'action présenté comme un lien de la charte */
button.lien {
  padding: 0;
  border: 0;
  background: none;
  color: var(--encre);
  font: inherit;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-color: var(--vert);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

button.lien:hover {
  text-decoration-color: var(--encre);
}

/* button_to enveloppe son bouton dans un formulaire : le garder en ligne */
.nav form.button_to {
  display: inline;
}

.formulaire input[type=password],
.formulaire input[type=text] {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--bordure-champ);
  border-radius: var(--arrondi-petit);
  background: var(--blanc);
  color: var(--encre);
  font: inherit;
  line-height: 1.4;
}

.formulaire input[type=password]:focus-visible,
.formulaire input[type=text]:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: 1px;
  border-color: var(--encre);
}

.formulaire .formulaire-erreur {
  margin: 0 0 1.75rem;
}

.texte-etroit {
  max-width: calc(30rem + 2 * var(--gouttiere));
}

.texte-etroit h1 {
  font-size: clamp(2.1rem, 1.7rem + 2vw, 2.75rem);
}

.texte-etroit .formulaire {
  margin-top: 1.5rem;
}

/* ---------- 2. Messages flash ---------- */
.flash {
  max-width: calc(var(--colonne) + 2 * var(--gouttiere));
  margin: 0 auto;
  padding: 0.5rem var(--gouttiere) 0;
}

.flash-message {
  margin: 0 0 0.5rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--vert);
  background: var(--surface);
  font-size: 1rem;
}

.flash-alerte {
  border-left-color: var(--rouge);
  background: var(--erreur-fond);
}

/* ---------- 3. Carte d'humeur ---------- */
/* L'illustration du mode, dessinée à l'encre sur papier blanc, posée sur le socle
   de la Kluk : une pilule à la couleur de l'humeur, avec son voyant. */
.carte-humeur {
  margin: 0;
}

.carte-humeur img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--blanc);
  border: 2.5px solid var(--encre);
  border-radius: var(--arrondi);
}

.carte-humeur::after {
  content: "";
  display: block;
  height: 1rem;
  margin: 0.4rem 6% 0;
  border: 2.5px solid var(--encre);
  border-radius: var(--arrondi-pilule);
  background: radial-gradient(circle, var(--porcelaine) 0 2.5px, transparent 3px), var(--humeur, var(--porcelaine-fonce));
}

/* ---------- 4. Légende ---------- */
.pastille {
  flex: none;
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  background: var(--humeur);
}

.pastille-supposee {
  background: color-mix(in srgb, var(--encre-douce) 35%, var(--porcelaine));
}

.pastille-inconnue {
  background: var(--surface);
  border: 1.5px dashed var(--bordure-champ);
}

.pastille-journal {
  position: relative;
  background: var(--porcelaine-fonce);
}

.pastille-journal::after,
.jour-journal::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blanc);
  box-shadow: 0 0 0 1px var(--encre);
}

.legende {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.4;
}

.legende ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

.legende li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legende .legende-etats {
  margin-top: 0.6rem;
  color: var(--encre-douce);
  font-size: 0.9375rem;
}

/* ---------- 5. Calendrier des humeurs ---------- */
/* Une colonne par semaine, une ligne par jour (du lundi au dimanche), comme sur GitHub. */
.calendrier-humeurs {
  --case: 0.95rem;
  --ecart: 3px;
}

@media (max-width: 30rem) {
  .calendrier-humeurs {
    --case: 0.9rem;
  }
}
.annee-titre {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.6rem;
}

.annee-mois {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1rem;
}

.mois-nom {
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4rem;
  color: var(--encre-douce);
}

.mois-jours,
.semaine-jours {
  display: grid;
  grid-template-rows: repeat(7, var(--case));
  grid-auto-flow: column;
  grid-auto-columns: var(--case);
  gap: var(--ecart);
}

.semaine-jours {
  grid-auto-columns: auto;
  padding-top: 1.7rem;
  margin-right: 0.15rem;
  font-size: 0.75rem;
  line-height: var(--case);
  color: var(--encre-douce);
}

.jour {
  position: relative;
  display: block;
  width: var(--case);
  height: var(--case);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  font: inherit;
}

.jour-filled {
  background: var(--humeur);
}

/* Mode supposé : la couleur de la veille, pâlie */
.jour-guessed {
  background: color-mix(in srgb, var(--humeur) 35%, var(--porcelaine));
}

.jour-unknown {
  background: var(--surface);
  border: 1.5px dashed var(--bordure-champ);
}

.jour-empty {
  background: var(--porcelaine-fonce);
}

.jour-future {
  box-shadow: inset 0 0 0 1px var(--porcelaine-fonce);
}

button.jour {
  cursor: pointer;
}

button.jour[aria-pressed=true] {
  outline: 2.5px solid var(--encre);
  outline-offset: 2px;
  border-radius: 3px;
}

button.jour:focus-visible {
  outline: 3px solid var(--encre);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  button.jour {
    transition: transform 0.12s ease;
  }
  button.jour:hover {
    transform: scale(1.3);
    z-index: 1;
  }
}
/* ---------- 6. Tableau de bord ---------- */
.tableau {
  max-width: var(--largeur-entete);
  margin: 0 auto;
  padding: 0.5rem var(--gouttiere) 0;
}

.tableau-titre {
  margin: 0.5rem 0 1.25rem;
  font-size: clamp(2.1rem, 1.7rem + 2vw, 3rem);
}

.tableau-calendrier {
  padding-bottom: 3rem;
}

.detail-date {
  margin: 0;
  font-size: 1.35rem;
}

.detail-date::first-letter {
  text-transform: uppercase;
}

.detail-mode {
  margin: 0.2rem 0 0;
  font-weight: 700;
  line-height: 1.35;
}

.detail-statut {
  font-weight: 400;
  color: var(--encre-douce);
}

.detail-statut:not(:empty)::before {
  content: "(";
}

.detail-statut:not(:empty)::after {
  content: ")";
}

.detail-journal {
  margin: 0.75rem 0 1.25rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.detail-journal-vide {
  color: var(--encre-douce);
  font-style: italic;
}

/* Sur mobile, le jour choisi reste en bas de l'écran pendant qu'on parcourt le calendrier */
@media (max-width: 59.99rem) {
  .detail {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    margin: 0 calc(-1 * var(--gouttiere));
    padding: 0.9rem var(--gouttiere) 1rem;
    background: var(--porcelaine);
    border-top: 3px solid var(--encre);
  }
  .detail .carte-humeur img {
    border-width: 2px;
    border-radius: var(--arrondi-petit);
  }
  .detail .carte-humeur::after {
    height: 0.6rem;
    margin-top: 0.25rem;
    border-width: 2px;
    background: var(--humeur, var(--porcelaine-fonce));
  }
  .detail-date {
    font-size: 1.1rem;
  }
  .detail-mode {
    font-size: 1rem;
  }
  .detail-journal {
    margin: 0.35rem 0 0.6rem;
    font-size: 1rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}
@media (min-width: 60rem) {
  .tableau {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 4rem;
    align-items: start;
  }
  .detail {
    position: sticky;
    top: 1.5rem;
    margin-top: 1.25rem;
  }
  .detail-texte {
    margin-top: 1.5rem;
  }
}
/* ---------- 7. Page publique ---------- */
/* Le nom de la personne en titre. Sur ordinateur, tout tient dans le premier écran :
   l'illustration à gauche, le jour choisi et les derniers mois à droite. */
.public {
  max-width: var(--largeur-entete);
  margin: 0 auto;
  padding: 0 var(--gouttiere) 4rem;
  display: grid;
  gap: 1.5rem;
}

.public-nom {
  margin: 0;
  font-size: clamp(2.6rem, 1.8rem + 3.4vw, 4rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.carte-humeur-grande {
  width: 100%;
  max-width: 22rem;
}

.public-date {
  margin: 0;
  font-size: 1.25rem;
}

.public-date::first-letter {
  text-transform: uppercase;
}

.public-mode {
  margin: 0.15rem 0 0.5rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  line-height: 1.15;
  text-wrap: balance;
}

.public-depuis {
  margin: 0;
  font-size: 1.1rem;
}

.public-autre-jour .detail-statut:not(:empty) {
  margin-right: 0.75rem;
}

.public-historique h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
}

.public-historique .annee-mois {
  margin-top: 1rem;
}

@media (min-width: 52rem) {
  .public {
    grid-template-columns: min(19rem, 42vh) minmax(0, 1fr);
    column-gap: 3.5rem;
    row-gap: 1.25rem;
    align-items: start;
  }
  .public-nom {
    grid-column: 1/-1;
  }
  .carte-humeur-grande {
    max-width: none;
    margin-top: 0.4rem;
  }
}
/* Changement de jour : bref fondu du détail */
@media (prefers-reduced-motion: no-preference) {
  .apparition {
    animation: apparition 0.35s ease-out;
  }
}
@keyframes apparition {
  from {
    opacity: 0.1;
  }
  to {
    opacity: 1;
  }
}
/* ---------- 8. Page d'un jour (journal) ---------- */
.page-jour {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.5rem var(--gouttiere) 5rem;
}

.retour {
  margin: 0;
  font-size: 1rem;
}

.page-jour-titre {
  margin: 0.5rem 0 1.5rem;
  font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem);
}

.page-jour .carte-humeur {
  max-width: 11rem;
}

.page-jour .formulaire {
  margin-top: 1.75rem;
}

.choix-modes {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.choix-modes li {
  position: relative;
}

.choix-modes input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choix-modes label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem 0.5rem 0.85rem;
  border: 2px solid var(--bordure-champ);
  border-radius: var(--arrondi-pilule);
  background: var(--blanc);
  font-size: 1rem;
  line-height: 1.3;
  cursor: pointer;
}

.choix-modes label:hover {
  border-color: var(--encre);
}

.choix-modes input:checked + label {
  border-color: var(--encre);
  box-shadow: inset 0 0 0 1.5px var(--encre);
  background: var(--surface);
}

.choix-modes input:focus-visible + label {
  outline: 3px solid var(--encre);
  outline-offset: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

@media (min-width: 48rem) {
  .page-jour {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    grid-template-areas: "carte entete" "carte formulaire";
    column-gap: 3.5rem;
    align-items: start;
  }
  .page-jour-entete {
    grid-area: entete;
  }
  .page-jour .carte-humeur {
    grid-area: carte;
    max-width: none;
    position: sticky;
    top: 1.5rem;
    margin-top: 1rem;
  }
  .page-jour .formulaire {
    grid-area: formulaire;
    margin-top: 0;
  }
}
/* ---------- 9. Impression ---------- */
@media print {
  .detail {
    position: static;
    border: 0;
  }
  .page-jour .formulaire .actions {
    display: none;
  }
}
