/* ==========================================================================
   La Piazza — Dispositif d'enquête de satisfaction
   Mobile d'abord (QR code sur les tables), léger, ludique.
   ========================================================================== */

@font-face {
  font-family: "Mona Sans"; font-style: normal; font-weight: 400 800; font-stretch: 100% 125%; font-display: swap;
  src: url("../fonts/mona-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Caveat"; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url("../fonts/caveat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Yellowtail"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/yellowtail-la-piazza.woff2") format("woff2");
  unicode-range: U+20, U+4C, U+50, U+61, U+69, U+7A;
}

:root {
  --coral: #EA5F57;
  --red: #C93F37;
  --basil: #21523D;
  --basil-2: #2E6B4F;
  --lemon: #F9D676;
  --lemon-soft: #FCEBB8;
  --ink: #2B2B2D;
  --ink-2: #5A5A5F;
  --line: #E8DFD2;
  --cream: #FFF7EC;
  --paper: #FFFFFF;
  --f-display: "Mona Sans", "Archivo", system-ui, sans-serif;
  --f-body: "Mona Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --f-script: "Yellowtail", "Brush Script MT", cursive;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --pop: cubic-bezier(.2, 1.5, .4, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--f-body); font-size: 16.5px; line-height: 1.55;
  color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--lemon); outline-offset: 3px; border-radius: 10px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hand { font-family: var(--f-hand); font-weight: 700; line-height: 1.1; }
.script { font-family: var(--f-script); }
h1, h2, h3 { font-family: var(--f-display); font-stretch: 118%; font-weight: 800; line-height: 1.05; margin: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 16.5px; text-decoration: none; line-height: 1;
  transition: transform .15s var(--ease), background-color .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 12px 24px -14px rgba(201, 63, 55, .9); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--paper { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost { background: transparent; border-color: currentColor; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ==========================================================================
   Questionnaire
   ========================================================================== */
.sv { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.sv-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; background: var(--cream);
  border-bottom: 1px solid rgba(43, 43, 45, .07);
}
.sv-brand { font-family: var(--f-script); font-size: 27px; line-height: 1; color: var(--red); text-decoration: none; padding-top: 2px; }
.sv-progress { flex: 1; display: grid; gap: 5px; min-width: 0; }
.sv-progress__label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-progress__bar { height: 8px; border-radius: 8px; background: rgba(43, 43, 45, .1); overflow: hidden; }
.sv-progress__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--lemon), var(--coral)); transition: width .55s var(--ease); }
.sv-time { flex: none; font-size: 12.5px; font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; }

.sv-main {
  flex: 1; width: min(100%, 560px); margin: 0 auto;
  display: grid; align-content: start; justify-items: center; gap: 4px;
  padding: 14px 18px 18px;
}
.sv-stage { position: relative; width: min(50vw, 210px); aspect-ratio: 1; margin: 2px 0 10px; }
.sv-stage::before { /* lueur du four, visible pendant la cuisson */
  content: ""; position: absolute; inset: -18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 150, 60, .55), rgba(255, 110, 40, .18) 60%, rgba(255, 110, 40, 0));
  opacity: 0; transform: scale(.8); transition: opacity .5s, transform .8s var(--ease);
}
.is-baking .sv-stage::before { opacity: 1; transform: scale(1); animation: glow 1.1s ease-in-out infinite alternate; }
@keyframes glow { to { transform: scale(1.06); opacity: .8; } }
.sv-stage svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.sv-pop {
  position: absolute; left: 50%; top: -6px; z-index: 2;
  font-family: var(--f-hand); font-weight: 700; font-size: 24px; color: var(--basil); white-space: nowrap;
  background: var(--lemon); padding: 2px 12px; border-radius: 999px;
  transform: translate(-50%, 0) rotate(-4deg); opacity: 0; pointer-events: none;
}
.sv-pop.is-on { animation: popTag 1.3s var(--ease) both; }
@keyframes popTag {
  0% { opacity: 0; transform: translate(-50%, 12px) rotate(-4deg) scale(.7); }
  18% { opacity: 1; transform: translate(-50%, -8px) rotate(-4deg) scale(1.05); }
  75% { opacity: 1; transform: translate(-50%, -12px) rotate(-4deg); }
  100% { opacity: 0; transform: translate(-50%, -22px) rotate(-4deg); }
}

.sv-screen { width: 100%; animation: svIn .42s var(--ease) both; }
.sv-screen.is-back { animation-name: svInBack; }
@keyframes svIn { from { opacity: 0; transform: translateX(26px); } }
@keyframes svInBack { from { opacity: 0; transform: translateX(-26px); } }
.sv-kicker { display: block; font-family: var(--f-hand); font-weight: 700; font-size: 23px; color: var(--red); margin: 0 0 2px; transform: rotate(-1.5deg); transform-origin: left; }
.sv-q { font-family: var(--f-display); font-stretch: 108%; font-weight: 800; font-size: clamp(21px, 5.4vw, 27px); line-height: 1.18; margin: 0 0 8px; letter-spacing: -.005em; }
.sv-help { color: var(--ink-2); font-size: 14.5px; margin: 0 0 16px; }
.sv-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--basil); background: #E6F0E9; border-radius: 999px; padding: 4px 11px; margin-bottom: 10px; }
.sv-itemlabel { font-family: var(--f-display); font-stretch: 108%; font-weight: 800; font-size: clamp(22px, 6vw, 30px); line-height: 1.15; margin: 4px 0 18px; }

/* Choix uniques (grandes cartes) */
.sv-options { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sv-opt {
  width: 100%; min-height: 58px; display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-radius: 18px; border: 2px solid var(--line); background: #fff;
  font-weight: 600; font-size: 16.5px; text-align: left; line-height: 1.25;
  transition: transform .15s var(--ease), border-color .2s, background-color .2s, color .2s;
}
.sv-opt:hover { border-color: #D7CABB; }
.sv-opt:active { transform: scale(.985); }
.sv-opt[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; }
.sv-opt[aria-pressed="true"] .ico-face { --face-bg: #fff; }
.sv-opt .ico { width: 38px; height: 38px; flex: none; }
.sv-opt--soft { border-style: dashed; color: var(--ink-2); }
.sv-opt__check { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; transition: all .2s; }
.sv-opt[aria-pressed="true"] .sv-opt__check { border-color: #fff; background: #fff; }
.sv-opt[aria-pressed="true"] .sv-opt__check::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }

/* Notes de 1 à 5 (parts de pizza) */
.sv-rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sv-rate button {
  position: relative; display: grid; justify-items: center; gap: 2px;
  padding: 10px 2px 8px; border-radius: 16px; border: 2px solid var(--line); background: #fff;
  font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: 19px;
  transition: transform .15s var(--ease), border-color .2s, background-color .2s;
}
.sv-rate button svg { width: 34px; height: 34px; }
.sv-rate button .slice-fill { fill: #EFE6D8; transition: fill .2s; }
.sv-rate button.is-lit { border-color: #F2B2A9; }
.sv-rate button.is-lit .slice-fill { fill: var(--coral); }
.sv-rate button[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; transform: translateY(-2px); }
.sv-rate button[aria-pressed="true"] .slice-fill { fill: #fff; }
.sv-rate__legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; font-size: 12.5px; color: var(--ink-2); line-height: 1.25; }
.sv-rate__legend span:last-child { text-align: right; }
.sv-nc {
  margin-top: 16px; min-height: 46px; padding: 0 18px; border-radius: 999px;
  border: 2px dashed #D6CABA; background: transparent; font-weight: 600; color: var(--ink-2);
}
.sv-nc[aria-pressed="true"] { border-style: solid; border-color: var(--ink); color: var(--ink); background: #fff; }

/* Recommandation 0 à 10 */
.sv-nps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.sv-nps button {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); background: #fff;
  font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: 18px;
  transition: transform .15s var(--ease), background-color .2s, border-color .2s;
}
.sv-nps button[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; transform: scale(1.08); }

/* Écran d'introduction avant une série de questions */
.sv-section { font-family: var(--f-display); font-stretch: 105%; font-weight: 700; font-size: clamp(20px, 5vw, 25px); line-height: 1.35; margin: 4px 0 6px; }
/* Oui / Non */
.sv-yn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.sv-opt--yn { justify-content: center; min-height: 62px; font-family: var(--f-display); font-stretch: 110%; font-weight: 800; font-size: 19px; }

/* Réponses libres */
.sv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.sv-chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff;
  font-weight: 600; font-size: 14.5px; transition: background-color .2s, border-color .2s, color .2s;
}
.sv-chip[aria-pressed="true"] { background: var(--basil); border-color: var(--basil); color: #fff; }
.sv-chips__label { width: 100%; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0; }
.sv-text {
  width: 100%; min-height: 112px; resize: vertical; padding: 14px 16px; border-radius: 18px;
  border: 2px solid var(--line); background: #fff; font-size: 16.5px; line-height: 1.45;
}
.sv-text:focus { outline: none; border-color: var(--coral); }
.sv-input { width: 100%; min-height: 52px; padding: 0 16px; border-radius: 16px; border: 2px solid var(--line); background: #fff; margin-top: 10px; }
.sv-input:focus { outline: none; border-color: var(--coral); }
.sv-reminder { display: inline-flex; gap: 8px; align-items: center; background: var(--lemon-soft); border-radius: 12px; padding: 7px 12px; font-size: 14px; font-weight: 600; margin: 0 0 14px; }

.sv-cta { margin-top: 18px; display: grid; gap: 10px; }
.sv-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: min(100%, 560px); margin: 0 auto; padding: 4px 18px calc(14px + env(safe-area-inset-bottom)); }
.sv-link { background: none; border: 0; padding: 10px 4px; font-weight: 600; font-size: 15px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.sv-link[hidden] { display: none; }

/* Écran d'accueil */
.sv-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; padding: 0; list-style: none; }
.sv-pills li { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.sv-title { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 9vw, 44px); line-height: .98; margin: 0 0 12px; }
.sv-lead { font-size: 17px; margin: 0 0 6px; }
.sv-note { font-size: 13.5px; color: var(--ink-2); margin: 10px 0 0; }

/* Fin : remerciements */
.sv-thanks { text-align: center; }
.sv-thanks .sv-title { margin-top: 6px; }
.sv-badge {
  display: inline-grid; place-items: center; text-align: center;
  width: 128px; height: 128px; border-radius: 50%; margin: 6px auto 14px;
  background: var(--basil); color: #fff; transform: rotate(-8deg);
  font-family: var(--f-hand); font-weight: 700; font-size: 21px; line-height: 1;
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .5);
  animation: badgeIn .8s var(--pop) both;
}
.sv-badge b { display: block; font-family: var(--f-display); font-stretch: 118%; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--lemon); margin: 4px 0; }
@keyframes badgeIn { from { opacity: 0; transform: rotate(-30deg) scale(.4); } }
.sv-baking { font-family: var(--f-hand); font-weight: 700; font-size: 26px; color: var(--red); text-align: center; margin: 0; }
.sv-meter { width: min(260px, 80%); height: 10px; margin: 12px auto 0; border-radius: 10px; background: rgba(43, 43, 45, .1); overflow: hidden; }
.sv-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lemon), #FF9D3C, var(--coral)); border-radius: inherit; transition: width 1.6s linear; }
.is-baking .sv-meter i { width: 100%; }
.sv-error { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #FBE4E1; color: var(--red); font-weight: 600; font-size: 14.5px; }

/* Pluie de basilic (célébration) */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti img { position: absolute; top: -60px; width: 34px; animation: confetti var(--d, 2.2s) cubic-bezier(.3, .6, .4, 1) var(--delay, 0s) forwards; }
@keyframes confetti { to { transform: translate3d(var(--dx, 0), 110vh, 0) rotate(var(--r, 360deg)); } }

/* Couches de la pizza */
.pz-layer, .pz-sub { opacity: 0; transform-box: fill-box; transform-origin: center; }
.pz-layer { transform: scale(.82); transition: opacity .45s ease, transform .6s var(--pop); }
.pz-sub { transform: translateY(-18px) scale(.5); transition: opacity .35s ease, transform .55s var(--pop); }
.pz-layer.is-on, .pz-sub.is-on { opacity: 1; transform: none; }
.pz-raw { transition: opacity .8s ease; }
.pz-baked .pz-raw { opacity: 0; }
.pz-steam path { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 4; stroke-linecap: round; opacity: 0; }
.pz-baked .pz-steam path { animation: steam 2.4s ease-in-out infinite; }
.pz-baked .pz-steam path:nth-child(2) { animation-delay: .5s; }
.pz-baked .pz-steam path:nth-child(3) { animation-delay: 1s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-22px); } }

/* Grand écran : pizza à gauche, question à droite */
@media (min-width: 900px) {
  .sv-main { width: min(100% - 64px, 1040px); grid-template-columns: 380px 1fr; align-items: center; align-content: center; gap: 56px; padding: 30px 0; }
  .sv-stage { width: 360px; margin: 0; }
  .sv-foot { width: min(100% - 64px, 1040px); padding-left: calc(380px + 56px); }
  .sv-q { font-size: 30px; }
}

/* ==========================================================================
   Pages d'outils : accueil du dispositif, résultats
   ========================================================================== */
.page { width: min(100% - 32px, 1120px); margin: 0 auto; padding: 28px 0 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0 24px; }
.topbar .brand { font-family: var(--f-script); font-size: 36px; color: var(--red); text-decoration: none; line-height: 1; }
.topbar nav { display: flex; gap: 6px; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 9px 14px; border-radius: 999px; }
.topbar nav a:hover { background: var(--lemon-soft); }
.topbar nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.kicker { font-family: var(--f-hand); font-weight: 700; font-size: 26px; color: var(--red); margin: 0 0 4px; transform: rotate(-1.5deg); transform-origin: left; display: inline-block; }
.h1 { font-stretch: 125%; text-transform: uppercase; font-size: clamp(32px, 6vw, 60px); line-height: .98; }
.h2 { font-stretch: 118%; font-size: clamp(22px, 3vw, 30px); margin-bottom: 14px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 720px; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: #fff; border-radius: 24px; padding: 24px; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 18px 40px -32px rgba(0, 0, 0, .4); }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { margin: 0 0 12px; color: var(--ink-2); }
.card--coral { background: var(--coral); color: #fff; }
.card--coral p { color: rgba(255, 255, 255, .9); }
.card--basil { background: var(--basil); color: #fff; }
.card--basil p { color: rgba(255, 255, 255, .85); }
.card--lemon { background: var(--lemon); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); margin-bottom: 12px; }
.card .tag { background: var(--lemon-soft); color: #6F5410; }
.card--coral .tag, .card--basil .tag { background: rgba(255, 255, 255, .18); color: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 700; color: var(--ink-2); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.table tbody th { font-weight: 600; color: var(--ink); font-size: inherit; text-transform: none; letter-spacing: 0; }
.table th.ev { min-width: 150px; max-width: 230px; }
.table th.ev b { display: block; font-weight: 600; line-height: 1.3; }
.table th.ev small { display: block; margin-top: 2px; font-weight: 500; font-size: 12.5px; color: var(--ink-2); }
/* Tableaux larges : la première colonne reste visible pendant le défilement horizontal */
.table-wrap .table tr > :first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--line); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field select { min-height: 48px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--cream); }
.field input:focus, .field select:focus { outline: none; border-color: var(--coral); background: #fff; }
.copybox { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.copybox input { flex: 1 1 230px; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 14px; }
.copybox .btn { min-height: 48px; }
.mailtext { white-space: pre-wrap; font-size: 14.5px; background: var(--cream); border-radius: 14px; padding: 14px; border: 1px dashed var(--line); }
.notice { border-radius: 16px; padding: 14px 16px; background: var(--lemon-soft); font-size: 15px; }
.notice--demo { background: var(--ink); color: #fff; font-weight: 700; text-align: center; letter-spacing: .02em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- Accueil du dispositif ---------- */
.hero { display: grid; gap: 22px; align-items: center; padding: 6px 0 34px; }
.hero__img { width: min(230px, 62%); height: auto; margin: 0 auto; animation: spin 80s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 860px) { .hero { grid-template-columns: 1.5fr 1fr; } .hero__img { width: min(340px, 100%); } }
.facts { display: grid; gap: 9px; margin: 4px 0 20px; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; font-size: 15px; line-height: 1.4; }
.facts dt { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; opacity: .78; padding-top: 2px; }
.facts dd { margin: 0; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.card--coral .btn--paper, .card--basil .btn--paper { border-color: transparent; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; }
.form-grid .btn { margin-bottom: 14px; }
.out { display: grid; gap: 16px; margin-top: 10px; }
.out .card { box-shadow: none; border: 2px solid var(--line); }
.when { display: inline-flex; gap: 8px; align-items: center; background: var(--lemon-soft); border-radius: 12px; padding: 7px 12px; font-weight: 600; font-size: 14.5px; margin: 0 0 12px; }
.small { font-size: 13.5px; color: var(--ink-2); }
.rules { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: rule; }
.rule { background: #fff; border-radius: 20px; padding: 18px 18px 16px; }
.rule h3 { font-size: 17px; margin-bottom: 6px; display: flex; gap: 10px; align-items: baseline; }
.rule h3::before { counter-increment: rule; content: counter(rule); font-family: var(--f-hand); font-size: 26px; color: var(--red); }
.rule p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.site-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table .num { text-align: right; white-space: nowrap; }
.table th.num { white-space: normal; }
.table td .btn--link, .btn--link { background: none; border: 0; padding: 4px 0; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.table input[type="number"] { width: 78px; min-height: 38px; border-radius: 10px; border: 2px solid var(--line); padding: 0 8px; font-weight: 700; background: #fff; }
.table input[type="number"]:focus { outline: none; border-color: var(--coral); }
.status { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.status small { font-weight: 500; color: var(--ink-2); }

.sheets-card p { margin: 0 0 10px; color: var(--ink-2); }
.sheets-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheets-card__head .tag { margin: 0; background: #E3F1E8; color: var(--basil); }

/* ---------- Tableau de bord ----------
   Chiffres proportionnels partout : les chiffres tabulaires de Mona Sans ont un dessin « code » (zéro pointé). */
.viz-root {
  --surface: #fff;
  --grid: #ECE7DF;
  --axis: #CFC8BC;
  /* Palette validée (skill dataviz) : divergente rouge ↔ bleu canard, milieu gris neutre */
  --v-neg2: #C93F37; --v-neg1: #EF9D93; --v-neu: #E3E0DA; --v-pos1: #85BDCB; --v-pos2: #186575;
  --v-series: #186575; --v-passif: #C9C4BA;
}
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 0 0 20px; }
.filters .field { margin: 0; flex: 1 1 210px; min-width: 0; max-width: 380px; }
.filters .field--seg { flex: 0 0 auto; }
.filters .field select { width: 100%; min-height: 46px; background: #fff; text-overflow: ellipsis; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: #fff; border-radius: 20px; padding: 18px 18px 16px; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 14px 30px -26px rgba(0, 0, 0, .45); }
.kpi__label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0; line-height: 1.3; }
.kpi__value { font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: 38px; line-height: 1.05; margin: 8px 0 4px; }
.kpi__value small { font-size: 18px; font-weight: 700; margin-left: 2px; }
.kpi__sub { font-size: 13.5px; color: var(--ink-2); margin: 0; line-height: 1.35; }
.kpi__n { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink); background: var(--cream); border-radius: 8px; padding: 3px 8px; }
.kpi__warn { display: flex; gap: 6px; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: #6B4E0E; background: var(--lemon-soft); border-radius: 8px; padding: 5px 8px; line-height: 1.3; }
.kpi__field { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.kpi__field input { width: 78px; min-height: 36px; border-radius: 10px; border: 2px solid var(--line); padding: 0 8px; font-weight: 700; }

.viz { background: var(--surface); border-radius: 24px; padding: 20px 20px 16px; margin: 0; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 18px 40px -32px rgba(0, 0, 0, .4); min-width: 0; }
.viz__head { margin-bottom: 16px; }
.viz__title { font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: 19px; line-height: 1.2; margin: 0; }
.viz__sub { font-size: 13.5px; color: var(--ink-2); margin: 3px 0 0; }
.viz__foot { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: center; margin-top: 14px; }
.viz__toggle { background: none; border: 0; padding: 6px 0; font-weight: 700; font-size: 13.5px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.viz__table { margin-top: 10px; }
.viz__table .table { font-size: 14px; }
.viz__table .table th, .viz__table .table td { padding: 8px 10px; }
.viz-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }

/* Barres horizontales (moyennes sur 5 ou effectifs) */
.mbars { display: grid; gap: 14px; }
.mbar, .mbar-axis { display: grid; grid-template-columns: minmax(140px, 1.1fr) minmax(150px, 2fr) 96px; gap: 4px 14px; align-items: center; }
.mbar__label { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.mbar__flag { display: inline-block; margin: 3px 0 0; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--cream); white-space: nowrap; }
.mbar__plot { position: relative; height: 24px; border-radius: 4px; }
.mbars--scale .mbar__plot::before { /* repères 1 à 5 : traits fins pleins */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, var(--grid) 1px, transparent 1px) 0 0 / 25% 100% repeat-x;
  border-right: 1px solid var(--grid);
}
.mbars--count .mbar__plot { border-left: 1px solid var(--axis); border-radius: 0; }
.mbar__fill { position: absolute; left: 0; top: 5px; height: 14px; width: calc(var(--v) * 100%); background: var(--v-series); border-radius: 0 4px 4px 0; transition: opacity .15s; }
.mbar__plot:hover .mbar__fill, .mbar__plot:focus-visible .mbar__fill { opacity: .8; }
.mbar__val { text-align: right; font-size: 12.5px; color: var(--ink-2); line-height: 1.25; }
.mbar__val b { display: block; font-size: 17px; color: var(--ink); }
.mbar-axis { margin-top: 6px; }
.mbar-axis .axis { position: relative; height: 16px; font-size: 12px; color: var(--ink-2); }
.mbar-axis .axis span { position: absolute; top: 0; transform: translateX(-50%); }
@media (max-width: 640px) {
  .mbar, .mbar-axis { grid-template-columns: 1fr 78px; }
  .mbar__label { grid-column: 1; grid-row: 1; }
  .mbar__plot { grid-column: 1; grid-row: 2; }
  .mbar__val { grid-column: 2; grid-row: 1 / span 2; }
  .mbar-axis > :first-child, .mbar-axis > :last-child { display: none; }
  .mbar-axis .axis { grid-column: 1; }
}

/* Barres empilées divergentes (échelles de Likert), centrées sur la réponse neutre */
.lik { display: grid; gap: 24px; }
.lik__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 14.5px; margin-bottom: 8px; }
.lik__head b { font-weight: 700; line-height: 1.3; }
.lik__head small { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.lik__plot { position: relative; height: 24px; }
.lik__plot::after { content: ""; position: absolute; top: -5px; bottom: -5px; left: var(--c); width: 1px; background: var(--ink-2); opacity: .55; }
.lik__seg { position: absolute; top: 0; bottom: 0; }
.lik__seg::before { content: ""; position: absolute; inset: 0 1px; background: var(--col); transition: opacity .15s; }
.lik__seg.is-first::before { border-radius: 4px 0 0 4px; }
.lik__seg.is-last::before { border-radius: 0 4px 4px 0; }
.lik__seg.is-first.is-last::before { border-radius: 4px; }
.lik__seg:hover::before, .lik__seg:focus-visible::before { opacity: .8; }
.lik__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0; margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); }
.lik__legend li { display: inline-flex; align-items: center; gap: 6px; }
.lik__legend i { width: 11px; height: 11px; border-radius: 3px; background: var(--col); flex: none; }
.lik__legend b { color: var(--ink); }
.lik__note { font-size: 12.5px; color: var(--ink-2); margin: 6px 0 0; }
.lik--compact { gap: 14px; }
.lik__row--compact .lik__head { margin-bottom: 5px; font-size: 13.5px; }
.lik--compact + .lik__scale + .lik__legend { margin-top: 12px; }
.table--groups td.is-gap { font-weight: 800; color: var(--ink); }
.table--groups tbody tr:nth-child(-n+3) th { font-weight: 700; }
.lik__scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-top: 4px; }

/* Recommandation : histogramme 0 à 10 */
.nps__plot { position: relative; display: grid; grid-template-columns: repeat(11, 1fr); align-items: end; height: 170px; border-bottom: 1px solid var(--axis); }
.nps__col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.nps__bar { width: min(24px, 72%); height: calc(var(--v) * (100% - 24px)); background: var(--col); border-radius: 4px 4px 0 0; transition: opacity .15s; }
.nps__col:hover .nps__bar, .nps__col:focus-visible .nps__bar { opacity: .8; }
.nps__cap { position: absolute; left: 0; right: 0; bottom: calc(var(--v) * (100% - 24px) + 4px); text-align: center; font-size: 12.5px; font-weight: 700; }
.nps__axis { display: grid; grid-template-columns: repeat(11, 1fr); text-align: center; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.nps__groups { display: grid; grid-template-columns: 7fr 2fr 2fr; gap: 0; margin-top: 8px; font-size: 12px; color: var(--ink-2); text-align: center; line-height: 1.25; }
.nps__groups span { border-top: 2px solid var(--col); padding-top: 4px; margin: 0 2px; }
.nps__groups i { display: block; font-style: normal; white-space: nowrap; }
.nps__groups b { display: block; color: var(--ink); font-size: 13px; margin-top: 2px; }
@media (max-width: 480px) { .nps__groups { font-size: 11px; } }

/* Infobulle (une seule, partagée) */
.tip {
  position: fixed; z-index: 60; left: 0; top: 0; pointer-events: none;
  max-width: 250px; padding: 8px 11px; border-radius: 10px; background: var(--ink); color: #fff;
  font-size: 13px; line-height: 1.35; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .55);
  opacity: 0; transition: opacity .12s;
}
.tip.is-on { opacity: 1; }
.tip b { display: block; font-size: 15.5px; }
.tip span { color: rgba(255, 255, 255, .78); }
.tip i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--col, #fff); vertical-align: middle; margin-right: 7px; }
[data-tip] { cursor: default; }
[data-tip]:focus-visible { outline: 3px solid var(--lemon); outline-offset: 2px; border-radius: 4px; }

/* Retours qualitatifs */
.themes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.themes button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 13.5px; }
.themes button b { margin-left: 4px; color: var(--ink-2); }
.themes button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.themes button[aria-pressed="true"] b { color: rgba(255, 255, 255, .8); }
.themes button[disabled] { opacity: .45; cursor: default; }
.qual { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.qual h4 { font-family: var(--f-display); font-stretch: 108%; font-weight: 800; font-size: 15.5px; margin: 0 0 10px; display: flex; justify-content: space-between; gap: 10px; }
.qual h4 small { font-family: var(--f-body); font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.comments { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-height: 560px; overflow: auto; }
.comments li { background: var(--cream); border-radius: 14px; padding: 11px 14px 10px; font-size: 15px; line-height: 1.45; }
.comments li small { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.comments .tone { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }
.comments .pos { border-left: 4px solid var(--v-pos2); }
.comments .neg { border-left: 4px solid var(--v-neg2); }
.comments .mix { border-left: 4px solid var(--axis); }
.comments .is-auto { font-style: italic; }
.empty { color: var(--ink-2); font-style: italic; margin: 0; }
.empty-state { text-align: center; padding: 34px 18px; }
.empty-state img { width: 120px; margin: 0 auto 14px; }
.empty-state .btns { justify-content: center; margin-top: 14px; }
.method { font-size: 14px; color: var(--ink-2); }
.method ul { padding-left: 18px; margin: 8px 0 0; }
.method li { margin: 0 0 6px; }
.method strong { color: var(--ink); }
section + section { margin-top: 28px; }
.sect-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sect-title .h2 { margin: 0; }

/* ==========================================================================
   Impression : chevalet de table et version papier
   ========================================================================== */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; }
  body { font-size: 11pt; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .page { width: auto; padding: 0; }
  .card, .kpi { box-shadow: none; border: 1px solid #ddd; }
  a { text-decoration: none; }
  .sheet-preview { height: auto !important; overflow: visible !important; }
  .tent, .paper { transform: none !important; box-shadow: none !important; margin: 0 !important; }
  .sheet-preview > .paper { width: auto; min-height: 0; padding: 0; border-radius: 0; }
}

/* Aperçu à l'écran d'une feuille A4, réduite pour tenir dans la largeur */
.sheet-preview { position: relative; margin-top: 18px; overflow: hidden; padding-bottom: 2px; }
.sheet-preview > .tent, .sheet-preview > .paper { transform-origin: top left; margin: 0 auto; }
/* à l'écran : une vraie feuille A4 (210 × 297 mm) avec les marges d'impression */
.sheet-preview > .paper { width: 210mm; min-height: 297mm; padding: 12mm; border-radius: 6px; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 24px 50px -34px rgba(0, 0, 0, .5); }

/* ---------- Chevalet de table (A4 plié en deux) ---------- */
.tent { width: 186mm; background: #fff; padding: 0; }
.tent__half {
  height: 128mm; border-radius: 6mm; padding: 11mm 12mm;
  display: grid; grid-template-columns: 1fr 62mm; gap: 9mm; align-items: center;
  background: var(--coral); color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  position: relative; overflow: hidden;
}
.tent__half--flip { transform: rotate(180deg); }
.tent__half::after { /* demi-pizza décorative */
  content: ""; position: absolute; width: 62mm; height: 62mm; left: -18mm; bottom: -34mm;
  background: url("../img/margherita-640.webp") center / contain no-repeat; opacity: .95;
}
.tent__txt { position: relative; z-index: 1; align-self: start; }
.tent .script { display: block; font-size: 28pt; line-height: 1; color: #fff; margin-bottom: 4mm; }
.tent h2 { font-stretch: 125%; text-transform: uppercase; font-size: 31pt; line-height: .95; margin: 0 0 5mm; }
.tent p { margin: 0 0 2.5mm; font-size: 13pt; font-weight: 600; line-height: 1.3; }
.tent .hand { font-size: 19pt; color: var(--lemon); margin-top: 4mm; }
.tent__qr { position: relative; z-index: 1; background: #fff; color: var(--ink); border-radius: 5mm; padding: 4mm 4mm 3mm; text-align: center; }
.tent__qr svg { display: block; width: 100%; height: auto; }
.tent__qr span { display: block; margin-top: 2mm; font-family: var(--f-hand); font-weight: 700; font-size: 15pt; color: var(--red); line-height: 1; }
.tent__small { position: absolute; right: 12mm; bottom: 6mm; width: 62mm; margin: 0 !important; text-align: center; font-size: 9pt !important; font-weight: 500 !important; opacity: .92; }
.tent__fold { height: 9mm; display: flex; align-items: center; gap: 3mm; font-size: 8.5pt; color: #9C8F80; }
.tent__fold::before, .tent__fold::after { content: ""; flex: 1; border-top: 1px dashed #CDBFAE; }
/* Version économe en encre */
.tent--light .tent__half { background: #fff; color: var(--ink); border: 1.5mm solid var(--coral); }
.tent--light .script { color: var(--red); }
.tent--light .hand { color: var(--basil); }
.tent--light .tent__half::after { opacity: .9; }
.tent--light .tent__qr { border: 1px solid var(--line); }

/* ---------- Version papier de l'enquête à chaud ---------- */
.paper { width: 186mm; background: #fff; padding: 2mm 0; color: var(--ink); font-size: 10.5pt; line-height: 1.4; }
.paper__head { position: relative; border-bottom: 2px solid var(--coral); padding-bottom: 2.5mm; margin-bottom: 3mm; }
.paper__head .script { font-size: 24pt; color: var(--red); line-height: 1; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.paper h1 { font-stretch: 118%; font-size: 17pt; margin: 1.5mm 0 1mm; }
.paper .intro { font-style: italic; color: var(--ink-2); margin: 0; }
.paper__meta { position: absolute; top: 0; right: 0; text-align: right; font-size: 9.5pt; color: var(--ink-2); white-space: nowrap; }
.paper__meta b { display: block; color: var(--ink); font-size: 10.5pt; }
.paper .pq { margin: 0 0 2.5mm; break-inside: avoid; }
.paper .pq h2 { font-stretch: 105%; font-size: 11pt; line-height: 1.28; margin: 0 0 2mm; }
.paper .pq h2 span { color: var(--red); margin-right: 1.5mm; }
.paper .help { margin: -1mm 0 2.5mm; font-size: 9.5pt; color: var(--ink-2); }
.box { display: inline-block; width: 3.8mm; height: 3.8mm; border: .35mm solid var(--ink); border-radius: .8mm; vertical-align: -.7mm; background: #fff; }
.paper .boxes { display: flex; flex-wrap: wrap; gap: 2mm 4.5mm; font-size: 9.5pt; }
.paper .boxes label { display: inline-flex; align-items: center; gap: 2mm; white-space: nowrap; }
.paper table { width: 100%; border-collapse: collapse; font-size: 9pt; table-layout: fixed; }
.paper th, .paper td { border: .25mm solid #CFC5B8; padding: .8mm 1.2mm; text-align: center; vertical-align: middle; }
.paper thead th { font-weight: 600; line-height: 1.2; color: var(--ink-2); }
.paper tbody th { text-align: left; font-weight: 600; font-size: 9.5pt; }
.paper col.c-item { width: 34%; }
.paper__section { margin: 0 0 3mm !important; font-size: 9.5pt; }
.paper__ten { display: flex; justify-content: space-between; gap: 1.5mm; max-width: 150mm; }
.paper__ten label { display: inline-flex; align-items: center; gap: 1.2mm; font-size: 9.5pt; font-weight: 600; }
.paper__anchors { display: flex; justify-content: space-between; max-width: 150mm; margin: 1mm 0 0 !important; font-size: 8.5pt !important; }
.paper .lines { height: 19.6mm; background: repeating-linear-gradient(to bottom, transparent 0 6.2mm, #CFC5B8 6.2mm 6.5mm); }
.paper .lines--short { height: 13mm; }
.paper__foot { display: flex; justify-content: space-between; align-items: center; gap: 6mm; margin-top: 2mm; border-top: 1px solid var(--line); padding-top: 2mm; }
.paper .thanks { font-family: var(--f-hand); font-weight: 700; font-size: 15pt; color: var(--red); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.paper__staff { font-size: 9pt; color: var(--ink-2); display: inline-flex; gap: 2mm; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .confetti { display: none; }
}

/* Échelle de Likert compacte (éléments notés un par un) */
.sv-options--compact { gap: 8px; }
.sv-options--compact .sv-opt { min-height: 50px; padding: 7px 14px; font-size: 15.5px; }
.sv-options--compact .sv-opt .ico { width: 32px; height: 32px; }
@media (min-width: 520px) { .sv-nps { grid-template-columns: repeat(11, 1fr); gap: 6px; } .sv-nps button { font-size: 16px; } }
/* Titres recevant le focus par programme (lecteurs d'écran) : pas de cadre visuel */
[tabindex="-1"]:focus { outline: none; }
