:root {
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg-soft: #f8fafc;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #ef4444;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.06);
  --radius: 16px;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: transparent;
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

input,
select,
textarea,
button {
  font: inherit;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: transparent;
  }


.logo {
    font-weight: 700;
    font-size: 20px;
}

.navbar nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
}

.page {
  width: 100%;
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px 32px;
}
@media (max-width: 640px) {
  .page {
    margin: 18px auto;
    padding: 0 12px 24px;
  }

  .page-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.filters form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

select, input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-ghost {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(226,232,240,0.9) !important;
  box-shadow: var(--shadow-soft) !important;
  transition: all 0.2s ease;
  min-width: 0;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.08);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}

.card h3 {
  font-size: 18px;
  font-weight: 600;
  word-break: break-word;
}

.city {
  font-size: 13px;
  color: #64748b;
}

.card-body p {
  margin-bottom: 6px;
  font-size: 14px;
  word-break: break-word;
}
@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 16px;
  }

  .card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .badge {
    align-self: flex-start;
  }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 6px 14px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;

    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;

    white-space: nowrap;          /* 🔥 force une seule ligne */
    line-height: 1;               /* évite effet étiré */
}

.alert {
    background: #fee2e2;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
}

/* FORM LAYOUT */
.stage-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.form-section h2 {
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

textarea {
    min-height: 100px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    resize: vertical;
}

/* Exchange box */
.exchange-box {
    margin-top: 20px;
    padding: 20px;
    background: #f1f5f9;
    border-radius: 14px;
}

/* Modern checkbox */
.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
}

.checkbox-modern input {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #2563eb;
    position: relative;
}

.checkbox-modern input:checked + .checkmark {
    background: #2563eb;
}

.checkbox-modern input:checked + .checkmark::after {
    content: "✓";
    color: white;
    position: absolute;
    left: 4px;
    top: -2px;
    font-size: 16px;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
}
/* BUTTONS */

.btn {
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37,99,235,0.25);
}

.btn-light {
    background: #f1f5f9;
    color: #1e293b;
}

.btn-light:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239,68,68,0.25);
}
/* NAVBAR */

.navbar {
  background: rgba(255,255,255,0.78) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226,232,240,0.7);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  width: 100%;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 800;
  letter-spacing: -0.2px;
  font-size: 20px;
  color: var(--text);
  line-height: 1.2;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  text-decoration: none;
  color: #334155;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: 0.2s ease;
}

.nav-link:hover {
  background: #f1f5f9;
}

@media (max-width: 768px) {
  .nav-inner {
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .logo {
    text-align: center;
    font-size: 18px;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
  }

  .nav-actions .btn,
  .nav-actions .nav-link {
    flex: 1 1 auto;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-actions .btn,
  .nav-actions .nav-link {
    width: 100%;
  }
}
/* PAGE AUTH CENTRÉE */

.auth-page {
    min-height: calc(100vh - 80px); /* hauteur écran moins navbar */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* CARTE */

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 45px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    animation: fadeUp 0.4s ease;
}

.auth-card h1 {
    margin-bottom: 35px;
    text-align: center;
    font-size: 24px;
}

/* FORM */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.form-field input {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: 0.2s ease;
}

.form-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* FULL BUTTON */

.full-btn {
    width: 100%;
    margin-top: 10px;
}

/* SWITCH LINK */

.auth-switch {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
}

.auth-switch a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ANIMATION */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing {
    min-height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.landing-content h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.landing-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #64748b;
}

.landing-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}
/* Toasts */
#toast-area{
    position: fixed;
    top: 18px;
    right: 18px;
    display: grid;
    gap: 12px;
    z-index: 9999;
  }
  
  .toast{
    width: min(420px, calc(100vw - 36px));
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 6px solid #2563eb;
    border-radius: 14px;
    padding: 14px 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.12);
    display: grid;
    grid-template-columns: 26px 1fr 26px;
    align-items: center;
    gap: 10px;
  
    animation: toastIn 260ms ease;
  }
  
  .toast .toast-icon i{ font-size: 18px; }
  .toast .toast-text{ font-size: 14px; color: #0f172a; line-height: 1.25; }
  .toast .toast-close{
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    padding: 6px;
  }
  .toast .toast-close:hover{ background:#f1f5f9; }
  
  .toast.success{ border-left-color: #22c55e; }
  .toast.success .toast-icon{ color:#22c55e; }
  
  .toast.error{ border-left-color: #ef4444; }
  .toast.error .toast-icon{ color:#ef4444; }
  
  .toast.warning{ border-left-color: #f59e0b; }
  .toast.warning .toast-icon{ color:#f59e0b; }
  
  .toast.info{ border-left-color: #2563eb; }
  .toast.info .toast-icon{ color:#2563eb; }
  
  .toast.hide{
    animation: toastOut 240ms ease forwards;
  }
  
  @keyframes toastIn{
    from{ opacity: 0; transform: translateY(-8px); }
    to{ opacity: 1; transform: translateY(0); }
  }
  @keyframes toastOut{
    to{ opacity: 0; transform: translateY(-8px); }
  }
  
  /* Micro-interactions */
  .card, .btn, input, select, textarea{
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  }
  
  .btn:active{
    transform: translateY(0px) scale(0.98);
  }
  
  input:focus, select:focus, textarea:focus{
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
  }
  /* ========== INDEX / FILTRES COMPACTS ========== */

.sub {
    color: #64748b;
    font-size: 14px;
  }
  
  /* barre du haut : titre + bouton filtre */
  .filterbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
  }
  
  /* panel repliable */
  .filters-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    margin-bottom: 26px;
  }
  
  .filters-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
  }
  
  /* inputs dans filtres : taille cohérente */
  .filters-form select,
  .filters-form input[type="text"] {
    min-width: 220px;
  }
  
  /* checkbox compacte stylée */
  .mini-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f1f5f9;
    font-weight: 600;
    color: #334155;
    border: 1px solid #e2e8f0;
  }
  
  .mini-check input {
    width: 16px;
    height: 16px;
  }
  
  /* actions alignées à droite */
  .filters-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
  }
  
  /* animation ouverture panel */
  .panel-in {
    animation: panelIn 0.18s ease;
  }
  
  @keyframes panelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  /* ========== EMPTY STATE ========== */
  .empty-state {
    grid-column: 1 / -1;
    background: white;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 26px;
    text-align: center;
    color: #334155;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
  }
  
  .empty-state h3 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  
  .empty-state p {
    color: #64748b;
    font-size: 14px;
  }
  
  /* ========== PETITES AMÉLIORATIONS UX ========== */
  
  /* rendre les liens/boutons plus "clickables" */
  .navbar nav a,
  .btn,
  button {
    cursor: pointer;
  }
  
  /* focus visible cohérent */
  select:focus,
  input:focus,
  textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
  }
  
  /* sur mobile : filtres prennent toute la largeur */
  @media (max-width: 640px) {
    .filterbar {
      flex-direction: column;
      align-items: stretch;
    }
  
    .filters-actions {
      margin-left: 0;
      width: 100%;
    }
  
    .filters-actions .btn {
      flex: 1;
      text-align: center;
    }
  
    .filters-form select,
    .filters-form input[type="text"] {
      width: 100%;
      min-width: 0;
    }
  
    .mini-check {
      width: 100%;
      justify-content: flex-start;
    }
  }
  .help{
  display:block;
  color:#64748b;
  font-size:12px;
}

  
  .navbar{
    background: rgba(255,255,255,0.78) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226,232,240,0.7);
  }
  
  .card{
    border: 1px solid rgba(226,232,240,0.9) !important;
    box-shadow: var(--shadow-soft) !important;
  }


  .btn-primary{
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: white !important;
  }
  .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px 22px;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
  }
  
  .form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
  }
  
  select,
  input,
  textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 16px; /* important sur iPhone pour éviter le zoom */
    background: white;
  }
  
  textarea {
    min-height: 110px;
    resize: vertical;
  }
  
  .form-section {
    background: white;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
  }
  
  .form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
  }
  @media (max-width: 640px) {
    .form-section {
      padding: 18px;
      border-radius: 14px;
    }
  
    .form-grid {
      grid-template-columns: 1fr;
      gap: 16px;
    }
  
    .form-footer {
      justify-content: stretch;
    }
  
    .form-footer .btn {
      width: 100%;
      text-align: center;
    }
  }
  .btn {
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    min-height: 44px;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: white !important;
  }
  
  .btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37,99,235,0.25);
  }
  
  .btn-light {
    background: #f1f5f9;
    color: #1e293b;
  }
  
  .btn-danger {
    background: #ef4444;
    color: white;
  }
  @media (max-width: 480px) {
    .landing-buttons,
    .filters-actions {
      flex-direction: column;
      width: 100%;
    }
  
    .landing-buttons .btn,
    .filters-actions .btn {
      width: 100%;
    }
  }
  @media (max-width: 640px) {
    .filterbar {
      flex-direction: column;
      align-items: stretch;
    }
  
    .filters-form {
      flex-direction: column;
      align-items: stretch;
    }
  
    .filters-form select,
    .filters-form input[type="text"],
    .mini-check,
    .filters-actions,
    .filters-actions .btn {
      width: 100%;
    }
  
    .filters-actions {
      margin-left: 0;
      flex-direction: column;
    }
  }
  @media (max-width: 640px) {
    .filterbar {
      flex-direction: column;
      align-items: stretch;
    }
  
    .filters-form {
      flex-direction: column;
      align-items: stretch;
    }
  
    .filters-form select,
    .filters-form input[type="text"],
    .mini-check,
    .filters-actions,
    .filters-actions .btn {
      width: 100%;
    }
  
    .filters-actions {
      margin-left: 0;
      flex-direction: column;
    }
  }