/* ==========================================================================
   Profilia - Section « Avis clients »  [profilia_avis_clients]

   Bloc note (moyenne, repartition) + carrousel d'avis selectionnes, dans
   le design de l'ancienne carte « avis du mois ». Themes en resume
   informatif. Rendu serveur (pfl-avis.php), navigation en JS (avis.js).
   Fond sable : rupture douce apres le blanc des secteurs.
   Deux arcs au plus : bloc note (haut droit), carte selection (bas droit).
   Le cyan de marque ne porte aucun texte.
   ========================================================================== */

.pf-reviews {
  --pf-rv-teal: var(--teal-900);
  --pf-rv-ink: var(--text-strong);
  --pf-rv-ink-2: var(--ink-72);                /* 5,7:1 sur sable, ~6:1 sur blanc */
  --pf-rv-line: var(--ink-12);
  --pf-rv-on-dark: #FFFFFF;
  --pf-rv-on-dark-2: rgba(255, 255, 255, .85);
  --pf-rv-cyan-text: var(--cyan-700);
  --pf-rv-cyan-soft: var(--cyan-100);
  --pf-rv-star: var(--rating);
  --pf-rv-star-off: rgba(13, 43, 48, .16);
  --pf-rv-radius: 24px;
  --pf-rv-g: var(--gutter);
  --pf-rv-arc: rgba(15, 178, 198, .2);
  --pf-rv-bg: var(--sand-200);

  position: relative;               /* repere des elements absolus */
  background: var(--pf-rv-bg);
  color: var(--pf-rv-ink);
  padding: 80px 0;
  overflow-x: clip;
}
.pf-reviews__inner { max-width: 1280px; margin: 0 auto; padding: 0 var(--pf-rv-g); }

.pf-reviews .screen-reader-text {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.pf-reviews :where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--pf-rv-cyan-text); outline-offset: 2px;
}
.pf-reviews [hidden] { display: none !important; }

.pf-reviews__apercu {
  margin: 0 0 var(--space-5); padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--warning-soft); font: 500 13px var(--font-sans);
}

.pf-rev-sm { display: none; }

/* --- En-tete --------------------------------------------------------------- */

.pf-reviews__head { margin: 0 0 32px; }
.pf-reviews__head h2 {
  margin: 0 0 var(--space-2);
  font: var(--type-display); letter-spacing: var(--type-display-tracking);
  color: var(--pf-rv-teal);
}
.pf-reviews__head p { margin: 0; font: var(--type-body-lg); color: var(--pf-rv-ink-2); }

/* --- Etoiles (doublees d'un aria-label sur le conteneur) ------------------- */

.pf-rev-stars { display: inline-flex; gap: 3px; line-height: 0; }
.pf-rev-stars svg { flex: none; }
.pf-rev-stars .on { fill: var(--pf-rv-star); }
.pf-rev-stars .off { fill: var(--pf-rv-star-off); }

/* --- Ligne : bloc note + carrousel selection ------------------------------- */

.pf-reviews__top {
  display: grid; grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px; align-items: stretch; margin: 0 0 28px;
}

/* Bloc note, fond teal */
.pf-rev-note {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 20px;
  padding: 32px 32px 28px;
  border-radius: var(--pf-rv-radius);
  background: var(--pf-rv-teal); color: var(--pf-rv-on-dark);
}
.pf-rev-note::before {
  content: ""; position: absolute; top: -120px; right: -120px;
  width: 280px; height: 280px; box-sizing: border-box;
  border: 48px solid var(--pf-rv-arc);
  border-right-color: transparent; border-bottom-color: transparent;
  border-radius: 50%; transform: rotate(-20deg); pointer-events: none;
}
.pf-rev-note > * { position: relative; }
.pf-rev-note .pf-rev-stars .off { fill: rgba(255, 255, 255, .22); }

.pf-rev-note__head { display: flex; align-items: center; gap: 14px; }
.pf-rev-note__g {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 44px; border-radius: 12px; background: var(--paper);
}
.pf-rev-note__g svg { width: 22px; height: 22px; }
.pf-rev-note__label { font: 500 15px var(--font-sans); color: var(--pf-rv-on-dark-2); }

.pf-rev-note__score { display: flex; align-items: center; gap: 18px; }
.pf-rev-note__big { font: 600 64px/1 var(--font-sans); letter-spacing: -.035em; }
.pf-rev-note__meta { display: flex; flex-direction: column; gap: 8px; font: 400 15px var(--font-sans); color: var(--pf-rv-on-dark-2); }

/* Repartition compacte (remplace les barres) : la part d'avis 1 etoile reste
   visible a cote de la selection d'avis positifs. */
.pf-rev-note__rep {
  margin: -6px 0 0;
  font: 400 14px/1.5 var(--font-sans); color: var(--pf-rv-on-dark-2);
}
.pf-rev-note__rep strong { font-weight: 600; color: var(--pf-rv-on-dark); }

/* Illustration (ordinateur) : ancree en bas, sur toute la largeur du bloc,
   rognee par son arrondi. La main pointe vers la citation du carrousel. */
.pf-rev-note__illu {
  margin: auto -32px -28px;          /* poussee en bas, bord a bord */
  line-height: 0; pointer-events: none;
}
.pf-rev-note__illu img { display: block; width: 100%; height: auto; }
.pf-rev-note__pub { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-rev-note__pub p { margin: 0; font: 400 15px var(--font-sans); color: var(--pf-rv-on-dark-2); }
.pf-rev-note__pub strong { display: block; font: 600 28px/1.15 var(--font-sans); letter-spacing: -.02em; color: var(--pf-rv-on-dark); }

/* Carte selection : le design de l'avis du mois, dont seul le contenu defile.
   L'arc est pose sur la carte, pas sur les diapositives : il reste fixe. */
.pf-rev-sel {
  position: relative; overflow: hidden; min-width: 0;
  display: flex; flex-direction: column;
  border: 1px solid var(--pf-rv-line); border-radius: var(--pf-rv-radius);
  background: var(--paper);
}
.pf-rev-sel::after {
  content: ""; position: absolute; right: -110px; bottom: -110px; z-index: 0;
  width: 220px; height: 220px; box-sizing: border-box;
  border: 40px solid var(--pf-rv-arc);
  border-right-color: transparent; border-bottom-color: transparent;
  border-radius: 50%; pointer-events: none;
}
.pf-rev-sel__rail {
  position: relative; z-index: 1; flex: 1;
  display: flex; align-items: stretch;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; scrollbar-width: none;
}
.pf-rev-sel__rail::-webkit-scrollbar { display: none; }
.pf-rev-sel__rail:focus-visible { outline-offset: -3px; border-radius: var(--pf-rv-radius); }

/* Toutes les diapositives prennent la hauteur de la plus longue : la carte
   ne saute pas d'un avis a l'autre. */
.pf-rev-sel__slide {
  position: relative; flex: 0 0 100%; min-width: 0; margin: 0;
  display: flex; flex-direction: column;
  padding: 36px 40px 24px;
  scroll-snap-align: start; scroll-snap-stop: always;
}
.pf-rev-mois__top { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.pf-rev-mois__badge {
  display: inline-flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 16px; border-radius: var(--radius-pill);
  background: var(--pf-rv-teal); color: var(--pf-rv-on-dark);
  font: 600 13.5px var(--font-sans);
}
.pf-rev-mois__badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan-500); }
.pf-rev-mois__q { margin: 26px 0 0; }
.pf-rev-mois__q p {
  margin: 0; max-width: 62ch;
  font: 500 24px/1.4 var(--font-sans); letter-spacing: -.012em; color: var(--pf-rv-ink);
  white-space: pre-line; overflow-wrap: anywhere;
}
.pf-rev-mois__by { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 28px; }
.pf-rev-mois__who { display: flex; flex-direction: column; min-width: 0; }
.pf-rev-mois__who strong { font: 600 15.5px var(--font-sans); color: var(--pf-rv-ink); }
.pf-rev-mois__who span { font: 400 14.5px var(--font-sans); color: var(--pf-rv-ink-2); }
.pf-rev-mois__end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pf-rev-mois__end a { font: 400 14px var(--font-sans); color: var(--pf-rv-ink-2); text-decoration: none; }
.pf-rev-mois__end a:hover { color: var(--pf-rv-cyan-text); text-decoration: underline; }

/* Navigation : points, position, fleches. */
.pf-rev-sel__nav {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 0 40px 28px;
}
.pf-rev-sel__dots { display: flex; align-items: center; margin-right: auto; margin-left: -7px; }
.pf-rev-sel__dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: var(--tap-min); padding: 0; border: 0; background: none; cursor: pointer;
}
.pf-rev-sel__dot::before {
  content: ""; width: 8px; height: 8px; border-radius: var(--radius-pill);
  background: var(--ink-22);
  transition: width var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.pf-rev-sel__dot[aria-current="true"]::before { width: 20px; background: var(--pf-rv-cyan-text); }
.pf-rev-sel__dot:hover { background: none; }
.pf-rev-sel__pos { margin-right: 6px; font: 400 14px var(--font-sans); color: var(--pf-rv-ink-2); font-variant-numeric: tabular-nums; }

.pf-rev-av {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  font: 600 15px var(--font-sans); color: #fff;
}
.pf-rev-av--0 { background: var(--teal-900); }
.pf-rev-av--1 { background: var(--cyan-700); }
.pf-rev-av--2 { background: var(--teal-600); }

.pf-rev-pub {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
  border-radius: var(--radius-pill); font: 600 13px var(--font-sans); white-space: nowrap;
}
.pf-rev-pub--cand { background: var(--pf-rv-cyan-soft); color: var(--cyan-800); }
.pf-rev-pub--entr { background: var(--teal-800); color: #fff; }

.pf-rev-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap-min); height: var(--tap-min); padding: 0;
  border: 1px solid var(--border-default); border-radius: 50%;
  background: var(--paper); color: var(--pf-rv-ink); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.pf-rev-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pf-rev-arrow:hover { background: var(--paper); border-color: var(--pf-rv-cyan-text); color: var(--pf-rv-cyan-text); }
.pf-rev-arrow:disabled { opacity: .4; cursor: default; border-color: var(--border-default); color: var(--pf-rv-ink); }

/* --- Themes : resume informatif, non cliquable ----------------------------- */

.pf-rev-themes { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; }
.pf-rev-themes__label { flex: none; font: 400 14.5px var(--font-sans); color: var(--pf-rv-ink-2); }
.pf-rev-themes__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pf-rev-theme {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px;
  border: 1px solid var(--pf-rv-line); border-radius: var(--radius-pill);
  background: var(--paper); color: var(--pf-rv-ink);
  font: 500 14.5px var(--font-sans); white-space: nowrap;
}
.pf-rev-theme > span { font-weight: 600; color: var(--pf-rv-cyan-text); }   /* sur blanc : 4,9:1 */

/* --- Pied ------------------------------------------------------------------ */

.pf-rev-foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px 32px; margin: 28px 0 0;
}
.pf-rev-foot__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.pf-rev-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--control-h-lg); padding: 0 28px; border-radius: var(--radius-pill);
  font: 600 15.5px var(--font-sans); letter-spacing: -.01em; text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.pf-rev-btn--plein { background: var(--cyan-700); color: #fff; }      /* seul bouton plein de la section */
.pf-rev-btn--plein:hover { background: var(--cyan-800); color: #fff; }
.pf-rev-btn--contour { border: 1px solid var(--border-strong); background: var(--paper); color: var(--pf-rv-ink); }
.pf-rev-btn--contour:hover { border-color: var(--pf-rv-cyan-text); color: var(--pf-rv-cyan-text); }
.pf-rev-foot__note { margin: 0; max-width: 52ch; text-align: right; font: 400 14px/1.5 var(--font-sans); color: var(--pf-rv-ink-2); }

/* --- Tablette et mobile (< 1024 px) ---------------------------------------- */
@media (max-width: 1023px) {
  .pf-reviews { --pf-rv-g: 40px; padding: 56px 0; }
  .pf-rev-lg { display: none; }
  .pf-rev-sm { display: inline; }
  .pf-reviews__head { margin-bottom: 20px; }

  .pf-reviews__top { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }

  .pf-rev-note {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "score g" "rep rep" "pub pub"; align-items: center;
    gap: 18px 12px; padding: 24px;
  }
  .pf-rev-note__head { grid-area: g; }
  .pf-rev-note__label { display: none; }
  .pf-rev-note__score { grid-area: score; gap: 14px; }
  .pf-rev-note__big { font-size: 52px; }
  .pf-rev-note__illu { display: none; }   /* ordinateur uniquement (non telechargee : chargement differe) */
  .pf-rev-note__rep { grid-area: rep; margin: -8px 0 0; }
  .pf-rev-note__pub { grid-area: pub; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14); }
  .pf-rev-note__pub strong { display: inline; margin-right: 6px; font-size: 22px; }

  .pf-rev-sel__slide { padding: 24px 24px 16px; }
  .pf-rev-mois__q { margin-top: 18px; }
  .pf-rev-mois__q p { font-size: 18px; }
  .pf-rev-mois__by { padding-top: 20px; }
  .pf-rev-mois__end { margin-left: 0; width: 100%; }
  .pf-rev-sel__nav { padding: 0 24px 16px; }
  .pf-rev-sel__nav .pf-rev-arrow { display: none; }   /* au doigt : balayage et points */
  .pf-rev-sel__pos { margin-right: 0; }

  .pf-rev-themes { flex-wrap: nowrap; }
  .pf-rev-themes__label { display: none; }
  .pf-rev-themes__list {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--pf-rv-g)); padding-inline: var(--pf-rv-g);
    scroll-padding-inline-start: var(--pf-rv-g);
  }
  .pf-rev-themes__list::-webkit-scrollbar { display: none; }

  .pf-rev-foot { flex-direction: column; align-items: stretch; gap: 16px; margin-top: 24px; }
  .pf-rev-foot__btns { flex-direction: column; }
  .pf-rev-btn { width: 100%; }
  .pf-rev-btn--contour { min-height: 48px; }
  .pf-rev-foot__note { max-width: none; text-align: left; font-size: 13.5px; }
}
@media (max-width: 767px) {
  .pf-reviews { --pf-rv-g: var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  .pf-rev-sel__rail { scroll-behavior: auto; }
  .pf-rev-sel__dot::before { transition: none; }
}
