/* 5étoiles — page d'avis client (modèle commun à tous les commerces)
   Même identité que 5etoiles.ca : charbon, craie, jaune soleil, DM Sans. */
:root {
  --ink: #222222;
  --ink-2: #2E2E2E;
  --ink-3: #3A3A38;
  --text: #2A2300;
  --paper: #F5F4F0;
  --sand: #E9E7E0;
  --sun: #FFE15E;
  --on-ink-muted: rgba(245, 244, 240, .72);
  --line: rgba(42, 35, 0, .15);
  --muted: rgba(42, 35, 0, .72);
  --danger: #A33A1F;
  --ease-out: cubic-bezier(.32, .72, 0, 1);
  --f-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gut: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--f-body); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--ink); }
button, input, textarea { font: inherit; color: inherit; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
p, h1, h2 { margin: 0; }

/* ---------- Écran ---------- */
.ecran { min-height: 100dvh; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 20px) var(--gut-r) 0 var(--gut); }
.haut { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding-block: 28px 16px; }
.pastille { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; border: 1px solid rgba(245,244,240,.18); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: .82rem; font-weight: 600; color: var(--on-ink-muted); }
.pastille b { display: grid; place-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--sun); color: var(--text); font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.etoiles { display: flex; gap: 8px; color: var(--sun); }
.etoiles svg { width: 30px; height: 30px; }
h1 { font-size: clamp(3rem, 15vw, 4.6rem); line-height: .92; letter-spacing: -.055em; font-weight: 700; text-wrap: balance; }
h1 em { display: block; font-style: normal; color: var(--sun); }
.intro { color: var(--on-ink-muted); font-size: 1.06rem; max-width: 30ch; }

/* ---------- Actions (zone du pouce) ---------- */
.bas { display: grid; gap: 12px; padding-block: 12px calc(20px + env(safe-area-inset-bottom, 0px)); }
.action { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 18px 12px 12px; border-radius: 22px; border: 0; text-align: left; text-decoration: none; font-weight: 700; font-size: 1.06rem; line-height: 1.2; cursor: pointer; transition: transform .2s var(--ease-out); }
.action:active { transform: scale(.97); transition-duration: .06s; }
.action .ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; }
.action .ico svg { width: 22px; height: 22px; }
.action small { display: block; margin-top: 3px; font-size: .84rem; font-weight: 500; opacity: .75; }
.action .fleche { margin-left: auto; flex: none; width: 20px; height: 20px; opacity: .7; }
.a-google { background: var(--sun); color: var(--text); }
.a-google .ico { background: var(--text); color: var(--sun); }
.a-prive { background: var(--ink-2); color: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.a-prive .ico { background: var(--ink-3); color: var(--sun); }
@media (hover: hover) { .action:hover { transform: translateY(-2px); } }
.signature { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 10px; font-size: .78rem; color: var(--on-ink-muted); text-decoration: none; }
.signature img { height: 22px; width: auto; display: block; }
.legal { text-align: center; font-size: .74rem; color: rgba(245,244,240,.5); }
.legal a { color: inherit; text-underline-offset: 3px; }

/* ---------- Merci ---------- */
.merci .etoiles svg { animation: monte .55s var(--ease-out) both; }
.merci .etoiles svg:nth-child(2) { animation-delay: .05s; } .merci .etoiles svg:nth-child(3) { animation-delay: .1s; }
.merci .etoiles svg:nth-child(4) { animation-delay: .15s; } .merci .etoiles svg:nth-child(5) { animation-delay: .2s; }
@keyframes monte { from { transform: translateY(14px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Feuille privée (dialog) ---------- */
dialog.feuille { width: min(560px, 100%); max-width: 100%; max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 16px); margin: auto auto 0; padding: 0; border: 0; border-radius: 28px 28px 0 0; background: var(--paper); color: var(--text); color-scheme: light; overflow: hidden; }
dialog.feuille::backdrop { background: rgba(0,0,0,.6); }
dialog.feuille[open] { animation: glisse .4s var(--ease-out) both; }
@keyframes glisse { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 600px) { dialog.feuille { margin: auto; border-radius: 28px; } }
.feuille form { display: flex; flex-direction: column; max-height: inherit; }
.poignee { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; flex: none; }
.f-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px 6px; flex: none; }
.f-tete h2 { font-size: 1.5rem; letter-spacing: -.035em; line-height: 1.1; }
.fermer { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.fermer svg { width: 16px; height: 16px; }
.f-corps { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 22px 8px; display: grid; gap: 22px; }
.note-privee { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.note-privee svg { flex: none; width: 15px; height: 15px; margin-top: 3px; color: var(--text); }
.q { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.q legend, .q label.titre { padding: 0; font-weight: 700; font-size: 1rem; }
.aide { font-size: .86rem; color: var(--muted); min-height: 1.3em; }
.note { display: flex; gap: 2px; margin-left: -6px; }
.note button { width: 54px; height: 54px; border: 0; background: none; padding: 6px; border-radius: 14px; cursor: pointer; display: grid; place-items: center; color: var(--text); }
.note svg { width: 38px; height: 38px; transition: transform .25s var(--ease-out); }
.note svg path { fill: transparent; stroke: currentColor; stroke-width: 1.4; transition: fill .15s; }
.note button.on svg path { fill: var(--sun); stroke: var(--text); }
.note button.on svg { transform: scale(1.06); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-weight: 600; font-size: .94rem; }
.puce[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
textarea, input[type="text"], input[type="email"] { width: 100%; font-size: 17px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--text); }
textarea { min-height: 112px; resize: vertical; line-height: 1.45; }
textarea:focus, input:focus { border-color: var(--text); outline: none; }
::placeholder { color: rgba(42,35,0,.45); }
.bascule { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.bascule input { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; margin: 0; border-radius: 999px; background: var(--sand); position: relative; cursor: pointer; transition: background .2s; }
.bascule input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .22s var(--ease-out); }
.bascule input:checked { background: var(--text); }
.bascule input:checked::after { transform: translateX(20px); background: var(--sun); }
.duo { display: grid; gap: 12px; }
@media (min-width: 520px) { .duo { grid-template-columns: 1fr 1fr; } }
.champ { display: grid; gap: 8px; min-width: 0; }
.champ label { font-weight: 700; font-size: .95rem; }
.erreur { color: var(--danger); font-size: .9rem; font-weight: 600; }
.pot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.f-pied { flex: none; padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--paper); }
.envoyer { width: 100%; min-height: 58px; border: 0; border-radius: 999px; background: var(--sun); color: var(--text); font-weight: 800; font-size: 1.04rem; cursor: pointer; transition: transform .2s var(--ease-out); }
.envoyer:active { transform: scale(.98); }
.envoyer:disabled { opacity: .55; cursor: wait; }

/* ---------- Bulle (démo) ---------- */
.bulle { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 30; width: max-content; max-width: calc(100% - 32px); background: var(--paper); color: var(--text); border-radius: 16px; padding: 12px 16px; font-size: .9rem; font-weight: 600; box-shadow: 0 16px 40px rgba(0,0,0,.35); transition: .3s var(--ease-out); }
.bulle.vue { opacity: 1; transform: translate(-50%, 0); }

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