:root {
  --bg: #faf6ef;
  --paper: #fffdf9;
  --ink: #2a251f;
  --muted: #6e6559;
  --line: #e8dfd2;
  --accent: #2f6b4f;
  --accent-dark: #245540;
  --accent-soft: #e3efe7;
  --warm: #d9734a;
  --warm-soft: #fbe7dc;
  --note: #fff4c9;
  --danger: #b3412e;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(42, 37, 31, 0.06), 0 8px 24px rgba(42, 37, 31, 0.06);

  --font-title: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Segoe Print', cursive;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 3.8vw, 2.3rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(1080px, 100% - 32px);
  margin-inline: auto;
}

.narrow {
  width: min(720px, 100% - 32px);
  margin-inline: auto;
}

.hand {
  font-family: var(--font-hand);
  font-size: 1.5em;
  line-height: 1.1;
  color: var(--warm);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.logo-mark {
  width: 36px;
  height: 36px;
  transform: rotate(-4deg);
  transition: transform 0.2s;
}

.logo:hover .logo-mark {
  transform: rotate(4deg) scale(1.05);
}

.logo-sub {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--warm);
  margin-left: 1px;
}

.nav {
  display: flex;
  gap: 22px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--accent);
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--paper);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.9rem;
}

/* ---------- Accueil ---------- */

.hero {
  padding: 64px 0 48px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.reassure {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--muted);
}

.reassure li::before {
  content: '✓ ';
  color: var(--accent);
  font-weight: 800;
}

.hero-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-card .laptop {
  width: 100%;
  height: auto;
}

.sticky-note {
  position: absolute;
  right: -14px;
  bottom: -26px;
  width: 210px;
  background: var(--note);
  padding: 16px 18px;
  border-radius: 4px;
  transform: rotate(3deg);
  box-shadow: 0 10px 20px rgba(42, 37, 31, 0.12);
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.15;
  color: #5b4a1f;
}

@media (max-width: 860px) {
  .hero {
    padding-top: 40px;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 420px;
    margin: 0 auto 30px;
  }

  .sticky-note {
    right: -6px;
  }
}

section {
  padding: 64px 0;
}

.section-head {
  max-width: 40em;
  margin-bottom: 36px;
}

.section-alt {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

/* Étapes */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  counter-increment: step;
}

.section-alt .steps li {
  background: var(--bg);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--warm-soft);
  color: var(--warm);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.2rem;
}

.steps p {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Dans l'atelier */

.workshop {
  position: relative;
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Le fil qui relie les étapes */
.workshop::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 30px;
  bottom: 30px;
  border-left: 2px dashed var(--line);
}

.workshop li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 18px 14px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.workshop h3 {
  margin: 4px 0 4px;
  font-size: 1.1rem;
}

.workshop p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.workshop-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 2px 0 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.workshop li:nth-child(3) .workshop-icon {
  background: var(--warm-soft);
  color: var(--warm);
}

/* Services */

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

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

/* À propos / engagements */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.promises {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.promises li {
  display: flex;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.promises strong {
  display: block;
}

.promises span {
  color: var(--muted);
  font-size: 0.95rem;
}

.promises .dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--warm);
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Tarifs */

.price-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 24px;
  padding: 32px;
}

.price-box h2 {
  margin-bottom: 0.25em;
}

.price-box p {
  margin: 0;
  opacity: 0.9;
}

.price-box .btn {
  background: #fff;
  color: var(--accent);
}

/* FAQ */

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-size: 1.4rem;
  line-height: 1;
  color: var(--warm);
}

.faq details[open] summary::after {
  content: '–';
}

.faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* Pied de page */

.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- Formulaires ---------- */

.page-intro {
  padding: 48px 0 8px;
}

.form {
  display: grid;
  gap: 22px;
  padding-bottom: 64px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 22px;
  margin: 0;
  display: grid;
  gap: 16px;
}

legend {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.15rem;
  padding: 0 8px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

@media (max-width: 600px) {
  .row {
    grid-template-columns: 1fr;
  }
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 0.95rem;
}

.hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.87rem;
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='password'],
select,
textarea {
  width: 100%;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}

.check input {
  margin-top: 5px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: none;
}

.field-title {
  margin: 6px 0 -4px;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Choix du système */

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s, background 0.15s;
}

.choice:hover {
  border-color: var(--accent);
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice:has(input:focus-visible) {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.choice input,
.app-tile input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice img {
  flex: none;
  width: 32px;
  height: 32px;
}

.choice strong {
  display: block;
  line-height: 1.2;
}

.choice small {
  color: var(--muted);
}

.subchoice {
  display: grid;
  gap: 12px;
  padding-left: 14px;
  border-left: 3px solid var(--accent-soft);
}

/* Tuiles d'applis */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.app-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.2;
  transition: border-color 0.15s, background 0.15s;
}

.app-tile:hover {
  border-color: var(--accent);
}

.app-tile:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.app-tile:has(input:checked)::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 8px;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.85rem;
}

.app-tile:has(input:focus-visible) {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.app-tile img {
  flex: none;
  width: 24px;
  height: 24px;
}

.app-tile small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Pastilles (suivi + admin) */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.chip img {
  width: 16px;
  height: 16px;
}

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

.password-box code {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px dashed var(--line);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
  padding: 26px 16px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dropzone .file-name {
  font-weight: 700;
  color: var(--accent);
}

.warning {
  position: relative;
  border: 2px solid var(--warm);
  border-radius: var(--radius);
  background: var(--warm-soft);
  padding: 18px 20px 18px 58px;
  color: var(--ink);
}

.warning::before {
  content: '!';
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--warm);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.warning strong {
  display: block;
  margin-bottom: 4px;
  color: var(--danger);
}

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  background: var(--warm-soft);
  color: var(--danger);
  font-weight: 600;
}

.alert[hidden] {
  display: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* Écran de confirmation */

.success {
  text-align: center;
  padding: 56px 0 72px;
}

.success .big-check {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.link-box {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 20px auto;
}

.link-box input {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
}

/* ---------- Suivi + discussion ---------- */

.track {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 32px 0 64px;
  align-items: start;
}

@media (max-width: 860px) {
  .track {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.panel + .panel {
  margin-top: 18px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 18px 30px;
  color: var(--muted);
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper);
}

.timeline li::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 23px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li:last-child::after {
  display: none;
}

.timeline li.done {
  color: var(--ink);
}

.timeline li.done::before {
  background: var(--accent);
  border-color: var(--accent);
}

.timeline li.done::after {
  background: var(--accent);
}

.timeline li.current {
  color: var(--ink);
  font-weight: 800;
}

.timeline li.current::before {
  background: var(--warm);
  border-color: var(--warm);
  box-shadow: 0 0 0 5px var(--warm-soft);
}

.facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.facts + h3,
.facts ~ h3 {
  margin-top: 20px;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.badge.warm {
  background: var(--warm-soft);
  color: var(--warm);
}

.badge.grey {
  background: var(--line);
  color: var(--muted);
}

/* Discussion */

.chat {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 520px;
  max-height: 75vh;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--warm-soft);
  color: var(--warm);
  display: grid;
  place-items: center;
  font-family: var(--font-title);
  font-weight: 700;
}

.chat-head strong {
  display: block;
  line-height: 1.2;
}

.chat-head span {
  color: var(--muted);
  font-size: 0.87rem;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px,
    var(--bg);
}

.bubble {
  max-width: min(78%, 520px);
  padding: 10px 14px;
  border-radius: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 1px rgba(42, 37, 31, 0.05);
}

.bubble time {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.bubble.them {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.bubble.me {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  max-width: 26em;
}

.chat-form {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.chat-form textarea {
  min-height: 46px;
  height: 46px;
  max-height: 160px;
  resize: none;
  overflow-y: hidden;
}

.chat-form .btn {
  align-self: flex-end;
}

/* ---------- Admin ---------- */

.admin-login {
  max-width: 380px;
  margin: 80px auto;
}

.wrap-wide {
  width: min(1440px, 100% - 32px);
}

/* Coquille de l'atelier : menu à gauche, demande à droite */

.app {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 14px 14px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.sidebar .logo {
  margin: 0 0 4px 4px;
}

.sidebar input[type='search'] {
  padding: 9px 12px;
  font-size: 0.95rem;
}

.sidebar .filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.sidebar .req-list {
  flex: 1;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 2px 6px 8px;
  align-content: start;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.app-main {
  container-type: inline-size;
  min-width: 0;
  padding: 26px 30px 48px;
}

.filters .count {
  margin-left: 6px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.os-mini {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: -2px;
}

/* Fiche d'une demande */

.detail-head {
  margin-bottom: 18px;
}

.detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.detail-title h2 {
  margin: 0;
}

.detail-head > p {
  margin: 4px 0 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.detail-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.detail-cards .panel + .panel {
  margin-top: 0;
}

.panel h3 {
  margin-top: 0;
}

.panel h4 {
  margin: 18px 0 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.quote {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid var(--warm);
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  white-space: pre-wrap;
}

.os-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.15rem;
}

.os-line img {
  width: 30px;
  height: 30px;
}

.side-panel {
  position: sticky;
  top: 20px;
  padding: 22px;
  gap: 14px;
}

.side-panel .row {
  grid-template-columns: 1fr auto;
}

.paid-check {
  padding-bottom: 12px;
  font-weight: 700;
}

.dispo {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--note);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.input-row {
  display: flex;
  gap: 6px;
}

.input-row input {
  flex: 1;
  min-width: 0;
}

/* Le mot de passe PC en police « machine à écrire » : on distingue bien l et 1, O et 0 */
.input-row input[name='pc_password'] {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.95rem;
}

.admin-chat {
  min-height: 440px;
}

@container (max-width: 1060px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    order: -1;
  }
}

@container (max-width: 620px) {
  .detail-cards {
    grid-template-columns: 1fr;
  }
}

/* Sur téléphone : d'abord le menu, puis la demande en plein écran */
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 100vh;
    border-right: 0;
  }

  .sidebar .req-list {
    overflow: visible;
  }

  .app.has-selection .sidebar {
    display: none;
  }

  .app:not(.has-selection) .app-main {
    display: none;
  }

  .app-main {
    padding: 16px 16px 40px;
  }
}

.back-link {
  display: none;
}

@media (max-width: 900px) {
  .back-link {
    display: inline-flex;
    margin-bottom: 12px;
  }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.filters button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}

.filters button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.req-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.req-list button {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.req-list button:hover,
.req-list button.active {
  border-color: var(--accent);
}

.req-list button.active {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.req-list .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.req-list .unread {
  background: var(--warm);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 1px 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

@media (max-width: 1100px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.proof-preview {
  margin-top: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  max-height: 260px;
  object-fit: contain;
  background: var(--bg);
}

.saved {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
}

.input-row .btn {
  flex: none;
  padding: 7px 11px;
}

.filters button {
  padding: 5px 10px;
}

.sidebar .req-list button.active {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
  background: var(--accent-soft);
}

/* ---------- Avis ---------- */

.stars {
  color: #e0a526;
  letter-spacing: 2px;
  white-space: nowrap;
}

.public-reviews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-review {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.public-review p {
  margin: 0;
}

.public-review-who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto !important;
}

.public-review-who .avatar {
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
}

.reviews-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0 28px;
  padding: 24px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.reviews-score {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.reviews-score-num {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
}

.reviews-score-stars {
  color: #e0a526;
  font-size: 1.6rem;
  letter-spacing: 3px;
}

.reviews-note {
  max-width: 46em;
  margin: 32px 0 64px;
}

.reviews-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  max-width: none;
}

.reviews-mini {
  margin: 0 0 8px;
  font-weight: 700;
}

/* Choix des étoiles : affichées de droite à gauche pour que le survol colore aussi les précédentes */
.star-picker {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

.star-picker input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.star-picker label {
  cursor: pointer;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--line);
  transition: color 0.1s, transform 0.1s;
}

.star-picker-lg label {
  font-size: 2.6rem;
}

.star-picker label:hover,
.star-picker label:hover ~ label,
.star-picker input:checked ~ label {
  color: #e0a526;
}

.star-picker label:hover {
  transform: scale(1.1);
}

.star-picker input:focus-visible + label {
  outline: 3px solid var(--accent-soft);
  border-radius: 4px;
}

.review-stars-big {
  margin: 4px 0 8px;
  font-size: 2rem;
  color: #e0a526;
  letter-spacing: 3px;
}

/* Page de suivi : colonne principale (avis + discussion) */
.track-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.review-panel {
  border: 2px solid #f0d58a;
  background: #fffbeb;
}

.notify-panel .btn {
  margin-top: 4px;
}

/* ---------- Admin : onglets, notifications, avis ---------- */

.view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.view-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}

.view-tabs button.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(42, 37, 31, 0.12);
}

.tab-badge {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--warm);
  color: #fff;
  font-size: 0.75rem;
  line-height: 20px;
}

.sidebar-reviews {
  flex: 1;
  padding: 8px 4px;
}

.sidebar-reviews p {
  margin: 0 0 4px;
}

.reviews-avg {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 2rem;
}

.sidebar-foot {
  flex-direction: column;
  align-items: stretch;
}

.sidebar-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notif-btn {
  width: 100%;
  padding: 9px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.notif-btn.on {
  border-style: solid;
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent);
}

.notif-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.reviews-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.reviews-groups {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.reviews-groups .panel + .panel {
  margin-top: 0;
}

.review-add {
  position: sticky;
  top: 20px;
  padding: 22px;
  gap: 14px;
}

@container (max-width: 900px) {
  .reviews-layout {
    grid-template-columns: 1fr;
  }

  .review-add {
    position: static;
  }
}

.review-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.review-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn.danger {
  color: var(--danger);
}

.btn.danger:hover {
  background: var(--warm-soft);
}

.review-add .row {
  grid-template-columns: 1fr;
}

/* Vérification de l'email par code */

.email-verify .input-row .btn {
  flex: none;
}

.code-step {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.code-step label {
  display: block;
  font-weight: 700;
}

.code-input {
  max-width: 11em;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 1.3rem !important;
  letter-spacing: 0.35em;
  text-align: center;
}

.verified {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  color: var(--accent);
  font-weight: 800;
}

.link-btn {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.link-btn:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}

.email-verify input[readonly] {
  background: var(--accent-soft);
  border-color: var(--accent);
}
