/* ─────────────────────────────────────────
   SMYL TRAVEL WIDGET — CSS
   Palette : burgundy #8B1A2F · gold #C9A55A · blanc
   ───────────────────────────────────────── */

:root {
  --smyl-burgundy: #8B1A2F;
  --smyl-bordeaux: #3A0812;
  --smyl-gold:     #C9A55A;
  --smyl-gold-lt:  #F5B800;
  --smyl-white:    #FFFFFF;
  --smyl-light:    #FDF6F0;
  --smyl-grey:     #6B6B6B;
  --smyl-shadow:   rgba(139,26,47,0.15);
  --smyl-radius:   12px;
  --smyl-font-h:   'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --smyl-font-b:   'DM Sans', 'Outfit', system-ui, sans-serif;
}

#smyl-widget {
  font-family: var(--smyl-font-b);
  color: #222;
}

/* ── LOADING ── */
.smyl-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  color: var(--smyl-grey);
}
.smyl-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #eee;
  border-top-color: var(--smyl-burgundy);
  border-radius: 50%;
  animation: smyl-spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes smyl-spin { to { transform: rotate(360deg); } }

/* ── GRILLE CATALOGUE ── */
#smyl-catalogue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

/* ── CARTE VOYAGE ── */
.smyl-card {
  background: var(--smyl-white);
  border-radius: var(--smyl-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--smyl-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.smyl-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px var(--smyl-shadow);
}
.smyl-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #f0e6e6;
}
.smyl-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--smyl-burgundy), var(--smyl-bordeaux));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--smyl-gold);
  font-size: 40px;
}
.smyl-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.smyl-card-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.smyl-card-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--smyl-light);
  color: var(--smyl-burgundy);
  border: 1px solid rgba(139,26,47,0.2);
  padding: 2px 8px;
  border-radius: 20px;
}
.smyl-card-title {
  font-family: var(--smyl-font-h);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--smyl-bordeaux);
  margin: 0 0 8px;
  line-height: 1.3;
}
.smyl-card-desc {
  font-size: 0.85rem;
  color: var(--smyl-grey);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.smyl-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(139,26,47,0.1);
}
.smyl-card-price {
  font-family: var(--smyl-font-h);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--smyl-burgundy);
}
.smyl-card-price span {
  font-size: 0.85rem;
  font-family: var(--smyl-font-b);
  font-weight: 400;
  color: var(--smyl-grey);
}
.smyl-btn-reserve {
  background: var(--smyl-burgundy);
  color: var(--smyl-white);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: var(--smyl-font-b);
}
.smyl-btn-reserve:hover {
  background: var(--smyl-bordeaux);
  transform: scale(1.03);
}

/* ── MODAL ── */
#smyl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 0, 5, 0.7);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: smyl-fadein 0.2s ease;
}
@keyframes smyl-fadein { from { opacity: 0; } to { opacity: 1; } }

#smyl-modal {
  background: var(--smyl-white);
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: smyl-slidein 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--smyl-burgundy) #eee;
}
@keyframes smyl-slidein {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

#smyl-modal-close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px 0 0;
  background: rgba(139,26,47,0.1);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--smyl-burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
#smyl-modal-close:hover { background: rgba(139,26,47,0.2); }

#smyl-modal-content {
  padding: 24px 28px 32px;
  clear: both;
}

/* ── EN-TÊTE MODAL ── */
.smyl-modal-header {
  margin-bottom: 24px;
}
.smyl-modal-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
}
.smyl-modal-title {
  font-family: var(--smyl-font-h);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--smyl-bordeaux);
  margin: 0 0 6px;
}
.smyl-modal-price-tag {
  display: inline-block;
  background: var(--smyl-light);
  border: 1px solid rgba(139,26,47,0.2);
  border-radius: 8px;
  padding: 6px 14px;
  font-family: var(--smyl-font-h);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--smyl-burgundy);
}

/* ── FORMULAIRE ── */
.smyl-form-section {
  margin-bottom: 20px;
}
.smyl-form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--smyl-burgundy);
  margin-bottom: 6px;
}
.smyl-form-input,
.smyl-form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--smyl-font-b);
  color: #222;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.smyl-form-input:focus,
.smyl-form-select:focus {
  outline: none;
  border-color: var(--smyl-burgundy);
  box-shadow: 0 0 0 3px rgba(139,26,47,0.1);
}
.smyl-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .smyl-form-row { grid-template-columns: 1fr; }
}
.smyl-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
@media (max-width: 500px) {
  .smyl-form-row-3 { grid-template-columns: 1fr 1fr; }
}

/* ── BLOC VOYAGEUR ── */
.smyl-voyageurs-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}
.smyl-voyageur-block {
  background: var(--smyl-light);
  border: 1px solid rgba(139,26,47,0.12);
  border-radius: 10px;
  padding: 14px 16px;
  animation: smyl-fadein 0.2s ease;
}
.smyl-voyageur-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--smyl-burgundy);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.smyl-voyageur-num {
  background: var(--smyl-burgundy);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}

/* ── DIVIDER ── */
.smyl-divider {
  border: none;
  border-top: 1px solid rgba(139,26,47,0.1);
  margin: 20px 0;
}

/* ── BOUTON SOUMETTRE ── */
.smyl-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--smyl-burgundy), var(--smyl-bordeaux));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--smyl-font-b);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 8px;
}
.smyl-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,26,47,0.35);
}
.smyl-btn-submit:active { transform: scale(0.98); }
.smyl-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── MESSAGES ── */
.smyl-msg-success {
  background: #f0faf4;
  border: 1.5px solid #4caf7d;
  border-radius: 10px;
  padding: 18px;
  color: #1a6b3c;
  text-align: center;
  font-weight: 600;
  margin-top: 16px;
}
.smyl-msg-error {
  background: #fff5f5;
  border: 1.5px solid #e57373;
  border-radius: 10px;
  padding: 14px;
  color: #c0392b;
  font-size: 0.9rem;
  margin-top: 10px;
}

/* ── BADGE PARTENAIRE ── */
.smyl-partner-badge {
  text-align: center;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 0.75rem;
  color: #aaa;
}
.smyl-partner-badge a {
  color: var(--smyl-burgundy);
  text-decoration: none;
  font-weight: 600;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  #smyl-catalogue {
    grid-template-columns: 1fr;
  }
  #smyl-modal-content {
    padding: 16px 18px 24px;
  }
  .smyl-modal-title { font-size: 1.3rem; }
}
