/* =========================================================
   STYLE APPLE-LIKE — CLAIR, SOBRE, PREMIUM
   ========================================================= */

/* ---------- VARIABLES ---------- */
:root{
  --bg: #ffffff;
  --bg-soft: #f5f5f7;

  --text: #1d1d1f;        /* noir Apple */
  --muted: #6e6e73;       /* gris Apple */

  --card: #ffffff;
  --stroke: #d2d2d7;

  --accent: #0071e3;      /* bleu Apple */
  --accent-soft: #e8f0fe;

  --danger: #d92d20;
  --ok: #1d9f6e;

  --radius: 18px;

  /* Avis */
  --g-star: #fbbc04;      /* “gold” star look (sans branding) */
  --g-avatar: #5f6368;
}

/* ---------- RESET / BASE ---------- */
*{ box-sizing:border-box }

html, body{ height:100% }

body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-soft);
}

a{ color: inherit; text-decoration: none }

.shell{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* ---------- TYPOGRAPHIE ---------- */
h1, h2, h3, h4{
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1{ font-size: clamp(32px, 4vw, 48px) }
h2{ font-size: 28px }
h3{ font-size: 20px }

p{
  margin: 0 0 1em;
  line-height: 1.6;
}

.muted{
  color: var(--muted);
  font-size: 15px;
}

/* ---------- HEADER / NAV ---------- */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--stroke);
}

.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
}

.brand__mark{
  width:36px;
  height:36px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background: var(--bg-soft);
  border:1px solid var(--stroke);
  font-weight:700;
}

.brand__text strong{ display:block; font-size:15px }
.brand__text em{
  display:block;
  font-style:normal;
  font-size:13px;
  color:var(--muted);
}

/* ---------- NAVIGATION ---------- */
.nav{
  display:flex;
  align-items:center;
  gap:10px;
}

.nav__link,
.nav__btn{
  padding:8px 12px;
  border-radius:999px;
  font-size:14px;
  color: var(--text);
  border:1px solid transparent;
  background:none;
  cursor:pointer;
}

.nav__link:hover,
.nav__btn:hover{ background: var(--bg-soft) }

.nav__cta{
  padding:8px 14px;
  border-radius:999px;
  background: var(--accent);
  color:#fff;
  font-weight:500;
}

.nav__dd{ position:relative }

.nav__menu{
  position:absolute;
  top:42px;
  right:0;
  min-width:220px;
  background:#fff;
  border:1px solid var(--stroke);
  border-radius:14px;
  padding:8px;
  display:none;
  box-shadow:0 12px 30px rgba(0,0,0,0.08);
}

.nav__menu.is-open{ display:block }

.nav__menu a{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
  color: var(--text);
}

.nav__menu a:hover{ background: var(--bg-soft) }

/* ---------- MOBILE ---------- */
.burger{
  display:none;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:#fff;
  cursor:pointer;
}

.mobileNav{ display:none; padding:12px 0 }

.mobileNav a{
  display:block;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:#fff;
  margin-top:8px;
}

.mobileNav.is-open{ display:block }

/* ---------- MAIN ---------- */
.main{ padding: 32px 0 48px }
.app{ min-height: 60vh }

/* ---------- LAYOUT HELPERS ---------- */
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.grid3{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

.sectionHead{ margin-bottom: 14px }

.loading{
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: #fff;
}

/* ---------- HERO ---------- */
.hero{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap:20px;
  margin-bottom:24px;
}

.hero__content{
  background:#fff;
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  padding:32px;
}

.hero__content p{
  font-size:18px;
  color: var(--muted);
}

.hero__actions{
  display:flex;
  gap:12px;
  margin-top:16px;
  flex-wrap:wrap;
}

.hero__card{ display:flex; align-items:center }

/* ---------- CARDS ---------- */
.card{
  background: var(--card);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.cards{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap:18px;
}

/* ---------- VISITES ---------- */
#visitsGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:18px;
}

.card--visit{ padding:0; overflow:hidden }

.visit__img{
  width:100%;
  height:170px;
  object-fit:cover;
  background: var(--bg-soft);
}

.visit__body{ padding:16px }

.visit__meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

.visit__actions{ margin-top: 12px }

/* ---------- BADGES ---------- */
.pill,
.badge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: var(--bg-soft);
  color: var(--muted);
}

.badge--danger{
  background:#fef0f0;
  border-color:#f5c2c7;
  color:#842029;
}

/* ---------- TAGS ---------- */
.tags{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.tag{
  font-size:12px;
  padding:5px 10px;
  border-radius:999px;
  background: var(--bg-soft);
  border:1px solid var(--stroke);
  color: var(--muted);
}

/* ---------- FORMULAIRES ---------- */
.label{
  display:block;
  margin:12px 0 6px;
  font-size:13px;
  color: var(--muted);
}

.input,
.textarea,
select{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:#fff;
  font-family:inherit;
}

.input:focus,
.textarea:focus,
select:focus{
  outline:none;
  border-color: var(--accent);
}

.textarea{ resize:vertical }

.checkbox{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top: 12px;
  color: var(--text);
}

/* ---------- BOUTONS ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:#fff;
  font-weight:500;
  cursor:pointer;
}

.btn:hover{ background: var(--bg-soft) }

.btn--primary{
  background: var(--accent);
  border-color: var(--accent);
  color:#fff;
}

.btn--primary:hover{ background:#005bb5 }

.btn--small{
  padding:8px 12px;
  font-size:14px;
}

.btn--danger{
  border-color:#f5c2c7;
  color:#842029;
}

/* ---------- NOTICES ---------- */
.notice{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:#fff;
  margin-top:12px;
}

.notice--ok{
  border-color:#b6e2c6;
  background:#edf7f1;
}

.notice--error{
  border-color:#f5c2c7;
  background:#fef0f0;
}

/* ---------- FOOTER ---------- */
.footer{
  border-top:1px solid var(--stroke);
  background:#fff;
  padding:24px 0;
}

.footer__inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

code{
  background: var(--bg-soft);
  border: 1px solid var(--stroke);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 12px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px){
  .hero{ grid-template-columns:1fr }
  .cards{ grid-template-columns: repeat(2,1fr) }
  #visitsGrid{ grid-template-columns: repeat(2,1fr) }
  .grid3{ grid-template-columns: 1fr }
}

@media (max-width: 720px){
  .nav{ display:none }
  .burger{ display:block }
  .cards{ grid-template-columns:1fr }
  #visitsGrid{ grid-template-columns:1fr }
  .grid2{ grid-template-columns:1fr }
}

/* =========================================================
   AVIS — LOOK “GOOGLE REVIEWS-LIKE” (SANS LOGO / MARQUE)
   ========================================================= */

.gReviews{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.gReview{
  display:grid;
  grid-template-columns: 46px 1fr;
  gap:12px;
  padding:0;
  border-bottom:1px solid var(--stroke);
  padding-bottom:14px;
}

.gReview:last-child{
  border-bottom:none;
  padding-bottom:0;
}

.gAvatar{
  width:40px;
  height:40px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background: var(--g-avatar);
  color:#fff;
  font-weight:700;
  font-size:14px;
}

.gTopLine{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}

.gName{
  font-size:15px;
  font-weight:600;
  color: var(--text);
  margin-top:2px;
}

.gMeta{
  font-size:13px;
  color: var(--muted);
  margin-top:2px;
}

.gDots{
  color: var(--muted);
  font-size:20px;
  line-height:1;
  padding:4px 8px;
  border-radius:10px;
}

.gDots:hover{
  background: var(--bg-soft);
}

.gRatingRow{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:8px;
}

.gStarsInline{
  display:flex;
  gap:2px;
  font-size:14px;
}

.gStarIcon{
  display:inline-block;
  transform: translateY(-0.5px);
}

.gStarIcon.is-on{ color: var(--g-star) }
.gStarIcon.is-off{ color: #dadce0 }

.gWhen{
  font-size:13px;
  color: var(--muted);
}

.gBody{
  margin-top:10px;
  font-size:14px;
  line-height:1.5;
  color: var(--text);
  white-space: pre-line;
  
}

.gVisited{
  margin-top:10px;
  font-size:13px;
  color: var(--muted);
}

.gForm .hp{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  opacity:0;
}

/* Picker étoiles (form) */
.gStars{
  display:flex;
  align-items:center;
  gap:4px;
  margin-top:2px;
}

/* AVIS — étoiles */
.gStar{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--stroke);
  background:#fff;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  color:#dadce0; /* gris */
}

.gStar.is-on{
  color: var(--g-star); /* jaune */
}

.gStar:hover{
  background: var(--bg-soft);
}

/* =========================================================
   AVIS — HEADER + BOUTON + MODALS + PHOTOS (compact)
   ========================================================= */

.gPlace{
  background:#fff;
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  padding:16px;
  margin-bottom:14px;
}

.gPlace__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.gPlace__title{
  margin:0 0 6px;
  font-size:34px;
  line-height:1.05;
  letter-spacing:-0.02em;
}

.gPlace__sub{
  color: var(--muted);
  font-size:16px;
  text-decoration:none;
}
.gPlace__sub:hover{ text-decoration:underline; }

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

.gBigRating{
  font-size:60px;
  font-weight:600;
  letter-spacing:-0.03em;
}

.gStarsSummary{
  display:flex;
  align-items:center;
  gap:10px;
}

.gStarsSummary__stars{
  display:flex;
  gap:3px;
  font-size:22px;
}

.gSStar{ color:#dadce0; position:relative; display:inline-block; }
.gSStar.full{ color: var(--g-star); }
.gSStar.empty{ color:#dadce0; }
.gSStar.half{ color:#dadce0; }
.gSStar.half::before{
  content:"★";
  position:absolute;
  left:0; top:0;
  width:50%;
  overflow:hidden;
  color: var(--g-star);
}

.gCount{
  font-size:18px;
  color: var(--muted);
}

/* Bouton */
.gWriteBtn{
  border:1px solid var(--stroke);
  background:#fff;
  border-radius:999px;
  padding:11px 16px;
  font-size:18px;
  color: var(--accent);
  cursor:pointer;
  transition: color .18s ease, font-weight .18s ease, box-shadow .18s ease, transform .18s ease;
}
.gWriteBtn:hover{
  font-weight:600;
  box-shadow:0 10px 22px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

/* Reviews list: compact */
.gReviews{
  display:flex;
  flex-direction:column;
  gap:12px; /* ✅ moins d’espace entre avis */
}

.gReview{
  display:grid;
  grid-template-columns: 42px 1fr; /* ✅ moins de blanc à gauche */
  gap:10px;
  border-bottom:1px solid var(--stroke);
  padding-bottom:12px;
}

.gReview:last-child{
  border-bottom:none;
  padding-bottom:0;
}

.gAvatar{
  width:36px; height:36px; /* ✅ compact */
  border-radius:999px;
  display:grid;
  place-items:center;
  background: var(--g-avatar);
  color:#fff;
  font-weight:700;
  font-size:13px;
}

.gTopLine{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
}

.gName{ font-size:15px; font-weight:600; margin-top:1px; }
.gMeta{ font-size:13px; color: var(--muted); margin-top:1px; }

.gDots{
  color: var(--muted);
  font-size:20px;
  line-height:1;
  padding:2px 6px;
  border-radius:10px;
}
.gDots:hover{ background: var(--bg-soft); }

.gRatingRow{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:2px;
}

.gStarsInline{ display:flex; gap:2px; font-size:14px; }
.gStarIcon.is-on{ color: var(--g-star); }
.gStarIcon.is-off{ color: #dadce0; }
.gWhen{ font-size:13px; color: var(--muted); }

.gBody{
  margin-top:2px;
  font-size:16px;
  line-height:1.55;
  color: var(--text);
  white-space: pre-line;
  
}

.gMore{
  border:none;
  background:transparent;
  color: var(--accent);
  cursor:pointer;
  font-size:16px;
  padding:0;
}
.gMore:hover{ text-decoration:underline; }

.gVisited{
  margin-top:8px;
  font-size:14px;
  color: var(--muted);
}

/* Photos under review */
.gPhotoRow{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.gThumb{
  width:150px;
  height:112px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--stroke);
  background: var(--bg-soft);
  padding:0;
  cursor:pointer;
}
.gThumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Modal */
.no-scroll{ overflow:hidden; }

.gModal{
  position:fixed;
  inset:0;
  display:none;
  z-index:1000;
}
.gModal.is-open{ display:block; }

.gModal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.35);
}

/* ✅ Panel limité en hauteur */
.gModal__panel{
  position:relative;
  width:min(720px, calc(100% - 24px));
  margin: 36px auto;
  background:#fff;
  border-radius:20px;
  border:1px solid var(--stroke);
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  overflow:hidden;
  max-height: calc(100vh - 72px); /* ✅ important */
  display:flex;
  flex-direction:column; /* ✅ header + body scroll */
}

.gModal__panel--photo{
  width:min(960px, calc(100% - 24px));
}

.gModal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--stroke);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  flex: 0 0 auto;
}

.gModal__title{ font-size:16px; font-weight:600; }
.gModal__close{
  width:36px; height:36px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:#fff;
  cursor:pointer;
}
.gModal__close:hover{ background: var(--bg-soft); }

/* ✅ Body scrollable */
.gModal__body{
  padding:16px;
  overflow:auto;
  flex: 1 1 auto;
}

/* Stars picker */
.gStars{
  display:flex;
  align-items:center;
  gap:4px;
  margin-top:2px;
}

.gStar{
  width:34px; height:34px;
  border-radius:10px;
  border:1px solid var(--stroke);
  background:#fff;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  color:#dadce0;
}
.gStar.is-on{ color: var(--g-star); }
.gStar:hover{ background: var(--bg-soft); }

.gForm .hp{
  position:absolute;
  left:-9999px;
  width:1px; height:1px;
  opacity:0;
}

.gVisitRow{
  display:flex;
  gap:10px;
}
.select{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius:12px;
  background:#fff;
}

/* Upload bar */
.gUploadBar{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.gUploadBtn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border-radius:999px;
  border:1px solid transparent;
  background: #eef3ff;
  padding:14px 16px;
  cursor:pointer;
  font-size:18px;
  color: var(--text);
}
.gUploadBtn:hover{ background:#e6eeff; }

.gCam{ font-size:18px; }

.gPicked{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.gPicked__item{
  width:120px;
  height:90px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--stroke);
  background: var(--bg-soft);
  position:relative;
}
.gPicked__item img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.gPicked__x{
  position:absolute;
  top:6px; right:6px;
  width:28px; height:28px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,0.9);
  cursor:pointer;
}
.gPicked__x:hover{ background:#fff; }

.gModal__foot{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:14px;
}

/* Photo modal */
.gPhotoWrap{ padding:16px; }
.gPhotoWrap img{
  width:100%;
  height:auto;
  border-radius:16px;
  display:block;
}

/* =========================================================
   PHOTO MODAL : pas de coupe + navigation
   ========================================================= */

.gModal__panel--photo{
  max-height: calc(100vh - 72px);
  display:flex;
  flex-direction:column;
}

/* zone photo */
.gPhotoStage{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:14px 14px 16px;
  flex:1 1 auto;
  min-height: 200px;
}

.gPhotoViewport{
  width: 100%;
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background: #0b0b0c; /* léger fond sombre comme Google */
  overflow:hidden;
  border:1px solid var(--stroke);
}

/* ✅ LE POINT IMPORTANT: contain + limites viewport */
#photoModalImg{
  max-width: 100%;
  max-height: calc(100vh - 160px); /* head + paddings */
  width: auto;
  height: auto;
  object-fit: contain;
  display:block;
}

/* flèches */
.gNavArrow{
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,0.9);
  cursor:pointer;
  font-size:28px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  user-select:none;
}
.gNavArrow:hover{
  background:#fff;
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

/* Responsive: sur petits écrans, flèches superposées */
@media (max-width: 520px){
  .gPhotoStage{ padding:10px; }
  .gNavArrow{
    position:absolute;
    top:50%;
    transform: translateY(-50%);
  }
  .gNavArrow--left{ left:10px; }
  .gNavArrow--right{ right:10px; }
}


