/* =====================================================================
   Amicale du Pissot — fondations
   Papier ivoire, encre brune, camel et bordeaux. Fraunces + Alegreya Sans.
   ===================================================================== */

:root {
  /* Couleurs des illustrations de l'amicale : papier ivoire, encre brune,
     bois et pierre en camel, et le bordeaux du vin pour les accents. */
  --papier:        #F2E9D8;
  --papier-clair:  #FBF6EA;
  --encre:         #3B2A1F;
  --encre-doux:    #6A5848;
  --camel:         #B5854F;
  --brun:          #6B4423;
  --pierre:        #DFD0B6;
  --vin:           #6E2233;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Alegreya Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --mesure: 62ch;
  --filet: 1px solid var(--pierre);
  --rythme: clamp(2.5rem, 6vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 20, "WONK" 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p, li { max-width: var(--mesure); }
p { margin: 0 0 1.1em; }

a { color: var(--brun); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--vin); }

:focus-visible {
  outline: 2px solid var(--vin);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; display: block; }

.contenu { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.etroit  { width: min(44rem, 100% - 2.5rem); margin-inline: auto; }

/* --- En-tête ------------------------------------------------------- */

.entete {
  border-bottom: var(--filet);
  background: var(--papier);
}
.entete__interieur {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem 2rem;
  padding: 1.15rem 0;
}
.marque {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--encre);
  margin-right: auto;
}
.nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.nav a {
  text-decoration: none;
  color: var(--encre-doux);
  font-size: 0.95rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--encre);
  border-bottom-color: var(--camel);
}

/* --- L'étiquette : la seule pièce spectaculaire du site ------------- */

/* --- L'accueil ---------------------------------------------------------
   Une photo du vignoble en plein cadre, le nom de l'amicale par-dessus.
   La photo fait tout le travail : le texte se contente d'être lisible
   dessus, quelle que soit la luminosité de l'image choisie. */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(20rem, 62vh, 34rem);
  padding: var(--rythme) 1.5rem;
  background: var(--brun) center / cover no-repeat;
  text-align: center;
  overflow: hidden;
}

/* Un dégradé plutôt qu'un voile uniforme : le ciel garde ses nuages,
   et le texte reste lisible là où il est posé. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
              rgba(59,42,31,.15) 0%,
              rgba(59,42,31,.45) 55%,
              rgba(59,42,31,.72) 100%);
}

.hero__texte { position: relative; max-width: 40rem; }

.hero__nom {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.02;
  color: var(--papier-clair);
  margin: 0;
  text-shadow: 0 2px 18px rgba(59,42,31,.5);
}

.hero__devise {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  color: var(--papier-clair);
  margin: 1.1rem 0 0;
  text-shadow: 0 2px 14px rgba(59,42,31,.55);
}

/* Un filet court entre le nom et la devise, comme sur une étiquette. */
.hero__trait {
  width: 4.5rem;
  height: 1px;
  border: 0;
  background: var(--papier-clair);
  opacity: .65;
  margin: 1.4rem auto 0;
}

.hero__millesime {
  color: rgba(251,246,234,.82);
  font-size: .95rem;
  letter-spacing: .04em;
  margin: 1.6rem 0 0;
}

/* Sans photo, le bandeau reste digne : papier chaud et encre brune. */
.hero:not(.hero--photo) { background: var(--papier); }
.hero:not(.hero--photo)::before { background: none; }
.hero:not(.hero--photo) .hero__nom,
.hero:not(.hero--photo) .hero__devise { color: var(--encre); text-shadow: none; }
.hero:not(.hero--photo) .hero__trait { background: var(--camel); opacity: 1; }
.hero:not(.hero--photo) .hero__millesime { color: var(--encre-doux); }

/* --- Sections ------------------------------------------------------ */

.section { padding-block: var(--rythme); }
.section + .section { border-top: var(--filet); }
.section__titre { margin-bottom: 1.75rem; }

.grille {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

/* --- Actualités ---------------------------------------------------- */

.nouvelle { max-width: none; }
.nouvelle img { border: 1px solid var(--pierre); margin-bottom: 0.9rem; }
.nouvelle__date { color: var(--encre-doux); font-size: 0.85rem; }
.nouvelle h3 { margin: 0.2rem 0 0.4rem; }
.nouvelle h3 a { text-decoration: none; }
.nouvelle p { font-size: 0.97rem; color: var(--encre-doux); }

/* --- Formulaires --------------------------------------------------- */

.champ { margin-bottom: 1.25rem; max-width: 28rem; }
.champ label { display: block; font-size: 0.9rem; margin-bottom: 0.35rem; }
.champ input[type="text"],
.champ input[type="email"],
.champ input[type="date"],
.champ input[type="number"],
.champ select,
.champ textarea {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.7rem;
  background: var(--papier-clair);
  border: 1px solid var(--pierre);
  border-radius: 2px;
  color: inherit;
}
.champ input:focus, .champ textarea:focus, .champ select:focus {
  border-color: var(--camel);
  outline: 2px solid var(--camel);
  outline-offset: 0;
}
.champ--case { display: flex; align-items: center; gap: 0.55rem; }
.champ--case label { margin: 0; }

.bouton {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  background: var(--encre);
  color: var(--papier);
  border: 1px solid var(--encre);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
}
.bouton:hover { background: var(--brun); border-color: var(--brun); color: var(--papier); }
.bouton--discret { background: none; color: var(--encre); border-color: var(--pierre); }
.bouton--discret:hover { background: none; border-color: var(--encre); color: var(--encre); }

/* --- Messages ------------------------------------------------------ */

.message {
  border-left: 3px solid var(--camel);
  background: var(--papier-clair);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  max-width: var(--mesure);
}
.message--erreur { border-left-color: var(--vin); }
.message p:last-child { margin-bottom: 0; }

/* --- Tableaux ------------------------------------------------------ */

.tableau { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.tableau th, .tableau td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: var(--filet);
}
.tableau th { font-weight: 600; font-size: 0.85rem; color: var(--encre-doux); }
.tableau td.nombre, .tableau th.nombre { text-align: right; }

.etat { font-size: 0.85rem; padding: 0.1rem 0.5rem; border: 1px solid var(--pierre); border-radius: 2px; }
.etat--ok { border-color: var(--camel); color: var(--brun); }
.etat--attente { border-color: var(--vin); color: var(--vin); }

/* --- Pied ---------------------------------------------------------- */

.pied {
  border-top: var(--filet);
  margin-top: var(--rythme);
  padding-block: 2.5rem;
  color: var(--encre-doux);
  font-size: 0.9rem;
}
.pied a { color: var(--encre-doux); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Administration
   Même palette, densité plus forte : on y travaille, on n'y flâne pas.
   ===================================================================== */

.admin-barre {
  background: var(--encre);
  color: var(--papier);
}
.admin-barre__interieur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.75rem;
  padding: .85rem 0;
}
.admin-barre__titre {
  font-family: var(--serif);
  font-size: 1.05rem;
}
.admin-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-right: auto; }
.admin-nav a, .admin-barre__sortie {
  color: #E3D5BC;
  text-decoration: none;
  font-size: .95rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.admin-nav a:hover, .admin-barre__sortie:hover { color: var(--papier); }
.admin-nav a[aria-current="page"] { color: var(--papier); border-bottom-color: var(--camel); }

.titre-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.titre-ligne h1, .titre-ligne h2 { margin-bottom: 0; }
.titre-ligne__actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* --- Cartes de synthèse --------------------------------------------- */

.cartes {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin-bottom: 1rem;
}
.carte {
  background: var(--papier-clair);
  border: var(--filet);
  padding: 1.25rem 1.35rem;
}
.carte__chiffre {
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1;
  margin: 0 0 .35rem;
}
.carte__libelle { color: var(--encre-doux); font-size: .9rem; margin: 0 0 .6rem; }
.carte__alerte { color: var(--vin); font-size: .9rem; margin: 0; }
.carte a { font-size: .9rem; }

/* --- Formulaires denses --------------------------------------------- */

.duo, .trio {
  display: grid;
  gap: 0 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.champ--large { max-width: none; }
.champ--court { max-width: 10rem; }
.aide { color: var(--encre-doux); font-size: .85rem; margin: .35rem 0 0; }

.filtres { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
.filtres input, .filtres select {
  font: inherit;
  padding: .55rem .7rem;
  background: var(--papier-clair);
  border: 1px solid var(--pierre);
  border-radius: 2px;
}

.saisie {
  display: grid;
  gap: 0 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  align-items: start;
}
.saisie > p { grid-column: 1 / -1; }
.saisie .champ--large { grid-column: span 2; }

.publication {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: var(--filet);
  padding-top: 1.25rem;
  margin-top: 1.5rem;
}
.publication .champ { margin-bottom: 0; }

/* --- Éditeur --------------------------------------------------------- */

.editeur { margin-top: 1.5rem; }
.editeur__barre {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
  border: 1px solid var(--pierre);
  border-bottom: 0;
  background: var(--papier-clair);
  padding: .4rem .5rem;
}
.editeur__barre button {
  font: inherit;
  font-size: .9rem;
  padding: .3rem .7rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  color: var(--encre);
}
.editeur__barre button:hover { border-color: var(--pierre); background: var(--papier); }
.editeur__separateur { flex: 1; }

.editeur textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.7;
  padding: 1.1rem 1.2rem;
  background: var(--papier-clair);
  border: 1px solid var(--pierre);
  border-radius: 0;
  color: inherit;
  resize: vertical;
}
.apercu {
  border: 1px solid var(--pierre);
  background: var(--papier-clair);
  padding: 1.5rem 1.6rem;
  min-height: 12rem;
}
.apercu p, .apercu li { max-width: var(--mesure); }

/* --- Gestion des photos ---------------------------------------------- */

.depot {
  border: 1px dashed var(--pierre);
  background: var(--papier-clair);
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.depot input[type="file"] { font: inherit; margin-bottom: .75rem; display: block; }

.galerie-admin {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.galerie-admin .photo { margin: 0; }
.galerie-admin img { border: 1px solid var(--pierre); width: 100%; }
.photo--une img { border-color: var(--camel); border-width: 2px; }
.photo__marque { color: var(--camel); font-size: .8rem; margin: .4rem 0 0; }
.photo__legende { display: flex; gap: .4rem; margin: .6rem 0 .5rem; }
.photo__legende input {
  flex: 1; min-width: 0; font: inherit; font-size: .9rem;
  padding: .35rem .5rem; border: 1px solid var(--pierre);
  background: var(--papier-clair); border-radius: 2px;
}
.photo__actions { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.photo__actions form { display: inline; }
.photo__actions button, .lien-discret {
  font: inherit; font-size: .82rem;
  padding: .25rem .5rem;
  background: none;
  border: 1px solid var(--pierre);
  border-radius: 2px;
  cursor: pointer;
  color: var(--encre-doux);
}
.photo__actions button:hover, .lien-discret:hover { border-color: var(--encre); color: var(--encre); }

.lien-danger {
  font: inherit; font-size: .82rem;
  padding: .25rem .5rem;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--vin);
}
.lien-danger:hover { border-color: var(--vin); }

/* --- Contenu rédigé --------------------------------------------------- */

.chapo { font-size: 1.15rem; color: var(--encre-doux); }
.corps h3, .corps h4 { margin-top: 2rem; }
.corps blockquote {
  margin: 1.5rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--camel);
  color: var(--encre-doux);
}
.figure { margin: 2rem 0; }
.figure img { border: 1px solid var(--pierre); }
.figure figcaption, .galerie figcaption {
  color: var(--encre-doux); font-size: .88rem; margin-top: .5rem;
}
.galerie {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}
.galerie figure { margin: 0; }
.galerie img { border: 1px solid var(--pierre); width: 100%; }

.menu { color: var(--encre-doux); font-size: .85rem; }

/* --- Publipostage ---------------------------------------------------- */

.zone-courrier {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.7;
  padding: 1.1rem 1.2rem;
  resize: vertical;
}

.variables { margin: -.5rem 0 1.5rem; }
.variables summary { cursor: pointer; font-size: .92rem; color: var(--encre-doux); }
.variables__liste { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.jeton {
  font: inherit;
  font-size: .82rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  padding: .28rem .55rem;
  background: var(--papier-clair);
  border: 1px solid var(--pierre);
  border-radius: 2px;
  cursor: pointer;
  color: var(--brun);
}
.jeton:hover { border-color: var(--camel); }

/* --- Calendrier du cabanon -------------------------------------------- */

.calendriers {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.mois__titre { font-size: 1.05rem; margin-bottom: .6rem; }
.calendrier { width: 100%; border-collapse: collapse; font-size: .92rem; }
.calendrier th {
  font-weight: 400; font-size: .78rem; color: var(--encre-doux);
  padding-bottom: .35rem; text-align: center;
}
.calendrier th abbr { text-decoration: none; }
.calendrier td {
  text-align: center;
  border: 1px solid transparent;
}
.jour--attente { background: var(--pierre); color: var(--encre); }
.jour--bloque  { background: var(--vin); color: var(--papier-clair); }
.jour--aujourdhui { border-color: var(--encre); font-weight: 600; }

.legende { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center;
           margin-top: 1.5rem; font-size: .88rem; color: var(--encre-doux); }
.pastille {
  display: inline-block;
  width: .9rem;
  height: .9rem;
  margin-right: .35rem;
  vertical-align: -2px;
  border: 1px solid var(--pierre);
  /* Indispensable : la pastille reprend les classes des jours, donc le
     trait barré. Sans cadre de référence, ce trait se positionne par
     rapport à la page et la traverse en diagonale. */
  position: relative;
  overflow: hidden;
}

/* --- Demandes de réservation ------------------------------------------ */

.demande {
  border: var(--filet);
  background: var(--papier-clair);
  padding: 1.15rem 1.3rem;
  margin-bottom: 1.25rem;
}
.demande__entete {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  align-items: baseline; margin-bottom: .5rem;
}
.demande__entete span { color: var(--encre-doux); }
.demande p { max-width: none; margin-bottom: .9rem; }
.demande__actions { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.demande__actions form { display: flex; gap: .4rem; }
.demande__actions input {
  font: inherit; font-size: .92rem; padding: .4rem .6rem; min-width: 12rem;
  border: 1px solid var(--pierre); background: var(--papier); border-radius: 2px;
}

.ligne-parts { display: flex; gap: .3rem; justify-content: flex-end; }
.ligne-parts input { width: 4rem; font: inherit; font-size: .9rem; padding: .25rem .4rem;
                     border: 1px solid var(--pierre); background: var(--papier-clair);
                     border-radius: 2px; text-align: right; }

/* --- Documents -------------------------------------------------------- */

.ligne-document { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .3rem; }
.ligne-document input[type="text"] { flex: 1 1 10rem; min-width: 0; }
.ligne-document input, .ligne-document select {
  font: inherit; font-size: .9rem; padding: .3rem .45rem;
  border: 1px solid var(--pierre); background: var(--papier-clair); border-radius: 2px;
}

/* --- Photos de bandeau -------------------------------------------------- */

/* Le dégradé du bandeau suffit : pas de fusion en plus, qui ternirait
   la photo sans rien gagner en lisibilité. */

/* --- En-tête des pages intérieures -------------------------------------
   Même construction que l'accueil, en plus court. Avec une photo, le
   titre passe en clair sur un dégradé ; sans photo, en encre brune sur
   le papier. La page s'ouvre pareil dans les deux cas. */

.bandeau {
  position: relative;
  background: var(--brun) center / cover no-repeat;
  padding-block: clamp(3rem, 8vw, 5.5rem);
  color: var(--papier-clair);
}
.bandeau::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
              rgba(59,42,31,.2) 0%,
              rgba(59,42,31,.5) 60%,
              rgba(59,42,31,.7) 100%);
}
.bandeau__texte { position: relative; }

.bandeau h1 {
  color: var(--papier-clair);
  margin-bottom: 0;
  text-shadow: 0 2px 16px rgba(59,42,31,.45);
}
.bandeau__trait {
  width: 3.5rem;
  height: 1px;
  border: 0;
  background: currentColor;
  opacity: .6;
  margin: 1.1rem 0 0;
}
.bandeau p {
  color: rgba(251,246,234,.88);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  margin: .9rem 0 0;
}

/* Sans photo : mêmes proportions, couleurs du papier. */
.bandeau--nu {
  background: var(--papier);
  color: var(--encre);
  border-bottom: var(--filet);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.bandeau--nu::before { display: none; }
.bandeau--nu h1 { color: var(--encre); text-shadow: none; }
.bandeau--nu .bandeau__trait { background: var(--camel); opacity: 1; }
.bandeau--nu p { color: var(--encre-doux); }

/* --- Réglage des photos, côté comité ------------------------------------ */

.emplacements {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.emplacement { border: var(--filet); background: var(--papier-clair); padding: 1.25rem; }
.emplacement h2 { font-size: 1.1rem; margin-bottom: .75rem; }
.emplacement img { width: 100%; border: 1px solid var(--pierre); margin-bottom: .75rem; }
.emplacement__vide {
  display: flex; align-items: center; justify-content: center;
  height: 8rem; margin-bottom: .75rem;
  border: 1px dashed var(--pierre); color: var(--encre-doux); font-size: .9rem;
}
.emplacement input[type="file"] { font: inherit; font-size: .88rem; display: block; margin-bottom: .6rem; width: 100%; }
.emplacement form + form { margin-top: .6rem; }

/* --- Lettrine ---------------------------------------------------------
   Une seule, sur le premier paragraphe de l'accueil. */

.intro::first-letter {
  float: left;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: 3.6em;
  line-height: .82;
  color: var(--camel);
  padding: .08em .12em 0 0;
}

/* --- Accents bordeaux ---------------------------------------------------
   Attention en ajoutant ici : une règle `.bouton` posée après
   `.bouton--discret` lui rend un fond sombre tout en lui laissant son
   texte sombre. C'est arrivé, le bouton devenait illisible. */

.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--vin); }
.message { border-left-color: var(--vin); }
.corps blockquote { border-left-color: var(--vin); }
.carte__chiffre { color: var(--brun); }


/* --- Calendrier de réservation ----------------------------------------
   Les jours sont des cibles de clic : ils doivent être assez grands pour
   un pouce, et montrer sans ambiguïté ce qui est pris et ce qui est choisi. */

.calendrier td {
  position: relative;
  min-width: 2.2rem;
  padding: .55rem .2rem;
  border-radius: 2px;
  cursor: default;
}
.calendrier td[data-date]:not(.jour--pris):not(.jour--bloque):not(.jour--passe) {
  cursor: pointer;
}
.calendrier td[data-date]:not(.jour--pris):not(.jour--bloque):not(.jour--passe):hover {
  background: var(--pierre);
}
.calendrier td:focus-visible { outline: 2px solid var(--vin); outline-offset: 1px; }

.jour--pris, .jour--bloque {
  color: var(--encre-doux);
  cursor: not-allowed;
}
/* Barré plutôt que coloré seulement : la couleur seule ne suffit pas à
   quelqu'un qui distingue mal le vert du gris. */
.jour--pris::after, .jour--bloque::after {
  content: "";
  position: absolute;
  left: 15%; right: 15%; top: 50%;
  border-top: 1.5px solid currentColor;
  transform: rotate(-18deg);
}
.jour--pris   { background: var(--pierre); }
.jour--bloque { background: var(--vin); color: var(--papier-clair); }
.jour--passe  { color: var(--pierre); }
.jour--vide   { border: 0; }

.jour--choisi { background: var(--camel); color: var(--papier-clair); }
.jour--bord   { background: var(--brun); font-weight: 700; }

.choix {
  margin: 1.25rem 0 2rem;
  padding: .75rem 1rem;
  border-left: 3px solid var(--vin);
  background: var(--papier-clair);
  max-width: none;
}

.visuellement-cache {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}



/* =====================================================================
   Les pages intérieures
   Elles portent l'essentiel du contenu : des nouvelles, des millésimes,
   des documents. Le travail ici consiste à rendre les listes lisibles et
   les photos régulières, pas à ajouter de l'ornement.
   ===================================================================== */

/* Un filet court au-dessus des titres de section, pour marquer les
   respirations sans tracer une ligne d'un bord à l'autre. */
.section h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--camel);
  margin-bottom: .9rem;
}
.titre-ligne h2::before, .carte h2::before, .demande h2::before { display: none; }

.section + .section { border-top: 0; }

/* --- Nouvelles ---------------------------------------------------------
   Les photos arrivent de téléphones différents, donc de proportions
   différentes. On les force au même format, sinon la grille ondule. */

.nouvelle img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  /* La carte reçoit la grande image et non la vignette : étirée au-delà
     de ses 480 pixels, celle-ci devenait floue sur un écran large. */
  border: 0;
  margin-bottom: 1rem;
  filter: saturate(.96);
  transition: filter .2s;
}
.nouvelle a:hover img { filter: saturate(1.1); }

.nouvelle h3 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin: .35rem 0 .5rem;
}
.nouvelle h3 a { color: var(--encre); }
.nouvelle h3 a:hover { color: var(--vin); }
.nouvelle__date {
  color: var(--camel);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: lowercase;
}

.grille { gap: 2.5rem 2rem; }

/* --- Tableaux ----------------------------------------------------------
   Les listes de millésimes et de documents se lisent en diagonale : des
   lignes qui réagissent au survol aident à ne pas sauter d'une rangée. */

.tableau tbody tr:hover { background: var(--papier-clair); }
.tableau th {
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .76rem;
  color: var(--camel);
  border-bottom-color: var(--camel);
}
.tableau td { padding-block: .8rem; }

/* L'année d'un millésime est la donnée qu'on cherche : elle mérite d'être
   lisible d'un coup d'œil. */
.tableau td a strong { font-family: var(--serif); font-size: 1.15rem; }

/* --- Album -------------------------------------------------------------- */

.galerie img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  border: 0;
  transition: opacity .2s;
}
.galerie a:hover img { opacity: .88; }
.galerie figcaption { font-style: italic; }

/* --- Corps d'article ---------------------------------------------------- */

.corps p, .corps li { font-size: 1.08rem; }
.corps h3 { font-size: 1.5rem; }
.figure img { border: 0; }
.chapo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--encre-doux);
  max-width: 34em;
}

/* --- Cartes de chiffres -------------------------------------------------- */

.carte {
  background: var(--papier-clair);
  border: 0;
  border-left: 3px solid var(--camel);
  padding: 1.35rem 1.45rem;
}
.carte__chiffre { font-size: 2.4rem; color: var(--encre); }

/* L'administration reste un outil : pas de filet décoratif au-dessus des
   titres, et des lignes plus serrées pour voir plus de monde à l'écran. */
.espace-admin .section h2::before { display: none; }
.espace-admin .tableau td { padding-block: .6rem; }
.espace-admin .section { padding-block: clamp(1.75rem, 4vw, 2.75rem); }

/* Un filet camel ferme le bandeau photo : il pose la limite entre
   l'image et le contenu, que la photo soit claire ou sombre en bas. */
.bandeau { border-bottom: 3px solid var(--camel); }
.bandeau--nu { border-bottom-width: 1px; border-bottom-color: var(--pierre); }

/* --- Foyers et membres --------------------------------------------------
   Un foyer tient en une ligne de tableau, ses membres en jetons : on lit
   d'un coup qui compose la maison. */

.jeton-membre {
  display: inline-block;
  font-size: .85rem;
  padding: .12rem .5rem;
  margin: 0 .25rem .25rem 0;
  background: var(--papier-clair);
  border: 1px solid var(--pierre);
  border-radius: 999px;
}
.jeton-membre--enfant { border-style: dashed; color: var(--encre-doux); }
.jeton-membre--sorti  { opacity: .5; text-decoration: line-through; }

.ligne-membre {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin-bottom: .5rem;
}
.ligne-membre input, .ligne-membre select {
  font: inherit;
  font-size: .92rem;
  padding: .35rem .5rem;
  border: 1px solid var(--pierre);
  background: var(--papier-clair);
  border-radius: 2px;
  min-width: 0;
  flex: 1 1 8rem;
}
.ligne-membre select { flex: 0 0 auto; }

/* Un foyer qui n'a pas souscrit reste visible mais en retrait. */
.foyer--sans td { color: var(--encre-doux); }
.foyer--sans td a { color: var(--encre-doux); }

/* --- Le comité ---------------------------------------------------------- */

.grille-comite {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.comite {
  border-left: 3px solid var(--camel);
  padding-left: 1rem;
}
.comite__nom { font-family: var(--serif); font-size: 1.15rem; margin: 0; }
.comite__fonction { color: var(--encre-doux); font-size: .92rem; margin: .2rem 0 0; }

/* --- Texte et image côte à côte ----------------------------------------- */

.duo-texte {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  align-items: start;
}
.duo-texte--inverse .duo-texte__image { order: -1; }
.duo-texte__image { margin: 0; }
.duo-texte__image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.duo-texte__texte h2 { margin-top: 0; }

/* --- Statuts dépliants --------------------------------------------------- */

.statuts summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.05rem;
  padding: .6rem 0;
  border-top: var(--filet);
  border-bottom: var(--filet);
}
.statuts[open] summary { margin-bottom: 1.5rem; }
.statuts .corps h3 { font-size: 1.1rem; color: var(--camel); margin-top: 1.8rem; }
.statuts .corps h4 { font-size: 1rem; margin-top: 1.5rem; }

/* --- Facturation --------------------------------------------------------
   Un bloc par foyer plutôt qu'une ligne de tableau : la facture se lit
   comme elle sera imprimée, avec le détail sous les yeux. */

.facture {
  border: var(--filet);
  background: var(--papier-clair);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.25rem;
}
.facture--payee { border-left: 3px solid var(--camel); opacity: .78; }

.facture__entete {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem 1rem;
  padding-bottom: .6rem;
  border-bottom: var(--filet);
}
.facture__total { font-family: var(--serif); font-size: 1.35rem; }

.facture__lignes { list-style: none; padding: 0; margin: .7rem 0 0; }
.facture__lignes li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .5rem 1rem;
  align-items: center;
  padding: .3rem 0;
  max-width: none;
}
.facture__montant { font-variant-numeric: tabular-nums; }
.ligne--annulee { color: var(--encre-doux); }
.ligne--annulee .facture__montant { text-decoration: line-through; }
.facture__lignes form { display: flex; gap: .35rem; align-items: center; }
.facture__lignes input[type="text"] {
  font: inherit; font-size: .85rem; padding: .2rem .4rem; width: 8rem;
  border: 1px solid var(--pierre); background: var(--papier); border-radius: 2px;
}

.facture__pied {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: .9rem;
  padding-top: .8rem;
  border-top: var(--filet);
}
.facture__pied form:last-of-type { margin-left: auto; }

/* Le total des parts vire au rouge dès qu'on promet plus que la récolte. */
.depassement { color: var(--vin); }
.tableau tfoot th { border-top: 2px solid var(--camel); border-bottom: 0; padding-top: .8rem; }
.saisie-parts {
  width: 5rem; font: inherit; font-size: .95rem; padding: .3rem .4rem; text-align: right;
  border: 1px solid var(--pierre); background: var(--papier-clair); border-radius: 2px;
}

/* --- La cave ------------------------------------------------------------- */

.ligne--active { background: var(--papier-clair); }
.ligne--active td:first-child { box-shadow: inset 3px 0 0 var(--camel); }
.champ--vente[hidden] { display: none; }

/* Une écriture se corrige sur place : le formulaire ne s'ouvre que si on
   le demande, sinon le tableau devient illisible. */
.correction summary { cursor: pointer; font-size: .82rem; color: var(--encre-doux); }
.correction[open] { display: block; margin-bottom: .5rem; }
.correction[open] form { margin-top: .5rem; justify-content: flex-end; }

.tarif { border-left: 3px solid var(--camel); padding-left: 1rem; margin: 1.5rem 0; }
.tarif .filtres { margin-bottom: .4rem; align-items: center; }
.tarif input[type="text"] { width: 7rem; text-align: right; }

/* Un dépôt qui n'est pas encore actif : on annonce ce qui viendra plutôt
   que de laisser un blanc où l'on cherche le bouton. */
.depot--attente { border-style: solid; border-color: var(--pierre); color: var(--encre-doux); }
.depot--attente p { margin: 0; max-width: none; }
