/* ============================================================
   ÉCRITURE DE SOIE — Page Avis
   Réutilise main.css + account.css (champs, card-block, badges)
   ============================================================ */

.avis-main { max-width: 1240px; }

.avis-head { text-align: center; margin-bottom: 3.2rem; }
.avis-title { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0.5rem 0 1.2rem; }
.avis-sub { color: var(--ink-soft); max-width: 52ch; margin: 1.3rem auto 0; font-size: 1.08rem; }

.avis-summary {
  display: inline-flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; justify-content: center;
  background: var(--cream); border: 1px solid var(--line); border-radius: 100px;
  padding: 0.7rem 1.6rem; box-shadow: 0 14px 34px -26px rgba(42, 32, 54, 0.4);
}
.avis-summary__score { font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--ink); }
.avis-summary__count { color: var(--ink-soft); font-style: italic; }

/* étoiles d'affichage */
.stars { color: var(--gold); letter-spacing: 0.06em; font-size: 1.05rem; }
.stars--lg { font-size: 1.6rem; }

/* layout : formulaire AU-DESSUS, puis la liste des avis */
.avis-layout { display: flex; flex-direction: column; gap: 2.6rem; }
.avis-form-block { max-width: 760px; margin: 0 auto; width: 100%; }
.avis-list-block { width: 100%; }

/* champs (mêmes codes que .account .field) */
.avis-main .field { margin-bottom: 1.05rem; }
.avis-main .field__label { display: block; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.45rem; }
.avis-main .field__opt { text-transform: none; letter-spacing: 0; font-style: italic; opacity: 0.7; }
.avis-main .field input,
.avis-main .field textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: 11px; font: inherit;
  background: var(--ivory); border: 1px solid var(--line); color: var(--ink); resize: vertical;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.avis-main .field input::placeholder,
.avis-main .field textarea::placeholder { color: rgba(42, 32, 54, 0.35); }
.avis-main .field input:focus,
.avis-main .field textarea:focus { outline: none; border-color: var(--silk-deep); background: var(--cream); box-shadow: 0 0 0 3px rgba(163, 31, 61, 0.08); }

/* notation par étoiles (input) */
.rating { border: none; padding: 0; margin: 0 0 1.05rem; }
.rating__stars { display: inline-flex; flex-direction: row-reverse; gap: 0.15rem; font-size: 2rem; line-height: 1; }
.rating__stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating__stars label {
  color: var(--ivory-2); cursor: pointer; transition: color 0.15s, transform 0.15s;
  -webkit-text-stroke: 1px rgba(201, 162, 74, 0.5);
}
/* survol (géré aussi en JS) + sélection : l'étoile et toutes à sa droite (= note ≥) */
.rating__stars label.is-hover,
.rating__stars input:checked ~ label,
.rating__stars label:hover,
.rating__stars label:hover ~ label { color: var(--gold); -webkit-text-stroke: 0; transform: scale(1.08); }

/* cartes d'avis */
.avis-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.3rem; align-items: start; }
.avis-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.7rem 1.5rem; position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.avis-card::before {
  content: "“"; position: absolute; top: -0.3rem; right: 1rem; font-family: var(--serif);
  font-size: 4.5rem; line-height: 1; color: var(--silk); opacity: 0.18;
}
.avis-card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -30px rgba(42, 32, 54, 0.42); }
.avis-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.9rem; }
.avis-card__name { font-family: var(--serif); font-size: 1.25rem; }
.avis-card__text { color: var(--ink-soft); line-height: 1.65; position: relative; white-space: pre-line; }
.avis-card__date { margin-top: 1rem; font-size: 0.82rem; font-style: italic; color: var(--silk-deep); text-transform: capitalize; }

@media (max-width: 860px) {
  .avis-layout { grid-template-columns: 1fr; }
  .avis-form-block { position: static; }
  .avis-list { grid-template-columns: 1fr; }
}

/* ============================================================
   Carte d'avis rotative dans le HERO (index.html)
   ============================================================ */
.hero__avis {
  position: absolute; z-index: 2; bottom: 2.2rem; right: var(--gutter);
  width: min(300px, 32vw); padding: 1.1rem 1.25rem;
  background: rgba(251, 248, 252, 0.72); backdrop-filter: blur(10px) saturate(1.1);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 50px -34px rgba(42, 32, 54, 0.5);
  text-decoration: none; color: var(--ink);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), box-shadow 0.4s var(--ease);
}
.hero__avis.is-in { opacity: 1; transform: none; }
.hero__avis:hover { box-shadow: 0 30px 56px -32px rgba(140, 24, 50, 0.45); }
.hero__avis-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.hero__avis-stars { color: var(--gold); font-size: 0.95rem; letter-spacing: 0.05em; }
.hero__avis-avg { font-size: 0.82rem; font-style: italic; color: var(--ink-soft); }
.hero__avis-quote { font-family: var(--serif); font-size: 1.02rem; line-height: 1.4; min-height: 2.8em; transition: opacity 0.4s var(--ease); }
.hero__avis-name { display: block; margin-top: 0.55rem; font-size: 0.85rem; color: var(--silk-deep); font-style: italic; }
.hero__avis-quote.is-fading { opacity: 0; }

@media (max-width: 880px) {
  .hero__avis { display: none; } /* on évite la surcharge sur petit écran */
}
