/* Page privée de Sandrine : les couleurs et les polices du site, en plus sobre.
   Pensée d'abord pour un téléphone tenu d'une main. */
@font-face { font-family: "Alegreya"; src: url("/polices/alegreya-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/polices/alegreya-sans-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/polices/alegreya-sans-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --papier: #ece4d8;
  --clair: #f7f3ee;
  --blanc: #fbf8f3;
  --encre: #3b372b;
  --titre: #2b2820;
  --gris: #7c7561;
  --filet: #d6cdbd;
  --rouge: #a8322a;
  --rouge-fonce: #8c2720;
  --rouge-clair: #f0d5d0;
  --celadon: #5d8279;
  --celadon-clair: #d3deda;
  --ocre: #a66c52;
  --ocre-fonce: #8c5c45;
  font-variant-numeric: lining-nums;
}

* { box-sizing: border-box; }

/* L'en-tête reste collé en haut : un lien vers une carte (#courrier, #jour, #ajouter) s'arrête dessous. */
html { scroll-padding-top: 7.5rem; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 1.125rem/1.5 "Alegreya Sans", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--rouge); }

h1, h2 {
  margin: 0;
  color: var(--titre);
  font-family: "Alegreya", Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
}
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
p { margin: 0; }

/* En-tête et rubriques */
.tete {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--papier);
  border-bottom: 1px solid var(--filet);
}
/* Le sceau et le nom, comme dans l'en-tête du site : ils ramènent à l'accueil. */
.tete__marque {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 0.55rem;
  margin: 0.5rem 1rem 0;
  color: var(--titre);
  text-decoration: none;
}
.tete__sceau {
  grid-row: span 2;
  width: 2.2rem;
  height: 2.2rem;
  transition: rotate 0.15s ease;
}
.tete__marque:hover .tete__sceau { rotate: -6deg; }
.tete__nom {
  align-self: end;
  font-family: "Alegreya", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.15;
  white-space: nowrap;
}
.tete__rubrique {
  align-self: start;
  color: var(--gris);
  font-size: 0.72rem;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .tete__sceau { transition: none; }
}
.onglets {
  display: flex;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.onglets::-webkit-scrollbar { display: none; }
.onglets__lien {
  flex: none;
  padding: 0.55rem 0.7rem;
  border-bottom: 3px solid transparent;
  color: var(--encre);
  font-weight: 500;
  text-decoration: none;
}
.onglets__lien[aria-current="page"] { border-color: var(--rouge); color: var(--titre); }

/* Les rubriques des réglages : trois pastilles sous le titre, celle où l'on est en plein. */
.rubriques { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rubriques__lien {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.3rem 0.95rem;
  border: 1px solid var(--gris);
  border-radius: 99rem;
  color: var(--titre);
  font-weight: 500;
  text-decoration: none;
}
.rubriques__lien:hover { border-color: var(--titre); background: var(--blanc); }
.rubriques__lien[aria-current="page"] { border-color: var(--titre); background: var(--titre); color: var(--blanc); }
/* Les mêmes pastilles filtrent les demandes par statut : le nombre de demandes suit le nom, et un point
   rappelle la couleur de l'étiquette. */
.rubriques__nombre { margin-left: 0.45rem; font-size: 0.9em; font-weight: 400; opacity: 0.7; }
.rubriques__lien--attente::before,
.rubriques__lien--confirmee::before,
.rubriques__lien--refusee::before,
.rubriques__lien--annulee::before,
.rubriques__lien--traitee::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.45rem;
  border: 1px solid transparent;
  border-radius: 50%;
}
.rubriques__lien--attente::before { background: var(--ocre); }
.rubriques__lien--confirmee::before { background: var(--celadon); }
.rubriques__lien--refusee::before { background: var(--rouge); }
.rubriques__lien--annulee::before { border-color: currentColor; border-style: dashed; }
.rubriques__lien--traitee::before { border-color: currentColor; }
/* Combien de demandes afficher. */
.affichage { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.3rem; margin: 0; }
.affichage__titre { margin-right: 0.35rem; color: var(--gris); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.affichage__choix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0 0.6rem;
  border-radius: 99rem;
  color: var(--titre);
  text-decoration: none;
}
.affichage__choix:hover { background: var(--blanc); }
.affichage__choix[aria-current="true"] { background: var(--celadon-clair); font-weight: 500; }

/* La photo en place dans un emplacement, vue en petit. */
.photo-vue { display: block; height: auto; border-radius: 8px; background: var(--blanc); object-fit: cover; }
.photo-vue--largeur { width: min(100%, 18rem); aspect-ratio: 3 / 2; }
.photo-vue--hauteur { width: 8rem; aspect-ratio: 5 / 7; }
input[type="file"] { width: 100%; min-height: 2.75rem; padding: 0.45rem 0.65rem; border: 1px dashed var(--gris); border-radius: 6px; background: var(--blanc); color: var(--encre); font: inherit; font-size: 0.95rem; }

/* Une valeur à relire avant de l'enregistrer (téléphone, adresse) : écrite en grand. */
.verif { display: grid; gap: 0.1rem; margin: 0; padding: 0.6rem 0.75rem; border-radius: 8px; background: var(--blanc); }
.verif__nom { color: var(--gris); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.verif__valeur { color: var(--titre); font-family: "Alegreya", Georgia, serif; font-size: 1.6rem; line-height: 1.25; overflow-wrap: anywhere; }

.page {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.1rem 1rem 4rem;
}

/* Cartes */
.carte {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border: 1px solid var(--filet);
  border-radius: 12px;
  background: var(--clair);
  box-shadow: 0 0.6rem 1.5rem rgba(59, 55, 43, 0.08);
}
.carte--etroite { max-width: 24rem; margin: 8vh auto 0; width: 100%; }

.demande--attente { border-left: 4px solid var(--ocre); }
.demande--confirmee { border-left: 4px solid var(--celadon); }
.demande--refusee { border-left: 4px solid var(--rouge); }
.demande__etat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.6rem;
  color: var(--gris);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.demande__quand { color: var(--gris); }
.demande__nom { color: var(--titre); font-size: 1.2rem; font-weight: 500; }
.demande__liens { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin: 0; padding: 0; list-style: none; }
.demande__ligne span {
  display: block;
  color: var(--gris);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.demande__message {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: var(--blanc);
  overflow-wrap: anywhere;
}

/* Formulaires */
.formulaire { display: grid; gap: 0.5rem; }
label { color: var(--titre); font-size: 0.95rem; font-weight: 500; }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--gris);
  border-radius: 6px;
  background: var(--blanc);
  color: inherit;
  font: inherit;
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, .bouton:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--rouge);
  outline-offset: 2px;
}
fieldset.choix { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; border: 0; }
fieldset.choix legend { padding: 0; color: var(--titre); font-size: 0.95rem; font-weight: 500; }
.case { display: flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; font-size: 1.05rem; font-weight: 400; }
/* Cases et boutons radio dessinés ici : laissés au navigateur, une case cochée
   perdait son contour dans WebKit (un simple point, une simple coche). */
.case input {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: 1.5px solid var(--gris);
  border-radius: 0.25rem;
  background: var(--blanc);
}
.case input[type="radio"] { border-radius: 50%; }
.case input::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--blanc); scale: 0; }
.case input[type="checkbox"]::before {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0;
  clip-path: polygon(13% 47%, 0 62%, 40% 100%, 100% 22%, 86% 8%, 38% 70%);
}
.case input:checked { border-color: var(--rouge); background: var(--rouge); }
/* La couleur du bandeau, montrée à côté de son nom : les teintes mêmes du site. */
.ton { flex: none; width: 1.6rem; height: 1rem; border-radius: 3px; }
.ton--calme { background: #4c6b64; }
.ton--chaud { background: #8c5c45; }
.ton--fort { background: var(--rouge); }
.case input:checked::before { scale: 1; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.duo > div { display: grid; gap: 0.25rem; align-content: end; }
.ligne { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: center; gap: 0.5rem; }

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--rouge);
  border-radius: 99rem;
  background: var(--rouge);
  color: #fff;
  font: 500 1.05rem/1.2 "Alegreya Sans", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.bouton:hover { border-color: var(--rouge-fonce); background: var(--rouge-fonce); }
.bouton--discret { border-color: var(--gris); background: transparent; color: var(--titre); }
.bouton--discret:hover { border-color: var(--titre); background: var(--blanc); }
.formulaire > .bouton { justify-self: start; }
.bouton--plein, .formulaire > .bouton--plein { width: 100%; justify-self: stretch; }
.bouton--petit { min-height: 2.25rem; padding: 0.3rem 0.9rem; font-size: 0.95rem; }
.gestes { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.sortie { justify-self: start; }

.repli summary { color: var(--gris); cursor: pointer; }
.repli[open] summary { margin-bottom: 0.5rem; }

/* Messages */
.note { color: var(--gris); font-size: 0.95rem; }
.note--cadre { padding: 0.5rem 0.75rem; border: 1px dashed var(--gris); border-radius: 8px; }
/* Une demande qui attend, rappelée en tête de l'agenda. */
.note--attente { border: 1px solid var(--ocre); background: var(--blanc); color: var(--titre); font-size: 1.05rem; }
.note--attente a { font-weight: 500; }
.confirmation, .alerte { padding: 0.65rem 0.8rem; border-radius: 8px; }
.confirmation { background: var(--celadon-clair); color: var(--titre); }
.alerte { border: 1px solid var(--rouge); background: var(--blanc); color: var(--rouge-fonce); }

/* Agenda */
.jour { margin-top: 0.5rem; }
.agenda { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--filet); list-style: none; }
.agenda__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--filet);
}
.agenda__ligne > a { display: flex; flex: 1; align-items: baseline; gap: 0.85rem; padding: 0.65rem 0; color: inherit; text-decoration: none; }
.agenda__ligne > .agenda__qui { padding: 0.65rem 0; }
.agenda__heure { flex: none; min-width: 4.2rem; color: var(--titre); font-family: "Alegreya", Georgia, serif; font-size: 1.2rem; }
.agenda__qui { display: grid; color: var(--titre); }
.agenda__qui small { color: var(--gris); font-size: 0.9rem; }
.agenda__ligne--attente .agenda__heure { color: var(--ocre-fonce); }
.agenda__ligne--annulee .agenda__heure, .agenda__ligne--annulee .agenda__qui { color: var(--gris); text-decoration: line-through; }
.agenda__ligne--annulee small { text-decoration: none; }
.agenda__ligne .statut { align-self: center; margin-left: auto; }
/* Les actualités à la une : leur place devant le titre, et deux flèches pour changer l'ordre. */
.ordre { display: flex; flex: none; gap: 0.3rem; }
.ordre__bouton { min-width: 2.75rem; min-height: 2.75rem; padding: 0; font-size: 1.4rem; line-height: 1; }
.ordre__vide { width: 2.75rem; }
.ordre__place { min-width: 1.6rem; color: var(--gris); }
.fil { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; }

/* Le mois d'un coup d'œil */
.mois { display: grid; grid-template-columns: 2.75rem 1fr 2.75rem; align-items: center; }
.mois__nom { text-align: center; }
.mois__pas {
  display: grid;
  place-items: center;
  min-height: 2.75rem;
  border-radius: 99rem;
  color: var(--titre);
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
}
a.mois__pas:hover { background: var(--clair); }
.cal { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.cal th { padding: 0 0 0.15rem; color: var(--gris); font-size: 0.8rem; font-weight: 500; text-transform: uppercase; }
.cal th abbr { text-decoration: none; }
.cal td { padding: 0; }
.cal__jour {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 2.9rem;
  border: 1px solid var(--filet);
  border-radius: 8px;
  background: var(--clair);
  color: var(--titre);
  text-decoration: none;
}
.cal__jour:hover { border-color: var(--gris); }
.cal__jour--repos { background: transparent; }
.cal__jour--passe .cal__num { color: var(--gris); }
.cal__jour--aujourdhui { border-color: var(--rouge); box-shadow: inset 0 0 0 1px var(--rouge); }
.cal__jour[aria-current="date"] { border-color: var(--titre); background: var(--blanc); box-shadow: inset 0 0 0 1px var(--titre); }
/* Fermé : des hachures sur tout le jour, ou sur sa moitié haute (matin) ou basse (après-midi). */
.cal__jour--ferme, .cal__jour--matin, .cal__jour--apres-midi {
  background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(124, 117, 97, 0.32) 5px 6px);
  background-repeat: no-repeat;
}
.cal__jour--matin { background-size: 100% 50%; background-position: top; }
.cal__jour--apres-midi { background-size: 100% 50%; background-position: bottom; }
.cal__num { font-family: "Alegreya", Georgia, serif; font-size: 1.1rem; line-height: 1; }
.cal__nb {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.2rem;
  border-radius: 99rem;
  background: var(--celadon);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}
.cal__nb--attente { background: var(--ocre-fonce); }
.cal__legende { font-size: 0.85rem; }
#jour h2 small { margin-left: 0.4rem; color: var(--gris); font-family: "Alegreya Sans", system-ui, sans-serif; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.libres { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.4rem; }
.libres__ou { flex-basis: 100%; color: var(--gris); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.pastille {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--celadon);
  border-radius: 99rem;
  background: var(--celadon-clair);
  color: var(--titre);
  text-decoration: none;
}
.pastille:hover { border-color: var(--titre); }
.etat { justify-self: start; padding: 0.15rem 0.7rem; border-radius: 99rem; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.etat--oui { background: var(--celadon); color: #fff; }
.etat--non { border: 1px solid var(--gris); color: var(--gris); }
/* L'étiquette de couleur d'une demande. Une seule est en plein : celle qui attend un geste, en ocre
   comme tout ce qui attend une réponse dans cet espace. Le rouge dit le refus. */
.statut {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 0.1rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 99rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
}
.statut--attente { background: var(--ocre-fonce); color: #fff; }
.statut--confirmee { border-color: var(--celadon); background: var(--celadon-clair); color: #2f4a43; }
.statut--refusee { border-color: var(--rouge); background: var(--rouge-clair); color: var(--rouge-fonce); }
.statut--annulee { border-color: var(--gris); border-style: dashed; color: var(--encre); }
.statut--traitee, .statut--autre { border-color: var(--gris); color: var(--encre); }
.alertes { display: grid; gap: 0.3rem; margin: 0; padding: 0.65rem 0.8rem 0.65rem 1.9rem; border: 1px solid var(--rouge); border-radius: 8px; background: var(--blanc); color: var(--rouge-fonce); }
.lien-agenda {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: var(--blanc);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  user-select: all;
}

/* Actualités : la rédaction, ses boutons de mise en forme, ses photos. */
.cache { position: absolute; left: -999rem; }
.actu-texte { min-height: 18rem; line-height: 1.45; }
.outils { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.outils:empty { display: none; }
.outil {
  min-height: 2.25rem;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--gris);
  border-radius: 6px;
  background: var(--blanc);
  color: var(--titre);
  font: 500 0.95rem/1.2 "Alegreya Sans", system-ui, sans-serif;
  cursor: pointer;
}
.outil:hover { border-color: var(--titre); }
.outil:focus-visible { outline: 2px solid var(--rouge); outline-offset: 2px; }
.outil--gras { font-weight: 700; }
.outil--italique { font-style: italic; }
.aide { display: grid; gap: 0.35rem; margin: 0; padding-left: 1.1rem; color: var(--gris); font-size: 0.95rem; }
code { padding: 0.05rem 0.3rem; border-radius: 4px; background: var(--blanc); color: var(--titre); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; }
.sous-titre { margin: 0.4rem 0 0; color: var(--titre); font-family: "Alegreya", Georgia, serif; font-size: 1.1rem; font-weight: 400; }
.actu-photo { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--filet); }
.actu-photo__vue { width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; background: var(--filet); object-fit: cover; }
.actu-photo__champs { display: grid; gap: 0.3rem; }
.carte > .bouton { justify-self: start; }
