/* ------------------------------------------------------------------ */
/*  Avisio — DA « plateforme d'avis »                                   */
/*  Fond gris, cartes blanches, étoiles colorées par note,              */
/*  arrondis 8px, ombres douces. Identité propre à la plateforme.       */
/* ------------------------------------------------------------------ */

:root {
  --green: #14a97a;
  --green-dark: #0f8a63;
  --green-soft: #e7f6f0;

  --ink: #191b1f;
  --ink-2: #3d4249;
  --grey: #6d747d;
  --grey-2: #9aa0a8;
  --line: #e3e6e9;
  --line-2: #eef0f2;
  --bg: #f4f6f7;
  --white: #fff;

  /* Échelle d'étoiles par note (rouge → vert) */
  --n1: #e8452c;
  --n2: #f08127;
  --n3: #f5c518;
  --n4: #7ec53f;
  --n5: #14a97a;
  --n0: #dcdfe3;

  --r: 8px;
  --r-sm: 4px;
  --shadow: 0 1px 2px rgba(25, 27, 31, .06), 0 4px 12px rgba(25, 27, 31, .05);
  --shadow-h: 0 2px 4px rgba(25, 27, 31, .07), 0 10px 24px rgba(25, 27, 31, .08);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* --- Boutons -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--grey-2); background: var(--white); }

/* --- Barre de navigation -------------------------------------------- */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.nav-cta { margin-left: auto; }

.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: var(--green);
}
.brand-mark svg { width: 26px; height: 26px; fill: currentColor; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }

/* --- Carte entreprise ------------------------------------------------ */
main { padding-bottom: 56px; }

.hero {
  margin: 12px 0 20px;
  padding: 26px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.hero-main { display: flex; align-items: center; gap: 20px; min-width: 0; }
.hero-logo {
  width: 76px; height: 76px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  background: var(--white);
}
.hero-id h1 { font-size: 30px; }
.hero-rating { display: flex; align-items: center; gap: 12px; margin-top: 9px; flex-wrap: wrap; }
.hero-rating b { font-size: 15.5px; }
.hero-count { margin-top: 6px; font-size: 14px; color: var(--grey); }
.hero-count b { color: var(--ink); font-weight: 600; }
.hero-count a { color: var(--green-dark); }
.hero-count a:hover { text-decoration: underline; }

.hero-side { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
}
.pill svg { width: 13px; height: 13px; }
.pill-verified { background: var(--green-soft); color: var(--green-dark); }

/* --- Étoiles (tuiles colorées) --------------------------------------- */
.stars { display: inline-flex; gap: 3px; }
.stars .s {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--n0);
  display: grid;
  place-items: center;
}
.stars .s svg { width: 19px; height: 19px; fill: #fff; }
.stars.sm .s { width: 22px; height: 22px; border-radius: 3px; }
.stars.sm .s svg { width: 14px; height: 14px; }
.stars.xs .s { width: 17px; height: 17px; border-radius: 3px; }
.stars.xs .s svg { width: 11px; height: 11px; }

.stars[data-note="1"] .s.on { background: var(--n1); }
.stars[data-note="2"] .s.on { background: var(--n2); }
.stars[data-note="3"] .s.on { background: var(--n3); }
.stars[data-note="4"] .s.on { background: var(--n4); }
.stars[data-note="5"] .s.on { background: var(--n5); }

/* --- Grille principale ------------------------------------------------ */
.layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 940px) {
  .layout { grid-template-columns: minmax(0, 1fr) 328px; gap: 24px; }
  .col-side { position: sticky; top: 92px; display: grid; gap: 20px; }
}
@media (max-width: 939px) { .col-side { display: grid; gap: 20px; } }

/* --- Barre d'outils ---------------------------------------------------- */
.toolbar[hidden] { display: none; }
.toolbar {
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--grey-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--grey); }
.toolbar-right select {
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
.toolbar-right select:focus { outline: none; border-color: var(--green); }

.result-line { padding: 18px 2px 12px; font-size: 13.5px; color: var(--grey); }
.result-line b { color: var(--ink); font-weight: 600; }

/* --- Cartes d'avis ------------------------------------------------------ */
.review {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 14px;
  transition: box-shadow .18s;
}
.review:hover { box-shadow: var(--shadow-h); }

.review-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
}
.avatar {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}
.reviewer-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.reviewer-meta { font-size: 13px; color: var(--grey); margin-top: 1px; }
.review-loc { margin-left: auto; font-size: 13px; color: var(--grey); text-align: right; }

.review-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0 12px; }
.review-date { font-size: 13px; color: var(--grey); }
.review-body h3 { font-size: 17px; margin-bottom: 8px; }
.review-text { color: var(--ink-2); font-size: 15px; }
.review-sans-texte { font-size: 14px; color: var(--grey-2); font-style: italic; }

.verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green-dark);
}
.verified svg { width: 13px; height: 13px; }

.reply {
  margin-top: 18px;
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 16px 18px;
}
.reply-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.reply-who { font-size: 13.5px; font-weight: 700; }
.reply-date { font-size: 12.5px; color: var(--grey); }
.reply-text { font-size: 14.5px; color: var(--ink-2); }

.empty { background: var(--white); border-radius: var(--r); box-shadow: var(--shadow); padding: 48px 24px; text-align: center; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--grey); font-size: 14px; }

.load-more[hidden] { display: none; }
.load-more { display: flex; justify-content: center; padding: 12px 0 0; }

/* --- Colonne latérale ---------------------------------------------------- */
.score { padding: 22px 24px; }
.score-head { display: flex; align-items: baseline; gap: 8px; }
.score-value { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.score-value.vide { color: var(--grey-2); font-weight: 500; }
.score-over { font-size: 14px; color: var(--grey); }
.score .stars { margin-top: 12px; }
.score-count { margin-top: 8px; font-size: 13.5px; color: var(--grey); }

.dist { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); display: grid; gap: 8px; }
.dist-row {
  display: grid;
  grid-template-columns: 62px 1fr 40px;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 2px 0;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}
.dist-row:hover .dist-label { color: var(--green-dark); text-decoration: underline; }
.dist-track { display: block; height: 12px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.dist-fill { display: block; height: 100%; background: var(--n0); }
.dist-row[data-note="5"] .dist-fill { background: var(--n5); }
.dist-row[data-note="4"] .dist-fill { background: var(--n4); }
.dist-row[data-note="3"] .dist-fill { background: var(--n3); }
.dist-row[data-note="2"] .dist-fill { background: var(--n2); }
.dist-row[data-note="1"] .dist-fill { background: var(--n1); }
.dist-row[data-active="true"] .dist-label { font-weight: 700; }
.dist-pct { font-size: 12.5px; color: var(--grey); text-align: right; }

.infos { padding: 22px 24px; }
.info-list { margin: 0; display: grid; gap: 14px; }
.info-list > div { display: grid; gap: 2px; }
.info-list dt { font-size: 12.5px; color: var(--grey); }
.info-list dd { margin: 0; font-size: 14.5px; font-weight: 500; }
.info-list dd a { color: var(--green-dark); }
.info-list dd a:hover { text-decoration: underline; }

.notice { padding: 20px 24px; }
.notice p { font-size: 13.5px; color: var(--grey); }
.notice p b { color: var(--ink); font-weight: 600; }

/* --- Pied de page --------------------------------------------------------- */
.foot { background: var(--ink); color: #b9bec5; padding: 44px 0 26px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.foot-brand .brand-mark { color: var(--green); }
.foot-brand { display: grid; gap: 4px; }
.foot-brand .brand-name { color: #fff; font-size: 20px; }
.foot-brand p { font-size: 13.5px; color: var(--grey-2); }
.foot-legal {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid #2e3238;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--grey-2);
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 767px) {
  .nav-inner { height: 64px; gap: 14px; }
  .brand-name { font-size: 17px; } /* « auxentisavis.fr » est long : on le réduit */
  .hero { padding: 20px; }
  .hero-main { align-items: flex-start; gap: 16px; } /* le logo s'aligne sur le titre, pas au centre */
  .hero-logo { width: 60px; height: 60px; font-size: 26px; }
  .hero-id h1 { font-size: 24px; }
  .hero-side { margin-left: 0; width: 100%; }
  .hero-side .btn { flex: 1; }
  .review { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* --- Fenêtre « profil vérifié » -------------------------------------------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 27, 31, .55);
}
.modal-box {
  position: relative;
  width: min(100%, 470px);
  background: var(--white);
  border-radius: var(--r);
  box-shadow: 0 12px 40px rgba(25, 27, 31, .28);
  padding: 30px 30px 26px;
}
.modal-x {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--grey);
  cursor: pointer;
}
.modal-x:hover { background: var(--bg); color: var(--ink); }
.modal-x svg { width: 17px; height: 17px; }

.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
}
.modal-badge svg { width: 13px; height: 13px; }

.modal-box h2 { font-size: 21px; margin: 16px 0 10px; }
.modal-box p { font-size: 14.5px; color: var(--ink-2); }
.modal-box p b { color: var(--ink); font-weight: 600; }

.modal-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.modal-actions .btn { flex: 1; min-width: 150px; }

@media (max-width: 480px) {
  .modal-box { padding: 26px 20px 22px; }
  .modal-box h2 { font-size: 19px; }
}
