/* /assets/css/reviews.css (SCOPED) — Google-like */
.page-avis{
  --text:#202124;
  --muted:#5f6368;
  --stroke:#e0e0e0;
  --star:#fbbc04;
  --max: 980px;

  color: var(--text);
  padding: 8px 0 24px;
}


/* reset local */
.page-avis *,
.page-avis *::before,
.page-avis *::after{ box-sizing:border-box; }

.page-avis a{ color:inherit; text-decoration:none; }
.page-avis .muted{ color: var(--muted); }

/* “container” local */
.page-avis .gPlace,
.page-avis .gCard{
  width:min(var(--max), calc(100% - 24px));
  margin: 0 auto;
}

/* Header place : simple et plat */
.page-avis .gPlace{
  padding: 10px 0 6px;
  border:0;
  background: transparent;
}

.page-avis .gPlace__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.page-avis .gPlace__title{
  margin:0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.page-avis .gPlace__sub{
  display:inline-block;
  margin-top:2px;
  font-size: 13px;
  color: var(--muted);
  text-decoration:none;
}

.page-avis .gWriteBtn{
  border: 1px solid #1a73e8;
  background: #1a73e8;     /* Google blue */
  color: #fff;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 18px;
  cursor:pointer;
}

.page-avis .gWriteBtn:hover{
  background: #1669d2;     /* très léger assombrissement */
  border-color: #1669d2;
}

.page-avis .gWriteBtn:active{ transform: translateY(1px); }

.page-avis .gPlace__ratingRow{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top: 8px;
}

.page-avis .gBigRating{
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height:1;
}

.page-avis .gStarsSummary{
  display:grid;
  gap:2px;
}

.page-avis .gStarsSummary__stars{
  display:flex;
  gap:2px;
  align-items:center;
}

.page-avis .gCount{
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Liste : pas de grosse card, plutôt une surface blanche + séparateurs */
.page-avis .gCard{
  margin-top: 10px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background:#fff;
  overflow:hidden;
}

.page-avis .gReviews{ padding: 0; }

.page-avis .loading,
.page-avis .empty,
.page-avis .error{
  padding: 14px 14px;
  font-size: 14px;
  color: var(--muted);
}

/* Un avis = ligne + séparateur */
.page-avis .gReview{
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--stroke);
  background:#fff;
}
.page-avis .gReview:last-child{ border-bottom:0; }

/* Entête : avatar rond, nom, sous-ligne, menu à droite */
.page-avis .gReview__head{
  display:grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items:start;
}

.page-avis .gAvatar{
  width:40px; height:40px;
  border-radius:999px;       /* rond type Google */
  display:grid;
  place-items:center;
  font-weight: 700;
  font-size: 14px;
  background:#f1f3f4;
  border:1px solid #e8eaed;
  color:#3c4043;
}

.page-avis .gReview__meta{ min-width:0; }

.page-avis .gName{
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0;
}

.page-avis .gRow{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.page-avis .gRow--sub{
  margin-top: 1px;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.page-avis .gDot{ opacity:.65; }

/* Ligne étoiles + temps (“il y a 2 mois”) */
.page-avis .gStarsInline{
  display:flex;
  gap: 2px;
  align-items:center;
}

.page-avis .gStarIcon{
  font-size: 16px;
  line-height: 1;
  color: var(--star);
  opacity:.25;
}
.page-avis .gStarIcon.is-on{ opacity:1; }

.page-avis .gDate{
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  padding-top: 0;
}

/* Badge Local Guide (sobre) */
.page-avis .gBadge{
  font-size: 13px;
  font-weight: 500;
  padding: 0;
  border:0;
  border-radius:0;
  background: transparent;
  color: var(--muted);
}

/* Corps + “Visité en …” */
.page-avis .gBody{
  margin-top: 8px;
  line-height: 1.5;
  font-size: 15px;
  color: var(--text);
  white-space: pre-wrap;
}

.page-avis .gVisited{
  margin-top: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

/* Photos : petites vignettes carrées comme Google */
.page-avis .gPhotos{
  margin-top: 10px;
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
}

.page-avis .gThumb{
  width: 88px;
  height: 66px;
  border-radius: 10px;
  border: 1px solid #e8eaed;
  overflow:hidden;
  padding:0;
  background:#fff;
  cursor:pointer;
}
.page-avis .gThumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Modal : plus “Google” (sobre, pas glossy) */
html.is-modal-open,
body.is-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.page-avis .gModal{
  position:fixed;
  inset:0;
  display:none;
  z-index:9999;

  /* ✅ évite que le scroll "fuite" vers la page */
  overscroll-behavior: contain;
}
.page-avis .gModal[aria-hidden="false"]{ display:block; }

.page-avis .gModal__backdrop{
  position:absolute; inset:0;
  background: rgba(32,33,36,.55);
}

.page-avis .gModal__panel{
  position:relative;
  width:min(720px, calc(100% - 24px));
  margin: 18px auto;

  background:#fff;
  border:1px solid var(--stroke);
  border-radius: 14px;
  overflow:hidden;

  /* ✅ iOS Safari: ne pas dépasser le viewport dynamique */
  max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));

  /* ✅ header fixe + body scroll */
  display:flex;
  flex-direction:column;
}

/* Fallback si dvh non supporté */
@supports not (height: 100dvh){
  .page-avis .gModal__panel{
    max-height: calc(100vh - 36px);
  }
}

.page-avis .gModal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 14px;
  border-bottom:1px solid var(--stroke);
  background:#fff;

  flex: 0 0 auto; /* ✅ reste en haut */
}

.page-avis .gModal__title{ font-weight:700; }

.page-avis .gModal__close{
  width:36px; height:36px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:#fff;
  cursor:pointer;
}
.page-avis .gModal__close:hover{ background:#f8f9fa; }

/* ✅ C'EST ICI QUE SE FAIT LE SCROLL */
.page-avis .gModal__body{
  padding: 14px;

  flex: 1 1 auto;
  overflow:auto;
  -webkit-overflow-scrolling: touch;

  /* ✅ évite que les derniers champs passent sous la barre iOS */
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

.page-avis .gModal__foot{
  display:flex;
  align-items:center;
  justify-content: flex-end;
  gap:10px;
  margin-top: 12px;

  flex: 0 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Form : neutre / Google */
.page-avis .gForm{ display:grid; gap:10px; }

.page-avis .label{
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}


.page-avis .input,
.page-avis .textarea,
.page-avis .select{
  width:100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background:#fff;
  color: var(--text);
  outline:none;
  font-size: 15px;
}

.page-avis .textarea{ resize:vertical; }

.page-avis .input:focus,
.page-avis .textarea:focus,
.page-avis .select:focus{
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26,115,232,.15);
}

.page-avis .checkbox{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 500;
  color: var(--text);
}

.page-avis .hp{ display:none; }

.page-avis .gVisitRow{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width:560px){
  .page-avis .gVisitRow{ grid-template-columns:1fr; }
}

/* Étoiles de saisie : plus proche Google */
.page-avis .gStars{ display:flex; gap:4px; align-items:center; }
.page-avis .gStar{
  width: 34px; height: 34px;
  border-radius: 999px;
  border:0px solid var(--stroke);
  background:#fff;
  cursor:pointer;
  font-size: 18px;
  color: var(--star);
  opacity:.35;
}
.page-avis .gStar:hover{ opacity:1; background:#f8f9fa; }
.page-avis .gStar.is-on{ opacity:1; border-color: rgba(251,188,4,.65); }

/* Upload */
.page-avis .gUploadBar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top: 2px;
}

.page-avis .gUploadBtn{
  border: 1px solid var(--stroke);
  background:#fff;
  padding: 10px 12px;
  border-radius: 18px;
  cursor:pointer;
  font-weight: 600;
}
.page-avis .gUploadBtn:hover{ background:#f8f9fa; }

.page-avis .gPicked{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.page-avis .gPicked__item{
  position:relative;
  width:92px; height:72px;
  border-radius:10px;
  border:1px solid #e8eaed;
  overflow:hidden;
  background:#fff;
}
.page-avis .gPicked__item img{ width:100%; height:100%; object-fit:cover; display:block; }
.page-avis .gPicked__x{
  position:absolute;
  top:6px; right:6px;
  width:26px; height:26px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.95);
  cursor:pointer;
  font-weight:700;
}

/* Bouton submit (si tu utilises gBtn) */
.page-avis .gBtn{
  border:1px solid var(--stroke);
  background:#fff;
  padding: 10px 14px;
  border-radius: 18px;
  font-weight: 600;
  cursor:pointer;
}
.page-avis .gBtn:hover{ background:#f8f9fa; }

.page-avis .gBtn--primary{
  border-color: #1a73e8;
  background:#1a73e8;
  color:#fff;
}
.page-avis .gBtn--primary:hover{
  background:#1669d2;
  border-color:#1669d2;
}

/* Photo modal stage */
.page-avis .gModal__panel--photo{
  width:min(960px, calc(100% - 24px));
}
.page-avis .gPhotoStage{
  padding: 12px;
  display:grid;
  grid-template-columns: 40px 1fr 40px;
  gap:10px;
  align-items:center;
}
.page-avis .gPhotoViewport{
  width:100%;
  height:min(72vh, 640px);
  border-radius: 12px;
  border:1px solid var(--stroke);
  background:#f8f9fa;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.page-avis .gPhotoViewport img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  display:block;
}
.page-avis .gNavArrow{
  width:40px;height:40px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:#fff;
  cursor:pointer;
  font-size:28px;
  line-height:1;
}
.page-avis .gNavArrow:disabled{ opacity:.35; cursor:not-allowed; }

/* --- Rotation photos (DB: reviews_photos.rotation = 0|90|180|270) --- */
.page-avis .gThumb img,
.page-avis #photoModalImg{
  transform: rotate(var(--rot, 0deg));
  transform-origin: center center;
}

/* Optionnel: petite fluidité quand on change de photo */
.page-avis #photoModalImg{
  transition: transform .12s ease;
}
/* Spinner minimal */
.page-avis .gSpinner{
  width:14px;
  height:14px;
  border:2px solid rgba(95,99,104,.35); /* gris Google */
  border-top-color:#1a73e8;            /* bleu Google */
  border-radius:50%;
  display:inline-block;
  vertical-align:-2px;
  animation: gSpin .7s linear infinite;
}

@keyframes gSpin { to { transform: rotate(360deg); } }

/* Mobile : sous-ligne avis plus compacte */
@media (max-width:560px){

  .page-avis .gReview__head{
    grid-template-columns: 36px 1fr;
    gap: 10px;
  }

  .page-avis .gAvatar{
    width:36px;
    height:36px;
  }

  .page-avis .gDate{
    grid-column: 2;
    justify-self:start;
    margin-top: 2px;
    font-size: 12px;
  }

  .page-avis .gRow--sub{
    gap: 5px;
    row-gap: 2px;
    font-size: 12px;
    line-height: 1.35;
  }

  .page-avis .gStarsInline{
    gap: 1px;
  }

  .page-avis .gStarIcon{
    font-size: 14px;
  }

  .page-avis .gDot{
    display:none;
  }

  .page-avis .gVisited{
    font-size: 12px;
    line-height: 1.35;
  }
}
@media (max-width:560px){

  .page-avis .gRow--sub{
    display:flex;
    flex-wrap:wrap;
  }

  .page-avis .gStarsInline{
    flex: 0 0 100%;
    width: 100%;
    margin-bottom: 2px;
  }

  .page-avis .gVisited{
    flex: 0 1 auto;
  }

}
.page-avis .googleReviewCard{
  margin-top:18px;
  padding:14px 16px;
  border:1px solid #e0e0e0;
  border-radius:18px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  box-shadow:0 8px 24px rgba(60,64,67,.08);
}

.page-avis .googleReviewCard__left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.page-avis .googleReviewCard__logo{
  width:38px;
  height:38px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#f8fafd;
  border:1px solid #e8eaed;
  font-size:24px;
  font-weight:800;
  font-family:Manrope, sans-serif;
}

.page-avis .gBlue{
  color:#4285f4;
}

.page-avis .googleReviewCard__title{
  font-weight:700;
  font-size:15px;
  margin-bottom:3px;
}

.page-avis .googleReviewCard__rating{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  color:#5f6368;
  font-size:14px;
}

.page-avis .googleReviewCard__stars{
  color:#fbbc04;
  letter-spacing:1px;
  font-size:15px;
}

.page-avis .googleReviewCard__count{
  color:#5f6368;
}

.page-avis .googleReviewCard__btn{
  flex:0 0 auto;
  padding:10px 14px;
  border-radius:999px;
  background:#1a73e8;
  color:#fff !important;
  font-weight:700;
  font-size:14px;
  text-decoration:none;
}

.page-avis .googleReviewCard__btn:hover{
  background:#1669d2;
}

@media (max-width:700px){
  .page-avis .googleReviewCard{
    align-items:flex-start;
    flex-direction:column;
  }

  .page-avis .googleReviewCard__btn{
    width:100%;
    text-align:center;
  }
}
@media (max-width: 640px) {
  body .site-header {
    z-index: 9998 !important;
  }

  body .page-avis .gModal {
    position: fixed;
    z-index: 99999 !important;
  }
}
.page-avis .gModal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2147483647;
}
@media (max-width: 640px) {
  body .page-avis .gModal {
    position: fixed;
    z-index: 2147483647 !important;
  }
}

.reviewsPagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 4px;
}

.reviewsPagination__pages {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.reviewsPagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  color: inherit;
  background: #fff;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.reviewsPagination__link:hover {
  border-color: currentColor;
  transform: translateY(-1px);
}

.reviewsPagination__link.is-current {
  color: #fff;
  background: var(--accent, #222);
  border-color: var(--accent, #222);
  cursor: default;
}

.reviewsPagination__direction {
  min-width: 112px;
}

@media (max-width: 620px) {
  .reviewsPagination {
    align-items: stretch;
  }

  .reviewsPagination__direction {
    flex: 1 1 120px;
  }

  .reviewsPagination__pages {
    flex: 1 0 100%;
    order: -1;
  }
}

