/* ============================================
   TAF TRANSPORT - Feuille de style parcours réservation
   Mobile-first + responsive (mobile / tablette / desktop)
   ============================================ */

:root {
  --orange-1: #ff8c42;
  --orange-2: #ff6b6b;
  --violet: #667eea;
  --gris-texte: #333;
  --gris-clair: #999;
  --gris-bordure: #ddd;
  --gris-inactif: #ddd;
  --erreur-bg: #ffebee;
  --erreur-bord: #f44336;
  --erreur-txt: #c62828;
  --succes-bg: #e8f5e9;
  --succes-bord: #4caf50;
  --succes-txt: #2e7d32;
  --ombre: 0 2px 10px rgba(0,0,0,0.1);
  --radius: 10px;
  --radius-champ: 5px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f5f7;
  color: var(--gris-texte);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* --- Carte principale (mobile-first : marges réduites) --- */
.tb-card {
  max-width: 600px;
  margin: 20px auto;
  padding: 24px 18px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--ombre);
}

.tb-title {
  text-align: center;
  color: var(--gris-texte);
  margin: 0 0 8px;
  font-size: 1.5rem;
}
.tb-subtitle {
  text-align: center;
  color: var(--gris-clair);
  margin: 0 0 28px;
  font-size: 0.95rem;
}

/* --- Indicateur d'étapes --- */
.tb-steps {
  display: flex;
  justify-content: space-around;
  margin-bottom: 32px;
  text-align: center;
  gap: 4px;
}
.tb-step { flex: 1; min-width: 0; }
.tb-step-num {
  width: 36px; height: 36px;
  background: var(--gris-inactif);
  color: var(--gris-clair);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  font-weight: bold;
}
.tb-step-label {
  color: var(--gris-clair);
  font-size: 0.75rem;
  margin: 0;
}
.tb-step.is-active .tb-step-num { background: var(--violet); color: #fff; }
.tb-step.is-active .tb-step-label { color: var(--violet); font-weight: bold; }

/* --- Champs de formulaire --- */
.tb-field { margin-bottom: 20px; }
.tb-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--gris-texte);
}
.tb-input, .tb-select, .tb-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gris-bordure);
  border-radius: var(--radius-champ);
  font-size: 1rem;
  font-family: inherit;
}
.tb-input:focus, .tb-select:focus, .tb-textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.tb-textarea { resize: vertical; min-height: 80px; }

/* --- Bouton principal (cible tactile confortable) --- */
.tb-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--orange-1) 0%, var(--orange-2) 100%);
  color: #fff;
  padding: 15px;
  font-size: 1.05rem;
  font-weight: bold;
  border: none;
  border-radius: var(--radius-champ);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  min-height: 48px;
}
.tb-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.tb-btn-secondary {
  background: #fff;
  color: var(--violet);
  border: 1px solid var(--violet);
}

/* --- Messages --- */
.tb-alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 0.95rem;
}
.tb-alert-error   { background: var(--erreur-bg); border: 1px solid var(--erreur-bord); color: var(--erreur-txt); }
.tb-alert-success { background: var(--succes-bg); border: 1px solid var(--succes-bord); color: var(--succes-txt); }

/* --- Spinner --- */
#tb-spinner {
  display: none;
  position: fixed; inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: 9999;
  align-items: center; justify-content: center;
  flex-direction: column;
}
#tb-spinner.is-visible { display: flex; }
.tb-spinner-circle {
  width: 48px; height: 48px;
  border: 5px solid var(--gris-bordure);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: tb-spin 0.8s linear infinite;
}
.tb-spinner-text { margin-top: 14px; color: var(--gris-texte); font-weight: bold; }
@keyframes tb-spin { to { transform: rotate(360deg); } }

/* --- Gestion des vues (phases) --- */
.tb-phase { display: none; }
.tb-phase.is-active { display: block; }

/* ============================================
   TABLETTE (>= 768px)
   ============================================ */
@media (min-width: 768px) {
  .tb-card { margin: 40px auto; padding: 36px 32px; }
  .tb-title { font-size: 1.75rem; }
  .tb-step-num { width: 40px; height: 40px; }
  .tb-step-label { font-size: 0.85rem; }
  .tb-btn:hover:not(:disabled) { transform: scale(1.02); }
}

/* ============================================
   DESKTOP (>= 1024px)
   ============================================ */
@media (min-width: 1024px) {
  .tb-card { margin: 60px auto; padding: 40px; }
  .tb-subtitle { margin-bottom: 40px; }
}

/* ============================================
   NAVIGATION UNIVERSELLE (injectée par nav.js)
   ============================================ */
:root { --nav-h: 60px; }
body { padding-top: var(--nav-h); }

.tb-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 9998;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.tb-nav-brand {
  font-weight: bold; font-size: 1.15rem; color: var(--violet);
  text-decoration: none; white-space: nowrap;
}
.tb-nav-brand span { color: var(--orange-2); font-size: 0.85rem; }

.tb-nav-links { display: flex; align-items: center; gap: 4px; }
.tb-nav-links a {
  color: var(--gris-texte); text-decoration: none;
  padding: 8px 12px; border-radius: 6px; font-size: 0.95rem;
  white-space: nowrap; transition: background 0.2s, color 0.2s;
}
.tb-nav-links a:hover { background: #f0f2ff; color: var(--violet); }
.tb-nav-links a.is-current { background: var(--violet); color: #fff; }

.tb-nav-toggle {
  display: none; background: none; border: none;
  font-size: 1.6rem; color: var(--violet); cursor: pointer;
  padding: 4px 8px; line-height: 1;
}

@media (max-width: 899px) {
  .tb-nav-toggle { display: block; }
  .tb-nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .tb-nav-links.is-open { max-height: 80vh; overflow: auto; }
  .tb-nav-links a { padding: 14px 20px; border-bottom: 1px solid #f0f0f0; border-radius: 0; }
}

/* ============================================
   HERO (page d'accueil)
   ============================================ */
.tb-hero {
  min-height: calc(100vh - var(--nav-h));
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b6b 100%);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
}
.tb-hero-content { color: #fff; max-width: 700px; }
.tb-hero-content h1 { font-size: 2.4rem; margin: 0 0 16px; text-shadow: 2px 2px 6px rgba(0,0,0,0.35); }
.tb-hero-content p  { font-size: 1.2rem; margin: 0 0 32px; text-shadow: 1px 1px 4px rgba(0,0,0,0.35); }
.tb-hero-btn {
  display: inline-block; padding: 16px 44px;
  font-size: 1.2rem; font-weight: bold; color: #fff;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  border-radius: 14px; text-decoration: none;
  box-shadow: 0 4px 15px rgba(255,107,107,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tb-hero-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255,107,107,0.6); }

/* ============================================
   PAGES INFO (accueil, à propos, tarifs, contact)
   ============================================ */
.tb-section { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }
.tb-info-card {
  background: #fff; padding: 32px; border-radius: 12px;
  box-shadow: var(--ombre); margin-bottom: 24px;
}
.tb-info-card h2 {
  color: var(--violet); font-size: 1.6rem;
  border-bottom: 3px solid var(--violet); padding-bottom: 10px; margin-top: 0;
}
.tb-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; margin: 20px 0;
}
.tb-grid-item {
  background: #f8f9fa; padding: 20px; border-radius: 8px;
  border-top: 4px solid var(--violet); text-align: center;
}
.tb-grid-item h3 { margin-top: 0; color: var(--violet); }
.tb-grid-item p { color: #666; margin: 0; }

@media (min-width: 768px) {
  .tb-hero-content h1 { font-size: 3.2rem; }
  .tb-hero-content p  { font-size: 1.5rem; }
}

/* ============================================
   PAGE TARIFS (tableau + encadrés)
   ============================================ */
.tb-tarif-highlight {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  border-radius: 12px; padding: 28px; text-align: center;
  margin: 16px 0; border: 1px solid #d0d9f0;
}
.tb-tarif-prix {
  font-size: 2.2rem; font-weight: bold; color: var(--violet); margin-bottom: 12px;
}
.tb-tarif-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border-radius: 8px; overflow: hidden; box-shadow: var(--ombre);
}
.tb-tarif-table th {
  background: var(--violet); color: #fff; padding: 14px; text-align: left;
}
.tb-tarif-table td { padding: 12px 14px; border-bottom: 1px solid #eee; }
.tb-tarif-total { background: #f0f4ff; }

@media (min-width: 768px) {
  .tb-tarif-prix { font-size: 2.5rem; }
}

/* ============================================
   FAQ ACCORDÉON (page à propos)
   ============================================ */
.tb-faq { margin: 12px 0; }
.tb-faq-item {
  border: 1px solid #e0e0e0; border-radius: 8px;
  margin-bottom: 10px; overflow: hidden;
}
.tb-faq-q {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; cursor: pointer; background: #f9f9f9;
  font-weight: 600; font-size: 1.02rem; color: var(--gris-texte);
  transition: background 0.3s;
}
.tb-faq-q:hover { background: #f0f0f0; }
.tb-faq-icon { font-size: 1.2rem; transition: transform 0.3s; flex-shrink: 0; margin-left: 10px; }
.tb-faq-item.is-open .tb-faq-icon { transform: rotate(45deg); }
.tb-faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 20px; background: #fff; color: #555; line-height: 1.6;
}
.tb-faq-item.is-open .tb-faq-a { max-height: 500px; padding: 16px 20px; }
.tb-faq-a a { color: var(--violet); font-weight: bold; }

/* ============================================
   PAGE CONTACT (grille formulaire + coordonnées)
   ============================================ */
.tb-contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.tb-contact-item {
  margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #e0e0e0;
}
.tb-contact-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.tb-contact-item h3 { color: var(--violet); margin: 0 0 8px; }
.tb-contact-item p { color: #666; margin: 0; line-height: 1.6; }
.tb-contact-item a { color: var(--violet); font-weight: bold; text-decoration: none; }
.tb-contact-item a:hover { text-decoration: underline; }

@media (min-width: 900px) {
  .tb-contact-grid { grid-template-columns: 2fr 1fr; align-items: start; }
}


/* ===== ACCUEIL : fond photo Prealpes + bienvenue + logo ===== */
.tb-hero {
  background:
    /* voile violet LEGER (.72 -> .34) : la photo respire, la teinte du
       theme reste presente. Le voile sombre en dessous garantit la
       lisibilite du texte blanc et du bouton orange. */
    linear-gradient(135deg, rgba(102,126,234,.34) 0%,
                            rgba(118,75,162,.26) 50%,
                            rgba(255,107,107,.28) 100%),
    linear-gradient(180deg, rgba(0,0,0,.14) 0%, rgba(0,0,0,.26) 100%),
    url("../img/fond_accueil.jpg") center/cover no-repeat;
}
/* Bienvenue : MEME police/graisse/ombre que le h1, en plus petit */
/* SPECIFICITE : '.tb-hero-content p' (classe+element) ecrase '.tb-welcome'
   (classe seule) -> il FAUT '.tb-hero-content p.tb-welcome' pour gagner.
   Meme police/graisse/ombre que le h1, taille reduite. */
.tb-hero-content p.tb-welcome {
  font-size: 1.6rem; font-weight: bold; margin: 0 0 10px; color: #fff;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.35);
}
@media (min-width: 768px) {
  .tb-hero-content p.tb-welcome { font-size: 2.1rem; }
}
/* logo dans la barre de navigation */
.tb-nav-logo { height: 38px; width: auto; display: block; border-radius: 6px; }
.tb-nav-brand { display: flex; align-items: center; gap: 10px; }
@media (max-width: 480px) { .tb-nav-brand span { display: none; } }
.tb-logo {
  display: block; margin: 0 auto 20px;
  max-width: 190px; height: auto;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.35));
}
@media (min-width: 768px) {
  .tb-welcome { font-size: 2rem; }
}


/* ===== SOUS-MENU ESPACE CLIENT (👤) ===== */
.tb-acct { position: relative; }
.tb-acct-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--gris-bordure);
  border-radius: 8px; padding: 8px 12px; cursor: pointer;
  font-size: 1rem; color: var(--gris-texte); font-family: inherit;
}
.tb-acct-btn:hover { background: #f0f2ff; color: var(--violet); border-color: var(--violet); }
.tb-acct-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border-radius: 10px; box-shadow: var(--ombre);
  border: 1px solid var(--gris-bordure); min-width: 210px; z-index: 1200;
  overflow: hidden;
}
.tb-acct.is-open .tb-acct-menu { display: block; }
.tb-acct-menu a {
  display: block; padding: 14px 18px; text-decoration: none;
  color: var(--gris-texte); font-size: 1rem; border-bottom: 1px solid #f0f0f0;
}
.tb-acct-menu a:last-child { border-bottom: none; }
.tb-acct-menu a:hover { background: #f0f2ff; color: var(--violet); }
/* Mobile : le sous-menu s'integre dans le menu hamburger, en pleine largeur */
@media (max-width: 768px) {
  .tb-acct { width: 100%; }
  .tb-acct-btn { width: 100%; border: none; border-radius: 0;
                 border-top: 1px solid #f0f0f0; padding: 14px 20px; }
  .tb-acct-menu { position: static; box-shadow: none; border: none;
                  min-width: 0; border-top: 1px solid #f0f0f0; }
}
