/* =======================================================================
   LevelARA Dev Club — styles v2
   Cartes de services à taille FIXE, portfolio, réservations, chat privé
   et correctifs RESPONSIVE (chargé après style.css).
   ======================================================================= */

/* ---------- Sécurité responsive globale : rien ne dépasse de l'écran ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img, video, canvas, svg { max-width: 100%; }
img { height: auto; }
table { width: 100%; }
.tableau-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tableau-wrap table { min-width: 560px; }
.container, .conteneur { width: 100%; }
p, li, h1, h2, h3 { overflow-wrap: anywhere; }
td, th { overflow-wrap: break-word; word-break: normal; }

/* Titres fluides : jamais trop grands sur téléphone */
h1 { font-size: clamp(1.7rem, 1.1rem + 3vw, 3rem); line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 1rem + 1.8vw, 2.2rem); line-height: 1.2; }
h3 { font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.3rem); }
.hero { padding: clamp(36px, 7vw, 76px) 0 clamp(28px, 5vw, 60px); }
.hero .lead { font-size: clamp(0.98rem, 0.9rem + 0.4vw, 1.12rem); }
.section { padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(32px, 6vw, 72px); }

/* ---------- Petits utilitaires ---------- */
.chargement { color: var(--text-mute); text-align: center; padding: 24px 0; grid-column: 1 / -1; }
.empty-state { text-align: center; color: var(--text-mute); padding: 36px 16px; grid-column: 1 / -1; }
.empty-state .btn { margin-top: 14px; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.lien-retour { margin-bottom: 14px; }
.case { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.case input { width: auto; }
.pastille { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--accent-ink); }
.pastille-action { background: color-mix(in srgb, var(--warning) 22%, transparent); color: #8A5A0E; }
[data-theme="dark"] .pastille-action { color: #F2C779; }

.note-devis { display: flex; gap: 12px; align-items: flex-start; margin-top: 30px; padding: 16px 18px; border: 1px dashed var(--line); border-radius: var(--radius-md); background: var(--paper-raised); color: var(--text-mute); font-size: .93rem; }
.note-devis svg { flex: 0 0 auto; color: var(--accent-ink); margin-top: 2px; }
.note-devis p { margin: 0; }
.note-devis a { color: var(--accent-ink); }

/* ---------- Cartes de services : TAILLE FIXE ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: clamp(14px, 2.4vw, 24px);
  grid-auto-rows: 1fr;           /* toutes les cartes de la grille ont la même hauteur */
}
.svc-card {
  display: flex; flex-direction: column;
  height: 100%; min-height: 420px; max-height: 420px;   /* hauteur FIXE : le texte ne l'agrandit jamais */
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.svc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.svc-img { display: block; flex: 0 0 170px; height: 170px; background: var(--teal-soft); overflow: hidden; }
.svc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding: 16px 18px 18px; gap: 6px; }
.svc-cat { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-title { margin: 0; font-size: 1.08rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.svc-desc { margin: 0; color: var(--text-mute); font-size: .9rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.svc-stars { color: var(--star); font-size: .9rem; margin-top: auto; }
.svc-stars small { color: var(--text-mute); }
.svc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.svc-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }

/* ---------- Détail d'un service ---------- */
.service-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.service-detail-img { width: 100%; aspect-ratio: 16 / 11; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--teal-soft); }
.service-detail-titre { margin: 6px 0 10px; }
.service-detail-desc { color: var(--text); line-height: 1.7; margin-bottom: 18px; }
.service-infos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.service-infos li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-raised); font-size: .92rem; }
.service-infos span { color: var(--text-mute); }
.service-infos strong { text-align: right; }

/* ---------- Portfolio ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(18px, 3vw, 30px); }
.pf-card { display: flex; flex-direction: column; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); transition: transform .25s ease, box-shadow .25s ease; }
.pf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.pf-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--deep); }
.pf-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .45s ease, transform .6s ease; }
.pf-img-2 { opacity: 0; }
.pf-card:hover .pf-img-1, .pf-media:focus-visible .pf-img-1 { transform: scale(1.04); }
.pf-card:hover .pf-img-2 { opacity: 1; }
.pf-visit { position: absolute; right: 12px; bottom: 12px; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .82rem; transform: translateY(8px); opacity: 0; transition: .25s ease; }
.pf-card:hover .pf-visit, .pf-media:focus-visible .pf-visit { transform: none; opacity: 1; }
.pf-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 22px; flex: 1; align-items: flex-start; }
.pf-body h3 { margin: 0; }
.pf-body p { margin: 0; color: var(--text-mute); line-height: 1.55; font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pf-tags { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.pf-tags li { font-size: .74rem; padding: 4px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--accent-ink); font-weight: 600; }
.pf-body .btn { margin-top: auto; }
@media (hover: none) { .pf-visit { opacity: 1; transform: none; } .pf-img-2 { display: none; } }

/* ---------- Réservations : liste ---------- */
.rsv-cartes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.rsv-carte { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md); color: inherit; box-shadow: var(--shadow-card); transition: border-color .2s, transform .2s; }
.rsv-carte:hover { border-color: var(--accent); transform: translateY(-2px); }
.rsv-carte small { color: var(--text-mute); }
.rsv-carte-haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rsv-carte-bas { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: .88rem; color: var(--text-mute); margin-top: 4px; }

/* ---------- Réservation : détail ---------- */
.rsv-entete { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.rsv-titre { margin: 4px 0 8px; }
.rsv-meta { color: var(--text-mute); font-size: .92rem; line-height: 1.6; margin: 0; }
.rsv-besoin { padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--paper-raised); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin-bottom: 22px; }
.rsv-besoin p { margin: 6px 0 0; white-space: pre-wrap; }
.rsv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 28px); align-items: start; }
.rsv-col { display: grid; gap: 18px; min-width: 0; }
.rsv-panel { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(14px, 3vw, 22px); box-shadow: var(--shadow-card); min-width: 0; }
.rsv-panel h3 { margin: 0 0 12px; }
.rsv-sous-titre { color: var(--text-mute); font-size: .88rem; margin: 0 0 12px; line-height: 1.5; }
.rsv-vide { color: var(--text-mute); font-size: .92rem; margin: 0; line-height: 1.6; }
.rsv-ok { color: var(--success); font-weight: 600; font-size: .92rem; margin: 10px 0 0; }
.rsv-prix { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--teal-soft); margin-bottom: 14px; flex-wrap: wrap; }
.rsv-prix strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); }
.rsv-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.rsv-accepter { margin-top: 14px; padding: 14px; border: 1px dashed var(--accent); border-radius: var(--radius-md); }
.rsv-accepter p { margin: 0 0 10px; }

.vers-liste { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.vers-ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); flex-wrap: wrap; }
.vers-ligne small { display: block; color: var(--text-mute); font-size: .8rem; margin-top: 2px; }
.vers-droite { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; font-weight: 600; }

.plan-ligne { display: grid; grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.plan-num { font-size: .8rem; color: var(--text-mute); font-weight: 600; }
.plan-outils { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }

.avis-note-select { display: flex; gap: 4px; margin-bottom: 12px; }
.avis-note-select button { background: none; border: 0; font-size: 1.9rem; line-height: 1; color: var(--line); cursor: pointer; padding: 2px 4px; }
.avis-note-select button.actif { color: var(--star); }

/* ---------- Chat privé ---------- */
.rsv-chat { display: flex; flex-direction: column; }
.chat-fil { display: flex; flex-direction: column; gap: 10px; height: clamp(300px, 52vh, 480px); overflow-y: auto; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); }
.chat-vide { margin: auto; text-align: center; color: var(--text-mute); font-size: .9rem; max-width: 30ch; }
.chat-msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; background: var(--paper-raised); border: 1px solid var(--line); }
.chat-msg.moi { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.chat-msg.autre { align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg p { margin: 2px 0; white-space: pre-wrap; line-height: 1.45; font-size: .93rem; }
.chat-nom { display: block; font-size: .72rem; font-weight: 700; opacity: .75; }
.chat-msg time { display: block; font-size: .7rem; opacity: .65; text-align: right; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.chat-form textarea { flex: 1; min-width: 0; resize: none; max-height: 120px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-raised); color: var(--text); font: inherit; }

/* ---------- Tableaux de bord : onglets défilants, formulaires ---------- */
.tabs-dashboard { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.tabs-dashboard::-webkit-scrollbar { display: none; }
.tabs-dashboard a { flex: 0 0 auto; white-space: nowrap; }
.stat-grille, .stats-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.champ-ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.champ input, .champ textarea, .champ select { max-width: 100%; }

/* ---------- Tablette ---------- */
@media (max-width: 960px) {
  .service-detail-grid, .rsv-grid { grid-template-columns: 1fr; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 640px) {
  .container, .conteneur { padding-left: 16px; padding-right: 16px; }
  .svc-card { min-height: 400px; max-height: 400px; }
  .svc-img { flex-basis: 150px; height: 150px; }
  .plan-ligne { grid-template-columns: 1fr 1fr; }
  .plan-num { grid-column: 1 / -1; }
  .plan-ligne > button, .plan-ligne > span:last-child { grid-column: 1 / -1; }
  .chat-msg { max-width: 92%; }
  .chat-fil { height: min(55vh, 420px); }
  .vers-ligne, .vers-droite { justify-content: flex-start; }
  .vers-droite .btn { width: 100%; }
  .svc-actions .btn, .cta-band .btn { width: 100%; }
  .rsv-btns .btn { flex: 1 1 100%; }
  .cta-band { flex-direction: column; align-items: flex-start; text-align: left; }
}
@media (max-width: 380px) {
  .svc-actions { flex-direction: column; }
  .btn { padding-left: 14px; padding-right: 14px; }
}


/* ---------- Négociation : propositions, accord, historique ---------- */
.rsv-accord { display: inline-block; padding: 6px 12px; margin-bottom: 12px; border-radius: 999px; background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); font-weight: 700; font-size: .85rem; }
.rsv-alerte { padding: 10px 14px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--text); font-size: .9rem; line-height: 1.5; margin: 10px 0; }
.rsv-proposition { padding: 14px; margin-bottom: 16px; border: 2px solid var(--accent); border-radius: var(--radius-md); background: var(--paper); }
.histo-haut { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.prop-liste { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.prop-liste li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); font-size: .9rem; flex-wrap: wrap; }
.rsv-histo { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.rsv-histo summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--accent-ink); }
.histo-liste { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.histo-liste li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.histo-liste small { display: block; color: var(--text-mute); }
.rsv-editeur { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.rsv-editeur h4 { margin: 0 0 6px; font-size: 1rem; }
.plan-payes { margin-bottom: 10px; padding: 8px 12px; background: var(--teal-soft); border-radius: var(--radius-md); }

/* ---------- TABLEAUX -> CARTES sur téléphone (espaces client et super admin) ---------- */
@media (max-width: 720px) {
  .tableau-wrap { overflow: visible; }
  .tableau-wrap table, .tableau-wrap tbody, .tableau-wrap tr, .tableau-wrap td { display: block; width: 100%; min-width: 0; }
  .tableau-wrap table { background: transparent; border: 0; }
  .tableau-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* masqué visuellement, lu par les lecteurs d'écran */
  .tableau-wrap tr { margin-bottom: 14px; padding: 6px 14px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
  .tableau-wrap td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border: 0; border-bottom: 1px dashed var(--line); text-align: right; font-size: .92rem; }
  .tableau-wrap td:last-child { border-bottom: 0; }
  .tableau-wrap td::before { content: attr(data-label); flex: 0 0 38%; max-width: 38%; text-align: left; font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-mute); }
  .tableau-wrap td.td-plein { display: block; text-align: center; color: var(--text-mute); }
  .tableau-wrap td.td-plein::before, .tableau-wrap td.td-actions::before { content: none; }
  .tableau-wrap td.td-actions { justify-content: flex-end; flex-wrap: wrap; }
  .tableau-wrap td.td-vide { display: none; }
  .tableau-wrap td .td-contenu { text-align: right; min-width: 0; }
  .tableau-wrap td img { max-width: 64px; }
  .tableau-wrap td .btn { flex: 0 0 auto; }
}

/* ---------- Paiement : carte (Stripe) + PayPal ---------- */
.pay-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn-paypal { background: #FFC439; color: #111; border: 1px solid #E5AC1F; font-weight: 700; }
.btn-paypal:hover:not([disabled]) { background: #F7B614; }
.btn-paypal[disabled] { background: var(--paper); color: var(--text-mute); border-color: var(--line); }

/* ---------- Chat : pièces jointes ---------- */
.chat-joindre { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-raised); color: var(--text); cursor: pointer; }
.chat-joindre:hover { border-color: var(--accent); color: var(--accent-ink); }
.chat-aide { margin: 8px 0 0; font-size: .76rem; color: var(--text-mute); line-height: 1.4; }
.chat-fil.depot { outline: 2px dashed var(--accent); outline-offset: -6px; }
.chat-prep { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chat-prep[hidden], .chat-progres[hidden] { display: none; }
.chat-puce { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 5px 8px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-raised); font-size: .8rem; }
.chat-puce .puce-nom { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-puce small { color: var(--text-mute); }
.chat-puce button { background: none; border: 0; cursor: pointer; color: var(--text-mute); font-size: .9rem; padding: 0 2px; }
.doc-ext { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: var(--accent); font-family: var(--font-mono); font-size: .68rem; font-weight: 700; }
.chat-progres { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.chat-barre { flex: 1 1 140px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.chat-barre span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.chat-progres small { color: var(--text-mute); }
.chat-pieces { display: grid; gap: 6px; margin: 6px 0 2px; }
.chat-img { display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.08); cursor: zoom-in; max-width: 240px; min-height: 60px; }
.chat-img img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.chat-img-attente { display: block; padding: 18px 12px; font-size: .8rem; opacity: .75; }
.chat-doc { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 280px; padding: 8px 10px; border: 1px solid rgba(0,0,0,.15); border-radius: 10px; background: rgba(255,255,255,.55); color: inherit; text-align: left; cursor: pointer; font: inherit; }
.chat-msg.moi .chat-doc { background: rgba(255,255,255,.35); border-color: rgba(0,0,0,.2); }
.chat-doc .doc-infos { display: grid; min-width: 0; }
.chat-doc strong { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-doc small { opacity: .75; font-size: .74rem; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(7,26,41,.88); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox button { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: #071A29; font-size: 1.1rem; cursor: pointer; }
@media (max-width: 640px) { .pay-btns { justify-content: stretch; width: 100%; } .pay-btns .btn { flex: 1 1 100%; } .chat-img, .chat-doc { max-width: 100%; } }
.chat-form textarea { min-height: 44px; line-height: 1.4; }

/* ---------- Chat : messages vocaux ---------- */
.rsv-chat.vocal-actif .chat-form { display: none; }
.chat-vocal { display: grid; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-raised); }
.chat-vocal[hidden], .vocal-ligne[hidden], .vocal-lecteur[hidden], .vocal-info[hidden] { display: none; }
.vocal-ligne { display: flex; align-items: center; gap: 10px; }
.vocal-point { width: 10px; height: 10px; border-radius: 50%; background: #D92D20; animation: vocal-pouls 1.1s ease-in-out infinite; }
@keyframes vocal-pouls { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.vocal-chrono { font-family: var(--font-mono); font-size: 1rem; }
.vocal-chrono.fin { color: #D92D20; }
.vocal-ligne small { color: var(--text-mute); }
.vocal-niveau { flex: 1 1 80px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.vocal-niveau span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.vocal-info { margin: 0; font-size: .85rem; color: var(--text-mute); }
.vocal-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chat-audio { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 300px; padding: 6px 10px 6px 6px; border: 1px solid rgba(0,0,0,.15); border-radius: 999px; background: rgba(255,255,255,.55); }
.chat-msg.moi .chat-audio { background: rgba(255,255,255,.35); border-color: rgba(0,0,0,.2); }
.vocal-lecteur .chat-audio { max-width: 100%; background: var(--paper); border-color: var(--line); }
.chat-audio .aud-play { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ink); color: var(--accent); cursor: pointer; }
.chat-audio .aud-play:disabled { opacity: .6; cursor: progress; }
.chat-audio .ico-pause, .chat-audio.lecture .ico-lire { display: none; }
.chat-audio.lecture .ico-pause { display: block; }
.chat-audio .aud-barre { flex: 1 1 60px; min-width: 40px; accent-color: var(--accent); cursor: pointer; }
.chat-audio .aud-temps { flex: 0 0 auto; font-family: var(--font-mono); font-size: .72rem; white-space: nowrap; }
.chat-audio .aud-nom { flex: 0 1 90px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; opacity: .75; }
@media (max-width: 640px) { .chat-audio { max-width: 100%; } }

/* ---------- Mode sombre : boutons pleins et pièces jointes lisibles ---------- */
/* --deep est plus sombre que le fond de page en mode sombre : les boutons pleins qui l'utilisent se fondaient dans le fond. */
[data-theme="dark"] .btn-primaire,
[data-theme="dark"] .filter-pill.active,
[data-theme="dark"] .auth-tab.active,
[data-theme="dark"] .cat-nav-pill.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
[data-theme="dark"] .btn-primaire:hover { background: #7BE3FF; color: var(--on-accent); }
/* Pièces jointes du chat : fond clair translucide + texte clair = illisible en mode sombre. */
[data-theme="dark"] .chat-doc,
[data-theme="dark"] .chat-audio { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
[data-theme="dark"] .doc-ext { background: var(--accent); color: var(--on-accent); }
[data-theme="dark"] .chat-msg.moi .doc-ext { background: #071A29; color: var(--accent); }

/* =======================================================================
   v2.4 — Formulaires centrés ; Nom/Prénom (et les autres paires) sur la
   même ligne ; une seule colonne uniquement sur très petit écran.
   ======================================================================= */
.champ-ligne, .form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row .form-group, .champ-ligne .champ { min-width: 0; }
@media (max-width: 340px) {
  .champ-ligne, .form-row { grid-template-columns: 1fr; gap: 0; }
}
.form-centre { max-width: 640px; margin: 0 auto; }
.form-card-profil { max-width: 640px; }
.form-centre .upload-photo { flex-direction: column; text-align: center; justify-content: center; gap: 12px; }
.form-centre .upload-photo-actions { display: flex; flex-direction: column; align-items: center; }
.champ-photo-inscription { flex-direction: column; justify-content: center; text-align: center; }
.champ-photo-inscription > div:last-child { display: flex; flex-direction: column; align-items: center; }
.form-centre label, .form-card-profil label { text-align: left; }
.form-hint.text-center { text-align: center; }
