/* ============================================================
   Tramesta — système visuel
   Conforme à docs/Charte_de_design.png
   ------------------------------------------------------------
   Couleurs, typographie et composants repris de la charte à
   l'identique. Les écrans qui n'existent pas encore (collections,
   saisons, recherche, favoris) ne sont pas simulés : mieux vaut
   une navigation courte et vraie qu'un décor qui ne mène nulle part.
   ============================================================ */

:root {
  /* Charte des couleurs */
  --creme: #fbf6ef;
  --sable: #f2e9dc;
  --olive: #6f7b57;
  --sauge-fonce: #4e5a43;
  --terracotta: #c7743a;
  --caramel: #d9a16b;
  --menthe-douce: #9bc49a;
  --charbon: #1f2a23;

  /* Déclinaisons de service (survol, actif, filets) */
  --terracotta-survol: #b96a33;
  --terracotta-actif: #9e5628;
  --olive-survol: #61694b;
  --blanc: #ffffff;
  --trait: #e6dbc9;
  --texte-doux: #6b7166;

  /* Typographie de la charte */
  --titres: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --interface: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --rayon: 16px;
  --rayon-s: 10px;
  --rayon-pilule: 999px;
  --ombre-carte: 0 1px 2px rgba(31, 42, 35, 0.03),
    0 10px 30px rgba(31, 42, 35, 0.05);
  --largeur: 64rem;
  --largeur-texte: 42rem;
}

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

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

body {
  margin: 0;
  background: var(--creme);
  color: var(--charbon);
  font-family: var(--interface);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typographie ─────────────────────────────────────────── */

h1 {
  font-family: var(--titres);
  font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); /* 32 → 44 */
  line-height: 1.27; /* 44/56 */
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

h2 {
  font-family: var(--titres);
  font-weight: 600;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); /* 22 → 28 */
  line-height: 1.29; /* 28/36 */
  margin: 0 0 1rem;
}

.surtitre {
  font-family: var(--interface);
  font-size: 0.8125rem; /* 13/18 */
  line-height: 1.38;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin: 0 0 0.35rem;
}

.chapeau {
  color: var(--texte-doux);
  margin: 0 0 1.75rem;
}

.meta {
  font-size: 0.8125rem;
  line-height: 1.38;
  color: var(--texte-doux);
}

a {
  color: var(--sauge-fonce);
}

/* ─── Ossature ────────────────────────────────────────────── */

.page {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 2rem 1.25rem 6rem;
}

.page--etroite {
  max-width: var(--largeur-texte);
}

.pied {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 1.25rem 6rem;
  font-size: 0.8125rem;
  color: var(--texte-doux);
}

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

.entete {
  background: var(--blanc);
  border-bottom: 1px solid var(--trait);
  position: sticky;
  top: 0;
  z-index: 20;
}

.entete__interieur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--sauge-fonce);
  flex-shrink: 0;
}

.marque svg {
  display: block;
  width: 28px;
  height: 28px;
}

/* Logo complet dans l'en-tête, identique à la page de connexion. */
.marque__logo {
  display: block;
  height: 34px;
  width: auto;
}

.marque__mot {
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1;
}

/* Onglets de navigation — pastilles, actif en olive plein */
.onglets {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.onglet {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--charbon);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--rayon-pilule);
  background: var(--sable);
  white-space: nowrap;
}

.onglet:hover {
  background: #e9dfcd;
}

.onglet[aria-current="page"] {
  background: var(--olive);
  color: var(--blanc);
  font-weight: 600;
}

.onglet[aria-current="page"]:hover {
  background: var(--olive-survol);
}

.onglet--nu {
  background: transparent;
  color: var(--texte-doux);
}

.onglet--nu:hover {
  background: var(--sable);
  color: var(--charbon);
}

/* ─── Barre d'onglets mobile (pouce en cuisine) ───────────── */

.barre-mobile {
  display: none;
}

/* ─── Boutons ─────────────────────────────────────────────── */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--interface);
  font-size: 1rem; /* 16/20 */
  font-weight: 600;
  line-height: 1.25;
  padding: 0.8125rem 1.5rem;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--rayon-s);
  background: var(--terracotta);
  color: var(--blanc);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bouton:hover {
  background: var(--terracotta-survol);
}

.bouton:active {
  background: var(--terracotta-actif);
}

.bouton--secondaire {
  background: var(--blanc);
  color: var(--charbon);
  border-color: var(--trait);
}

.bouton--secondaire:hover {
  background: var(--creme);
  border-color: var(--olive);
}

.bouton--texte {
  background: transparent;
  color: var(--charbon);
  padding: 0.5rem 0;
  min-height: 0;
}

.bouton--texte:hover {
  background: transparent;
  color: var(--sauge-fonce);
}

.bouton--pleine-largeur {
  width: 100%;
}

/* Suppression : rouge terreux, clairement distinct des actions bénignes. */
.bouton--danger {
  background: #9e2f22;
  color: var(--blanc);
}

.bouton--danger:hover {
  background: #872619;
}

.bouton--danger-texte {
  background: transparent;
  color: #9e2f22;
  border-color: transparent;
}

.bouton--danger-texte:hover {
  background: #f7e9e6;
}

.actions-fiche {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 2rem;
}

/* ─── Cartes ──────────────────────────────────────────────── */

.carte {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.carte > :first-child {
  margin-top: 0;
}

.carte--sable {
  background: var(--sable);
  border-color: transparent;
}

/* ─── Liste des recettes ──────────────────────────────────── */

.recettes {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.recette-carte {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 1.35rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.recette-carte:hover {
  border-color: var(--olive);
  transform: translateY(-2px);
}

/* Carte avec photo : image en tête, texte dessous. */
.recette-carte--photo {
  padding: 0;
  overflow: hidden;
}

.recette-carte__photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: var(--sable);
}

.recette-carte--photo .recette-carte__titre,
.recette-carte--photo .recette-carte__meta {
  padding-left: 1.35rem;
  padding-right: 1.35rem;
}

.recette-carte--photo .recette-carte__titre {
  padding-top: 1rem;
}

.recette-carte--photo .jeton {
  margin-left: 1.35rem;
  margin-bottom: 1.35rem;
}

.recette-carte__titre {
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
}

.recette-carte__meta {
  font-size: 0.8125rem;
  color: var(--texte-doux);
}

.jeton {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--sauge-fonce);
  background: var(--sable);
  border-radius: var(--rayon-pilule);
  padding: 0.2rem 0.65rem;
  margin-top: 0.5rem;
  align-self: flex-start;
}

/* ─── Fiche : photo en tête + cartouche du titre (charte) ─── */

.fiche__hero {
  position: relative;
  margin-bottom: 2rem;
}

/* Retour #5 : crédit de l'illustration reprise d'un site, en haut à droite. */
.fiche__credit {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  margin: 0;
  padding: 0.2rem 0.6rem;
  border-radius: var(--rayon-pilule);
  background: rgba(31, 42, 35, 0.68);
  color: var(--blanc);
  font-size: 0.75rem;
}

.fiche__credit a {
  color: var(--blanc);
}

.fiche__photo {
  width: 100%;
  max-height: 26rem;
  object-fit: cover;
  border-radius: var(--rayon);
  display: block;
  background: var(--sable);
}

/* Le titre et la note vivent dans un cadre crème posé sur le bas de la
   photo — comme la charte. Fond opaque = contraste garanti, quelle que soit
   l'image. */
.fiche__cartouche {
  position: relative;
  margin: -3.75rem 1.25rem 0;
  background: var(--creme);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  box-shadow: 0 14px 34px -20px rgba(31, 42, 35, 0.55);
  padding: 1.25rem 1.6rem;
}

.fiche__cartouche h1 {
  margin: 0;
}

/* Sans photo : le cartouche redevient un simple bloc de titre. */
.fiche__hero--sans-photo .fiche__cartouche {
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.fiche__note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.55rem 0 0;
  font-family: var(--interface);
  font-size: 0.95rem;
  color: var(--texte-doux);
}

.fiche__note .etoiles {
  font-size: 1.1rem;
}

.fiche__note-valeur {
  font-weight: 600;
  color: var(--charbon);
}

.photo-edition img {
  width: 100%;
  max-width: 20rem;
  border-radius: var(--rayon-s);
  display: block;
  margin-bottom: 0.5rem;
}

input[type="file"] {
  min-height: 0;
  padding: 0.55rem 0.6rem;
  font-size: 0.9rem;
  background: var(--blanc);
}

/* ─── Fiche : bandeau de repères ──────────────────────────── */

.reperes {
  display: flex;
  flex-wrap: wrap;
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 1.1rem 0.5rem;
  margin: 1.5rem 0 2rem;
}

.repere {
  flex: 1 1 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
  padding: 0 0.75rem;
  border-right: 1px solid var(--trait);
}

.repere:last-child {
  border-right: 0;
}

.repere svg {
  width: 26px;
  height: 26px;
  color: var(--caramel);
  margin-bottom: 0.15rem;
}

.repere__valeur {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
}

.repere__nom {
  font-size: 0.75rem;
  color: var(--texte-doux);
}

/* ─── Fiche : deux colonnes ───────────────────────────────── */

.fiche-corps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
}

.section__entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.section__entete h2 {
  margin: 0;
}

/* Ingrédients : liste à puces, comme la charte */
.ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ingredients li {
  position: relative;
  padding: 0 0 0.9rem 1.15rem;
}

.ingredients li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--olive);
}

/* Titre de section d'ingrédients (« VINAIGRETTE », « SALADE ») — charte. */
.ingredients__section {
  font-family: var(--interface);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 1.4rem 0 0.8rem;
}

.section__entete + .ingredients__section {
  margin-top: 0.25rem;
}

.qte {
  font-weight: 600;
}

/* Préparation : pastilles olive numérotées */
.etapes {
  counter-reset: etape;
  list-style: none;
  margin: 0;
  padding: 0;
}

.etapes li {
  counter-increment: etape;
  position: relative;
  padding: 0 0 1.35rem 2.85rem;
}

.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: -0.05rem;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--olive);
  color: var(--blanc);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Astuce */
.astuce {
  background: var(--sable);
  border-radius: var(--rayon-s);
  padding: 1.1rem 1.25rem;
  margin-top: 1.5rem;
}

.astuce h3 {
  font-family: var(--interface);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.astuce p {
  font-size: 0.8125rem;
  color: var(--texte-doux);
  margin: 0;
}

/* Provenance */
.provenance {
  background: var(--sable);
  border-radius: var(--rayon-s);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}

.provenance .surtitre {
  margin-bottom: 0.2rem;
}

/* ─── Avis : notation et notes personnelles ───────────────── */

.avis {
  margin-top: 2.5rem;
}

.etoiles {
  color: var(--terracotta);
  letter-spacing: 1px;
}

/* Sélecteur d'étoiles : radios accessibles, remplissage en survol/sélection.
   L'ordre inversé (row-reverse) permet à « ~ » de teindre les étoiles à
   gauche de celle qu'on désigne. */
.etoiles-choix {
  display: inline-flex;
  flex-direction: row-reverse;
  border: 0;
  padding: 0;
  margin: 0 0 0.5rem;
}

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

.etoiles-choix label {
  font-size: 2rem;
  line-height: 1;
  color: var(--trait);
  cursor: pointer;
  padding: 0 1px;
  transition: color 0.12s ease;
}

.etoiles-choix label:hover,
.etoiles-choix label:hover ~ label,
.etoiles-choix input:checked ~ label {
  color: var(--terracotta);
}

.etoiles-choix input:focus-visible + label {
  outline: 2px solid var(--sauge-fonce);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Les notes personnelles des autres membres s'affichent comme des post-it
   épinglés sur la recette : la mémoire familiale, écrite à la main. */
.postits {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.postit {
  flex: 1 1 14rem;
  max-width: 20rem;
  margin: 0;
  padding: 1rem 1.15rem 0.9rem;
  background: #fbf3d9;
  border-radius: 3px;
  box-shadow: 0 8px 16px -10px rgba(31, 42, 35, 0.5);
  transform: rotate(-1deg);
}

.postit:nth-child(even) {
  background: #e9f1e0;
  transform: rotate(1.2deg);
}

.postit blockquote {
  margin: 0 0 0.6rem;
  font-family: var(--interface);
  color: var(--charbon);
}

.postit__auteur {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--sauge-fonce);
}

.postit__auteur .etoiles {
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Bascule métrique / impérial ─────────────────────────── */

.unites {
  display: inline-flex;
  background: var(--sable);
  border-radius: var(--rayon-pilule);
  padding: 4px;
  gap: 2px;
}

.unites button {
  font-family: var(--interface);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: var(--texte-doux);
  padding: 0.45rem 1rem;
  border-radius: var(--rayon-pilule);
  cursor: pointer;
  white-space: nowrap; /* « Comme écrit » ne se coupe jamais en deux lignes */
  transition: background 0.18s ease, color 0.18s ease;
}

@media (max-width: 420px) {
  .unites button {
    padding: 0.45rem 0.75rem;
  }
}

.unites button:hover {
  color: var(--charbon);
}

.unites button[aria-pressed="true"] {
  background: var(--olive);
  color: var(--blanc);
}

/* ─── Formulaires ─────────────────────────────────────────── */

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 1.25rem 0 0.4rem;
}

.aide {
  font-size: 0.8125rem;
  color: var(--texte-doux);
  margin: 0.45rem 0 0;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="search"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  font-family: var(--interface);
  font-size: 1rem;
  color: var(--charbon);
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon-s);
  padding: 0.7rem 0.85rem;
  min-height: 48px;
}

textarea {
  line-height: 1.6;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #9a9c93;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--sauge-fonce);
  outline-offset: 2px;
}

/* Case à cocher : la légende à côté, pas au-dessus. */
.case {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  cursor: pointer;
}

.case input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  accent-color: var(--olive);
  flex-shrink: 0;
}

.rangee {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.rangee > * {
  flex: 1 1 7rem;
}

/* ─── Messages ────────────────────────────────────────────── */

.messages {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
}

.messages li {
  font-size: 0.9375rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--rayon-s);
  margin-bottom: 0.6rem;
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-left: 3px solid var(--menthe-douce);
}

.messages .error {
  border-left-color: var(--terracotta-actif);
}
.messages .warning {
  border-left-color: var(--caramel);
}
.messages .success {
  border-left-color: var(--olive);
}

/* ─── Écran vide ──────────────────────────────────────────── */

.vide {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
}

.vide svg {
  width: 46px;
  height: 46px;
  color: var(--olive);
  opacity: 0.55;
  margin-bottom: 0.75rem;
}

.vide p {
  color: var(--texte-doux);
  margin: 0 0 1.5rem;
}

/* ─── Connexion ───────────────────────────────────────────── */

.accueil {
  max-width: 24rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
  text-align: center;
}

.accueil__logo {
  max-width: 100%;
  height: auto;
}

.accueil__devise {
  font-family: var(--titres);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--texte-doux);
  margin: 0.25rem 0 2rem;
}

.accueil form {
  text-align: left;
}

.accueil .bouton {
  width: 100%;
  margin-top: 1.75rem;
}

.accueil ul {
  list-style: none;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--terracotta-actif);
}

/* ─── Mobile ──────────────────────────────────────────────── */

@media (max-width: 52rem) {
  .fiche-corps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 40rem) {
  .entete__interieur {
    padding: 0.6rem 1rem;
    gap: 0.75rem;
    justify-content: center;
  }

  .marque__logo {
    height: 30px;
  }

  /* La navigation passe en barre basse : à portée du pouce en cuisine. */
  .onglets {
    display: none;
  }

  .page {
    padding: 1.5rem 1rem 6.5rem;
  }

  .pied {
    padding: 0 1rem 6.5rem;
  }

  .reperes {
    padding: 1rem 0.25rem;
  }

  /* Jusqu'à 5 repères (difficulté comprise) sur une seule ligne. */
  .repere {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 0.15rem;
  }

  .repere__nom {
    font-size: 0.6875rem;
  }

  .barre-mobile {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: var(--blanc);
    border-top: 1px solid var(--trait);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .barre-mobile a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.6rem 0.25rem 0.7rem;
    text-decoration: none;
    color: var(--texte-doux);
    font-size: 0.6875rem;
  }

  .barre-mobile a[aria-current="page"] {
    color: var(--olive);
    font-weight: 600;
  }

  .barre-mobile svg {
    width: 22px;
    height: 22px;
  }
}

/* ─── Confort et impression ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .entete,
  .onglets,
  .barre-mobile,
  .unites,
  .pied,
  .bouton {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .page {
    max-width: none;
    padding: 0;
  }
  .fiche-corps {
    grid-template-columns: 1fr 1fr;
  }
  .carte,
  .reperes {
    border-color: #ddd;
    break-inside: avoid;
  }
}

/* ─── Page « À propos » (publique) ────────────────────────── */

.accueil__liens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.accueil__aide {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

/* Connexion : « ou » entre le mot de passe et le code par courriel. */
.accueil__ou {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.accueil .accueil__ou + .bouton {
  margin-top: 0;
}

.accueil__ou::before,
.accueil__ou::after {
  content: "";
  flex: 1;
  border-top: 1px solid currentColor;
  opacity: 0.4;
}

/* Bouton qui a l'allure d'un lien (action en POST, cf. confirm_login_code). */
.accueil__lien {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--sauge-fonce);
  text-decoration: underline;
  cursor: pointer;
}

.accueil__liens a,
.pied a {
  color: var(--sauge-fonce);
}

/* Page « À propos » — mise en page de docs/Tramesta_A_Propos.pdf.
   Couleurs de la charte pour le décoratif ; texte coloré en nuances foncées
   (terracotta-actif 5,1:1, sauge-fonce 6,8:1 sur crème : WCAG AA). */
.ap__entete {
  text-align: center;
}

.ap__logo {
  display: block;
  max-width: 17rem;
  height: auto;
  margin: 0 auto 1.25rem;
}

.ap__sous-titre {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--sauge-fonce);
  max-width: 34rem;
  margin: 0.75rem auto 0;
  line-height: 1.55;
}

.ap__filet {
  border: 0;
  border-top: 1px solid var(--trait);
  margin: 2.5rem 0;
}

.ap__filet--accent {
  border-top: 2px solid var(--terracotta);
  margin: 1.75rem 0 1.75rem;
}

.ap p {
  line-height: 1.65;
  margin: 0 0 0.85rem;
}

.ap section {
  margin-top: 2.25rem;
}

.ap h2 {
  font-size: clamp(1.5rem, 5vw, 1.95rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.9rem;
  text-wrap: balance;
}

.ap__accent--terracotta {
  color: var(--terracotta-actif);
}

.ap__accent--olive {
  color: var(--sauge-fonce);
}

.ap__intertitre {
  font-family: var(--titres);
  color: var(--sauge-fonce);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.6rem;
}

.ap__liste {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.ap__liste li {
  position: relative;
  padding-left: 1.1rem;
  margin: 0.3rem 0;
}

.ap__liste li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
}

.ap__encadre {
  background: var(--sable);
  border-left: 4px solid var(--olive);
  border-radius: 0 var(--rayon-s) var(--rayon-s) 0;
  padding: 0.9rem 1.1rem 0.4rem;
  margin: 0.9rem 0;
}

.ap__encadre--terracotta {
  border-left-color: var(--terracotta);
}

.ap__encadre-titre {
  font-family: var(--interface);
  font-size: 1rem;
  font-weight: 600;
  color: var(--sauge-fonce);
  margin: 0 0 0.3rem;
}

.ap__encadre--terracotta .ap__encadre-titre {
  color: var(--terracotta-actif);
}

.ap__courriel {
  font-weight: 600;
  font-size: 1.1rem;
}

.ap__courriel a,
.ap__encadre a {
  color: var(--terracotta-actif);
}

.ap__signature {
  margin-top: 2.75rem;
}

.ap__equipe {
  font-family: var(--titres);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 0.25rem !important;
}

/* ─── Famille, invitations, accueil ───────────────────────── */

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

.membres__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--trait);
}

.membres__ligne:last-child {
  border-bottom: 0;
}

.membres__nom {
  min-width: 0;
  overflow-wrap: anywhere;
}

.etiquette {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--sauge-fonce);
  background: var(--sable);
  border-radius: var(--rayon-pilule);
  padding: 0.2rem 0.65rem;
}

.choix {
  border: 0;
  padding: 0;
  margin: 1.25rem 0 0.5rem;
}

.choix legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding: 0;
}

.choix__option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  margin: 0.45rem 0;
  cursor: pointer;
}

.choix__option input {
  width: auto;
  min-height: 0;
  margin-top: 0.3rem;
  accent-color: var(--olive);
}

.actions-formulaire {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.accueil__titre {
  font-size: 1.5rem;
  margin: 0.5rem 0 0.25rem;
}

.accueil__fixe {
  margin: 0.25rem 0 0.75rem;
  padding: 0.7rem 0.9rem;
  background: var(--sable);
  border-radius: var(--rayon-s);
  overflow-wrap: anywhere;
}

/* ─── Traduction d'une recette ────────────────────────────── */

.bandeau-traduction {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin: 0 0 1.25rem;
  padding: 0.65rem 0.9rem;
  background: var(--sable);
  border-radius: var(--rayon-s);
  font-size: 0.9rem;
  color: var(--texte-doux);
}

.bandeau-traduction a {
  color: var(--sauge-fonce);
}

/* ─── Pilotage (compte de supervision) ─────────────────────────────── */
.pilotage__chiffres {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.pilotage__chiffre {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon-s);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pilotage__chiffre strong {
  font-family: var(--titres);
  font-size: 1.35rem;
  color: var(--charbon);
}

.pilotage__chiffre span,
.pilotage__note {
  font-size: 0.8rem;
  color: var(--texte-doux);
}

/* Les tableaux défilent horizontalement sur téléphone, pas la page. */
.pilotage__defilement {
  overflow-x: auto;
}

.pilotage__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  white-space: nowrap;
}

.pilotage__table th,
.pilotage__table td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--trait);
}

.pilotage__table thead th {
  font-weight: 600;
  color: var(--texte-doux);
}

.pilotage__table a {
  color: var(--sauge-fonce);
}

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

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

.pilotage__liste li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--trait);
}

/* ─── Page d'attente d'un import ───────────────────────────────────── */
.attente {
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.attente__titre {
  font-size: 1.5rem;
  margin: 1rem 0 0.5rem;
}

.attente__roue {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid var(--sable);
  border-top-color: var(--terracotta);
  animation: attente-tour 0.9s linear infinite;
}

@keyframes attente-tour {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .attente__roue {
    animation: none;
    border-color: var(--terracotta);
  }
}

/* ─── Recherche, catégories, étiquettes (A4) ───────────────────────── */
.recherche {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}

.recherche input[type="search"] {
  flex: 1 1 16rem;
  margin: 0;
}

.recherche select {
  flex: 1 1 10rem;
  width: auto;
  margin: 0;
}

.recherche .bouton {
  flex: 0 0 auto;
  margin: 0;
}

.puces,
.fiche__classement {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
}

.fiche__classement {
  margin: 0.5rem 0 0;
}

.puce {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-pilule);
  background: var(--blanc);
  color: var(--charbon);
  font-size: 0.85rem;
  text-decoration: none;
}

.puce:hover {
  border-color: var(--olive);
}

.puce--etiquette {
  color: var(--sauge-fonce);
}

.puce--origine {
  font-style: italic;
}

/* Terracotta foncé : blanc dessus à 5,1:1 (WCAG AA). */
.puce--active,
.puce--active:hover {
  background: var(--terracotta-actif);
  border-color: var(--terracotta-actif);
  color: var(--blanc);
}

.puce__nombre {
  font-size: 0.75rem;
  opacity: 0.75;
}

.etiquettes-choix {
  border: 0;
  padding: 0;
  margin: 0;
}

/* Même allure que les autres libellés (« Catégorie »…). Flottant : sinon le
   navigateur place la légende sur la bordure et ignore sa marge haute. */
.etiquettes-choix legend {
  float: left;
  width: 100%;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0;
  margin: 1.25rem 0 0.4rem;
}

.etiquettes-choix legend + * {
  clear: both;
}

.etiquettes-choix__liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.case-etiquette {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-pilule);
  background: var(--blanc);
  font-weight: normal;
  cursor: pointer;
}

.case-etiquette input {
  width: auto;
  margin: 0;
}

.case-etiquette:has(input:checked) {
  border-color: var(--sauge-fonce);
  background: var(--creme);
}

.etiquettes-choix__nouvelles {
  font-weight: normal;
}

/* ─── La recette originale (photo du manuscrit, A6) ────────────────── */
.originale {
  margin-top: 1.5rem;
}

.originale--validation {
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--trait);
}

.originale__pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.originale__pages img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--rayon-s);
  border: 1px solid var(--trait);
  background: var(--sable);
  display: block;
}

/* Champs photo : un vrai bouton, large et lisible, plutôt que le contrôle brut
   du navigateur (« Sélect. fichiers »). */
input[type="file"] {
  width: 100%;
  font-family: var(--interface);
  font-size: 0.875rem;
  color: var(--texte-doux);
}

input[type="file"]::file-selector-button {
  font-family: var(--interface);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--charbon);
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon-s);
  padding: 0.7rem 1rem;
  margin-right: 0.75rem;
  min-height: 48px;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: var(--creme);
  border-color: var(--olive);
}

/* ─── Astuces de la recette ─────────────────────────────────────────── */
.astuces {
  margin-top: 1.5rem;
  background: var(--creme);
}

.astuces__liste {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.astuces__liste li {
  margin: 0.4rem 0;
  line-height: 1.55;
}

.astuces__liste li::marker {
  color: var(--caramel);
}

/* ─── « Votre avis » (bêta) ─────────────────────────────────────────── */
.bouton-avis {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  padding: 0.55rem 1rem;
  border-radius: var(--rayon-pilule);
  background: var(--sauge-fonce);
  color: var(--blanc);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px -8px rgba(31, 42, 35, 0.55);
}

.bouton-avis:hover {
  background: var(--charbon);
}

/* Sur téléphone : au-dessus de la barre de navigation du bas (même seuil). */
@media (max-width: 40rem) {
  .bouton-avis {
    bottom: 5rem;
    right: 0.75rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
  }
}

@media print {
  .bouton-avis {
    display: none;
  }
}

.choix-retour {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border: 0;
  padding: 0;
  margin: 0 0 0.5rem;
}

.choix-retour__option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-pilule);
  background: var(--blanc);
  font-weight: 600;
  cursor: pointer;
}

.choix-retour__option input {
  width: auto;
  margin: 0;
}

.choix-retour__option:has(input:checked) {
  border-color: var(--sauge-fonce);
  background: var(--creme);
}

.pilotage__alertes a {
  display: inline-block;
  margin: 0 0 1rem;
  color: var(--terracotta-actif);
}

.pilotage__retour {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--trait);
}

.pilotage__retour--traite {
  opacity: 0.55;
}

.pilotage__message {
  margin: 0.4rem 0;
  white-space: normal;
}

.pilotage__capture {
  max-width: 16rem;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-s);
  display: block;
  margin: 0.4rem 0;
}

.pilotage__trace {
  max-height: 20rem;
  overflow: auto;
  font-size: 0.75rem;
  background: var(--sable);
  padding: 0.6rem;
  border-radius: var(--rayon-s);
}

.pilotage__annuler {
  display: inline;
  margin-left: 0.5rem;
}

/* ─── Mémoire familiale (B1) ───────────────────────────────────────── */
.fiche__recette-de {
  margin: 0.35rem 0 0;
  font-family: var(--titres);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--terracotta-actif);
}

.fiche__lignee {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.fiche__lignee a {
  color: var(--sauge-fonce);
}

.recette-carte__de {
  font-family: var(--titres);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--terracotta-actif);
}

.souvenirs {
  margin-top: 1.5rem;
}

.souvenir {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: var(--creme);
  border-left: 3px solid var(--caramel);
  border-radius: 0 var(--rayon-s) var(--rayon-s) 0;
}

.souvenir blockquote {
  margin: 0;
  font-family: var(--titres);
  font-style: italic;
  line-height: 1.6;
}

.souvenir figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--texte-doux);
}

.actions-fiche form {
  display: inline;
}

.souvenir__mien summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--sauge-fonce);
  margin: 0.25rem 0 0.75rem;
}

.souvenir__mien[open] summary {
  margin-bottom: 0.5rem;
}

/* Ajouter une recette : le champ d'adresse et son bouton « Coller ». */
.champ-coller {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.champ-coller input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.champ-coller .bouton {
  flex: 0 0 auto;
  margin: 0;
}

.champ-coller .bouton[hidden] {
  display: none;
}

/* Page d'import : « Partager vers Tramesta » (application installable, P2). */
.installer {
  border-left: 3px solid var(--olive);
}

.installer[hidden],
.installer [hidden] {
  display: none;
}

.installer .aide {
  margin-bottom: 0.75rem;
}

.installer .aide:last-child {
  margin-bottom: 0;
}

/* Page d'aide « Partager vers Tramesta depuis un iPhone » (P3). */
.aide-etapes,
.aide-liste {
  margin: 0 0 0.75rem;
  padding-left: 1.4rem;
}

.aide-etapes li,
.aide-liste li {
  margin-bottom: 0.5rem;
}

[data-iphone][hidden] {
  display: none;
}

/* ─── Mémos vocaux (B2) ───────────────────────────────────── */

.memo {
  margin: 0 0 1rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--trait);
}

.memo audio {
  display: block;
  width: 100%;
  margin-bottom: 0.4rem;
}

.memo figcaption {
  font-size: 0.9375rem;
}

.memo__meta {
  display: block;
  color: var(--texte-doux);
  font-size: 0.8125rem;
}

.memo__retirer {
  margin-top: 0.4rem;
}

.memo--etape {
  margin: 0.6rem 0 0;
  padding: 0;
  border: 0;
}

.memo--etape audio {
  height: 2.25rem;
}

.memo__nouveau summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--sauge-fonce);
  margin: 0.25rem 0 0.75rem;
}

.enregistreur {
  margin: 0.75rem 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--rayon-s);
  background: var(--sable);
}

.enregistreur[hidden],
.enregistreur [hidden] {
  display: none;
}

.enregistreur__commandes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.enregistreur__commandes .bouton {
  margin: 0;
}

.enregistreur__temps {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 3.5rem;
}

.enregistreur audio {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
}

.memo__transcription {
  margin-top: 0.4rem;
  font-size: 0.9375rem;
}

.memo__transcription summary {
  cursor: pointer;
  color: var(--sauge-fonce);
  font-weight: 600;
}

.memo__transcription p {
  margin: 0.4rem 0 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--trait);
}

