/**
 * =============================================================================
 * Fichier      : app/modules/Citoyen/assets/css/suivi-ticket.css
 * Auteur       : Régis KREMER (Baithz) — Bassin de Pompey
 * Version      : 8.0.0 (2026-01-09)
 * Objet        : Suivi ticket citoyen — REFONTE SATISFACTION À CHAUD
 * -----------------------------------------------------------------------------
 * CHANGELOG
 * -----------------------------------------------------------------------------
 * 8.0.0 (2026-01-09)
 * - [BREAKING] Refonte complète section satisfaction à chaud
 * - [ADD] Étoiles hero grandes (4rem) avec stars_calculated après soumission
 * - [ADD] Légendes explicites échelles ("Pas du tout satisfait" → "Très satisfait")
 * - [FIX] Carrés réduits (64×64px au lieu de 80×80px)
 * - [ADD] Wrapper satisfaction-scale-wrapper pour légendes gauche/droite
 * - [ADD] Détails repliables <details> pour 4 notes individuelles
 * - [SAFE] Zéro régression : toutes les sections existantes préservées
 *
 * 7.0.0 (2026-01-03)
 * - [FIX CRITIQUE] Photos/Map EXACTEMENT 250×250px côte à côte
 * - [FIX] Étoiles parfaitement centrées
 * - [FIX] .citoyen-chat-preview MASQUÉ par défaut
 * =============================================================================
 */

/* ==========================================================================
   GRID RESPONSIVE (CHAT ÉTROIT / DÉTAILS LARGES)
   ========================================================================== */
.citoyen-grid-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 992px) {
  .citoyen-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   HEADER PAGE "ESPACE CITOYEN" (MODERNE STYLE MES-TICKETS)
   ========================================================================== */
.citoyen-page-header {
  background: linear-gradient(135deg, #153875 0%, #2563a8 50%, #1e4d8b 100%);
  color: #fff;
  padding: 24px 30px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(21, 56, 117, 0.3);
  position: relative;
  overflow: hidden;
}

.citoyen-page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.citoyen-page-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

.citoyen-page-header h1::before {
  content: '👤 ';
  font-size: 1.6rem;
  margin-right: 10px;
  opacity: 0.9;
}

.citoyen-page-header p {
  margin: 10px 0 0 0;
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   HEADER TICKET (TITRE + BADGE STATUS + META)
   ========================================================================== */
.citoyen-ticket-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.citoyen-ticket-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.citoyen-ticket-title h1 {
  margin: 0;
  font-size: 1.8rem;
  color: #153875;
  font-weight: 700;
}

.badge-id {
  color: #e67e22;
  font-weight: 900;
}

.badge-status {
  padding: 6px 12px;
  border-radius: 12px;
  background: #2c3e50;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-status.status-0 { background: #6c757d; }
.badge-status.status-1 { background: #17a2b8; }
.badge-status.status-2 { background: #28a745; }

.citoyen-ticket-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-top: 10px;
}

.citoyen-ticket-meta > div {
  display: flex;
  gap: 5px;
}

.citoyen-ticket-meta span {
  color: #888;
}

.citoyen-ticket-meta strong {
  color: #333;
  font-weight: 600;
}

@media (max-width: 768px) {
  .citoyen-ticket-meta {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CHAT / ÉCHANGES
   ========================================================================== */
.citoyen-chat h2 {
  font-size: 1.2rem;
  color: #153875;
  margin: 0 0 14px 0;
  font-weight: 700;
}

.citoyen-chat-thread {
  max-height: 800px;
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  
  scrollbar-width: thin;
  scrollbar-color: #ccc #f8f9fa;
}

.citoyen-chat-thread::-webkit-scrollbar {
  width: 6px;
}
.citoyen-chat-thread::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}
.citoyen-chat-thread::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}
.citoyen-chat-thread::-webkit-scrollbar-thumb:hover {
  background-color: #bbb;
}

.chat-msg {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 12px 15px;
  font-size: 0.95rem;
  position: relative;
}

.chat-msg.self {
  background-color: #e3f2fd;
  border-color: #bbdefb;
  margin-left: 20px;
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.chat-meta .chat-author {
  font-weight: bold;
  color: #08559c;
}

.chat-msg.self .chat-meta .chat-author {
  color: #0277bd;
}

.chat-meta .chat-date {
  font-size: 0.8em;
  color: #777;
}

.chat-text {
  margin-top: 6px;
  line-height: 1.4;
  word-wrap: break-word;
}

.comment-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.comment-gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.1);
  cursor: zoom-in;
  transition: transform 0.2s;
  background: #fff;
}

.comment-gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 5;
}

.comment-gallery-grid:has(img:only-child) {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  max-width: 200px;
}

/* ==========================================================================
   FORMULAIRE CHAT
   ========================================================================== */
.citoyen-chat-form {
  position: relative;
}

.chat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 25px;
  padding: 6px 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  padding: 8px !important;
  font-size: 0.95rem;
  font-family: inherit;
}

.chat-btn,
.chat-btn-photo,
.chat-btn-send {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-btn:hover,
.chat-btn-photo:hover,
.chat-btn-send:hover {
  transform: scale(1.1);
}

.chat-btn img,
.chat-btn-photo img,
.chat-btn-send img {
  width: 36px;
  height: 36px;
}

/* PREVIEW FICHIERS - MASQUÉ PAR DÉFAUT */
.chat-preview {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 12px;
  background: rgba(33, 37, 41, 0.9);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px 6px 6px 0;
  font-size: 0.85rem;
  margin-bottom: 6px;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10;
  max-width: 90%;
}

.chat-preview:not([hidden]) {
  display: flex;
}

.chat-preview .preview-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1;
  padding: 0;
}

/* ==========================================================================
   DÉTAILS (COLONNE DROITE - LARGE)
   ========================================================================== */
.citoyen-details h2 {
  font-size: 1.2rem;
  color: #153875;
  margin: 0 0 14px 0;
  font-weight: 700;
}

.detail-row {
  margin-bottom: 14px;
  line-height: 1.5;
}

.detail-row .label {
  font-weight: 700;
  color: #203858;
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.detail-row .value {
  color: #27314c;
}

.detail-row.description-row .value {
  background: #f7fafd;
  border-radius: 8px;
  padding: 15px;
  border-left: 3px solid #dae9f8;
  display: block;
  margin-top: 6px;
  line-height: 1.6;
}

/* ==========================================================================
   MÉDIAS (PHOTOS + CARTE) - 250×250px CÔTE À CÔTE ALIGNÉS
   ========================================================================== */
.citoyen-media {
  display: grid;
  grid-template-columns: 250px 250px;
  gap: 16px;
  margin-top: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .citoyen-media {
    grid-template-columns: 1fr;
  }
}

.citoyen-photos h3,
.citoyen-map h3 {
  font-size: 1rem;
  color: #153875;
  margin-bottom: 12px;
  font-weight: 700;
}

.citoyen-photos,
.citoyen-map {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 250px;
}

/* PHOTO PRINCIPALE - 250×250px CARRÉ STRICT */
.photo-main {
  display: block;
  width: 250px !important;
  height: 250px !important;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
  cursor: zoom-in;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background-color: #f0f0f0;
  transition: filter 0.2s;
}

.photo-main:hover {
  filter: brightness(1.03);
}

/* MINIATURES */
.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thumb {
  height: 70px;
  width: 70px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s;
}

.thumb:hover {
  opacity: 1;
  transform: scale(1.05);
  border-color: #aaa;
}

/* PLACEHOLDER */
.no-photo-placeholder {
  width: 250px !important;
  height: 250px !important;
  background: #f9fafb;
  border: 1px dashed #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 1.1em;
}

/* CARTE - 250×250px FIXE */
.citoyen-mapbox,
#ticketMap {
  width: 250px !important;
  height: 250px !important;
  min-height: 250px !important;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  box-sizing: border-box;
  overflow: hidden;
  background: #f0f0f0;
}

/* ==========================================================================
   AVIS / FEEDBACK - ÉTOILES CENTRÉES
   ========================================================================== */
.citoyen-feedback h2 {
  font-size: 1.2rem;
  color: #153875;
  margin: 0 0 14px 0;
  font-weight: 700;
}

.stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0;
}

.star {
  font-size: 32px;
  line-height: 1;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8f9fa;
  color: #ccc;
  cursor: pointer;
  transition: all 0.2s;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.star:hover:not(:disabled) {
  background: #fff3cd;
  border-color: #e67e22;
  transform: scale(1.1);
}

.star.on {
  background: #e67e22;
  border-color: #e67e22;
  color: #fff;
}

.star:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.feedback-comment {
  background: #f7fafd;
  border-left: 3px solid #dae9f8;
  border-radius: 8px;
  padding: 12px 15px;
  margin-top: 12px;
  line-height: 1.5;
  color: #333;
}

.feedback-readonly {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* ==========================================================================
   LIENS / NAVIGATION
   ========================================================================== */
.citoyen-links {
  text-align: center;
  padding: 16px;
}

.citoyen-links a {
  display: inline-block;
}

.citoyen-header-right {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   TOAST
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast-success { background-color: #28a745; }
.toast-error   { background-color: #dc3545; }

/* ==========================================================================
   VIEWER PHOTOS
   ========================================================================== */
.viewer-container { z-index: 120000 !important; }
.viewer-backdrop  { z-index: 119990 !important; }
body.viewer-open { overflow: hidden; }

/* ==========================================================================
   Chat: différencier "Vous" vs interlocuteur
   ========================================================================== */
.citoyen-chat-thread .chat-msg {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f8fb;
  border: 1px solid rgba(0,0,0,0.06);
}

.citoyen-chat-thread .chat-msg.self {
  margin-left: auto;
  background: #eaf3ff;
  border-color: rgba(0, 70, 160, 0.12);
}

.citoyen-chat-thread .chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.citoyen-chat-thread .chat-msg.self .chat-author {
  color: #0b5bd3;
  font-weight: 700;
}

.citoyen-chat-thread .chat-msg:not(.self) .chat-author {
  color: #163a6b;
  font-weight: 700;
}

.citoyen-chat-thread .chat-date {
  opacity: 0.65;
  font-size: 0.85rem;
}

/* Badge lecture (Lu / Non lu) */
.badge-read{
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.12);
  white-space: nowrap;
}

.badge-read.read{
  background: rgba(0, 160, 90, .10);
  color: #0b6b3a;
  border-color: rgba(0, 160, 90, .25);
}

.badge-read.unread{
  background: rgba(255, 140, 0, .12);
  color: #8a4b00;
  border-color: rgba(255, 140, 0, .30);
}

.badge-read.unread[data-mark-read="1"]{
  cursor: pointer;
  user-select: none;
}
.badge-read.unread[data-mark-read="1"]:hover{
  filter: brightness(0.98);
}

/* ==========================================================================
   SATISFACTION "À CHAUD" V10.0 — CARRÉS RÉDUITS + ÉTOILES LIVE
   ========================================================================== */

.citoyen-satisfaction {
  margin-top: 32px;
}

.satisfaction-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
}

.satisfaction-header-text h2 {
  margin: 0 0 8px 0;
  font-size: 1.75rem;
  font-weight: 900;
  color: #153875;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.satisfaction-intro {
  margin: 0;
  color: #6b7280;
  font-size: 1.05rem;
  line-height: 1.6;
}

.satisfaction-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  color: #ff8c00;
  opacity: 0.9;
  filter: drop-shadow(0 4px 8px rgba(255, 140, 0, 0.2));
}

.satisfaction-unavailable {
  padding: 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  text-align: center;
  font-size: 1.05rem;
  color: #6b7280;
}

/* FORMULAIRE */
.satisfaction-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ⭐ ÉTOILES LIVE (affichage note globale calculée) */
.satisfaction-live-preview {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 3px solid #fb923c;
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(251, 146, 60, 0.25);
  margin-bottom: 24px;
  display: block !important; /* TOUJOURS VISIBLE */
  opacity: 0.5; /* Grisé au début */
  transition: opacity 0.3s ease;
}

.satisfaction-live-preview.has-notes {
  opacity: 1; /* Opaque quand notes renseignées */
}

.live-preview-label {
  font-size: 1rem;
  font-weight: 800;
  color: #9a3412;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.live-preview-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.star-live {
  font-size: 3.5rem;
  line-height: 1;
  color: #d1d5db;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.star-live.active {
  color: #f59e0b;
  text-shadow: 
    0 0 20px rgba(245, 158, 11, 0.6),
    0 4px 12px rgba(245, 158, 11, 0.4);
  animation: star-glow 1s ease-in-out;
}

@keyframes star-glow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.live-preview-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: #ea580c;
  margin: 10px 0 8px 0;
  text-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
}

.live-preview-hint {
  font-size: 0.9rem;
  color: #9a3412;
  font-style: italic;
  opacity: 0.85;
}

/* QUESTIONS */
.satisfaction-question {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.satisfaction-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #1f2937;
  letter-spacing: -0.3px;
}

.label-text {
  flex: 1;
}

.label-required {
  color: #dc2626;
  font-weight: 900;
  font-size: 1.2rem;
}

.label-optional {
  font-size: 0.9rem;
  font-weight: 500;
  color: #9ca3af;
  font-style: italic;
}

/* ÉCHELLES MODERNES (5 carrés 56×56px) */
.satisfaction-scale-modern {
  display: grid;
  grid-template-columns: repeat(5, 56px);
  gap: 12px;
  justify-content: start;
}

.scale-btn-modern {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* Tooltip hover */
.scale-btn-modern::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding: 6px 12px;
  background: #1f2937;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.scale-btn-modern::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #1f2937;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.scale-btn-modern:hover {
  border-color: #ff8c00;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 8px 20px rgba(255, 140, 0, 0.2),
    0 0 0 3px rgba(255, 140, 0, 0.1);
  background: linear-gradient(135deg, #fff 0%, #fffbf5 100%);
}

.scale-btn-modern:hover::before,
.scale-btn-modern:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.scale-btn-modern.active {
  background: linear-gradient(135deg, #ff8c00 0%, #ff9d1f 100%);
  border-color: #ff8c00;
  color: #fff;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 
    0 12px 28px rgba(255, 140, 0, 0.35),
    0 0 0 3px rgba(255, 140, 0, 0.2);
}

.scale-btn-modern.active::before,
.scale-btn-modern.active::after {
  opacity: 0;
}

.scale-btn-modern .scale-number {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-btn-modern:hover .scale-number {
  transform: scale(1.12);
}

.scale-btn-modern.active .scale-number {
  transform: scale(1.15);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

@keyframes pulse-select {
  0%, 100% { transform: translateY(-3px) scale(1.08); }
  50% { transform: translateY(-3px) scale(1.12); }
}

.scale-btn-modern.active {
  animation: pulse-select 0.5s ease;
}

/* Textarea commentaire FIXE */
.satisfaction-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: #1f2937;
  background: #ffffff;
  resize: vertical;
  transition: all 0.3s ease;
  line-height: 1.6;
  box-sizing: border-box;
}

.satisfaction-form textarea:focus {
  outline: none;
  border-color: #ff8c00;
  box-shadow: 
    0 0 0 3px rgba(255, 140, 0, 0.1),
    0 4px 12px rgba(255, 140, 0, 0.15);
  background: #fffbf5;
}

.satisfaction-form textarea::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* Bouton submit */
.satisfaction-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-submit-satisfaction {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff8c00 0%, #ff9d1f 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 16px rgba(255, 140, 0, 0.25);
}

.btn-submit-satisfaction:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 140, 0, 0.35);
  background: linear-gradient(135deg, #ff9d1f 0%, #ffb03a 100%);
}

.btn-submit-satisfaction:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(255, 140, 0, 0.2);
}

.btn-submit-satisfaction svg {
  width: 20px;
  height: 20px;
}

/* Messages status */
.satisfaction-status {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  display: none;
  text-align: center;
}

.satisfaction-status:not(:empty) {
  display: block;
}

.satisfaction-status.ok {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border: 2px solid #b1dfbb;
}

.satisfaction-status.error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border: 2px solid #f5c6cb;
}

.satisfaction-status.pending {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  color: #856404;
  border: 2px solid #ffeaa7;
}

/* LECTURE SEULE (identique, rien à changer) */
.satisfaction-readonly {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.satisfaction-thank {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1.05rem;
  border: 2px solid #b1dfbb;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.satisfaction-thank svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.satisfaction-stars-hero {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 4px solid #fb923c;
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 
    0 16px 40px rgba(251, 146, 60, 0.25),
    inset 0 -2px 0 rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.satisfaction-stars-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  pointer-events: none;
}

.stars-hero-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: #9a3412;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

.stars-hero-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.star-hero {
  font-size: 4.5rem;
  line-height: 1;
  color: #d1d5db;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

.star-hero.active {
  color: #f59e0b;
  text-shadow: 
    0 0 20px rgba(245, 158, 11, 0.6),
    0 4px 12px rgba(245, 158, 11, 0.4);
}

.star-hero.half {
  background: linear-gradient(90deg, #f59e0b 50%, #d1d5db 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stars-hero-value {
  font-size: 3rem;
  font-weight: 900;
  color: #ea580c;
  margin: 12px 0;
  text-shadow: 0 4px 8px rgba(234, 88, 12, 0.3);
  position: relative;
  z-index: 1;
}

.stars-hero-hint {
  font-size: 0.95rem;
  color: #9a3412;
  font-style: italic;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.satisfaction-details {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 24px;
  transition: all 0.3s ease;
}

.satisfaction-details[open] {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.satisfaction-details-toggle {
  cursor: pointer;
  user-select: none;
  font-weight: 800;
  font-size: 1.05rem;
  color: #153875;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  list-style: none;
  transition: all 0.3s ease;
}

.satisfaction-details-toggle:hover {
  color: #ff8c00;
}

.satisfaction-details-toggle::-webkit-details-marker {
  display: none;
}

.satisfaction-details-toggle svg {
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #9ca3af;
}

.satisfaction-details[open] .satisfaction-details-toggle svg {
  transform: rotate(180deg);
  color: #ff8c00;
}

.satisfaction-details .satisfaction-results {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.satisfaction-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.satisfaction-result-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.result-label {
  font-weight: 800;
  color: #1f2937;
  font-size: 1rem;
}

.result-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.result-star {
  font-size: 1.3rem;
  color: #d1d5db;
  transition: all 0.2s ease;
}

.result-star.active {
  color: #fbbf24;
  filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.4));
}

.result-value {
  margin-left: 10px;
  font-weight: 900;
  font-size: 1.1rem;
  color: #ff8c00;
}

.satisfaction-comment {
  padding: 20px 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 16px;
  border-left: 6px solid #ff8c00;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.satisfaction-comment strong {
  display: block;
  margin-bottom: 10px;
  color: #153875;
  font-size: 1.05rem;
  font-weight: 800;
}

.satisfaction-comment p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
  font-size: 0.98rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .satisfaction-header {
    flex-direction: column;
    gap: 20px;
  }

  .satisfaction-icon {
    align-self: center;
    width: 48px;
    height: 48px;
  }

  .satisfaction-scale-modern {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

  .scale-btn-modern {
    width: 100%;
    height: 52px;
  }

  .scale-btn-modern .scale-number {
    font-size: 1.5rem;
  }

  .scale-btn-modern::before,
  .scale-btn-modern::after {
    display: none;
  }

  .satisfaction-result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .star-live {
    font-size: 2.8rem;
  }

  .live-preview-value {
    font-size: 2rem;
  }

  .star-hero {
    font-size: 3.5rem;
  }

  .stars-hero-value {
    font-size: 2.5rem;
  }

  .satisfaction-stars-hero,
  .satisfaction-live-preview {
    padding: 28px 20px;
  }
}

/* ==========================================================================
   LECTURE SEULE (READONLY) — ÉTOILES HERO
   ========================================================================== */

.satisfaction-readonly {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.satisfaction-thank {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #d4edda;
  color: #155724;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
}

.satisfaction-thank svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ⭐ ÉTOILES GRANDES (HERO) */
.satisfaction-stars-hero {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 3px solid #fb923c;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(251, 146, 60, 0.2);
}

.stars-hero-label {
  font-size: 1rem;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stars-hero-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.star-hero {
  font-size: 4rem;
  line-height: 1;
  color: #d1d5db;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.star-hero.active {
  color: #f59e0b;
  text-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.star-hero.half {
  background: linear-gradient(90deg, #f59e0b 50%, #d1d5db 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stars-hero-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: #ea580c;
  margin: 8px 0;
  text-shadow: 0 2px 4px rgba(234, 88, 12, 0.2);
}

.stars-hero-hint {
  font-size: 0.9rem;
  color: #9a3412;
  font-style: italic;
  opacity: 0.85;
}

/* Détails repliables */
.satisfaction-details {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 20px;
}

.satisfaction-details[open] {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.satisfaction-details-toggle {
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 1rem;
  color: #153875;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  list-style: none;
}

.satisfaction-details-toggle::-webkit-details-marker {
  display: none;
}

.satisfaction-details-toggle svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.satisfaction-details[open] .satisfaction-details-toggle svg {
  transform: rotate(180deg);
}

.satisfaction-details .satisfaction-results {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.satisfaction-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.result-label {
  font-weight: 700;
  color: #1f2937;
  font-size: 0.95rem;
}

.result-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.result-star {
  font-size: 1.2rem;
  color: #d1d5db;
}

.result-star.active {
  color: #fbbf24;
}

.result-value {
  margin-left: 8px;
  font-weight: 800;
  font-size: 1rem;
  color: #ff8c00;
}

.satisfaction-comment {
  padding: 16px 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #ff8c00;
}

.satisfaction-comment strong {
  display: block;
  margin-bottom: 8px;
  color: #153875;
  font-size: 1rem;
}

.satisfaction-comment p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {
  .citoyen-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .citoyen-ticket-title {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .citoyen-ticket-title h1 {
    font-size: 1.5rem;
  }
  
  .badge-status {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
  
  .chat-row {
    padding: 4px 8px;
  }
  
  .chat-btn img,
  .chat-btn-photo img,
  .chat-btn-send img {
    width: 32px;
    height: 32px;
  }
  
  .stars {
    gap: 4px;
  }
  
  .star {
    font-size: 24px;
    width: 42px;
    height: 42px;
    padding: 8px 10px;
  }
  
  .photo-main,
  .no-photo-placeholder,
  .citoyen-mapbox,
  #ticketMap {
    width: 100% !important;
    max-width: 300px !important;
    height: 300px !important;
    min-height: 300px !important;
  }

  .citoyen-photos,
  .citoyen-map {
    width: 100%;
  }

  .citoyen-media {
    grid-template-columns: 1fr;
  }

  .thumb {
    height: 60px;
    width: 60px;
  }

  /* Satisfaction responsive */
  .satisfaction-header {
    flex-direction: column;
    gap: 16px;
  }

  .satisfaction-icon {
    align-self: center;
  }

  .satisfaction-scale-wrapper {
    flex-direction: column;
    gap: 12px;
  }

  .scale-legend {
    text-align: center !important;
    min-width: unset;
  }

  .scale-btn {
    width: 56px;
    height: 56px;
    padding: 6px;
  }

  .scale-number {
    font-size: 1.3rem;
  }

  .scale-emoji {
    font-size: 1.4rem;
  }

  .satisfaction-result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .star-hero {
    font-size: 3rem;
  }

  .stars-hero-value {
    font-size: 2rem;
  }

  .satisfaction-stars-hero {
    padding: 24px 16px;
  }
}