/* ───────── Page avis ───────── */
.avis-page {
  padding: 3.5rem 0 6rem;
  position: relative;
  z-index: 1;
}
.avis-page .container { max-width: 620px; }

/* ── Hero ── */
.avis-hero {
  text-align: center;
  margin-bottom: 2.75rem;
}
.avis-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  background: linear-gradient(135deg, #D4481214, #F07A3020);
  border: 1.5px solid #D4481222;
  border-radius: 22px;
  margin-bottom: 1.35rem;
  position: relative;
}
.avis-hero-icon svg {
  width: 38px;
  height: 38px;
}
.avis-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.85rem;
}
.avis-hero h1 em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.avis-hero p {
  font-size: 0.975rem;
  color: var(--text-light);
  line-height: 1.65;
  max-width: 460px;
  margin: 0 auto;
}

/* ── Progress steps ── */
.avis-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.25rem;
}
.avis-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
}
.avis-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid #5C403318;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-light);
  transition: all 0.3s;
  z-index: 1;
}
.avis-step.active .avis-step-dot {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px #D4481230;
}
.avis-step.done .avis-step-dot {
  background: #EDFAF3;
  border-color: #22C55E40;
  color: #16a34a;
}
.avis-step-line {
  width: 48px;
  height: 1.5px;
  background: #5C403314;
  margin: 0 -2px;
  margin-bottom: 22px;
  flex-shrink: 0;
}
.avis-step-label {
  font-size: 0.68rem;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
  position: absolute;
  top: 32px;
}
.avis-step.active .avis-step-label { color: var(--primary); font-weight: 600; }

/* ── Section cards ── */
.avis-section {
  background: var(--bg-card);
  border: 1px solid #5C403312;
  border-radius: 18px;
  padding: 1.85rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s;
}
.avis-section:focus-within {
  box-shadow: 0 0 0 3px #D4481210, 0 4px 20px #5C40330A;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.section-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-display);
  margin-top: 1px;
}
.section-text {}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}
.section-desc {
  font-size: 0.825rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ── Star rating ── */
.star-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
}
.star-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  font-size: 2.4rem;
  line-height: 1;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.18s;
  filter: grayscale(1) opacity(0.28);
  user-select: none;
  display: block;
}
.star-btn.lit {
  filter: none;
  transform: scale(1.18);
}
.star-btn:hover { transform: scale(1.25); filter: none; }

.star-label-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.75rem;
  min-height: 1.3em;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.star-label-text.chosen { color: var(--primary); font-weight: 500; font-style: normal; }

/* ── Chips ── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip-input { display: none; }
.chip-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.45rem 1rem;
  border: 1.5px solid #5C403318;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  line-height: 1.4;
}
.chip-label .chip-icon { font-size: 0.9em; line-height: 1; }
.chip-label:hover {
  border-color: #D4481235;
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px #5C403310;
}
.chip-input:checked + .chip-label {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px #D4481230;
  transform: translateY(-1px) scale(1.02);
}

/* ── Textarea ── */
.avis-textarea-wrap { position: relative; }
.avis-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid #5C403318;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  resize: vertical;
  min-height: 160px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
}
.avis-textarea::placeholder { color: var(--text-light); opacity: 0.6; }
.avis-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #D4481214; }
.avis-textarea[aria-invalid="true"] { border-color: var(--primary); }

.char-counter {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: right;
  margin-top: 0.4rem;
  transition: color 0.2s;
}
.char-counter.near-limit { color: var(--primary); font-weight: 600; }

.field-error {
  font-size: 0.8rem;
  color: var(--primary);
  margin-top: 0.4rem;
  display: none;
  font-weight: 500;
}
.field-error.visible { display: block; }

/* ── Submit area ── */
.avis-submit-area { margin-top: 1.5rem; }
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  box-shadow: 0 4px 18px #D4481230;
  letter-spacing: 0.01em;
}
.btn-submit:hover:not(:disabled) {
  opacity: 0.93;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 28px #D4481240;
}
.btn-submit:active:not(:disabled) { transform: scale(0.98); box-shadow: none; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.btn-submit-icon { font-size: 1.05em; }
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: avis-spin 0.7s linear infinite;
  display: none;
}
.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-label,
.btn-submit.loading .btn-submit-icon { display: none; }
@keyframes avis-spin { to { transform: rotate(360deg); } }

.submit-note {
  text-align: center;
  font-size: 0.775rem;
  color: var(--text-light);
  margin-top: 0.85rem;
  line-height: 1.5;
}

.alert-error {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-top: 1rem;
  line-height: 1.5;
  background: #FFF1EE;
  border: 1px solid #D448121A;
  color: #9B1A00;
}
.alert-error.visible { display: block; }
.alert-error strong { font-weight: 600; display: block; margin-bottom: 0.2rem; }

/* ── Success state ── */
.avis-success {
  display: none;
  text-align: center;
  padding: 3.5rem 1.5rem 4rem;
  animation: avis-fade-in 0.4s ease;
}
.avis-success.visible { display: block; }
@keyframes avis-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.success-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px; height: 84px;
  background: linear-gradient(135deg, #EDFAF3, #D1FAE5);
  border-radius: 50%;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
  border: 2px solid #22C55E30;
  animation: avis-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes avis-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.avis-success h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text);
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}
.avis-success p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.65;
  max-width: 380px;
  margin: 0 auto 2rem;
}
.avis-success .btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1.4rem;
  border: 1.5px solid #5C403318;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
}
.avis-success .btn-back:hover { border-color: #D4481235; color: var(--text); transform: translateX(-2px); }

/* ── Responsive ── */
@media (max-width: 480px) {
  .avis-section { padding: 1.35rem; }
  .star-btn { font-size: 2rem; }
  .avis-steps { gap: 0; }
  .avis-step-line { width: 32px; }
  .avis-step-label { font-size: 0.6rem; }
}
