/* ============================================================
   VQ.css — Veilleur de quai (Dock Watcher)
   Module Marina GroupMaker
   ============================================================ */

/* === Page layout === */
.VQ-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* === Hero === */
.VQ-hero {
  text-align: center;
  padding: 32px 16px 24px;
}
.VQ-hero-chip {
  display: inline-block;
  background: rgba(231, 76, 60, .1);
  color: #c0392b;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.VQ-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text, #1f2a44);
  margin: 0 0 8px;
}
.VQ-hero-subtitle {
  font-size: .95rem;
  color: var(--muted, #5a6a85);
  margin: 0 0 20px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.VQ-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

/* === Distress button (VHF style) === */
.VQ-distress-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 56px;
  min-height: 56px;
  padding: 12px 24px;
  border-radius: 50px;
  background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  border: 3px solid rgba(255, 255, 255, .3);
  box-shadow:
    0 4px 20px rgba(231, 76, 60, .35),
    0 0 0 4px rgba(231, 76, 60, .12);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
  line-height: 1.2;
}
.VQ-distress-btn:hover,
.VQ-distress-btn:focus-visible {
  transform: scale(1.06);
  box-shadow:
    0 6px 28px rgba(231, 76, 60, .5),
    0 0 0 6px rgba(231, 76, 60, .18);
  text-decoration: none;
  color: #fff;
}
.VQ-distress-btn:active { transform: scale(.97); }

/* Variante ronde (icône seule, dans capitainerie) */
.VQ-distress-btn--round {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.5rem;
}

/* === Back link === */
.VQ-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--muted, #5a6a85);
  text-decoration: none;
  margin-bottom: 12px;
}
.VQ-back:hover { color: var(--brand, #20466e); }

/* === Section titles === */
.VQ-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text, #1f2a44);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(47, 111, 237, .12);
}

/* === Request cards list === */
.VQ-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.VQ-card {
  background: var(--card-bg, #fff);
  border-radius: var(--radius, 12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  padding: 16px 18px;
  border-left: 4px solid var(--brand, #20466e);
  transition: box-shadow .15s ease;
}
.VQ-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

/* Urgency borders */
.VQ-card--normal   { border-left-color: #27ae60; }
.VQ-card--urgent   { border-left-color: #f39c12; }
.VQ-card--tempete  { border-left-color: #e74c3c; background: rgba(231, 76, 60, .03); }

.VQ-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.VQ-card-boat {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #1f2a44);
}
.VQ-card-owner {
  font-size: .8rem;
  color: var(--muted, #5a6a85);
  margin-top: 2px;
}
.VQ-card-meta {
  font-size: .8rem;
  color: var(--muted, #7a8aa5);
  margin-top: 6px;
}
.VQ-card-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* === Status badges === */
.VQ-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.VQ-badge--open      { background: #27ae60; color: #fff; }
.VQ-badge--taken     { background: #f39c12; color: #fff; }
.VQ-badge--completed { background: #7f8c8d; color: #fff; }
.VQ-badge--cancelled { background: #bdc3c7; color: #555; }

/* Urgency badges */
.VQ-badge--urgence-normal  { background: #27ae60; color: #fff; }
.VQ-badge--urgence-urgent  { background: #f39c12; color: #fff; }
.VQ-badge--urgence-tempete { background: #e74c3c; color: #fff; }

/* === Form === */
.VQ-form {
  background: var(--card-bg, #fff);
  border-radius: var(--radius, 12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  padding: 24px;
  margin-top: 16px;
}
.VQ-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text, #1f2a44);
  margin: 0 0 18px;
}
.VQ-field {
  margin-bottom: 16px;
}
.VQ-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text, #1f2a44);
  margin-bottom: 5px;
}
.VQ-input,
.VQ-textarea,
.VQ-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bd, #d1d5db);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  background: var(--card-bg, #fff);
  transition: border-color .15s;
}
.VQ-input:focus,
.VQ-textarea:focus {
  border-color: var(--ok, #2f6fed);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.VQ-textarea { min-height: 90px; resize: vertical; }

/* === Radio group (urgence) === */
.VQ-radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.VQ-radio-card {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 10px 8px;
  border: 2px solid var(--bd, #d1d5db);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: .85rem;
  font-weight: 600;
}
.VQ-radio-card:has(input:checked) {
  border-color: var(--ok, #2f6fed);
  background: rgba(47, 111, 237, .06);
}
.VQ-radio-card input { display: none; }

/* === Authorization checkboxes === */
.VQ-auth-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.VQ-auth-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 2px solid var(--bd, #d1d5db);
  border-radius: 10px;
  cursor: pointer;
  font-size: .85rem;
  transition: border-color .15s, background .15s;
}
.VQ-auth-chip:has(input:checked) {
  border-color: #27ae60;
  background: rgba(39, 174, 96, .06);
}
.VQ-auth-chip input[type="checkbox"] {
  accent-color: #27ae60;
}

/* === Checklist builder === */
.VQ-checklist-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.VQ-checklist-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.VQ-checklist-row .VQ-input { flex: 1; }
.VQ-checklist-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #e74c3c;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.VQ-checklist-remove:hover { background: #c0392b; }
.VQ-checklist-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  color: var(--ok, #2f6fed);
  background: none;
  border: 1px dashed var(--ok, #2f6fed);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
}
.VQ-checklist-add:hover { background: rgba(47, 111, 237, .06); }

/* Preset chips */
.VQ-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.VQ-preset-chip {
  font-size: .78rem;
  padding: 4px 10px;
  border-radius: 16px;
  border: 1px solid var(--bd, #d1d5db);
  background: var(--surface-2, #f8f9fa);
  cursor: pointer;
  transition: background .15s;
}
.VQ-preset-chip:hover { background: var(--surface-2, #eef1f5); }
.VQ-preset-chip.active {
  background: var(--ok, #2f6fed);
  color: #fff;
  border-color: var(--ok, #2f6fed);
}

/* === Legal clause === */
.VQ-clause-box {
  border: 1px solid var(--bd, #d1d5db);
  border-radius: var(--radius, 12px);
  padding: 16px;
  background: rgba(47, 111, 237, .03);
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 10px;
}
.VQ-clause-box h4 {
  font-size: .9rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text, #1f2a44);
}
.VQ-clause-box p,
.VQ-clause-box ul {
  font-size: .82rem;
  color: var(--muted, #4a5568);
  line-height: 1.5;
  margin: 0 0 8px;
}
.VQ-clause-box ul {
  padding-left: 18px;
}
.VQ-clause-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text, #1f2a44);
  margin-top: 4px;
}
.VQ-clause-check input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--ok, #2f6fed);
}

/* === Submit button === */
.VQ-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 28px;
  background: var(--ok, #2f6fed);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.VQ-submit:hover { background: var(--brand-2, #1a5cd4); }
.VQ-submit--danger {
  background: #e74c3c;
}
.VQ-submit--danger:hover { background: #c0392b; }
.VQ-submit--ghost {
  background: transparent;
  color: #e74c3c;
  border: 1px solid #e74c3c;
}
.VQ-submit--ghost:hover { background: rgba(231, 76, 60, .06); }

/* === Detail page === */
.VQ-detail-card {
  background: var(--card-bg, #fff);
  border-radius: var(--radius, 12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  padding: 24px;
}
.VQ-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.VQ-detail-field-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted, #7a8aa5);
  margin-bottom: 3px;
}
.VQ-detail-field-value {
  font-size: .95rem;
  color: var(--text, #1f2a44);
}

/* === Checklist read-only (owner request — NOT interactive) === */
.VQ-checklist-readonly {
  list-style: none;
  padding: 0;
  margin: 0;
}
.VQ-checklist-readonly li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 4px;
  background: var(--surface-2, #f8f9fb);
  border-radius: 8px;
  font-size: .88rem;
  color: var(--text, #1f2a44);
}
.VQ-checklist-bullet {
  color: #2980b9;
  font-size: 1rem;
  flex-shrink: 0;
}

/* === Checklist in report (interactive + completed view) === */
.VQ-checklist-report {
  list-style: none;
  padding: 0;
  margin: 0;
}
.VQ-checklist-report li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--bd, #f0f0f0);
  font-size: .88rem;
}
.VQ-checklist-report li:last-child { border-bottom: none; }

/* === Report photos grid === */
.VQ-report-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.VQ-report-photo {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
}
.VQ-report-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === Audio recorder === */
.VQ-audio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.VQ-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px solid #e74c3c;
  border-radius: 24px;
  background: var(--card-bg, #fff);
  color: #e74c3c;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.VQ-audio-btn:hover {
  background: #e74c3c;
  color: #fff;
}
.VQ-audio-btn.recording {
  background: #e74c3c;
  color: #fff;
  animation: vq-pulse 1s ease-in-out infinite;
}
@keyframes vq-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, .4); }
  50%      { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}
.VQ-audio-preview {
  margin-top: 8px;
}
.VQ-audio-preview audio {
  max-width: 100%;
  height: 36px;
}

/* === Media buttons row (gallery + camera + video) === */
.VQ-media-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.VQ-media-btn {
  font-size: .85rem !important;
  padding: 10px 16px !important;
}

/* Capture buttons (camera / video) — always visible for reliability
   (CSS media query (hover:none)+(pointer:coarse) doesn't match all mobile devices) */
.VQ-media-btn--capture {
  display: inline-flex !important;
}

/* === Photo & video previews (before upload) === */
.VQ-photo-previews {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.VQ-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--bd, #d1d5db);
  position: relative;
}
.VQ-photo-preview img,
.VQ-photo-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.VQ-video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1.2rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
  pointer-events: none;
}

/* === Report video display === */
.VQ-report-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* === Alert feedback === */
.VQ-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .88rem;
  margin-bottom: 16px;
}
.VQ-alert--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.VQ-alert--error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.VQ-alert--info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* === Points / badge inline === */
.VQ-points-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  font-weight: 700;
  color: #f39c12;
}

/* ============================================================
   FLOATING ACTION BAR (index marina)
   Barre flottante sous le header — boutons flash marina
   Anticipé pour 2+ boutons côte à côte
   ============================================================ */
.VQ-flash-bar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: linear-gradient(135deg, #0b1e30 0%, #142e4a 50%, #0f2942 100%);
  box-shadow: 0 6px 28px rgba(15, 41, 66, .45);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: vqFlashSlide .4s ease-out;
}
.VQ-flash-bar[hidden] { display: none; }

/* Floating mode: fixed under header when reopened mid-page, settles back on scroll-up */
.VQ-flash-bar--floating {
  position: fixed !important;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 1200;
}

@keyframes vqFlashSlide {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Individual flash button */
.VQ-flash-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  border-radius: 60px;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
  border: 3px solid rgba(255, 255, 255, .3);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: .02em;
}
.VQ-flash-btn:hover,
.VQ-flash-btn:focus-visible {
  transform: scale(1.06);
  text-decoration: none;
}
.VQ-flash-btn:active { transform: scale(.96); }

/* Variant: check bateau (red/orange distress + halo pulsant) */
.VQ-flash-btn--check {
  background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
  color: #fff;
  box-shadow:
    0 4px 20px rgba(231, 76, 60, .45),
    0 0 0 5px rgba(243, 156, 18, .18);
  animation: vqHaloPulse 2s ease-in-out infinite;
}
.VQ-flash-btn--check:hover {
  box-shadow:
    0 6px 32px rgba(231, 76, 60, .6),
    0 0 0 8px rgba(243, 156, 18, .25);
  color: #fff;
  animation: none;
}

@keyframes vqHaloPulse {
  0%, 100% {
    box-shadow:
      0 4px 20px rgba(231, 76, 60, .45),
      0 0 0 5px rgba(243, 156, 18, .18);
  }
  50% {
    box-shadow:
      0 6px 30px rgba(231, 76, 60, .6),
      0 0 0 12px rgba(243, 156, 18, .12),
      0 0 40px rgba(243, 156, 18, .08);
  }
}

/* Variant: future aide/coup de main (blue) — ready for next sprint */
.VQ-flash-btn--aide {
  background: linear-gradient(135deg, #2980b9 0%, #6dd5fa 100%);
  color: #fff;
  box-shadow:
    0 3px 14px rgba(41, 128, 185, .4),
    0 0 0 3px rgba(41, 128, 185, .1);
}
.VQ-flash-btn--aide:hover {
  box-shadow:
    0 5px 22px rgba(41, 128, 185, .55),
    0 0 0 5px rgba(41, 128, 185, .15);
  color: #fff;
}

/* Profile completion flash button */
.VQ-flash-btn--profil {
  background: linear-gradient(135deg, #059669 0%, #34d399 100%);
  color: #fff;
  border-color: rgba(5, 150, 105, .25);
}
.VQ-flash-btn--profil:hover {
  box-shadow:
    0 5px 22px rgba(5, 150, 105, .55),
    0 0 0 5px rgba(5, 150, 105, .15);
  color: #fff;
}

/* Notifications flash button */
.VQ-flash-btn--notif {
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  color: #fff;
  border-color: rgba(139, 92, 246, .25);
}
.VQ-flash-btn--notif:hover {
  box-shadow:
    0 5px 22px rgba(139, 92, 246, .55),
    0 0 0 5px rgba(139, 92, 246, .15);
  color: #fff;
}

/* Icon inside flash button */
.VQ-flash-btn-icon {
  font-size: 1.6rem;
  line-height: 1;
}

/* Badge/pastille count on flash button */
.VQ-flash-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  background: #fff;
  color: #e74c3c;
  font-size: .8rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  animation: vqBadgeBounce 1s ease-in-out infinite alternate;
}
@keyframes vqBadgeBounce {
  0%   { transform: scale(1); }
  100% { transform: scale(1.12); }
}

/* Languette (fermer / ouvrir) — même emplacement */
.VQ-flash-tab-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 20px;
}
.VQ-flash-tab {
  border: none;
  background: #142e4a;
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 18px;
  border-radius: 0 0 12px 12px;
  transition: background .15s, color .15s;
}
.VQ-flash-tab svg {
  width: 18px;
  height: 18px;
}
.VQ-flash-tab:hover {
  background: #1a3a5c;
  color: #fff;
}
.VQ-flash-tab[hidden] { display: none; }

/* Reopen button (languette fixe sous le header, même emplacement visuel) */
.VQ-flash-reopen {
  position: fixed;
  top: 48px;
  right: 20px;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #142e4a;
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  padding: 5px 18px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
  transition: background .15s, color .15s;
}
.VQ-flash-reopen svg {
  width: 18px;
  height: 18px;
}
.VQ-flash-reopen:hover {
  background: #1a3a5c;
  color: #fff;
}
.VQ-flash-reopen[hidden] { display: none !important; }
.VQ-flash-tab-row[hidden] { display: none !important; }

@keyframes vqReopenFade {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 600px) {
  .VQ-detail-grid { grid-template-columns: 1fr; }
  .VQ-radio-group { flex-direction: column; }
  .VQ-auth-group  { flex-direction: column; }
  .VQ-distress-btn { padding: 10px 18px; font-size: .85rem; }
  .VQ-report-photos { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .VQ-form { padding: 16px; }

  /* Flash bar responsive */
  .VQ-flash-bar {
    padding: 12px 44px 12px 14px;
    gap: 10px;
  }
  .VQ-flash-btn {
    padding: 14px 24px;
    font-size: 1.05rem;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }
  .VQ-flash-btn-icon { font-size: 1.4rem; }
}
