/* ======================== GÉNÉRAL ========================= */

:root {
  --bleu-nuit: #152138;
  --dore: #c8a95b;
  --gris: #2d333d;

  --police-titre: "Abhaya Libre", Georgia, serif;
  --police-menu: "DM Sans", Arial, sans-serif;
  --police-italique: "Instrument Serif", Georgia, serif;
  --police-texte: "Habibi", Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--police-titre);
  font-weight: 800;
  color: var(--bleu-nuit);
  line-height: 1.3;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.container {
  max-width: 1176px;
  margin-inline: auto;
  padding-inline: 24px;
}

.btn-pill {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid var(--bleu-nuit);
  border-radius: 64px;
  background: none;
  color: var(--bleu-nuit);
  font-family: var(--police-italique);
  font-style: italic;
  font-weight: 400;
  font-size: 27px;
  transition-duration: 0.4s;

  &:hover {
    background: var(--bleu-nuit);
    color: var(--dore);
  }
}

.accent {
  color: var(--dore);
}

.page-title {
  margin-top: 120px;
  text-align: center;

  h1 {
    color: var(--dore);
    font-family: var(--police-italique);
    font-style: italic;
    font-weight: 400;
    font-size: 76px;
  }

  p {
    max-width: 600px;
    margin: 10px auto 30px;
    font-family: var(--police-texte);
    font-weight: 400;
    font-size: 27px;
  }

  .grand-chiffre {
    margin: 0;
    color: var(--dore);
    font-family: var(--police-italique);
    font-size: 120px;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;

  label {
    padding-left: 12px;
    font-family: var(--police-texte);
    font-weight: 400;
    font-size: 24px;
  }

  input,
  textarea,
  select {
    padding: 12px 20px;
    border: 1px solid var(--bleu-nuit);
    border-radius: 23px;
    font-family: var(--police-texte);
    font-size: 18px;
  }

  select {
    background: #fff;
  }

  textarea {
    height: 200px;
  }
}

.form-error {
  padding-left: 12px;
  color: #a1272b;
  font-family: var(--police-menu);
  font-weight: 400;
  font-size: 15px;
}

.champ-piege {
  position: absolute;
  left: -9999px;
}

.form-feedback {
  color: #a1272b;
}

.line {
  margin: 20px;
  border: 1px solid var(--dore);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* message affiché une seule fois (connexion réussie, erreur…) */
.alerte {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 14px 28px;
  border-radius: 64px;
  background: var(--bleu-nuit);
  color: var(--dore);
  font-family: var(--police-menu);
  text-align: center;
  transform: translateX(-50%);
  animation: alerte-disparait 5s forwards;
}

@keyframes alerte-disparait {
  0%,
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@media (max-width: 1100px) {
  .page-title h1 {
    font-size: 60px;
  }
}

@media (max-width: 768px) {
  .page-title h1 {
    font-size: 48px;
  }

  .page-title p {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .btn-pill {
    font-size: 22px;
  }

  .page-title h1 {
    font-size: 40px;
  }
}

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

/* ======================== EN-TÊTE ========================= */

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px 24px;
  padding-block: 30px;
}

.brand {
  grid-row: span 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-name {
  display: block;
  font-size: 46px;
}

.brand-tagline {
  color: var(--dore);
  font-family: var(--police-menu);
  font-weight: 500;
  font-size: 24px;
}

.header-right {
  justify-self: end;
  display: flex;
  gap: 12px;

  button {
    flex-shrink: 0;
    padding: 8px;
    border: none;
    background: none;
  }

  img {
    max-width: none;
  }
}

/* recherche en temps réel : la loupe déplie le champ à sa gauche */
.recherche {
  position: relative;
  display: flex;
  align-items: center;

  input[type="search"]::-webkit-search-cancel-button {
    display: none;
  }

  input[type="search"] {
    position: absolute;
    right: 100%;
    width: 0;
    padding: 8px 0;
    border: 0 solid var(--dore);
    border-radius: 64px;
    background: #fff;
    font-family: var(--police-menu);
    font-size: 16px;
    color: var(--bleu-nuit);
    opacity: 0;
    transition:
      width 0.25s,
      padding 0.25s,
      opacity 0.2s;
  }

  &.ouvert input[type="search"] {
    width: 240px;
    padding: 8px 16px;
    border-width: 1px;
    opacity: 1;
  }
}

.recherche-resultats {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(320px, 90vw);
  margin: 0;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(21 33 56 / 18%);
  list-style: none;

  &[hidden] {
    display: none;
  }

  a {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--bleu-nuit);
    font-family: var(--police-menu);
    font-size: 18px;

    &:hover,
    &:focus-visible {
      background: #f6efdc;
      color: var(--dore);
      outline: none;
    }
  }

  small {
    color: var(--gris);
    font-size: 13px;
  }
}

.recherche-vide {
  padding: 10px 12px;
  color: var(--gris);
  font-family: var(--police-menu);
}

@media (max-width: 768px) {
  /* petits écrans : le champ se déplie sous l'en-tête, sur toute la largeur */
  .site-header {
    position: relative;
  }

  .recherche {
    position: static;

    &.ouvert input[type="search"] {
      top: calc(100% + 4px);
      right: 16px;
      left: 16px;
      width: auto;
    }
  }

  .recherche-resultats {
    top: calc(100% + 56px);
    right: 16px;
    left: 16px;
    width: auto;
  }

  /* champ ouvert : l'en-tête s'agrandit, le champ ne recouvre plus le titre de la page */
  .site-header:has(.recherche.ouvert) {
    padding-bottom: 64px;

    /* le champ et les résultats se placent dans cet espace réservé */
    .recherche.ouvert input[type="search"] {
      top: calc(100% - 60px);
    }

    .recherche-resultats {
      top: calc(100% - 8px);
    }
  }
}

.nav-toggle {
  display: none;
  color: var(--bleu-nuit);
  font-family: var(--police-menu);
  font-size: 18px;
  cursor: pointer;
}

.main-nav {
  justify-self: end;

  ul {
    display: flex;
    gap: 32px;
  }

  a {
    color: var(--gris);
    font-family: var(--police-menu);
    font-weight: 300;
    font-size: 24px;
    white-space: nowrap;

    &:hover,
    &.active {
      color: var(--dore);
      font-weight: 400;
    }
  }

  .dropdown:hover {
    color: var(--dore);
  }
}

.compte-connecte {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.user-name {
  text-transform: capitalize;
  color: var(--dore);
  font-family: var(--police-menu);
  font-weight: 500;
}

.logout-btn {
  padding: 6px 14px;
  border: 1px solid var(--bleu-nuit);
  border-radius: 64px;
  background: none;
  color: var(--bleu-nuit);
  font-family: var(--police-menu);
  cursor: pointer;
}

a.user-name:hover {
  text-decoration: underline;
}

@media (max-width: 1400px) {
  .main-nav a {
    font-size: 20px;
  }

  .main-nav ul {
    gap: 24px;
  }

  .brand-name {
    font-size: 38px;
  }

  .brand-tagline {
    font-size: 20px;
  }
}

@media (max-width: 1100px) {
  .main-nav a {
    font-size: 18px;
  }

  .main-nav ul {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  /* le menu se replie derrière le bouton "Menu" */
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    justify-self: center;

    &.ouvert {
      display: block;
    }

    ul {
      flex-direction: column;
      align-items: center;
      gap: 15px;
    }
  }

  .brand img {
    width: 70px;
  }

  .brand-name {
    font-size: 32px;
  }

  .brand-tagline {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  /* connecté : pseudo et déconnexion, puis Menu, puis loupe et thème */
  .header-right:has(.compte-connecte) {
    flex-wrap: wrap;
    justify-content: flex-end;

    .compte-connecte {
      order: -1;
      flex-basis: 100%;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .nav-toggle {
      order: -1;
      flex-basis: 100%;
      text-align: right;
    }
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding-block: 15px;
  }

  .brand img {
    width: 50px;
  }

  .brand-name {
    font-size: 24px;
  }

  .compte-connecte {
    gap: 4px;
  }

  .user-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logout-btn {
    padding: 6px 10px;
    font-size: 14px;
  }
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  border-radius: 15px;
  border: 1px solid var(--dore);
  background-color: #f9f9f9;
  box-shadow: 0 8px 16px 0 rgb(0 0 0 / 20%);
  z-index: 1;
}

.dropdown-content a {
  display: block;
  padding: 12px 16px;
  color: black;
  font-family: var(--police-menu);
  font-weight: 400;
  font-size: 16px;

  &::first-letter {
    text-transform: uppercase;
  }
}

.dropdown:hover .dropdown-content {
  display: block;
}

.barre-sticky {
  /* en haut de page : le conteneur n'existe pas pour la mise en page,
     les deux boutons restent à leur place d'origine */
  display: contents;

  /* ajoutée par navigation.js quand le header sort de l'écran */
  &.detachee {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    top: 16px;
    /* même bord droit que .container (max-width 1176px + 24px de marge) */
    right: max(24px, calc((100% - 1176px) / 2 + 24px));
    z-index: 55;
    padding: 4px 14px;
    border: 1px solid var(--dore);
    border-radius: 64px; /* le fond ovale */
    background: rgb(255 255 255 / 90%);
    box-shadow: 0 6px 18px rgb(21 33 56 / 15%);
    backdrop-filter: blur(6px);
    animation: barre-apparait 0.8s ease-out;
    transition: 0.3s ease-in;
  }
}

@keyframes barre-apparait {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

[data-theme="dark"] .barre-sticky.detachee {
  background: rgb(28 42 69 / 90%); /* --fond-bloc légèrement transparent */
  box-shadow: 0 6px 18px rgb(0 0 0 / 45%);
}

@media (prefers-reduced-motion: reduce) {
  .barre-sticky.detachee {
    animation: none;
  }
}
/* ====================== PIED DE PAGE ====================== */

.site-footer {
  margin-top: 100px;
  background: var(--bleu-nuit);
  color: var(--dore);
  font-family: var(--police-menu);
  font-weight: 300;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding-top: 36px;
}

.footer-logo {
  width: 110px;
  height: auto;
  flex-shrink: 0;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 37px;
  font-size: 24px;
}

.footer-newsletter {
  justify-self: end;
  max-width: 343px;

  h2 {
    font-family: var(--police-italique);
    font-style: italic;
    font-weight: 400;
    font-size: 40px;
  }

  p {
    font-family: "Amiri", Georgia, serif;
  }
}

.newsletter-field {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 6px;
  border: 1px solid var(--dore);
  border-radius: 8px;

  .newsletter-envoi {
    display: flex;
    padding: 0;
    border: none;
    background: none;
  }

  input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    color: var(--dore);
  }
}

.socials {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
}

.copyright {
  padding: 24px 0 12px;
  text-align: center;
  font-size: 15px;

  a:hover {
    color: var(--dore);
  }
}

@media (max-width: 1100px) {
  .footer-nav {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;

    img {
      margin: 0 auto;
    }
  }

  .footer-newsletter {
    justify-self: center;
  }
}

/* ======================== ACCUEIL ========================= */

.hero {
  h3 {
    color: var(--dore);
    text-align: center;
    font-size: 2.5vw;
    font-family: var(--police-italique);
    font-weight: 200;
    position: relative;
    top: 300px;
    z-index: 1;
  }

  img {
    width: 100%;
    height: 573px;
    object-fit: cover;
    opacity: 0.86;
    transition: transform 0.2s;
  }
}

.intro {
  margin-top: 94px;
  text-align: center;
  font-family: var(--police-texte);
  font-weight: 400;
  font-size: 26px;

  h1 {
    font-size: inherit;
    font-weight: inherit;
  }
}

.value-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 68px;

  img {
    width: 226px;
    height: 325px;
    object-fit: cover;
    border-radius: 113px;
  }

  figcaption {
    margin-top: 30px;
    text-align: center;
    font-size: 20px;
  }
}

.cta-wrap {
  margin-top: 40px;
  text-align: center;
}

.top3 {
  margin-top: 80px;
}

.top3 h2 {
  margin-bottom: 30px;
  text-align: center;
}

.top3-liste {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.top3-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 20px;
  text-align: center;

  img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 3px;
  }
}

.top3-rang {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dore);
  color: #fff;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .value-list img {
    width: 190px;
    height: 275px;
  }
}

@media (max-width: 768px) {
  .hero img {
    height: 350px;
  }

  .top3-liste {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero img {
    height: 250px;
  }

  .value-list img {
    width: 135px;
    height: 195px;
  }
}

/* =================== LISTE DES RECETTES =================== */

.main-recette {
  margin: 40px;
  display: flex;
  justify-content: center;
}

.main-img {
  margin: 40px;
  img {
    width: 400px;
    height: 600px;
    object-fit: cover;
  }
}

.main-txt {
  margin: 40px;
  width: 40vw;
  padding: 10px;

  h1 {
    margin: 30px;
    text-align: center;
    color: var(--dore);
    font-family: var(--police-italique);
    font-weight: 200;
    font-size: 65px;
  }

  p {
    font-family: var(--police-texte);
    font-size: 22px;
    font-weight: 100;
  }

  .regale {
    text-align: center;
  }
}

.recette-card {
  background: var(--bleu-nuit);
  color: white;
  flex: 0 0 calc((100% - 40px) / 3); /* 3 cartes visibles, 2 écarts de 20px */
}

.recette-card-body {
  background-size: cover;
  background-position: center;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  position: relative;
  overflow: hidden;
}

.recette-card-body-txt {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background-color: var(--bleu-nuit);
  opacity: 0;
  transform: translateY(100%);
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;

  h2 {
    color: var(--dore);
    font-size: 26px;
  }

  .btn-pill {
    border-color: var(--dore);
    color: var(--dore);
    font-size: 22px;
    text-align: center;
  }
}

.recette-btn:hover {
  background-color: var(--dore);
  color: var(--bleu-nuit);
}

.recette-card-body:hover .recette-card-body-txt {
  opacity: 1;
  transform: translateY(0);
}

.carousel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
}

.recettes-grid {
  display: flex;
  gap: 20px;
  transition: transform 0.6s ease-out;
}

.carousel-btn,
.carrousel-fleche {
  flex: none;
  border: 1px solid var(--bleu-nuit);
  border-radius: 50%;
  background: none;
  color: var(--bleu-nuit);
  line-height: 1;
  transition-duration: 0.3s;

  &:hover:not(:disabled) {
    background: var(--bleu-nuit);
    color: var(--dore);
  }

  &:disabled {
    opacity: 0.3;
    cursor: default;
  }
}

.carousel-btn {
  width: 48px;
  height: 48px;
  font-size: 32px;
}

@media (max-width: 1100px) {
  .recette-card {
    flex: 0 0 calc((100% - 20px) / 2); /* 2 cartes */
  }

  .main-txt {
    width: 70%;
  }
}

@media (max-width: 768px) {
  .main-recette {
    flex-direction: column-reverse;
    align-items: center;
    margin: 20px 0;
  }

  .main-img {
    margin: 20px 0;
    width: 100%;

    img {
      width: 100%;
      max-width: 400px;
      height: auto;
      aspect-ratio: 2 / 3;
      object-fit: cover;
      margin-inline: auto;
    }
  }

  .main-txt {
    width: 100%;
    margin: 0;
    padding: 0 80px;

    h1 {
      font-size: 45px;
      margin: 20px 0;
    }

    p {
      font-size: 16px;
    }
  }

  .recette-card {
    flex: 0 0 100%;
  }
}

@media (max-width: 480px) {
  .recette-card {
    flex: 0 0 100%;
  }

  .recette-card-body {
    width: 100%;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
}

/* ====================== PAGE RECETTE ====================== */

.recette-top {
  display: grid;
  margin-top: 40px;
  grid-template-columns: minmax(0, 520px) 1fr;
  gap: 32px;
  align-items: stretch;
}

.recette-fiche {
  display: flex;
  flex-direction: column;
  padding: 28px 32px 22px;
  border-radius: 19px;
  background: var(--bleu-nuit);
  color: white;
  font-size: 16px;
  line-height: 1.55;

  ul {
    list-style: disc;
  }

  h1 {
    margin-bottom: 14px;
    font-family: var(--police-italique);
    font-style: italic;
    font-weight: 400;
    font-size: 26px;
    line-height: 1.25;
    text-align: center;
    color: var(--dore);
  }

  h2 {
    margin-block: 22px 8px;
    font-family: var(--police-texte);
    font-weight: 400;
    font-size: 16px;
  }

  p,
  li {
    font-family: var(--police-texte);
    font-weight: 400;
  }

  ul,
  ol {
    padding-left: 22px;
  }

  li + li {
    margin-top: 4px;
  }
}

.recette-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.etape-titre {
  font-family: var(--police-titre);
  color: var(--bleu-nuit);
  font-size: 32px;
  margin-top: 60px;
  margin-bottom: 10px;
}

.recette-photo-step {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;

  img {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    object-fit: cover;
  }
}

.commentaire-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
  margin-top: 40px;

  .btn-pill {
    align-self: center;
  }
}

.note-moyenne {
  font-weight: 700;
}

.etoiles {
  display: flex;
  gap: 4px;
}

.etoile {
  border: none;
  background: none;
  color: #bdb6a4;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.etoile.active {
  color: var(--dore);
}

.etoile:focus-visible {
  outline: 2px solid var(--dore);
}

.note-message {
  min-height: 26px;
}

.notation,
.invitation-avis {
  margin: 8px 0 24px;
}

.commentaire-note {
  margin-left: 8px;
  color: var(--dore);
  letter-spacing: 2px;
}

.recette-categorie {
  color: var(--dore);
  font-style: italic;
}

.recette-fiche .recette-categorie {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 8px auto 16px;
  padding: 6px 18px;
  border: 1px solid var(--dore);
  border-radius: 999px;
  color: var(--dore);
  font-family: var(--police-menu);
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
}

.recette-fiche .recette-infos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;

  li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px 12px;
    border: 1px solid rgb(255 255 255 / 25%);
    border-radius: 999px;
    background: rgb(255 255 255 / 8%);
    font-family: var(--police-menu);
    font-weight: 400;
    font-size: 13px;
  }

  i {
    color: var(--dore);
  }

  .note-moyenne {
    color: var(--dore);
  }
}

/* commentaire masqué : seul l'administrateur le voit */
.commentaire-masque {
  opacity: 0.55;
}

.commentaire-info {
  font-style: italic;
}

.recette-fiche .recette-description {
  margin-top: 6px;
  opacity: 0.9;
}

.recette-fiche .ingredients-carte {
  margin-top: 22px;
  padding: 16px 22px 18px;
  border: 1px solid rgb(200 169 91 / 35%);
  border-radius: 14px;
  background: rgb(255 255 255 / 6%);

  .portions-fixe {
    margin: 0;
  }

  h2 {
    margin: 0;
    color: var(--dore);
    font-family: var(--police-italique);
    font-style: italic;
    font-size: 24px;
  }
}

.recette-fiche .preparation-titre {
  margin-block: 26px 12px;
  font-family: var(--police-italique);
  font-style: italic;
  font-size: 24px;
  color: var(--dore);
}

.recette-fiche .portions,
.recette-fiche .portions-fixe {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  font-family: var(--police-menu);
  font-size: 14px;

  &[hidden] {
    display: none;
  }

  button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--dore);
    border-radius: 50%;
    background: none;
    color: var(--dore);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition-duration: 0.3s;

    &:hover:not(:disabled) {
      background: var(--dore);
      color: var(--bleu-nuit);
    }

    &:disabled {
      opacity: 0.35;
      cursor: default;
    }
  }

  output {
    min-width: 1.5ch;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
  }
}

.recette-fiche .ingredients {
  padding: 0;
  list-style: none;

  li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    padding: 5px 0;
  }

  .ing-nom::first-letter {
    text-transform: uppercase;
  }

  .ing-pointille {
    flex: 1;
    min-width: 12px;
    border-bottom: 1px dotted rgb(200 169 91 / 55%);
  }

  .ing-qte,
  .ing-texte {
    color: var(--dore);
    font-family: var(--police-menu);
    font-weight: 500;
    font-size: 15px;
  }
}

.recette-fiche .preparation {
  padding: 0;
  list-style: none;
  counter-reset: etape;

  li {
    position: relative;
    margin: 0;
    padding: 0 0 16px 46px;
    counter-increment: etape;
  }

  li::before {
    content: counter(etape);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--dore);
    border-radius: 50%;
    color: var(--dore);
    font-family: var(--police-menu);
    font-weight: 500;
    font-size: 14px;
  }

  strong {
    display: block;
    margin-bottom: 2px;
    font-family: var(--police-italique);
    font-style: italic;
    font-weight: 400;
    font-size: 20px;
    line-height: 1.2;
  }

  .qte {
    color: var(--dore);
    font-weight: 700;
  }
}

.recette-fiche .fiche-logo {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 22px;

  img {
    width: 36px;
    height: 36px;
    opacity: 0.95;
  }
}

.recette-bas > * {
  min-width: 0;
}

.recette-bas {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 70px;

  h2 {
    margin-bottom: 18px;
    font-family: var(--police-italique);
    font-style: italic;
    font-weight: 400;
    font-size: 24px;
    text-align: center;
  }
}

.carrousel-corps {
  display: flex;
  align-items: center;
  gap: 12px;
}

.carrousel-piste {
  display: flex;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }

  > li {
    flex: 0 0 100%;
    scroll-snap-align: center;
  }
}

.carrousel-fleche {
  width: 36px;
  height: 36px;
  font-size: 24px;

  &[hidden] {
    display: none;
  }
}

/* carte « autre recette » : photo, nom, étoiles */
.divers-recettes .carrousel-piste > li {
  padding: 10px 10px 26px;
}

.autre-recette {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 16px;
  color: var(--bleu-nuit);
  text-align: center;

  img {
    width: 100%;
    height: 160px;
    border-radius: 3px;
    object-fit: cover;
  }

  .autre-titre {
    display: block;
    font-family: var(--police-italique);
    font-style: italic;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.1;
  }

  .autre-titre::first-letter {
    text-transform: uppercase;
  }

  .note-etoiles {
    letter-spacing: 3px;
  }

  &::after {
    content: "Voir la recette →";
    padding-bottom: 1px;
    border-bottom: 1px solid var(--dore);
    font-family: var(--police-menu);
    font-weight: 500;
    font-size: 13px;
  }
}

.divers-recettes {
  overflow: hidden;
}

/* carte d'un avis (le fond et la bordure sont ceux des cartes, voir plus bas) */
.avis-bloc .commentaire {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 170px;
  padding: 20px 24px;
  font-family: "Amiri", Georgia, serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.45;
  text-align: left;

  p:has(> strong) {
    font-family: var(--police-italique);
    font-style: italic;
    font-size: 28px;
    line-height: 1.1;
  }

  p strong {
    font-weight: 400;
  }

  .commentaire-auteur {
    order: 5;
    margin-top: auto;
    font-family: var(--police-menu);
    font-weight: 500;
    font-size: 14px;
    text-transform: capitalize;

    &::before {
      content: "— ";
      color: var(--dore);
    }

    span {
      margin-left: 6px;
      font-weight: 300;
      font-size: 13px;
    }

    .commentaire-note {
      margin-left: 8px;
      font-size: 15px;
    }
  }

  .commentaire-info {
    order: 4;
    font-size: 15px;
  }

  button {
    order: 6;
    padding: 4px 16px;
    border: 1px solid #a32020;
    border-radius: 20px;
    background: transparent;
    color: #a32020;
    font-family: var(--police-texte);
    font-size: 15px;
  }
}

.avis-bloc #voir-plus {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
  padding: 8px 22px;
  font-size: 18px;
}

#aucun-avis {
  margin-bottom: 12px;
  text-align: center;
  font-family: var(--police-texte);
  font-weight: 400;
}

/* juste en dessous : donner son avis */
.participer {
  max-width: 640px;
  margin: 60px auto 0;
  text-align: center;

  h2 {
    margin-bottom: 14px;
    font-family: var(--police-italique);
    font-style: italic;
    font-weight: 400;
    font-size: 24px;
  }

  .commentaire-form {
    margin-inline: auto;
    text-align: left;
  }

  .invitation-avis .btn-pill {
    margin: 4px;
  }
}

.participer .etoiles {
  justify-content: center;
}

@media (max-width: 1100px) {
  .recette-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .recette-top,
  .recette-bas {
    grid-template-columns: minmax(0, 1fr);
  }

  .recette-bas {
    gap: 40px;
    margin-top: 50px;
  }

  /* sur mobile : les avis d'abord, les autres recettes en dessous */
  .divers-recettes {
    order: 1;
  }

  .autre-recette img {
    height: 200px;
  }

  .recette-fiche {
    padding: 22px 20px 18px;
  }
}

@media (max-width: 768px) {
  .recette-top {
    grid-template-columns: 1fr;
  }

  .recette-photo-step {
    align-items: start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* =========== CARTES (top 3, autres recettes, avis, chiffres) ============ */

.note-etoiles {
  color: var(--dore);
}

.top3-carte,
.autre-recette,
.avis-bloc .commentaire,
.stat-card {
  border: 1px solid rgb(196 151 74 / 20%);
  border-radius: 4px;
  background-color: #fbf9f5;
  box-shadow: 0 4px 12px rgb(0 0 0 / 2%);
}

.top3-carte,
.autre-recette,
.avis-bloc .commentaire {
  border-color: rgb(196 151 74 / 45%);
}

.top3-carte,
.autre-recette,
.stat-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;

  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgb(196 151 74 / 12%);
  }
}

/* ======================== À PROPOS ======================== */

.about-title {
  text-align: center;
  margin-bottom: 27px;
  font-family: var(--police-italique);
  font-style: italic;
  font-weight: 400;
  font-size: 76px;

  span {
    display: block;
    color: var(--dore);
  }
}

.histoire {
  margin-top: 20px;
  font-family: var(--police-texte);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;

  p {
    margin-bottom: 20px;
  }

  p:last-child {
    margin-bottom: 0;
  }
}

.about-top {
  display: flex;
  gap: 20px;
  justify-content: space-around;
  align-items: center;
  padding: 30px;

  .about-top-txt {
    width: 40vw;
  }

  .about-txt-start {
    font-family: var(--police-italique);
    font-size: 40px;
    color: var(--dore);
  }

  .about-top-txt-citation {
    font-family: var(--police-italique);
    font-size: 24px;
    padding: 20px;
    border: 1px solid rgb(196 151 74 / 20%);
    background-color: #fbf9f5;
  }
}

.about-bottom {
  text-align: center;

  img {
    width: 600px;
    margin: 40px auto;
    border-radius: 15px;
  }

  .about-bottom-end {
    font-family: var(--police-italique);
    font-size: 40px;
    color: var(--dore);
  }
}

.heritage-stats-section {
  max-width: 960px;
  margin: 50px auto 60px auto;
  padding: 0 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 24px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 30px;
  text-align: center;
}

.stat-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  color: var(--dore);
}

.stat-number {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-subtitle {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.stat-description {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

main:has(.histoire) + .site-footer {
  margin-top: 80px;
}

@media (max-width: 900px) {
  .about-top {
    flex-direction: column;
    padding: 20px 0;

    .about-top-txt {
      width: 100%;
    }
  }

  .about-top-img img {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .histoire {
    font-size: 19px;

    h1 {
      font-size: 52px;
    }
  }
}

@media (max-width: 480px) {
  .histoire {
    font-size: 17px;

    h1 {
      font-size: 40px;
    }

    .histoire-image {
      border-radius: 44px;
    }
  }
}

/* ======================== CONTACT ========================= */

main:has(.contact-infos) + .site-footer {
  margin-top: 0;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 70px;
  max-width: 966px;

  .message {
    grid-column: 2;
    grid-row: 1 / 4;

    textarea {
      flex: 1;
    }
  }

  .btn-pill,
  .form-feedback {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

.contact-infos {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: start;
  margin-top: 90px;
  padding-block: 120px 100px;
  background: var(--bleu-nuit);
  color: var(--dore);
}

.contact-texte {
  background-color: #223355;
  height: 40vh;
  padding: 50px;
  text-align: start;
  font-family: var(--police-texte);
  font-weight: 400;
  font-size: 18px;

  h2 {
    font-family: var(--police-italique);
    font-style: italic;
    font-size: 45px;
  }

  address {
    font-style: normal;
  }
}

#map {
  width: 40vw;
  height: 40vh;
}

@media (max-width: 768px) {
  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form .message {
    grid-column: auto;
    grid-row: auto;
  }

  .contact-infos-inner {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .contact-infos {
    flex-direction: column;

    #map {
      width: 356px;
    }
  }
}

/* ================ CONNEXION ET INSCRIPTION ================ */

.connection-hub {
  margin: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.img-connect {
  img {
    width: 25vw;
    border-radius: 57px;
  }
}

.form-connect {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(640px, 100%);
  text-align: center;

  form {
    margin: 30px 0;
  }

  h1 {
    color: var(--dore);
    font-family: var(--police-italique);
    font-size: 60px;
    font-weight: 200;
  }

  .line {
    border-bottom: 1px solid var(--dore);
  }

  p {
    font-size: 20px;
  }

  .logo-connect {
    margin-top: 20px;
    display: flex;
    gap: 40px;
    justify-content: center;
  }
}

.popup-connexion {
  inset: 120px 0 auto;
  width: min(380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 30px 30px;
  border: 1px solid var(--dore);
  border-radius: 23px;
  background: white;
  box-shadow: 0 20px 60px rgb(21 33 56 / 25%);
  color: var(--bleu-nuit);
  text-align: center;

  &::backdrop {
    background: rgb(21 33 56 / 35%);
  }

  h2 {
    color: var(--dore);
    font-family: var(--police-italique);
    font-style: italic;
    font-weight: 400;
    font-size: 45px;
  }

  > p {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--dore);
    font-size: 18px;
  }

  .connect-form {
    > span {
      font-family: var(--police-texte);
      font-weight: 400;
      font-size: 16px;
    }

    .btn-pill {
      margin-top: 10px;
      font-size: 22px;
    }
  }
}

.popup-fermer {
  position: absolute;
  top: 12px;
  right: 18px;
  border: none;
  background: none;
  color: var(--bleu-nuit);
  font-size: 30px;
  line-height: 1;

  &:hover {
    color: var(--dore);
  }
}

.popup-lien {
  display: inline-block;
  margin-top: 20px;
  color: var(--gris);
  font-family: var(--police-menu);
  font-weight: 300;
  font-size: 15px;
  text-decoration: underline;

  &:hover {
    color: var(--dore);
  }
}

.connect-form {
  display: flex;
  flex-direction: column;
  gap: 10px;

  .btn-pill {
    align-self: center;
  }
}

.deja-client {
  margin-bottom: 20px;
  font-family: var(--police-texte);
  font-weight: 400;

  button {
    border: none;
    background: none;
    color: var(--dore);
    text-decoration: underline;

    &:hover {
      color: var(--bleu-nuit);
    }
  }
}

@media (max-width: 1100px) {
  .connection-hub {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .popup-connexion {
    inset: 80px 0 auto;
  }
}

/* ===================== ADMINISTRATION ===================== */

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 966px;

  .btn-pill {
    align-self: center;
  }
}

.admin-bloc legend {
  margin-bottom: 20px;
  padding: 0 14px;
  color: var(--dore);
  font-family: var(--police-italique);
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
}

.admin-infos {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
}

.admin-champs {
  display: flex;
  flex-direction: column;
  gap: 16px;

  textarea {
    height: 140px;
  }
}

.admin-ligne {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.photo-slot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;

  input {
    font-family: var(--police-menu);
    font-weight: 300;
    font-size: 15px;
  }
}

.photo-vide {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--dore);
  border-radius: 15px;
  background-color: rgb(200 169 91 / 8%);
  transition: 0.2s;

  &::after {
    content: "＋ Photo (facultative)";
    color: var(--dore);
    font-family: var(--police-menu);
    font-size: 15px;
  }

  &[style*="background-image"]::after {
    display: none;
  }
}

.photo-slot:hover .photo-vide {
  background-color: rgb(200 169 91 / 18%);
}

.photo-principale .photo-vide {
  border-radius: 57px;
}

.admin-etapes {
  display: flex;
  flex-direction: column;
  gap: 30px;
  list-style: none;
}

.admin-etape {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgb(200 169 91 / 40%);
  border-radius: 16px;

  textarea {
    height: 165px;
  }
}

.admin-section,
.admin-bloc {
  padding: 28px;
  border: 1px solid rgb(200 169 91 / 75%);
  border-radius: 20px;
  background: #f7f1e3;
  box-shadow: 0 8px 24px rgb(21 33 56 / 10%);
}

.admin-section {
  margin-block: 28px 50px;
  overflow-x: auto; /* sur mobile, le tableau défile dans son bloc, pas la page */

  h2 {
    margin-bottom: 18px;
    color: var(--dore);
    font-family: var(--police-italique);
    font-style: italic;
    font-weight: 400;
    font-size: 36px;
  }

  .admin-form {
    margin-inline: auto;
  }

  .admin-note {
    text-align: center;
  }
}

.admin-note {
  margin-bottom: 20px;
  font-family: var(--police-texte);
}

.admin-boutons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--police-texte);

  th,
  td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
  }

  th {
    border-bottom: 2px solid var(--dore);
    color: var(--dore);
    font-family: var(--police-menu);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  td {
    border-bottom: 1px solid rgb(200 169 91 / 30%);
  }

  /* texte libre (message, commentaire) : même un mot géant passe à la ligne */
  .cellule-texte {
    min-width: 260px;
    overflow-wrap: anywhere;
  }

  tbody tr:hover {
    background: rgb(200 169 91 / 7%);
  }

  td a {
    font-weight: 700;

    &:hover {
      color: var(--dore);
    }
  }

  button {
    padding: 6px 16px;
    border: 1px solid var(--bleu-nuit);
    border-radius: 20px;
    background: transparent;
    font-family: var(--police-texte);
    transition: 0.2s;

    &:hover {
      border-color: var(--dore);
      background: var(--dore);
      color: #152138;
    }
  }
}

.recette-masquee {
  opacity: 0.5;
}

.admin-onglets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 0;
  padding: 6px;
  border: 1px solid var(--dore);
  border-radius: 999px;
  background: rgb(200 169 91 / 8%);

  a {
    padding: 8px 22px;
    border-radius: 999px;
    color: var(--bleu-nuit);
    font-family: var(--police-menu);
    font-weight: 500;
    transition: 0.2s;

    &:hover {
      background: rgb(200 169 91 / 22%);
    }

    &.active {
      background: var(--bleu-nuit);
      color: var(--fond, #fff);
    }
  }
}

@media (max-width: 768px) {
  .admin-infos,
  .admin-etape {
    grid-template-columns: 1fr;
  }

  .photo-principale .photo-vide {
    aspect-ratio: 4 / 3;
    border-radius: 15px;
  }

  .admin-section,
  .admin-bloc {
    padding: 16px;
  }

  .admin-onglets a {
    padding: 8px 14px;
  }

  .admin-table {
    font-size: 14px;
  }
}

/* ===================== MENTIONS LÉGALES ===================== */

.mentions {
  max-width: 800px;
  padding-block: 40px 70px;

  h1 {
    margin-bottom: 8px;
    text-align: center;
  }

  h2 {
    margin: 30px 0 8px;
    color: var(--dore);
    font-size: 26px;
  }

  p {
    line-height: 1.6;
  }

  a {
    color: var(--dore);
    text-decoration: underline;
  }
}

.mentions-note {
  text-align: center;
  font-style: italic;
}

/* ===================== DARK MODE ===================== */

.theme-toggle {
  color: var(--bleu-nuit);
  font-size: 22px;
  position: relative;
  top: 3px;

  &:hover {
    color: var(--dore);
  }
}

/* En sombre, le « bleu nuit » (texte, bordures) devient crème et la page prend un fond bleu très foncé. */
[data-theme="dark"] {
  --bleu-nuit: #ece3cf;
  --gris: #cfc8b9;
  --fond: #0f1829;
  --fond-bloc: #1c2a45;
  color-scheme: dark;

  body {
    background: var(--fond);
    transition: 0.5s ease-in;
  }

  .btn-pill:hover,
  .site-footer,
  .contact-infos,
  .recette-card,
  .recette-card-body-txt,
  .carousel-btn:hover:not(:disabled),
  .recette-fiche,
  .alerte {
    background: var(--fond-bloc);
    transition: 0.5s ease-in;
  }

  .top3 {
    color: var(--fond);
    transition: 0.5s ease-in;
  }

  .stat-card,
  .about-top-txt-citation {
    border: 1px solid var(--dore);
    background: var(--fond-bloc);
    box-shadow: 0 4px 14px rgb(0 0 0 / 35%);
    color: var(--dore);
    transition: 0.5s ease-in;
  }

  .top3-carte,
  .autre-recette,
  .avis-bloc .commentaire {
    border-color: rgb(236 227 207 / 15%);
    background: var(--fond-bloc);
    box-shadow: 0 4px 14px rgb(0 0 0 / 35%);
    color: var(--bleu-nuit);
  }

  .admin-section,
  .admin-bloc {
    border-color: rgb(236 227 207 / 28%);
    background: var(--fond-bloc);
    box-shadow: 0 8px 24px rgb(0 0 0 / 45%);
  }

  .recette-btn:hover {
    color: #152138;
    transition: 0.5s ease-in;
  }

  .dropdown-content,
  .popup-connexion,
  .photo-vide {
    background: var(--fond-bloc);
    transition: 0.5s ease-in;
  }

  .dropdown-content a {
    color: var(--bleu-nuit);

    &:hover {
      color: var(--dore);
    }
  }

  input,
  textarea,
  select {
    background: var(--fond);
    color: var(--bleu-nuit);
    transition: 0.5s ease-in;
  }

  /* icônes noires : inversées pour rester visibles */
  .account-btn img,
  .recherche-btn img {
    filter: invert(1);
    transition: 0.5s ease-in;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.5s;
  }
}

/* ======================== NEWSLETTER ET INSCRIPTION ======================== */

.desinscription {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* case RGPD de l'inscription : texte centré sur deux lignes */
.form-field .rgpd-label {
  display: block;
  padding-left: 0;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;

  input {
    width: 18px;
    height: 18px;
    margin: 0 10px 3px 0;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--dore);
  }

  span {
    text-wrap: balance;
  }

  /* retour à la ligne forcé seulement sur grand écran */
  .rgpd-br {
    display: none;
  }

  @media (min-width: 900px) {
    .rgpd-br {
      display: inline;
    }
  }

  a {
    color: var(--dore);
    text-decoration: underline;
  }
}

[data-theme="dark"] .newsletter-field {
  background: rgb(255 255 255 / 6%);

  &:focus-within {
    box-shadow: 0 0 0 2px rgb(200 169 91 / 40%);
  }

  input {
    background: transparent;
    color: var(--bleu-nuit);

    &::placeholder {
      color: rgb(236 227 207 / 55%);
    }
  }

  .newsletter-envoi img {
    filter: none;
  }
}

.badge {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 999px;
  background: #e3f2e5;
  color: #1f6b2f;
  font-family: var(--police-menu);
  font-size: 13px;
  font-weight: 500;
}

.badge-masque {
  background: #ececec;
  color: #666;
}

[data-theme="dark"] .badge {
  background: rgb(80 180 100 / 18%);
  color: #8fd9a0;
}

[data-theme="dark"] .badge-masque {
  background: rgb(255 255 255 / 10%);
  color: #b9b9b9;
}

/* pages courtes (confirmation d'e-mail, désinscription) : message centré, pied de page en bas de l'écran */
.page-courte {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: calc(100vh - 560px); /* écran moins en-tête et pied de page */

  h1 {
    margin-bottom: 0;
  }

  p {
    margin: 0;
  }

  .mentions-note + .mentions-note {
    margin-top: 6px;
  }
}

/* ===== Ajouter une recette : ingrédients (quantité, unité, nom) ===== */
.ingredients-bloc {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ingredient-ligne {
  display: grid;
  grid-template-columns: 130px 250px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;

  input,
  select {
    min-width: 0;
    padding: 12px 20px;
    border: 1px solid var(--bleu-nuit);
    border-radius: 23px;
    font-family: var(--police-texte);
    font-size: 18px;
  }
}

.ingredient-retirer {
  width: 44px;
  height: 44px;
  border: 1px solid var(--dore);
  border-radius: 50%;
  background: none;
  color: var(--dore);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;

  &:hover {
    background: var(--dore);
    color: #fff;
  }
}

#ajouter-ingredient {
  align-self: center;
}

#ajouter-etape {
  display: block;
  margin: 20px auto 0;
}

@media (max-width: 700px) {
  .ingredient-ligne {
    grid-template-columns: minmax(0, 1fr) 44px;

    input[type="number"],
    select,
    input[type="text"] {
      grid-column: 1;
    }

    .ingredient-retirer {
      grid-column: 2;
      grid-row: 1 / 4;
    }
  }
}
