.recours-page {
  min-height: calc(100vh - 52px);
  background: #f1f5f9;
  padding: 2rem 1rem 3rem;
}
@media (max-width: 575.98px) {
  .recours-page {
    padding: 1rem 0.5rem 2rem;
  }
}

.recours-container {
  max-width: 820px;
  margin: 0 auto;
}

.recours-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.recours-header {
  background: linear-gradient(135deg, #5a1f28 0%, #722f37 60%, #8b3a46 100%);
  border-bottom: 3px solid #c9a84c;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (max-width: 575.98px) {
  .recours-header {
    padding: 1.25rem 1.25rem;
  }
}

.recours-header__left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.recours-header__icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #c9a84c;
  box-shadow: 0 0 14px rgba(201, 168, 76, 0.2);
}
@media (max-width: 575.98px) {
  .recours-header__icon {
    display: none;
  }
}

.recours-header__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.2rem;
  line-height: 1.25;
}
@media (max-width: 575.98px) {
  .recours-header__title {
    font-size: 1rem;
  }
}

.recours-header__subtitle {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.recours-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s;
}
.recours-header__back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

.recours-body {
  padding: 2rem;
}
@media (max-width: 575.98px) {
  .recours-body {
    padding: 1.25rem 1rem;
  }
}

.rf-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rf-section:hover {
  border-color: rgb(80.7183600713%, 84.7076648841%, 90.0267379679%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
@media (max-width: 575.98px) {
  .rf-section {
    padding: 1.1rem 1rem;
    margin-bottom: 1rem;
  }
}

.rf-section__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px dashed #e2e8f0;
}

.rf-section__num {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 6px;
  background: #1a2e4a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.rf-section__num--opt {
  background: #94a3b8;
}

.rf-section__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a2e4a;
}

.rf-section__hint {
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 1.1rem;
  line-height: 1.5;
}

.rf-required {
  color: #e53e3e;
  font-size: 0.85rem;
  margin-left: 2px;
}

.rf-optional {
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #6b7280;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  margin-left: 4px;
}

.rf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}
@media (max-width: 575.98px) {
  .rf-grid-2 {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.rf-field {
  display: flex;
  flex-direction: column;
}

.rf-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
}

.rf-input,
.rf-select,
.rf-textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  color: #1e293b;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}
.rf-input::placeholder,
.rf-select::placeholder,
.rf-textarea::placeholder {
  color: #94a3b8;
}
.rf-input:focus,
.rf-select:focus,
.rf-textarea:focus {
  border-color: #1a2e4a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 46, 74, 0.08);
}

.rf-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}

.rf-redaction {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.rf-redaction__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a2e4a;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed #e2e8f0;
}
.rf-redaction__header i {
  color: #c9a84c;
}

.rf-textarea--redaction {
  min-height: 260px;
  font-size: 0.92rem;
  line-height: 1.7;
  padding: 1rem 1.1rem;
}

.rf-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

.rf-text-muted {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.25rem;
  display: block;
}

.rf-field-error {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #dc2626;
  margin-top: 0.35rem;
  animation: slideIn 0.15s ease;
}
.rf-field-error i {
  font-size: 0.82rem;
  flex-shrink: 0;
}

.rf-radio-group {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.rf-radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.rf-radio-group label input[type=radio] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1a2e4a;
}

.rf-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: #fafbfd;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}
.rf-dropzone:hover {
  border-color: #722f37;
  background: #fdf8f8;
}
.rf-dropzone:hover .rf-dropzone__icon {
  color: #722f37;
  transform: translateY(-3px);
}

.rf-dropzone__icon {
  font-size: 2.2rem;
  color: #94a3b8;
  transition: all 0.25s;
}

.rf-dropzone__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
}

.rf-dropzone__hint {
  font-size: 0.75rem;
  color: #6b7280;
}

.rf-file-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid #d1fae5;
  border-radius: 10px;
  background: #f0fdf4;
  animation: slideIn 0.2s ease;
}

.rf-file-item__icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  background: rgba(114, 47, 55, 0.08);
  color: #722f37;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.rf-file-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rf-file-item__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rf-file-item__size {
  font-size: 0.72rem;
  color: #6b7280;
  background: #e2f0e8;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  align-self: flex-start;
  margin-top: 2px;
}

.rf-file-item__remove {
  border: none;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.rf-file-item__remove:hover {
  background: #fee2e2;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.alert-warning {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.alert-danger {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

.rf-recap-table {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.rf-recap-row {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}
.rf-recap-row:last-child {
  border-bottom: none;
}
.rf-recap-row:nth-child(odd) {
  background: #fcfdfe;
}

.rf-recap-row__key {
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
  min-width: 130px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .rf-recap-row__key {
    min-width: 100px;
  }
}

.rf-recap-row__val {
  font-size: 0.88rem;
  color: #1e293b;
  flex: 1;
}

.btn-recours-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.75rem;
  background: linear-gradient(135deg, #c9a84c, #d8be73);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.3);
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-recours-primary:hover:not(:disabled) {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
  color: #fff !important;
}
.btn-recours-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-recours-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: #f1f5f9;
  color: #475569 !important;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-recours-secondary:hover {
  background: #e2e8f0;
  color: #1e293b !important;
  border-color: #94a3b8;
}

.rf-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 0.5rem;
  gap: 1rem;
}

.recours-success {
  text-align: center;
  padding: 2.5rem 1rem;
  animation: fadeUp 0.4s ease;
}

.recours-success__icon {
  font-size: 3.5rem;
  color: #10b981;
  margin-bottom: 1.25rem;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.recours-success__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a2e4a;
  margin-bottom: 0.5rem;
}

.recours-success__text {
  font-size: 0.9rem;
  color: #6b7280;
  max-width: 460px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.recours-success__ref {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  margin-bottom: 2rem;
}

.recours-success__ref-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: #6b7280;
}

.recours-success__ref-value {
  font-size: 1rem;
  font-weight: 800;
  color: #722f37;
  letter-spacing: 1.5px;
}

.recours-success__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.upload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.upload-spinner-container {
  text-align: center;
  padding: 2.5rem 2rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
}

.upload-logo-spinner .spinning-logo {
  width: 90px;
  height: 90px;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.4));
}

.upload-text h5 {
  font-weight: 600;
  color: #fff;
}
.upload-text p {
  font-size: 0.88rem;
}

.btn-spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-right-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 0.2em solid #1a2e4a;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: #6b7280;
}

.text-danger {
  color: #ef4444 !important;
}

.text-warning {
  color: #f59e0b !important;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.me-1 {
  margin-right: 0.25rem;
}

.ms-2 {
  margin-left: 0.5rem;
}

.py-5 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rf-depot-mode {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}
.rf-depot-mode .rf-depot-mode__btn {
  flex: 1;
  padding: 1.5rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.rf-depot-mode .rf-depot-mode__btn i {
  font-size: 2rem;
  color: #6c757d;
  transition: color 0.2s ease;
}
.rf-depot-mode .rf-depot-mode__btn span {
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}
.rf-depot-mode .rf-depot-mode__btn small {
  font-size: 0.8rem;
  color: #6c757d;
}
.rf-depot-mode .rf-depot-mode__btn:hover {
  border-color: #bc4f5e;
  background: #fff9f9;
}
.rf-depot-mode .rf-depot-mode__btn.active {
  border-color: #bc4f5e;
  background: #f8e8ea;
  box-shadow: 0 2px 8px rgba(188, 79, 94, 0.2);
}
.rf-depot-mode .rf-depot-mode__btn.active i {
  color: #bc4f5e;
}
.rf-depot-mode .rf-depot-mode__btn.active span {
  color: #722f37;
}
.rf-depot-mode .rf-depot-mode__btn.active small {
  color: #722f37;
}
.rf-depot-mode .rf-depot-mode__btn:focus-visible {
  outline: 2px solid #bc4f5e;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .rf-depot-mode {
    flex-direction: column;
  }
}
