/* Avis clients Exoring - formulaire de la page /avis/ et etiquettes de canal.
   Charge par exo-avis.php : sur les 5 fiches coloris et sur la page /avis/. */

/* ---- Etiquette "Acheté en pharmacie" sous le nom de l auteur ---- */
.exo-avis-etiquette {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #33415c;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  vertical-align: middle;
}
.exo-avis-etiquette--site { background: #e7f6ec; color: #17663a; }
.exo-avis-etiquette--pharmacie { background: #e8f0fe; color: #1a4a8a; }
.exo-avis-etiquette--salon { background: #fff4e5; color: #b45309; }

/* ---- Question sur le canal (fiches produit + page avis) ---- */
.exo-avis-canal {
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 18px 0;
}
.exo-avis-canal legend {
  font-weight: 700;
  font-size: .95rem;
  padding: 0 6px;
}
/* La question n est plus encastree dans la bordure (legend en "encoche") : sur mobile
   elle passait sur 2 lignes et l asterisque tombait dans le cadre (2026-10-24).
   Elle devient un titre en haut du cadre, qui peut passer a la ligne proprement. */
.exo-avis-canal legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 10px;
  line-height: 1.35;
}
.exo-avis-canal legend + * { clear: both; }
.exo-avis-canal--erreur { border-color: #b32d2e; }
.exo-avis-erreur { color: #b32d2e; font-weight: 600; margin: 0 0 10px; }
.exo-avis-canal__option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  cursor: pointer;
  line-height: 1.35;
}
.exo-avis-canal__option input { margin-top: 3px; flex: none; }

/* ---- Piege a robots : invisible pour les humains, lisible par un automate ---- */
.exo-avis-piege {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---- Formulaire autonome de la page /avis/ ---- */
.exo-avis-form {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}
.exo-avis-form__intro { margin: 0 0 22px; color: #444; }
.exo-avis-form__ligne { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; }
.exo-avis-form__ligne label { font-weight: 700; font-size: .95rem; }
.exo-avis-form__aide { font-size: .8rem; color: #777; }
.exo-avis-form input[type="text"],
.exo-avis-form input[type="email"],
.exo-avis-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: .95rem;
  box-sizing: border-box;
}
.exo-avis-form .required { color: #b32d2e; }

/* Etoiles : radios en ordre inverse, coloration au survol et apres selection */
.exo-avis-note { border: 0; padding: 0; margin: 0 0 18px; }
.exo-avis-note legend { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.exo-avis-note__etoiles {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}
.exo-avis-note__etoiles input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.exo-avis-note__etoiles label {
  font-size: 2.1rem;
  line-height: 1;
  color: #d9d9d9;
  cursor: pointer;
  transition: color .12s ease;
}
.exo-avis-note__etoiles label:hover,
.exo-avis-note__etoiles label:hover ~ label,
.exo-avis-note__etoiles input:checked ~ label { color: #f5a623; }
.exo-avis-note__etoiles input:focus-visible + label { outline: 2px solid #111; outline-offset: 3px; }

.exo-avis-form__envoi { margin: 24px 0 0; }
.exo-avis-form__bouton {
  padding: 14px 30px;
  border: 1px solid var(--wp--preset--color--custom-bleu-rispon, #4fa3fd);
  border-radius: 8px;
  background: var(--wp--preset--color--custom-bleu-rispon, #4fa3fd);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background-color .2s ease;
}
.exo-avis-form__bouton:hover { background: #2f74b8; border-color: #2f74b8; }
/* Envoi en cours : le bouton montre qu il s est passé quelque chose, et ne repart pas */
.exo-avis-form__bouton.est-en-cours,
.exo-avis-form__bouton:disabled {
  background: #8fbfe8;
  border-color: #8fbfe8;
  cursor: wait;
}
.exo-avis-form--envoi { opacity: .65; pointer-events: none; }
.exo-avis-form--envoi .exo-avis-form__bouton { pointer-events: auto; }

/* ---- Zone d avis des fiches produit ---- */
.exo-avis-zone {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}
.exo-avis-zone__titre {
  text-align: center;
  margin: 0 0 6px;
}
.exo-avis-zone__sous-titre {
  margin: 38px 0 14px;
  font-size: 1.15rem;
}
.exo-avis-zone__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 26px;
}
.exo-avis-zone__etoiles span {
  font-size: 1.5rem;
  line-height: 1;
  color: #d9d9d9;
}
.exo-avis-zone__etoiles .est-pleine { color: #f5a623; }
.exo-avis-zone__moyenne { font-weight: 700; color: #333; }
.exo-avis-zone__vide {
  text-align: center;
  color: #555;
  margin: 0 0 28px;
}
.exo-avis-zone__mention {
  margin: 22px 0 0;
  font-size: .78rem;
  color: #777;
  line-height: 1.5;
}

/* Liste des avis : gabarit natif WooCommerce, allege */
.exo-avis-liste {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}
.exo-avis-liste li {
  padding: 18px 0;
  border-top: 1px solid #ececec;
}
.exo-avis-liste li:last-child { border-bottom: 1px solid #ececec; }
.exo-avis-liste .avatar { display: none; }
.exo-avis-liste .woocommerce-review__author { font-weight: 700; }
.exo-avis-liste .woocommerce-review__published-date { color: #888; font-size: .85rem; margin-left: 6px; }
.exo-avis-liste .woocommerce-review__verified { color: #17663a; font-weight: 600; font-style: normal; }
.exo-avis-liste .star-rating { color: #f5a623; }

.exo-avis-merci {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 26px;
  border: 1px solid #a6dbb8;
  border-radius: 12px;
  background: #e7f6ec;
  color: #17663a;
  text-align: left;
}
.exo-avis-merci p { margin: 0 0 8px; }
.exo-avis-merci p:last-child { margin-bottom: 0; font-weight: 400; }

/* Etoiles du haut de fiche ([etoiles_exoring]) : partie non atteinte de la note (2026-10-23) */
.exo-stars .exo-stars__vides { color: #d6d6d6; }

/* ---- Carte du formulaire (fiches + /avis/), 2026-10-23 ----
   Contour, fond legerement teinte et ombre douce pour que le formulaire se
   detache de la liste d avis au-dessus. Champs sur fond blanc. */
.exo-avis-carte {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 36px;
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  background: #f6f9fd;
  box-shadow: 0 8px 28px rgba(15, 35, 70, .07);
  text-align: left;
  box-sizing: border-box;
}
.exo-avis-zone .exo-avis-carte { margin-top: 44px; }
.exo-avis-carte__titre {
  margin: 0 0 6px !important;
  text-align: center;
  font-size: 1.4rem;
}
.exo-avis-carte .exo-avis-form { max-width: none; }
/* Sur les fiches, WooCommerce ajoute une marge sous les <label> (.woocommerce form label) */
.exo-avis-carte .exo-avis-form__ligne label { margin: 0 !important; }
.exo-avis-carte .exo-avis-form__intro {
  text-align: center;
  color: #555;
  margin: 0 0 26px;
}
.exo-avis-carte .exo-avis-form input[type="text"],
.exo-avis-carte .exo-avis-form input[type="email"],
.exo-avis-carte .exo-avis-form textarea,
.exo-avis-carte .exo-avis-canal {
  background: #fff;
  border-color: #d5dce6;
}
.exo-avis-carte .exo-avis-form input:focus,
.exo-avis-carte .exo-avis-form textarea:focus {
  outline: none;
  border-color: var(--wp--preset--color--custom-bleu-rispon, #4fa3fd);
  box-shadow: 0 0 0 3px rgba(79, 163, 253, .18);
}
.exo-avis-carte .exo-avis-form__envoi { text-align: center; }
.exo-avis-carte .exo-avis-zone__mention { text-align: center; margin-top: 18px; }
.exo-avis-carte .exo-avis-merci { max-width: none; }

/* Page /avis/ : la liste vient apres le formulaire */
.exo-avis-zone--page { margin-top: 56px; }

/* Fiches, ordinateur (>= 1024 px) : liste a gauche, formulaire a droite (2026-10-27).
   Tablette et mobile : empile, inchange. Pas de position sticky : le formulaire est
   plus haut que l ecran et passerait sous l en-tete fixe. */
@media (min-width: 1024px) {
  .exo-avis-zone:has(.exo-avis-zone__colonnes) { max-width: 1140px; }
  .exo-avis-zone__colonnes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }
  .exo-avis-zone__colonnes .exo-avis-carte {
    margin-top: 0;
    max-width: none;
  }
}

/* Page /avis/ ([exo_avis_page]) sous 1024 px : formulaire d abord, puis titre,
   note et liste, comme avant le passage en colonnes. */
@media (max-width: 1023px) {
  .exo-avis-zone--page-colonnes { display: flex; flex-direction: column; }
  .exo-avis-zone--page-colonnes .exo-avis-zone__colonnes { display: contents; }
  .exo-avis-zone--page-colonnes .exo-avis-zone__formulaire { order: 1; margin-bottom: 56px; }
  .exo-avis-zone--page-colonnes .exo-avis-carte { margin-top: 0; }
  .exo-avis-zone--page-colonnes .exo-avis-zone__resume { order: 2; }
  .exo-avis-zone--page-colonnes .exo-avis-zone__liste { order: 3; }
}

@media (max-width: 600px) {
  .exo-avis-carte { padding: 24px 18px; border-radius: 12px; }
  .exo-avis-carte__titre { font-size: 1.25rem; }
}

/* ---- Couleur du bracelet (facultatif), en pastilles (2026-10-29) ---- */
.exo-avis-couleur {
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 18px 0;
}
.exo-avis-carte .exo-avis-couleur { background: #fff; border-color: #d5dce6; }
.exo-avis-couleur legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 10px;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.35;
}
.exo-avis-couleur__facultatif { font-weight: 400; color: #777; }
.exo-avis-couleur__options { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.exo-avis-couleur__options input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.exo-avis-couleur__option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 9px;
  border: 1px solid #d5dce6;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: .92rem;
  line-height: 1.2;
}
.exo-avis-couleur__options input:checked + .exo-avis-couleur__option {
  border-color: #1f2a37;
  box-shadow: 0 0 0 1px #1f2a37;
  font-weight: 700;
}
.exo-avis-couleur__options input:focus-visible + .exo-avis-couleur__option { outline: 2px solid #111; outline-offset: 2px; }
.exo-avis-pastille {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
  flex: none;
}
.exo-avis-etiquette--couleur {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  color: #33415c;
}
.exo-avis-etiquette--couleur .exo-avis-pastille { width: 12px; height: 12px; }

/* ---- "Voir plus d avis" (2026-10-29) ----
   La page ne contient que les 4 avis les plus recents ; exo-avis.js ajoute les
   suivants par 10. Le bouton reprend les classes exo-faq-toutes du CSS
   additionnel (meme rendu que la FAQ). */
.exo-avis-liste-wrap .exo-faq-toutes-wrap { margin: 8px 0 24px; }
.exo-avis-plus[aria-busy="true"] { opacity: .6; cursor: progress; }

/* ---- "Client confirme" : coche verte au lieu du texte (2026-11-02) ----
   Le texte de WooCommerce "(client confirmé, a commandé sur exoring.fr)" reste
   dans la page pour les lecteurs d ecran, mais n est plus affiche (font-size 0).
   Legende sous la note moyenne (.exo-avis-zone__legende). */
.exo-avis-coche,
.woocommerce-review__verified::before {
  content: "";
  display: inline-block;
  width: 17px;
  height: 17px;
  vertical-align: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10.5' fill='none' stroke='%231f8a4c' stroke-width='2'/%3E%3Cpath d='M7 12.5l3.2 3.2L17.2 8.6' fill='none' stroke='%231f8a4c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.woocommerce-review__verified {
  font-size: 0 !important;
  font-style: normal;
  margin: 0 2px 0 4px;
}
/* Legende collee sous la note, l espace de 26 px passe sous la legende. */
.exo-avis-zone__note:has(+ .exo-avis-zone__legende) { margin-bottom: 6px; }
.exo-avis-zone__legende {
  margin: 0 0 26px !important;
  font-size: .8rem;
  color: #444;
  text-align: center;
  line-height: 1.4;
}
.exo-avis-zone__legende .exo-avis-coche { margin-right: 4px; }
/* Coche collee au prenom, date en dessous : sans ca, le retour a la ligne
   automatique placait la coche sur la ligne de la date. */
.exo-avis-liste .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.exo-avis-liste .meta .woocommerce-review__author { order: 0; }
.exo-avis-liste .meta .woocommerce-review__verified { order: 1; }
.exo-avis-liste .meta::before { content: ""; order: 2; flex-basis: 100%; height: 0; }
.exo-avis-liste .meta .woocommerce-review__dash { order: 3; margin-right: 6px; }
.exo-avis-liste .meta .woocommerce-review__published-date { order: 4; margin-left: 0; }
