/* Pages chauffeur : profil, documents, paiements, missions */

/* Programme partenaire – avantages et conditions */
.partner-benefits {
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.3));
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius, 14px);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.partner-benefits h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: var(--text, #e5e7eb);
}
.benefit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.benefit-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.benefit-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.06);
}
.benefit-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text, #e5e7eb);
}
.benefit-card p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
}
.benefit-highlight {
  font-size: 1.5rem !important;
  font-weight: 700;
  color: var(--accent, #38bdf8) !important;
  margin-bottom: 0.35rem !important;
}
.partner-conditions {
  margin-bottom: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.partner-conditions h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text, #e5e7eb);
}
.partner-conditions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.partner-conditions li {
  font-size: 0.9rem;
  color: var(--text-muted, #94a3b8);
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
}
.partner-conditions li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent, #38bdf8);
}
.partner-benefits .btn-primary {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #fff;
  border: none;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.05s ease;
}
.partner-benefits .btn-primary:hover {
  opacity: 0.95;
}

.page-content {
  flex: 1;
  padding: 1.5rem 0 2rem;
}

.page-content .container {
  max-width: 640px;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

.page-header p {
  color: var(--text-muted, #9ca3af);
  font-size: 0.95rem;
  margin: 0;
}

.page-card {
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.3));
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius, 14px);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.page-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.page-field {
  margin-bottom: 1rem;
}

.page-field:last-child {
  margin-bottom: 0;
}

.page-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted, #9ca3af);
  margin-bottom: 0.35rem;
}

.page-field-help {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  margin-top: 0.25rem;
}

.page-field .val {
  font-size: 1rem;
}

.profile-photo-field .profile-photo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.profile-photo-wrap .profile-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(148, 163, 184, 0.25);
}
.profile-photo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(148, 163, 184, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
}

.page-field input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.3));
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #e5e7eb);
  font-size: 1rem;
  box-sizing: border-box;
}

.page-field input:focus,
.page-field select:focus,
.page-field textarea:focus {
  outline: 2px solid var(--color-primary, #00d4ff);
  outline-offset: 2px;
  border-color: var(--accent, #38bdf8);
}

.page-field select,
.page-field textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.3));
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #e5e7eb);
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

.page-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.page-field select option {
  background: #0f172a;
  color: #e5e7eb;
  padding: 8px 12px;
}

.page-field textarea {
  resize: vertical;
  min-height: 80px;
}

.page-msg {
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.page-msg--success {
  color: #4ade80;
  padding: 0.5rem 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
  border-left: 3px solid #4ade80;
}

.page-msg--error {
  color: var(--danger, #ef4444);
  padding: 0.5rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border-left: 3px solid var(--danger, #ef4444);
}

/* Doc list – alignement 4 colonnes premium */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 1rem;
  flex-wrap: nowrap;
}
.doc-item:last-child { border-bottom: none; }
.doc-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}
.doc-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  flex-shrink: 0;
}
.doc-status.validated {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}
.doc-status.pending {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}
.doc-status.missing {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}
.doc-status.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}
.doc-date {
  min-width: 7rem;
  text-align: right;
  font-size: 0.9rem;
  color: var(--text-muted, #9ca3af);
  opacity: 0.9;
  flex-shrink: 0;
}
.doc-action {
  min-width: 7.5rem;
  text-align: right;
  flex-shrink: 0;
}
.btn-replace {
  display: inline-block;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.btn-replace:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}
.doc-item__file {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

@media (max-width: 767px) {
  .doc-item {
    flex-wrap: wrap;
    padding: 1rem 0;
    gap: 0.75rem;
  }
  .doc-left {
    flex: 1 1 100%;
    order: 1;
  }
  .doc-date {
    min-width: auto;
    text-align: left;
    order: 2;
    flex: 1 1 100%;
    font-size: 0.85rem;
  }
  .doc-action {
    min-width: auto;
    flex: 1 1 100%;
    order: 3;
    text-align: left;
  }
  .btn-replace {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* Toast documents */
.doc-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.25rem;
  background: rgba(34, 197, 94, 0.95);
  color: #0f172a;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: opacity 0.2s ease;
}
.doc-toast[hidden] { display: none; }

/* Doc KYC banner */
.doc-kyc-banner {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.doc-kyc-banner:empty { display: none; }
.doc-kyc-banner--draft { background: rgba(234, 179, 8, 0.15); border-left: 4px solid #facc15; color: #facc15; }
.doc-kyc-banner--pending { background: rgba(59, 130, 246, 0.15); border-left: 4px solid #60a5fa; color: #60a5fa; }
.doc-kyc-banner--rejected { background: rgba(239, 68, 68, 0.15); border-left: 4px solid #f87171; color: #f87171; }
.doc-kyc-banner--approved { background: rgba(34, 197, 94, 0.15); border-left: 4px solid #4ade80; color: #4ade80; }
.doc-kyc-banner .btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }

/* Paiement list */
.paiement-list { list-style: none; padding: 0; margin: 0; }
.paiement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.paiement-item:last-child { border-bottom: none; }
.paiement-item__date { color: var(--text-muted, #9ca3af); font-size: 0.9rem; }
.paiement-item__amount { font-weight: 600; color: #4ade80; }

/* Mission list */
.mission-list { list-style: none; padding: 0; margin: 0; }
.mission-item {
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.25));
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.5rem;
}
.mission-item:last-child { margin-bottom: 0; }
.mission-item__route { font-weight: 500; font-size: 1rem; }
.mission-item__meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; }
.mission-item__details { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(148, 163, 184, 0.15); font-size: 0.9rem; }
.mission-item__link { color: var(--accent, #38bdf8); }

/* Ticket list */
.ticket-list { list-style: none; padding: 0; margin: 0; }
.ticket-item {
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.25));
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.5rem;
}
.ticket-item:last-child { margin-bottom: 0; }
.ticket-item__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.ticket-item__cat { font-size: 0.8rem; color: var(--text-muted); }
.ticket-item__status { font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: 6px; }
.ticket-item__status--open { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.ticket-item__status--answered { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.ticket-item__status--closed { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.ticket-item__delete {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ticket-item__delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
.ticket-item__msg { font-size: 0.9rem; margin-top: 0.5rem; color: var(--text-muted); }
.ticket-item__date { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }
.ticket-attach { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }

/* Formulaire Créer un ticket */
.ticket-form .page-field { margin-bottom: 1.25rem; }
.ticket-form .page-field:last-of-type { margin-bottom: 1rem; }
.ticket-form .btn-primary { margin-top: 0.25rem; }
.label-optional { font-weight: 400; color: var(--text-muted, #94a3b8); font-size: 0.9em; }
.ticket-field-file .file-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.ticket-field-file input[type="file"] {
  font-size: 0.9rem;
  padding: 8px 12px;
  max-width: 100%;
}
.ticket-field-file .file-input-label {
  font-size: 0.9rem;
  color: var(--text-muted, #94a3b8);
}
.ticket-field-file .file-input-label.has-file {
  color: var(--text, #e5e7eb);
}
.ticket-field-file input[type="file"]::file-selector-button {
  padding: 6px 12px;
  margin-right: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.3));
  background: rgba(255, 255, 255, 0.08);
  color: var(--text, #e5e7eb);
  font-size: 0.85rem;
  cursor: pointer;
}
.ticket-field-file input[type="file"]::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Section Fiscalité & Paiements */
.fiscal-section {
  margin-bottom: 2rem;
}
.fiscal-section__title {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: var(--text, #e5e7eb);
}
.fiscal-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.fiscal-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
}
.fiscal-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent, #38bdf8);
  opacity: 0.9;
}
.fiscal-card__icon svg {
  width: 24px;
  height: 24px;
}
.fiscal-card__heading {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text, #e5e7eb);
}
.fiscal-card__body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted, #94a3b8);
}
.fiscal-card__body p {
  margin: 0 0 0.75rem;
}
.fiscal-card__body p:last-child {
  margin-bottom: 0;
}

/* Alerte informative bleu clair */
.fiscal-alert {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  color: #bae6fd;
}
.fiscal-alert__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #38bdf8;
}
.fiscal-alert__icon svg {
  width: 24px;
  height: 24px;
}
.fiscal-alert strong {
  display: block;
  color: #7dd3fc;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}
.fiscal-alert p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.95;
}

/* Bouton Demander un paiement */
.btn-paiement-request {
  margin-top: 1rem;
}

/* Modal rappel fiscal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.2s ease;
}
.modal-overlay[hidden] {
  display: none;
}
.modal-paiement {
  background: #fff;
  color: #0f172a;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  max-width: 440px;
  width: 100%;
  overflow: hidden;
}
.modal-paiement__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  padding: 1.5rem 1.5rem 0;
  color: #0f172a;
}
.modal-paiement__body {
  padding: 1.25rem 1.5rem;
}
.modal-paiement__body p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #334155;
}
.modal-paiement__body p:last-of-type {
  margin-bottom: 1rem;
}
.modal-paiement__checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
}
.modal-paiement__checkbox input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #0ea5e9;
  cursor: pointer;
}
.modal-paiement__actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #e2e8f0;
}
.modal-paiement__btn-cancel {
  flex: 1;
}
.modal-paiement__btn-confirm {
  flex: 1;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border: none;
  color: #fff;
  font-weight: 600;
}
.modal-paiement__btn-confirm:hover:not(:disabled) {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  opacity: 0.95;
}
.modal-paiement__btn-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .fiscal-section__title {
    font-size: 1.2rem;
  }
  .fiscal-card {
    padding: 1.25rem;
  }
  .fiscal-alert {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }
  .modal-paiement__actions {
    flex-direction: column;
  }
  .modal-paiement__btn-cancel,
  .modal-paiement__btn-confirm {
    width: 100%;
  }
}
