/* ==========================================================================
   🛒 MODULE DE RÉSERVATION INTERACTIF - STYLE-RESERVATION.CSS (100% RESPONSIVE)
   ========================================================================== */

/* --- Déclaration des variables graphiques (Teintes MEL Glow) --- */
:root {
  --primary: #c8395f;
  --primary-gradient: linear-gradient(135deg, #c8395f 0%, #e0537a 100%);
  --dark: #282828;
  --bg-app: #f9f6f6;
  --bg-card: #ffffff;
  --text-main: #3a3231;
  --text-light: #7c6e6d;
  --border-color: #eee1e3;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  margin: 0;
  padding: 0;
}

/* --- Barre de navigation de la page --- */
.navbar-reservation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 4%;
  background: var(--dark);
  
  top: 0;
  z-index: 100;
}

.navbar-reservation .logo img {
  max-height: 45px;
}

.navbar-reservation .back-link {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.navbar-reservation .back-link:hover {
  color: #f7d8e4;
}

/* --- Conteneur général --- */
.reservation-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
  padding-bottom: 160px; /* Évite que le bandeau inférieur cache le dernier produit ou bouton */
}

.reservation-header {
  text-align: center;
  margin-bottom: 40px;
}

.reservation-header h1 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.reservation-header p {
  color: var(--text-light);
  font-size: 1rem;
}

/* --- Encart/Étapes (Éléments du formulaire) --- */
.step-section {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.step-section h2 {
  font-family: 'Playfair Display', serif;
  color: var(--dark);
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.step-number {
  background: var(--primary-gradient);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
}

/* --- Grilles d'alignement pour les dates et coordonnées --- */
.form-dates-grid, .form-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

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

.form-group label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dark);
}

.form-group input {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--primary);
}

/* ==========================================================================
   🛠️ ALIGNEMENT DU CATALOGUE (Vue Ordinateur par défaut)
   ========================================================================== */
.table-wrapper {
  width: 100%;
}

.tarifs-location-reservation {
  width: 100%;
  border-collapse: collapse;
}

.tarifs-location-reservation th {
  background: #fdfafb;
  color: var(--dark);
  padding: 12px 15px;
  font-weight: 600;
  text-align: left;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tarifs-location-reservation tr.item-row {
  border-bottom: 1px solid #f5eaeb;
  transition: background-color 0.2s;
}

.tarifs-location-reservation tr.item-row:hover {
  background-color: #fffcfd;
}

.tarifs-location-reservation td {
  padding: 15px 10px;
  vertical-align: middle;
}

/* Verrouillage absolu des dimensions de l'image de location */
.photo-equipement {
  width: 75px !important;
  height: 75px !important;
  min-width: 75px;
  min-height: 75px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: block;
}

/* Zone si pas d'image en base */
.no-img-placeholder {
  width: 75px;
  height: 75px;
  background: #e2e8f0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #a0aec0;
  font-weight: 600;
}

/* Contenu textuel, stocks et variantes */
.item-title {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark);
  line-height: 1.3;
}

.item-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 2px;
}

.stock-indicator {
  display: block;
  font-size: 0.8rem;
  color: #2f855a;
  margin-top: 3px;
  font-weight: 500;
}

.variant-selector select {
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  background: #fff;
  cursor: pointer;
  outline: none;
}

.unit-price {
  font-weight: 600;
  color: var(--primary);
  font-size: 1rem;
  white-space: nowrap;
}

/* ==========================================================================
   🔢 LE COMPTEUR DE QUANTITÉ COMPACT ET ALIGNÉ
   ========================================================================== */
.quantity-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c8babb;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.qty-btn {
  background: #fff;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--dark);
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: #fff0f3;
  color: var(--primary);
}

.qty-input {
  width: 42px;
  height: 32px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
  background: #fff;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ==========================================================================
   💰 BANDEAU DEVIS GLOBAL (STICKY EN BAS)
   ========================================================================== */
.sticky-summary-box {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 960px;
  background: #222222;
  color: #fff;
  border-radius: 16px;
  padding: 15px 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 999;
}

.summary-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.summary-details {
  display: flex;
  align-items: center;
  gap: 30px;
}

.summary-line {
  font-size: 0.95rem;
  color: #cdcdcd;
}

.count-badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: bold;
  margin-left: 5px;
}

.summary-line.total {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

#total-price-display {
  color: #f7d8e4;
  margin-left: 5px;
}

.summary-notice {
  font-size: 0.75rem;
  color: #9a8f90;
  margin: 0;
}

.btn-submit-booking {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-submit-booking:disabled {
  background: #444;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
}

.footer-reservation {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 0.8rem;
}



/* ==========================================================================
   📱 CONFIGURATION STRICTEMENT RESPONSIVE POUR SMARTPHONE (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  
  body {
    padding-bottom: 60px; /* Donne de l'air pour la boîte fixe en bas */
  }

  .reservation-container {
    padding-bottom: 150px; /* Sécurité pour pas masquer les derniers inputs */
    margin: 20px auto;
  }

  /* --- Transmutation du tableau en cartes empilées --- */
  .tarifs-location-reservation, 
  .tarifs-location-reservation thead, 
  .tarifs-location-reservation tbody, 
  .tarifs-location-reservation th, 
  .tarifs-location-reservation td, 
  .tarifs-location-reservation tr { 
    display: block; 
  }
  
  /* Masquage de l'en-tête de colonne sur smartphone */
  .tarifs-location-reservation thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  /* Chaque ligne d'article devient son propre encadré */
  .tarifs-location-reservation tr.item-row {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 20px;
    padding: 15px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.01);
  }

  .tarifs-location-reservation tr.item-row:hover {
    background-color: #ffffff;
  }

  /* Réorganisation des cellules à l'intérieur de la carte */
  .tarifs-location-reservation td {
    padding: 6px 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }

  /* Positionnement centré et empilé pour l'image et la description */
  .tarifs-location-reservation td[data-label="Photo"] {
    justify-content: center;
    padding-bottom: 10px;
    border-bottom: 1px dashed #f5eaeb;
    margin-bottom: 10px;
  }

  .tarifs-location-reservation td[data-label="Description"] {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-bottom: 10px;
    border-bottom: 1px dashed #f5eaeb;
    margin-bottom: 10px;
  }

  .item-title {
    font-size: 1.05rem;
  }

  /* Génération des intitulés sur la gauche pour les valeurs brutes restante */
  .tarifs-location-reservation td[data-label="Tarif unitaire"]::before,
  .tarifs-location-reservation td[data-label="Quantité"]::before {
    content: attr(data-label) " :";
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  /* --- Recadrage du bandeau de devis sticky en bas --- */
  .sticky-summary-box {
    width: calc(100% - 20px);
    bottom: 10px;
    padding: 10px;
    max-width: 90%;

  }

  .summary-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .summary-details {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }

  .summary-line.total {
    font-size: 1.15rem;
  }
  

  
  .btn-submit-booking {
    width: 100%;
    padding: 14px;
    font-size: 0.9rem;
  }
  .summary-line {
    font-size: 0.8rem;
    color: #cdcdcd;
}


}


@media (max-width: 768px) {
  /* Correction du H1 : plus petit, aligné, et gère mieux les coupures de mots */
  .reservation-header h1 {
    font-size: 1.6rem !important; /* Un peu plus grand que 1.2 pour rester lisible */
    line-height: 1.2;
    padding: 0 10px;
    word-break: break-word; /* Force le mot à se couper proprement si besoin */
    hyphens: auto;
  }

.process-steps {
    display: flex !important;
    justify-content: space-between !important;
    gap: 5px !important; /* Réduit l'espace pour tout faire tenir */
    padding: 0 5px !important;
  }
  
  .process-steps div {
    flex: 1 1 30% !important;
    text-align: center;
  }

  .process-steps i {
    font-size: 1.2rem !important;
    margin-bottom: 8px;
    display: block;
  }

  .process-steps p {
    font-size: 0.65rem !important; /* Texte plus petit pour éviter le retour à la ligne */
    line-height: 1.1 !important;
    margin: 0 !important;
  }

  .process-steps small {
    font-size: 0.6rem !important;
    display: block;
    margin-top: 2px;
  }
  /* Assure-toi que le texte SEO ne déborde pas */
  .seo-intro {
    padding: 0 15px;
    font-size: 0.8rem;
  }
}

/* Harmonisation du menu déroulant avec les autres champs */
#user-livraison {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 10px; /* Rayon identique à tes inputs */
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    background-color: #fff;
    cursor: pointer;
    /* Supprime le look "système" trop basique */
    appearance: none; 
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%235a4b46" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Effet au clic (focus) pour correspondre au design global */
#user-livraison:focus {
    outline: none;
    border-color: #c8395f; /* Ton rose signature */
    box-shadow: 0 0 5px rgba(200, 57, 95, 0.2);
}


.btn-submit-booking:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

