:root {
  --fond: #f5f5f5;
  --texte: #222;
  --doux: #6b6b6b;
  --bouton: #9a6c6b;
  --bordure: #e8e8e8;
  --erreur: #b00020;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px;
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

main { max-width: 780px; margin: 0 auto; padding: 24px 0 48px; }

h1 { font-size: 1.8rem; font-weight: 500; }

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

/* Liste des prestations par categorie */
.categorie { margin-bottom: 40px; }
.categorie h2 { font-size: 1.35rem; font-weight: 400; margin: 0 0 12px; }

/* Carte cadeau a montant libre, toujours visible en haut. */
.montant-libre {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 20px 32px 24px;
  margin-bottom: 40px;
}
.montant-libre h2 { font-size: 1.35rem; font-weight: 400; margin: 0; }
.montant-libre .sous-titre { color: var(--doux); margin: 4px 0 16px; }
.montant-libre label { display: block; font-weight: 600; margin-bottom: 6px; }
.saisie-montant { display: flex; align-items: center; gap: 8px; }
.saisie-montant input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 10px;
  border: 1px solid var(--bordure);
  border-radius: 8px;
}
.montant-libre button { width: 100%; margin-top: 8px; }

/* Sur ordinateur, le titre de categorie est un simple titre. */
.titre-categorie {
  all: unset;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.chevron { display: none; }

.bloc {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 8px 32px 16px;
}

.bloc .ligne {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--bordure);
}
.bloc .ligne:last-of-type { border-bottom: none; }
/* Glissement des prestations supplementaires (Voir plus / Voir moins). */
.supplement {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s ease-in-out;
}
.bloc.tout .supplement { grid-template-rows: 1fr; }
.supplement-interieur { min-height: 0; overflow: hidden; }

.intitule { flex: 1; min-width: 0; }

.description {
  display: block;
  color: var(--doux);
  font-style: italic;
}
.prix { white-space: nowrap; }

.choisir {
  background: var(--bouton);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 14px;
  white-space: nowrap;
}

.voir-plus {
  background: none;
  color: #4f46e5;
  text-decoration: underline;
  padding: 16px 0 0;
}

/* Telephone : categories en menu deroulant, repliees a l'arrivee. */
@media (max-width: 640px) {
  body { padding: 0 12px; }
  h1 { font-size: 1.6rem; }

  .montant-libre { padding: 16px; margin-bottom: 20px; }
  .montant-libre h2 { font-size: 1.05rem; font-weight: 500; }

  .categorie {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
  }
  .categorie h2 { font-size: 1.05rem; font-weight: 500; margin: 0; }
  .titre-categorie {
    cursor: pointer;
    padding: 18px 16px;
    box-sizing: border-box;
    gap: 12px;
  }
  .chevron {
    display: block;
    flex: none;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-bottom: 4px;
    transition: transform 0.6s ease-in-out;
  }
  .categorie.ouverte .chevron { transform: rotate(-135deg); margin: 4px 0 0; }

  /* Glissement : la hauteur passe de 0 a la hauteur du contenu. */
  .bloc {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.6s ease-in-out;
    box-shadow: none;
    padding: 0;
  }
  .categorie.ouverte .bloc { grid-template-rows: 1fr; }
  .bloc-interieur { min-height: 0; overflow: hidden; padding: 0 16px; }
  .bloc-interieur > :last-child { margin-bottom: 8px; }

  /* Une fois depliee, la categorie montre tout. */
  .supplement { grid-template-rows: 1fr; transition: none; }
  .voir-plus { display: none; }

  .bloc .ligne { flex-wrap: wrap; gap: 12px; padding: 16px 0; }
  .intitule { flex-basis: 100%; }
  .prix { font-weight: 700; margin-right: auto; }
  .choisir { padding: 6px 12px; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bloc, .chevron, .supplement { transition: none; }
}

/* Formulaire */
.champ { display: flex; flex-direction: column; margin-bottom: 16px; }
.champ label { font-weight: 600; margin-bottom: 4px; }
.champ input, .champ textarea {
  font: inherit;
  padding: 10px;
  border: 1px solid var(--bordure);
  border-radius: 8px;
  background: #fff;
}
.champ small { color: var(--doux); margin-top: 4px; }
.champ.ligne { flex-direction: row; align-items: center; gap: 8px; }
.champ.ligne label { margin: 0; font-weight: 400; }

.erreur { color: var(--erreur); font-size: 0.9rem; margin: 4px 0 0; }

.recap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 16px;
  margin-bottom: 24px;
}

button {
  font: inherit;
  background: var(--bouton);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

.masque { display: none; }
