:root {
  /* Palette de couleurs */
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-dark: #047857;
  --primary-light: #d1fae5;
  
  --accent-blue: #0284c7;
  --accent-blue-hover: #0369a1;
  --accent-blue-light: #e0f2fe;
  
  --gold: #f59e0b;
  --gold-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  
  /* Thème Fond Bleu Ciel Franc et Élégant */
  --bg-main: #cbe3fb;
  --bg-section-alt: #b8dcfa;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f7fe;
  --bg-input: #f8fbff;
  
  /* Typographie */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #1e293b;
  
  --border-color: #93c5fd;
  --border-subtle: #bfdbfe;
  --border-focus: #10b981;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.13);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}

section, 
.how-it-works-section, 
.status-section, 
.upload-section {
  scroll-margin-top: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  background-image: linear-gradient(180deg, #cde5fb 0%, #bdddfa 50%, #b0d5f8 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Typographie & Helpers */
.gradient-text {
  background: linear-gradient(135deg, #0284c7 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-center { text-align: center; }
.required { color: #ef4444; }

/* Navbar Navy Blue */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 21, 40, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  width: 100%;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo-accent { color: #38bdf8; }
.logo-dot { color: #10b981; }

.nav-links {
  display: none;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-link:hover { color: #38bdf8; }

/* Boutons - Verts pour Démarrer maintenant, Suivant et Vérifier */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Boutons Principaux, Suivant & Recherche : Vert Émeraude */
.btn-primary,
.btn-next,
#btnGoToUpload,
#btnSearchStatus,
.btn-search {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.btn-primary:hover:not(:disabled),
.btn-next:hover:not(:disabled),
#btnGoToUpload:hover:not(:disabled),
#btnSearchStatus:hover:not(:disabled),
.btn-search:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #fff;
  box-shadow: none !important;
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #065f46 100%);
  transform: none !important;
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-light);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Hero Section */
.hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
  color: #0f172a;
}

@media (min-width: 768px) {
  .hero-title { font-size: 3.5rem; }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #334155;
  font-weight: 500;
  max-width: 680px;
  margin: 0 auto 2.25rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 700;
  background: #ffffff;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  width: 345px;
  max-width: calc(100vw - 2rem);
  box-sizing: border-box;
  flex: 0 0 auto;
}

.trust-item svg { color: #10b981; flex-shrink: 0; }

.trust-item .counter,
.counter {
  font-weight: 800;
  color: #0284c7;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block !important;
}

/* Upload Section & Card */
.upload-section {
  padding: 1rem 0 1.5rem;
}

.upload-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 16px 45px rgba(2, 132, 199, 0.12);
  position: relative;
}

@media (min-width: 768px) {
  .upload-card { padding: 3rem; }
}

.card-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.card-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Steps Indicator */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  position: relative;
}

.step-indicator-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
  cursor: pointer;
}

.step-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
}

.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  text-align: center;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #cbd5e1;
  margin: -1.2rem 0.5rem 0;
  z-index: 1;
}

.step-indicator-item.active .step-circle {
  background: #10b981;
  border-color: #059669;
  color: #fff;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

.step-indicator-item.active .step-label { color: #0f172a; font-weight: 700; }

.step-indicator-item.completed .step-circle {
  background: #0284c7;
  border-color: #0369a1;
  color: #fff;
}

/* Alert Box */
.alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

/* Form Steps */
.form-step-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.form-step-content.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title-box {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.step-title-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.step-title-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.label-precision-hint {
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
  margin-left: 0.35rem;
}

[dir="rtl"] .label-precision-hint {
  margin-left: 0;
  margin-right: 0.35rem;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: #64748b;
  pointer-events: none;
}

.form-control {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #0f172a;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  transition: var(--transition);
}

.input-icon-wrapper .form-control {
  padding-left: 2.85rem;
}

.form-control:focus {
  outline: none;
  border-color: #10b981;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.field-hint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Fused Phone Input Box */
.phone-input-merged {
  display: flex;
  align-items: center;
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  box-sizing: border-box;
}

.phone-input-merged:focus-within {
  border-color: #10b981;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.custom-country-picker {
  position: relative;
  flex: 0 0 auto;
}

.country-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 0.85rem 0.85rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  cursor: pointer;
  height: 100%;
  box-sizing: border-box;
  outline: none;
  box-shadow: none;
  transition: background-color 0.2s ease;
}

.country-picker-btn:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.country-flag-icon {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 1px rgba(0,0,0,0.5);
  flex-shrink: 0;
  display: inline-block;
}

.picker-chevron {
  color: #64748b;
  margin-left: 0.15rem;
  transition: transform 0.2s ease;
}

.custom-country-picker.open .picker-chevron {
  transform: rotate(180deg);
}

.phone-input-divider {
  width: 1px;
  height: 26px;
  background-color: var(--border-color);
  flex-shrink: 0;
}

.phone-input-field-merged {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: #0f172a;
  width: 100%;
  box-shadow: none;
  box-sizing: border-box;
}

/* Dropdown Menu */
.country-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: 275px;
  max-width: min(275px, calc(100vw - 3rem));
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  z-index: 1000;
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
}

[dir="rtl"] .country-dropdown-menu {
  left: auto;
  right: 0;
}

.country-search-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: #f8fafc;
}

.country-search-box svg {
  color: #64748b;
  flex-shrink: 0;
}

.country-search-box input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: #0f172a;
  outline: none;
}

.country-list {
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
  padding: 0.35rem 0;
  margin: 0;
}

.country-list-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: #1e293b;
  transition: background-color 0.15s ease;
}

.country-list-item:hover,
.country-list-item.selected {
  background-color: #f0fdf4;
  color: #15803d;
  font-weight: 600;
}

.country-list-item .item-code {
  margin-left: auto;
  font-weight: 700;
  color: #0284c7;
  font-size: 0.85rem;
}

[dir="rtl"] .country-list-item .item-code {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .phone-input-merged {
  direction: ltr;
}

[dir="rtl"] .phone-input-field-merged {
  direction: ltr;
  text-align: left;
}

/* Radio Cards */
.radio-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .radio-cards { grid-template-columns: 1fr 1fr; }
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.radio-card:hover {
  border-color: #0284c7;
  background: #ffffff;
}

.radio-card input[type="radio"] {
  margin-top: 0.25rem;
  accent-color: #10b981;
}

.radio-card-content {
  display: flex;
  flex-direction: column;
}

.radio-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
}

.radio-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Custom Checkboxes */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  cursor: pointer;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  transition: var(--transition);
}

.custom-checkbox:hover {
  border-color: #0284c7;
  background: #ffffff;
}

.custom-checkbox input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  accent-color: #10b981;
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

.checkbox-label strong {
  color: #0f172a;
}

/* Upload Drop Zones */
.upload-box-wrapper {
  margin-bottom: 2rem;
  transition: var(--transition);
}

#paymentUploadWrapper {
  margin-top: 1.75rem;
  padding-top: 0;
  border-top: none;
}

.upload-label-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.upload-badge {
  background: #e0f2fe;
  color: #0284c7;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.upload-label-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.file-drop-zone {
  border: 2px dashed #93c5fd;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  padding: 2.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.file-drop-zone:hover {
  border-color: #10b981;
  background: #f0fdf4;
}

.file-drop-zone.dragover {
  border-color: #10b981;
  background: #dcfce7;
}

.drop-icon {
  color: #0284c7;
  margin-bottom: 0.75rem;
}

.drop-text {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.drop-text strong { color: #0f172a; }

.file-limit {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-drop-zone.has-file {
  padding: 0;
  border: none;
  background: transparent;
  cursor: default;
}

.file-selected-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
  animation: fadeIn 0.25s ease-out;
  min-width: 0;
  max-width: 100%;
}

.file-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.selected-file-name {
  font-weight: 700;
  color: #065f46;
  font-size: 0.9rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.selected-file-size {
  font-size: 0.8rem;
  color: #059669;
  white-space: nowrap;
}

.btn-change-file {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-change-file:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* --- Boîte de Confirmation & Langue du CV --- */
.cv-language-confirm-box {
  margin-top: 1rem;
  background: #ffffff;
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
  animation: fadeIn 0.3s ease-out;
}

.cv-confirm-badge-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.cv-success-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.cv-confirm-titles h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 0.2rem;
}

.cv-confirm-file-details {
  font-size: 0.82rem;
  color: #047857;
  font-weight: 600;
}

.cv-language-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.15rem;
}

.cv-alert-icon {
  color: #0284c7;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cv-alert-text {
  font-size: 0.88rem;
  color: #0c4a6e;
  line-height: 1.45;
}

.cv-alert-text strong {
  display: block;
  margin-bottom: 0.15rem;
  color: #0369a1;
  font-weight: 700;
}

.cv-confirm-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-confirm-english {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #10b981;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-confirm-english:hover {
  background-color: #059669;
  transform: translateY(-1px);
}

.btn-modify-cv-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-modify-cv-lang:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}


@media (max-width: 580px) {
  .cv-confirm-buttons {
    flex-direction: column;
  }
  .btn-confirm-english,
  .btn-modify-cv-lang {
    width: 100%;
    justify-content: center;
  }
}

/* Form Actions */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* Spinner Animation */
.spinner {
  animation: rotate 1.5s linear infinite;
}

.spinner .path {
  stroke: #fff;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

@keyframes dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Success View */
.success-view {
  text-align: center;
  padding: 2rem 1rem;
  animation: fadeIn 0.4s ease-out;
}

.success-icon-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #d1fae5;
  border: 2px solid #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-view h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #0f172a;
}

.success-highlight-box {
  background: linear-gradient(135deg, #e0f2fe 0%, #d1fae5 100%);
  border: 1px solid #7dd3fc;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem auto;
  max-width: 600px;
}

.success-promise {
  font-size: 1.15rem;
  color: #0c4a6e;
  line-height: 1.5;
}

.success-details {
  color: var(--text-light);
  font-size: 0.95rem;
  max-width: 580px;
  margin: 0 auto 2rem;
}

/* Status Section */
/* --- Section Suivi de Dossier & Bouton Vert Déclencheur --- */
.status-section {
  padding: 1rem 0 4.5rem;
  scroll-margin-top: 140px;
  background: transparent;
  position: relative;
}

.status-trigger-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-top: 6rem;
  padding-bottom: 2rem;
  position: relative;
}

.status-btn-container {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.status-hand-indicator {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  display: none;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  user-select: none;
  z-index: 999;
}

.hand-pointer-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  animation: handBounce 1.1s infinite ease-in-out;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.hand-white-icon {
  display: block;
  pointer-events: none;
}

@keyframes handBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.btn-hero-lg,
.btn-status-trigger {
  width: 440px;
  max-width: calc(100vw - 2.5rem);
  min-height: 64px;
  padding: 0.85rem 1.5rem;
  font-size: 1.18rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background-color: #10b981 !important;
  background-image: none !important;
  color: #ffffff !important;
  border: 2px solid transparent !important;
  outline: none !important;
  cursor: pointer;
  transform: none !important;
  transition: background-color 0.15s ease-in-out !important;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}

.btn-hero-lg:hover,
.btn-status-trigger:hover {
  background-color: #059669 !important;
  background-image: none !important;
  color: #ffffff !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn-hero-lg:focus,
.btn-hero-lg:focus-visible,
.btn-status-trigger:focus,
.btn-status-trigger:focus-visible {
  outline: none !important;
  background-color: #10b981 !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-hero-lg:active,
.btn-status-trigger:active {
  background-color: #047857 !important;
  transform: none !important;
  box-shadow: none !important;
}

@media (max-width: 520px) {
  .btn-hero-lg,
  .btn-status-trigger {
    width: 100%;
    max-width: calc(100vw - 2rem);
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    white-space: normal;
    min-height: 58px;
  }
}

.status-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 12px 35px rgba(2, 132, 199, 0.1);
  animation: fadeIn 0.4s ease;
}

@media (min-width: 768px) {
  .status-card { padding: 2.5rem; }
}

.section-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-search-form {
  margin: 2rem 0 1.5rem;
}

.search-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .search-input-group {
    flex-direction: row;
  }
  .search-input-group .search-input {
    flex: 1;
  }
}

.status-result-card {
  margin-top: 1.5rem;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  animation: fadeIn 0.3s ease;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.status-result-card.pending {
  background: #fefce8;
  border-color: #fef08a;
}

.status-result-card.validated {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.status-result-card.rejected {
  background: #fef2f2;
  border-color: #fecaca;
}

.status-result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-width: 0;
}

.status-candidat-title {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45;
  color: #1e293b;
}

.status-candidat-email {
  word-break: break-all;
  overflow-wrap: anywhere;
  color: #1e293b;
}

.status-candidat-specialty {
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #334155;
  font-weight: 500;
}

.status-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.pending { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.status-badge.validated { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.status-body p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: #1e293b;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.status-meta,
.status-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Section Comment ça marche : 3 Étapes Claires
   ========================================================================== */
.how-it-works-section {
  position: relative;
  width: 100%;
  padding: 4.5rem 0 1.5rem;
  background: transparent;
  display: flex;
  flex-direction: column;
}

.how-it-works-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.section-header {
  margin-bottom: 2.25rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.section-header p {
  color: #334155;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Les 3 cercles d'étapes compacts et épurés */
.steps-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4.25rem;
  width: 100%;
}

.feature-card {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.65rem 0.5rem;
  box-sizing: border-box;
  position: relative;
  transition: all 0.2s ease-in-out;
  flex: 0 0 135px;
  transform: none !important;
}

.feature-card.step-clickable-card {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.feature-card.step-clickable-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: none !important;
  border: 1px solid #93c5fd !important;
}

.feature-card.step-clickable-card:active {
  transform: none !important;
  box-shadow: none !important;
}

.step-card-click-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 0.12rem 0.5rem;
  border-radius: 20px;
  margin-top: 0.15rem;
  transition: all 0.2s ease;
}

.feature-card.step-clickable-card:hover .step-card-click-hint {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f9ff;
  border: 1px solid #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.feature-card.step-clickable-card:hover .feature-icon {
  background: #e0f2fe;
  transform: scale(1.06);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-number {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.05rem;
}

@media (max-width: 600px) {
  .steps-grid {
    gap: 2rem;
  }
  .feature-card {
    width: 120px;
    height: 120px;
    flex: 0 0 120px;
    padding: 0.5rem;
  }
  .feature-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.2rem;
  }
  .feature-icon svg {
    width: 18px;
    height: 18px;
  }
  .feature-number {
    font-size: 0.72rem;
  }
  .step-card-click-hint {
    font-size: 0.58rem;
    padding: 0.1rem 0.4rem;
  }
}

.hero-subtitle-ar {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  line-height: 1.8 !important;
  color: #1e293b;
  max-width: 850px;
  margin: 0 auto 1.75rem;
}

/* Footer */
.footer {
  background: #0f172a;
  border-top: 1px solid #1e293b;
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer-brand {
  margin-bottom: 1.5rem;
}

.footer-logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.footer-logo .logo-accent {
  color: #38bdf8;
}

.footer-logo .logo-clic {
  color: #ffffff;
  font-weight: 800;
}

.footer-logo .logo-dot {
  color: #10b981;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #38bdf8;
}


/* --- Bouton CTA Hero --- */
.hero-cta-wrapper {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  z-index: 5;
}

#navBtnStart {
  background-color: #10b981 !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
  color: #ffffff !important;
  transform: none !important;
  transition: background-color 0.15s ease-in-out !important;
}

#navBtnStart:hover {
  background-color: #059669 !important;
  background-image: none !important;
  transform: none !important;
}



/* --- Modal Blanche de Confirmations Préalables (Centrage & Visibilité 100% Garantie) --- */
.modal-backdrop-public {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  box-sizing: border-box;
  animation: fadeIn 0.2s ease;
}

.confirmation-modal-card {
  background: #ffffff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid #bfdbfe;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
  box-sizing: border-box;
  overflow: hidden;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header-custom {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  background: #ffffff;
}

.modal-header-custom h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.15rem 0;
  line-height: 1.25;
}

.modal-header-custom p {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0;
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #64748b;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body-custom {
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  overflow-y: auto;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

.modal-body-custom .custom-checkbox {
  margin-bottom: 0.65rem;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.modal-body-custom .custom-checkbox:last-child {
  margin-bottom: 0;
}

.modal-body-custom .custom-checkbox:hover {
  background: #f0fdf4;
  border-color: #86efac;
}

.modal-body-custom .checkbox-label {
  font-size: 0.83rem;
  line-height: 1.35;
  color: #334155;
}

.modal-body-custom .checkbox-label strong {
  color: #0f172a;
}

.modal-footer-custom {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  background: #f8fbff;
  flex-shrink: 0;
}

.modal-footer-custom .btn {
  padding: 0.65rem 1.2rem;
  font-size: 0.92rem;
}

.upload-card.show-card {
  display: block !important;
  animation: modalSlideUp 0.35s ease-out;
}

@media (max-width: 640px) {
  .modal-backdrop-public {
    padding: 0.5rem;
  }
  .confirmation-modal-card {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 12px;
  }
  .modal-header-custom {
    padding: 0.85rem 1rem 0.65rem;
  }
  .modal-header-custom h3 {
    font-size: 1.05rem;
  }
  .modal-body-custom {
    padding: 0.75rem 1rem;
  }
  .modal-body-custom .custom-checkbox {
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.5rem;
  }
  .modal-body-custom .checkbox-label {
    font-size: 0.78rem;
  }
  .modal-footer-custom {
    padding: 0.65rem 1rem;
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  .modal-footer-custom .btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
  }
}


/* --- Language Switcher in Navbar --- */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
  backdrop-filter: blur(8px);
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.lang-btn.active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* --- Animated Counters in Trust Badges --- */
.trust-item .counter {
  font-weight: 800;
  color: #0284c7;
  font-size: 1.05rem;
}

/* --- Modal CGU --- */
#confirmationModal {
  z-index: 100000;
}

#cguModal {
  z-index: 200000 !important;
}

#stepDetailModal {
  z-index: 250000 !important;
}

.step-detail-modal-card {
  max-width: 560px;
  width: 92%;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  animation: modalScaleUp 0.25s ease-out;
  overflow: hidden;
}

.step-modal-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.step-detail-body {
  padding: 1.5rem 1.75rem;
}

.step-detail-main-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #334155;
}

.step-detail-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-top: 1.25rem;
}

.step-alert-icon {
  flex-shrink: 0;
  color: #d97706;
  margin-top: 0.15rem;
}

.step-alert-content {
  flex: 1;
}

.step-alert-content strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 0.35rem;
}

.step-alert-content p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #78350f;
  margin: 0;
}

.cgu-modal-card {
  max-width: 680px;
}

.cgu-inline-link {
  color: #0284c7;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline;
  transition: all 0.2s ease;
}

.cgu-inline-link:hover {
  color: #0369a1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cgu-body-content {
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.6;
  padding: 1.25rem 1.5rem;
}

.cgu-section {
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}

.cgu-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.cgu-section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

/* --- Support RTL (Arabe) --- */
[dir="rtl"] body,
[dir="rtl"] {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: right;
}

[dir="rtl"] .hero-title,
[dir="rtl"] .hero-subtitle,
[dir="rtl"] .text-center,
[dir="rtl"] .section-header,
[dir="rtl"] .card-header,
[dir="rtl"] .section-header h2,
[dir="rtl"] .section-header p,
[dir="rtl"] .card-header h2,
[dir="rtl"] .card-header p {
  text-align: center;
}

[dir="rtl"] .input-icon {
  left: auto;
  right: 1rem;
}

[dir="rtl"] .input-icon-wrapper input {
  padding-left: 1rem;
  padding-right: 2.75rem;
}

[dir="rtl"] .form-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] #step2 .form-actions {
  flex-direction: row;
}

[dir="rtl"] .modal-header-custom {
  flex-direction: row;
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .modal-header-text {
  text-align: right;
  direction: rtl;
  flex: 1;
}

[dir="rtl"] .modal-header-text h3,
[dir="rtl"] .modal-header-text p {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .cgu-modal-card,
[dir="rtl"] .cgu-body-content,
[dir="rtl"] .cgu-section,
[dir="rtl"] .cgu-section h4,
[dir="rtl"] .cgu-section p,
[dir="rtl"] .step-detail-modal-card,
[dir="rtl"] .step-detail-body,
[dir="rtl"] .step-detail-main-text,
[dir="rtl"] .step-detail-alert-box,
[dir="rtl"] .step-alert-content {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .modal-footer-custom {
  flex-direction: row;
  justify-content: flex-start;
  direction: rtl;
}

[dir="rtl"] .custom-checkbox {
  padding-left: 0;
  padding-right: 32px;
  text-align: right;
}

[dir="rtl"] .custom-checkbox .checkmark {
  left: auto;
  right: 0;
}

[dir="rtl"] .steps-indicator {
  flex-direction: row;
}

[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-brand {
  text-align: right;
}

[dir="rtl"] .feature-card-top {
  flex-direction: row-reverse;
}

[dir="rtl"] .selected-file-name,
[dir="rtl"] .selected-file-size {
  text-align: right;
}

[dir="rtl"] .status-result-header {
  flex-direction: row;
}

[dir="rtl"] .status-candidat-title {
  text-align: right;
}

/* --- BaridiMob, CCP & Payment Widget --- */
.payment-header-with-rib {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.upload-label-header-payment {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

.upload-label-header-payment h4 {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.payment-amount-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #e8f0fe;
  color: #1a73e8;
  border: 1px solid #d2e3fc;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: none !important;
  margin-left: 0.35rem;
  vertical-align: middle;
}

[dir="rtl"] .payment-amount-inline {
  margin-left: 0;
  margin-right: 0.35rem;
}

.finger-pointing-icon {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -2.5px;
  flex-shrink: 0;
  animation: none !important;
  transform: none !important;
}

[dir="rtl"] .finger-pointing-icon {
  transform: scaleX(-1) !important;
  animation: none !important;
}

.payment-channels-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.payment-channels-hint {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  flex: 0 0 auto;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
}

.payment-hint-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  min-width: 0;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.25rem 0.8rem;
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.payment-hint-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.blue-arrow-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.blue-arrow-svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(2, 132, 199, 0.25));
  transition: transform 0.2s ease;
}

.payment-upload-guidance-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  background: transparent;
  border: none;
  padding: 0.25rem 0;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  text-align: left;
  box-shadow: none;
}

.payment-upload-hint-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.blue-arrow-down-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.blue-arrow-down-svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(2, 132, 199, 0.25));
  transition: transform 0.2s ease;
}

[dir="rtl"] .payment-upload-guidance-bar {
  justify-content: flex-start;
  text-align: right;
}

.payment-channels-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  flex-shrink: 0;
}

[dir="rtl"] .payment-channels-container {
  align-items: flex-start;
}

.payment-channel-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #f8fafc;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  transition: var(--transition);
  width: 350px;
  max-width: 100%;
  height: 44px;
  box-sizing: border-box;
}

.payment-channel-row:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  flex-shrink: 0;
}

.algerie-poste-icon-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}

.baridimob-icon-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.btn-rib-toggle {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0284c7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition);
  font-variant-numeric: tabular-nums;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  height: 34px;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.btn-rib-toggle:hover {
  background: #f0f9ff;
  border-color: #38bdf8;
  color: #0369a1;
}

.btn-rib-toggle.revealed {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.25px;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  height: 34px;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  text-align: center;
}

.btn-rib-toggle.revealed span,
.btn-rib-toggle.revealed #ccpDisplayText,
.btn-rib-toggle.revealed #ribDisplayText {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block !important;
  text-align: center;
}

.btn-copy-rib {
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: var(--transition);
  height: 34px;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .payment-channels-wrapper,
  [dir="rtl"] .payment-channels-wrapper {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem;
    margin-top: 0.85rem;
  }
  .payment-channels-hint,
  [dir="rtl"] .payment-channels-hint {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem 0.65rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 0.25rem 0 !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }
  .payment-hint-left,
  [dir="rtl"] .payment-hint-left {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .payment-hint-text,
  [dir="rtl"] .payment-hint-text {
    font-size: 0.88rem !important;
    line-height: 1.4 !important;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
  .payment-channels-hint .blue-arrow-wrapper,
  [dir="rtl"] .payment-channels-hint .blue-arrow-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .payment-channels-hint .blue-arrow-svg,
  [dir="rtl"] .payment-channels-hint .blue-arrow-svg {
    transform: rotate(90deg) !important;
  }
  .payment-channels-container,
  [dir="rtl"] .payment-channels-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 0.65rem;
  }
  .payment-upload-guidance-bar,
  [dir="rtl"] .payment-upload-guidance-bar {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem 0.65rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
  }
  .payment-upload-hint-text,
  [dir="rtl"] .payment-upload-hint-text {
    font-size: 0.88rem !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
}

@media (max-width: 480px) {
  .payment-channel-row {
    width: 100%;
    max-width: 100%;
  }
  .btn-rib-toggle,
  .btn-rib-toggle.revealed {
    width: 175px;
    min-width: 175px;
    max-width: 175px;
    font-size: 0.78rem;
  }
}

.btn-copy-rib:hover {
  background: #059669;
}

.btn-copy-rib.copied {
  background: #047857;
}

/* Reveal Animation for Payment Step */
.reveal-payment {
  animation: slideDownFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[dir="rtl"] .payment-header-with-rib {
  flex-direction: column;
}

@media (min-width: 769px) {
  [dir="rtl"] .payment-channels-wrapper {
    flex-direction: row;
  }
}

[dir="rtl"] .payment-channels-hint {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .white-arrow-svg,
[dir="rtl"] .blue-arrow-svg,
[dir="rtl"] .btn-next svg,
[dir="rtl"] .btn-prev svg,
[dir="rtl"] #btnConfirmAndOpenForm svg {
  transform: scaleX(-1) !important;
}

[dir="rtl"] .payment-channel-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .btn-rib-toggle.revealed {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  flex-direction: row !important;
}

[dir="rtl"] .btn-rib-toggle.revealed span,
[dir="rtl"] .btn-rib-toggle.revealed #ccpDisplayText,
[dir="rtl"] .btn-rib-toggle.revealed #ribDisplayText {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block !important;
}

/* --- Boutons Flottants WhatsApp & Facebook --- */
.floating-social-group {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  z-index: 99999;
}

[dir="rtl"] .floating-social-group {
  right: auto;
  left: 1.5rem;
}

.floating-social-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  text-decoration: none;
  box-shadow: none !important;
  transform: none !important;
  transition: opacity 0.2s ease, filter 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.floating-social-btn:hover {
  transform: none !important;
  box-shadow: none !important;
  filter: brightness(0.92);
}

.floating-social-btn:active {
  transform: none !important;
}

.floating-social-btn.btn-whatsapp {
  background: #25d366;
}

.floating-social-btn.btn-facebook {
  background: #1877f2;
}

/* ==========================================================================
   OPTIMISATIONS 100% RESPONSIVE SMARTPHONES (< 480px & < 360px)
   ========================================================================== */

@media (max-width: 480px) {
  /* Navbar & Logo */
  .navbar {
    padding: 0.75rem 0;
  }
  .nav-container {
    padding: 0 0.85rem;
  }
  .logo {
    font-size: 1.35rem;
  }
  .lang-switcher {
    padding: 2px;
    gap: 2px;
  }
  .lang-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.76rem;
  }

  /* Hero Section */
  .hero {
    padding: 2rem 0 1.5rem;
  }
  .hero-title {
    font-size: 1.85rem;
    line-height: 1.25;
    margin-bottom: 1rem;
  }
  .hero-subtitle {
    font-size: 0.98rem;
    padding: 0 0.25rem;
    margin-bottom: 1.5rem;
  }
  .hero-trust {
    gap: 0.65rem;
    margin-bottom: 1.25rem;
  }
  .trust-item {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
    text-align: center;
    border-radius: var(--radius-sm);
  }

  /* Upload Card & Steps */
  .upload-card {
    padding: 1.25rem 0.85rem;
    border-radius: var(--radius-md);
  }
  .card-header {
    margin-bottom: 1.5rem;
  }
  .card-header h2 {
    font-size: 1.45rem;
  }
  .card-header p {
    font-size: 0.88rem;
  }
  .steps-indicator {
    margin-bottom: 1.5rem;
  }
  .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.88rem;
  }
  .step-label {
    font-size: 0.72rem;
  }
  .step-line {
    margin: -1rem 0.35rem 0;
  }

  /* Drop Zones & Fichiers */
  .file-drop-zone {
    padding: 1.75rem 0.85rem;
  }
  .drop-text {
    font-size: 0.88rem;
  }
  .file-limit {
    font-size: 0.75rem;
  }

  /* Form Actions (Boutons Suivant / Précédent) */
  .form-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
  }
  .form-actions .btn {
    padding: 0.7rem 0.95rem;
    font-size: 0.88rem;
  }

  /* Paiement & Boutons RIB */
  .payment-channel-row {
    width: 100%;
    max-width: 100%;
    padding: 0.3rem 0.45rem;
    height: auto;
    min-height: 44px;
    box-sizing: border-box;
  }
  .btn-rib-toggle,
  .btn-rib-toggle.revealed {
    width: 165px;
    min-width: 165px;
    max-width: 165px;
    font-size: 0.75rem;
    padding: 0.25rem 0.35rem;
  }
  .btn-copy-rib {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  /* Modals */
  .confirmation-modal-card {
    max-width: calc(100vw - 1rem);
    width: 100%;
  }
  .cgu-modal-card {
    max-width: calc(100vw - 1rem);
    width: 100%;
  }
  .cgu-body-content {
    max-height: 65vh;
    max-height: 65dvh;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
  }

  /* Boutons Flottants WhatsApp / Facebook avec Safe Area */
  .floating-social-group {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
    gap: 0.65rem;
  }
  [dir="rtl"] .floating-social-group {
    right: auto;
    left: calc(1rem + env(safe-area-inset-left, 0px));
  }
  .floating-social-btn {
    width: 44px;
    height: 44px;
  }
  .floating-social-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Suivi de dossier */
  .status-card {
    padding: 1.25rem 0.85rem;
    border-radius: var(--radius-md);
  }
  .status-result-card {
    padding: 1rem 0.85rem;
  }
  .status-candidat-title {
    font-size: 0.88rem;
  }
  .status-badge {
    font-size: 0.78rem;
    padding: 0.3rem 0.7rem;
  }
}

/* Écrans très étroits (smartphones 320px à 360px ex: iPhone SE 1ère gen, Galaxy Fold) */
@media (max-width: 360px) {
  .logo {
    font-size: 1.2rem;
  }
  .lang-btn {
    padding: 0.25rem 0.45rem;
    font-size: 0.72rem;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .upload-card {
    padding: 1rem 0.65rem;
  }
  .btn-rib-toggle,
  .btn-rib-toggle.revealed {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    font-size: 0.7rem;
  }
  .btn-copy-rib {
    padding: 0.25rem 0.35rem;
    font-size: 0.7rem;
  }
  .floating-social-group {
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    right: calc(0.75rem + env(safe-area-inset-right, 0px));
  }
  [dir="rtl"] .floating-social-group {
    right: auto;
    left: calc(0.75rem + env(safe-area-inset-left, 0px));
  }
  .floating-social-btn {
    width: 40px;
    height: 40px;
  }
  .floating-social-btn svg {
    width: 20px;
    height: 20px;
  }
}

