/* =============================================
   YABUS – style.css
   Design: Modern Luxury – Bleu profond + Ambre
   ============================================= */

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

:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --slate-900: #0f172a;
  --slate-950: #020617;
  --slate-700: #334155;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 20px 60px rgba(0,0,0,0.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(to bottom, var(--slate-900), var(--blue-900), var(--slate-900));
  min-height: 100vh;
  color: #1e293b;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- HEADER ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-300);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--blue-600), var(--amber-500));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
}
.logo-name {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1;
}
.logo-tagline {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--amber-600);
  letter-spacing: 0.03em;
}
.btn-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue-600);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.btn-phone:hover { background: var(--blue-700); }

/* ---- HERO ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://d2xsxph8kpxj0f.cloudfront.net/310519663262313317/3F2ecoA7YNKSRYoMmrhUGA/yabus-hero-banner-nmmWT9evLGezrW9oHwsj5W.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}
.hero-content { position: relative; }
.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  color: white;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #bfdbfe;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-amber {
  background: var(--amber-500);
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
}
.btn-amber:hover { background: var(--amber-600); }
.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ---- FORM SECTION ---- */
.section-form {
  padding: 3rem 0 4rem;
  position: relative;
  z-index: 10;
}
.form-wrap { max-width: 760px; }

/* ---- CARD ---- */
.card {
  background: rgba(255,255,255,0.99);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  background: linear-gradient(to right, var(--blue-600), var(--blue-700));
  padding: 1.75rem 2rem;
  color: white;
}
.card-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.card-desc { font-size: 0.9rem; color: #bfdbfe; }
.card-body { padding: 2rem; }

/* ---- FORM ELEMENTS ---- */
form { display: flex; flex-direction: column; gap: 1.5rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: #1e293b;
  background: white;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}
.field input:focus,
.field select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.field select:disabled {
  background-color: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.cost-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: linear-gradient(to right, #eff6ff, #fffbeb);
  border: 2px solid #bfdbfe;
  border-radius: var(--radius);
  height: 100%;
  min-height: 46px;
}
.cost-label { font-size: 0.85rem; color: var(--slate-700); }
.cost-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue-600);
}

/* ---- PAYMENT OPTIONS ---- */
.payment-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.payment-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border: 2px solid var(--slate-300);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  background: white;
  min-width: 110px;
  position: relative;
  flex: 1;
  max-width: 140px;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-option:hover {
  border-color: var(--blue-600);
  background: #eff6ff;
}

.payment-option:has(input:checked) {
  border-color: var(--blue-600);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.payment-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  width: 65px;
  height: 42px;
  background: #f8fafc;
  flex-shrink: 0;
}
.payment-img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.payment-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-700);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

@media (max-width: 768px) {
  .payment-options {
    gap: 0.75rem;
  }
  
  .payment-option {
    padding: 0.65rem 0.75rem;
    min-width: 95px;
    max-width: 120px;
  }
  
  .payment-logo {
    width: 55px;
    height: 36px;
  }
  
  .payment-name {
    font-size: 0.75rem;
  }
}

@media (max-width: 640px) {
  .payment-options {
    gap: 0.6rem;
  }
  
  .payment-option {
    padding: 0.6rem 0.6rem;
    min-width: 85px;
    max-width: 110px;
  }
  
  .payment-logo {
    width: 50px;
    height: 33px;
  }
  
  .payment-name {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .payment-options {
    gap: 0.5rem;
  }
  
  .payment-option {
    padding: 0.5rem 0.5rem;
    min-width: 75px;
    max-width: 100px;
    flex: 1;
  }
  
  .payment-logo {
    width: 45px;
    height: 30px;
  }
  
  .payment-name {
    font-size: 0.65rem;
  }
}

/* ---- SUBMIT ---- */
.btn-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to right, var(--blue-600), var(--blue-700));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.1s;
}
.btn-submit:hover { background: linear-gradient(to right, var(--blue-700), #1e40af); }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.security-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--slate-700);
  background: #f8fafc;
  padding: 0.85rem;
  border-radius: var(--radius);
}

/* ---- ADVANTAGES ---- */
.section-advantages {
  padding: 4rem 0;
  background: rgba(255,255,255,0.04);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: white;
  text-align: center;
  margin-bottom: 3rem;
}
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) { .advantages-grid { grid-template-columns: 1fr; } }
.advantage-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 1.75rem;
  transition: background 0.2s;
}
.advantage-card:hover { background: rgba(255,255,255,0.18); }
.adv-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1rem;
}
.advantage-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}
.advantage-card p { font-size: 0.9rem; color: #bfdbfe; line-height: 1.5; }

/* ---- FOOTER ---- */
.footer {
  background: var(--slate-950);
  border-top: 1px solid #1e293b;
  padding: 3rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}
.footer-grid p, .footer-grid ul, .footer-grid li {
  font-size: 0.85rem;
  color: var(--slate-400);
  line-height: 1.7;
}
.footer-grid ul { list-style: none; }
.footer-grid a {
  color: var(--slate-400);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-grid a:hover { color: var(--amber-500); }
.socials { display: flex; gap: 1rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s, transform 0.2s;
  border: 1px solid rgba(255,255,255,0.2);
}
.social-link:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.social-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: #475569;
}

/* ---- SEARCH-SELECT (ville avec barre de recherche) ---- */
.search-select {
  position: relative;
}
.search-input {
  width: 100%;
  padding: 0.6rem 2.2rem 0.6rem 0.9rem;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: #1e293b;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat right 0.8rem center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: text;
  box-sizing: border-box;
}
.search-input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.search-input:disabled {
  background-color: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: white;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius);
  max-height: 220px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.search-dropdown.open { display: block; }
.search-dropdown-item {
  padding: 0.55rem 0.9rem;
  font-size: 0.93rem;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.15s;
}
.search-dropdown-item:hover,
.search-dropdown-item.active {
  background: #eff6ff;
  color: var(--blue-600);
  font-weight: 600;
}
.search-dropdown-empty {
  padding: 0.75rem 0.9rem;
  font-size: 0.88rem;
  color: var(--slate-400);
  text-align: center;
}

/* ---- TOAST ---- */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 9999;
}
.toast {
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease;
  max-width: 340px;
}
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(120%); }
}
