/* Section « Ils parlent de nous » — avis clients à la une (Figma 8964-7390).
   Rendu par wp-content/novamira-sandbox/palmsquare-avis-vedette.php */
.psav, .psav * { box-sizing: border-box; }
.psav {
  position: relative;
  max-width: 1216px;
  margin: 0 auto;
  font-family: 'Satoshi', sans-serif;
  color: #0E0E0E;
  text-align: left;
}
.psav__title {
  margin: 0 0 40px;
  text-align: center;
  font-family: 'Livvic', sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.25;
  color: #0E0E0E;
}
.psav__title em { font-weight: 500; font-style: italic; }

/* Onglets logos — jamais sur 2 lignes : défilement horizontal au-delà de la largeur */
.psav__tabs {
  display: flex;
  gap: 16px;
  align-items: flex-start; /* l'encart actif/survolé grandit vers le BAS uniquement */
  justify-content: safe center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  min-height: 80px;
  margin-bottom: 28px;
  padding: 0 2px;
}
.psav__tabs::-webkit-scrollbar { display: none; }
.psav__tab {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 62px;
  min-width: 124px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 2px solid #FFFFFF;
  border-radius: 19px;
  cursor: pointer;
  transition: background .22s ease, border-color .22s ease, height .28s cubic-bezier(.4, 0, .2, 1);
}
/* Survol = même look que l'état sélectionné : fond rose, bordure rose clair, logo blanc, encart agrandi */
.psav__tab:hover,
.psav__tab.is-active {
  background: #FF00A7;
  border-color: #FF71CE;
  height: 78px;
}
/* Cadre du logo : prend exactement la taille rendue de l'image — la découpe blanche
   se superpose dessus à taille identique, le logo ne grossit donc JAMAIS au survol/actif
   (seul l'encart s'étend). flex: 0 0 auto — une règle globale du site réduit sinon les spans en flex. */
/* Le cadre porte la taille de rendu (variables injectées en PHP, ratio préservé) ;
   l'image et la découpe blanche le remplissent — aucun logo ne peut être écrasé par le flex. */
.psav__logowrap {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: var(--psav-w, 100px);
  height: var(--psav-h, 43px);
}
.psav__logo, .psav__tab img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}
/* Découpe blanche du logo (mask CSS) pour survol/actif — fiable quel que soit le format du logo.
   Superposée au logo (même cadre, même ratio) : mask-size contain la cale au pixel près. */
.psav__logomask {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
/* visibility (pas display) : le logo garde sa place, le cadre garde sa taille */
.psav__tab:hover .psav__logo, .psav__tab.is-active .psav__logo { visibility: hidden; }
.psav__tab:hover .psav__logomask, .psav__tab.is-active .psav__logomask { display: block; }
.psav__logotxt { font-weight: 900; font-size: 22px; text-transform: uppercase; }
.psav__tab:hover .psav__logotxt, .psav__tab.is-active .psav__logotxt { color: #fff; }

/* Slides */
.psav__slide { display: none; }
/* Changement de slide : statique, aucune animation d'apparition */
.psav__slide.is-active { display: block; }

/* Carte avis — hauteur fixe 534px */
.psav__card {
  display: flex;
  gap: 40px;
  align-items: stretch;
  height: 460px;
  background: rgba(255, 255, 255, 0.52);
  border: 2px solid #FFFFFF;
  border-radius: 20px;
  padding: 20px;
}
.psav__quote {
  flex: 1 1 0;
  min-width: 0;
  margin: auto 0;
  padding: 10px 10px 10px 30px;
  font-size: 20px;
  line-height: 34px;
  font-weight: 400;
  /* texte trop long → coupé avec … */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 11; max-height: 390px;
  line-clamp: 11;
  overflow: hidden;
}
.psav__quote p { margin: 0 0 18px; }
.psav__quote p:last-child { margin-bottom: 0; }
.psav__quote strong, .psav__quote b { font-weight: 700; font-style: italic; }
.psav__visual {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  border-radius: 12px;
  overflow: hidden;
}
/* l'image remplit TOUJOURS son cadre (cover), même trop petite */
.psav__visual img.psav__site {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 12px;
  display: block;
}

/* Identité (avatar + nom + poste) */
.psav__who {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  min-height: 60px;
}
.psav__avatar,
img.psav__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.psav__id { display: flex; flex-direction: column; gap: 3px; }
.psav__nom { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.25; }
.psav__role { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.4; }

/* Flèches */
.psav__nav {
  position: absolute;
  bottom: 6px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #FF00A7;
  border: 3px solid #FF71CE;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
  padding: 0;
}
.psav__nav:hover { background: #E42899; border-color: #FC78CE; }
.psav__nav--prev { left: 0; }
.psav__nav--prev svg { transform: rotate(180deg); }
.psav__nav--next { right: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .psav__quote { font-size: 19px; line-height: 32px; }
  /* Tablette : carte en colonne (image puis citation, hauteur auto) — en ligne, le clamp laissait une ligne coupée sous les … */
  .psav__card { flex-direction: column; height: auto; gap: 16px; padding: 14px; border-radius: 18px; }
  .psav__visual { order: 1; flex: none; width: 100%; align-self: auto; }
  .psav__visual img.psav__site { height: 320px; }
  .psav__quote { order: 2; flex: 0 0 auto; height: auto; min-height: 0; max-height: none; margin: 0; padding: 4px 12px 12px; -webkit-line-clamp: 14; line-clamp: 14; }
  .psav__nom { font-size: 22px; }
}
@media (max-width: 767px) {
  .psav__title { font-size: 34px; margin-bottom: 22px; }

  /* Onglets : défilement horizontal (prêt pour 5-6 logos), sans barre visible */
  .psav__tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
    margin: 0 -6px 20px;
    padding: 6px 6px 10px;
  }
  .psav__tabs::-webkit-scrollbar { display: none; }
  .psav__tab { flex: 0 0 auto; height: 56px; min-width: 118px; padding: 8px 16px; border-radius: 16px; }
  .psav__tab:hover, .psav__tab.is-active { height: 62px; }
  /* même cadre réduit proportionnellement : les logos gardent leur ratio */
  .psav__logowrap { width: calc(var(--psav-w, 100px) * .77); height: calc(var(--psav-h, 43px) * .77); }
  .psav__logotxt { font-size: 15px; }

  /* Carte : image d'abord (rythme visuel), citation ensuite — hauteur auto sur mobile */
  .psav__card { flex-direction: column; height: auto; gap: 14px; padding: 12px; border-radius: 16px; }
  .psav__visual { order: 1; flex: none; width: 100%; align-self: auto; }
  .psav__visual img.psav__site { height: 240px; }
  /* flex:1 1 0 + overflow:hidden (hérités du desktop) écrasaient la citation à 0px en colonne : hauteur au contenu */
  .psav__quote { order: 2; flex: 0 0 auto; height: auto; min-height: 0; margin: 0; padding: 2px 10px 10px; font-size: 16px; line-height: 26px; -webkit-line-clamp: 14; line-clamp: 14; }
  .psav__quote p { margin-bottom: 12px; }

  /* Pied : avatar + nom entre les flèches */
  .psav__who {
    margin-top: 18px;
    min-height: 56px;
    padding: 0 54px;
    gap: 10px;
    text-align: left;
  }
  .psav__avatar, img.psav__avatar { width: 52px; height: 52px; }
  .psav__nom { font-size: 18px; line-height: 1.2; white-space: normal; }
  .psav__role { font-size: 13px; line-height: 1.3; }
  .psav__nav { width: 44px; height: 44px; border-width: 2px; bottom: 6px; }
  .psav__nav svg { width: 19px; height: 19px; }
}

/* Le focus clavier/clic ne doit jamais figer la couleur de survol */
.psav__nav:focus { outline: none; }
.psav__nav:focus:not(:hover) { background: #FF00A7; border-color: #FF71CE; }
.psav__nav:focus-visible { outline: 3px solid #FF71CE; outline-offset: 3px; }
.psav__tab:focus { outline: none; }
.psav__tab:focus-visible { outline: 3px solid #FF71CE; outline-offset: 3px; }

/* 2026-09-07 – Mobile tactile uniquement : pas de flèches, barre de logos collante pour naviguer en scrollant la section */
@media (max-width: 767px) and (pointer: coarse) {
  .psav__nav { display: none !important; }
  .psav__who { padding: 0; }
  .psav__tabs {
    position: -webkit-sticky; position: sticky;
    top: var(--psav-sticky-top, 96px); /* header mobile fixe = 84px */
    z-index: 20;
    margin: 0 0 20px;
    padding: 8px 8px;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(255, 0, 167, .10);
  }
  body.admin-bar .psav__tabs { top: calc(var(--psav-sticky-top, 96px) + 46px); }
}

/* Le thème enfant met overflow-x:hidden sur html/body : ça transforme body en conteneur de défilement et casse position:sticky.
   overflow-x:clip bloque le débordement horizontal de la même façon sans casser sticky. Mobile uniquement, hors verrouillage du scroll (menu ouvert / Lenis stoppé). */
@media (max-width: 767px) and (pointer: coarse) {
  html:not(.lenis-stopped) { overflow-x: clip !important; overflow-y: visible !important; }
  html:not(.lenis-stopped) body:not(.psmb-open) { overflow-x: clip !important; overflow-y: visible !important; }
}

/* 2026-09-08 – Focus des onglets : neutralise le style global des boutons (fond bordeaux), contour rose au clavier */
.psav__tab:focus:not(:hover):not(.is-active) { background: rgba(255, 255, 255, .52); border-color: #FFFFFF; height: 62px; }
.psav__tab:focus:not(:hover):not(.is-active) .psav__logomask { display: none; }
.psav__tab:focus:not(:hover):not(.is-active) .psav__logotxt { color: inherit; }
.psav__tab.is-active:focus, .psav__tab:hover:focus { background: #FF00A7; border-color: #FF71CE; }
.psav__tab:focus-visible, .psav__nav:focus-visible { outline: 3px solid #FF00A7; outline-offset: 3px; }
@media (max-width: 767px) { .psav__tab:focus:not(:hover):not(.is-active) { height: 56px; } }

/* 2026-09-08 – Mobile : jamais de flèches sous 768px (tactile ou non) */
@media (max-width: 767px) {
  .psav__nav { display: none !important; }
  .psav__who { padding: 0; }
}

/* ==================================================================
   2026-10-12 v23 – Nouvelle disposition (inspiration « Deafi »)
   Ordinateur : carte = avis + signature + bouton « Voir le cas » | image ;
   logos SOUS la carte ; minuteur = ligne rose sur la bordure basse de la carte.
   Mobile : avis, signature, image, bouton ; logos sous la carte ; pas de fleches.
   ================================================================== */
.psav { display: flex; flex-direction: column; }
.psav__slides { position: relative; }
.psav__tabs { margin: 28px 0 0; }

/* Carte en grille : colonne gauche centree verticalement, image sur toute la hauteur */
.psav__card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  grid-template-rows: 1fr auto auto auto 1fr;
  grid-template-areas: ". visual" "quote visual" "who visual" "cta visual" ". visual";
  column-gap: 40px;
  height: 500px;
  padding: 20px;
}
.psav__quote { grid-area: quote; margin: 0; padding: 0 0 0 30px; max-height: none; -webkit-line-clamp: 9; line-clamp: 9; }
/* overflow:hidden met la hauteur mini a 0 dans une grille : on la force a la hauteur du texte (limite a 9 lignes) */

.psav__visual { grid-area: visual; min-height: 0; }

/* Signature */
.psav__who { grid-area: who; justify-content: flex-start; margin: 22px 0 0; min-height: 0; padding: 0 0 0 30px; text-align: left; }
.psav__avatar, img.psav__avatar { width: 52px; height: 52px; }
.psav__nom { font-size: 20px; }
.psav__role { font-size: 15px; color: #6B7280; }

/* Bouton « Voir le cas … » */
.psav__cta {
  grid-area: cta;
  justify-self: start;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0 30px;
  padding: 11px 20px;
  border-radius: 999px;
  background: #FF00A7;
  border: 2px solid #FF71CE;
  color: #FFFFFF !important;
  font-family: 'Satoshi', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  transition: background .18s ease, border-color .18s ease;
}
.psav__cta:hover { background: #E42899; border-color: #FC78CE; }
.psav__cta:focus-visible { outline: 3px solid #FF00A7; outline-offset: 3px; }
.psav__cta svg { flex: none; }

/* Minuteur : ligne blanche qui avance sur la bordure basse de la carte */
.psav__card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 0;
  background: #FFFFFF;
  pointer-events: none;
}
.psav.is-auto .psav__slide.is-active .psav__card::after { animation: psav-progress var(--psav-delay, 8s) linear forwards; }
.psav.is-paused .psav__slide.is-active .psav__card::after { animation-play-state: paused; }
@keyframes psav-progress { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .psav__card::after { display: none; } }

/* Fleches sur les cotes de la carte (ordinateur) */
@media (min-width: 1025px) {
  .psav__nav { top: 50%; bottom: auto; transform: translateY(-50%); width: 60px; height: 60px; }
  .psav__nav--prev { left: -88px; }
  .psav__nav--next { right: -88px; }
}
/* 1025-1439px : peu de marge autour de la section -> fleches plus petites, a cheval sur le bord */
@media (min-width: 1025px) and (max-width: 1439px) {
  .psav__nav { width: 48px; height: 48px; }
  .psav__nav svg { width: 21px; height: 21px; }
  .psav__nav--prev { left: -8px; }
  .psav__nav--next { right: -8px; }
}

/* Tablette et mobile : carte en colonne, ordre avis > signature > image > bouton */
@media (max-width: 1024px) {
  .psav__card { display: flex; flex-direction: column; height: auto; gap: 0; }
  .psav__quote { order: 1; flex: 0 0 auto; padding: 8px 12px 0; margin: 0; -webkit-line-clamp: 14; line-clamp: 14; }
  .psav__who { order: 2; margin: 18px 0 0; padding: 0 12px; }
  .psav__visual { order: 3; margin-top: 20px; }
  .psav__cta { order: 4; align-self: center; margin: 20px 0 8px; }
  .psav__slides { padding-bottom: 84px; } /* place des fleches sous la carte (tablette) */
}
@media (max-width: 767px) {
  .psav__slides { padding-bottom: 0; }
  .psav__quote { padding: 4px 6px 0; }
  .psav__who { margin-top: 14px; padding: 0 6px; }
  .psav__avatar, img.psav__avatar { width: 46px; height: 46px; }
  .psav__nom { font-size: 18px; }
  .psav__role { font-size: 13px; }
  .psav__visual { margin-top: 16px; }
  .psav__cta { margin: 16px 0 6px; font-size: 15px; padding: 10px 18px; max-width: 100%; text-align: center; }
  /* logos sous la carte : plus de barre collante en haut d'ecran */
  .psav__tabs { position: static !important; top: auto !important; margin: 20px -6px 0 !important; padding: 6px 6px 10px !important; background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
/* Ordinateur : colonne gauche empilee (avis, signature, bouton) centree verticalement ;
   image en absolu sur la droite, toute la hauteur de la carte (42,5 % de la largeur utile). */
@media (min-width: 1025px) {
  .psav__card { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0; padding: 20px calc(60px + (100% - 80px) * .425) 20px 20px; }
  .psav__who, .psav__cta { flex-shrink: 0; }
  .psav__quote { flex: 0 1 auto; min-height: 0; align-self: stretch; }
  .psav__visual { position: absolute; top: 20px; right: 20px; bottom: 20px; width: calc((100% - 80px) * .425); }
  .psav__visual img.psav__site { position: absolute; inset: 0; }
}

/* Logos sous la carte : l'encart actif/survole grandit vers le HAUT (cartes alignees en bas). */
.psav__tabs { align-items: flex-end; margin-top: 20px; }
@media (max-width: 767px) { .psav__tabs { min-height: 0; } }

/* Minuteur : rail Rose 100 (#FFE5F6) sur toute la largeur du bas de la carte, la ligne blanche avance dessus */
.psav__card::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #FFE5F6; pointer-events: none; }
.psav__card::after { z-index: 1; }
@media (prefers-reduced-motion: reduce) { .psav__card::before { display: none; } }
