/* ==========================================================================
   PAGE : DEVIS IPHONE (Refonte visuelle)
   ========================================================================== */

/* === Structure Générale de la Page === */
.devis-page-section .page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.devis-page-section .page-header h1 {
  color: #2D496B;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.devis-page-section .page-header p {
  font-size: 1.1rem;
  color: #555e68;
  max-width: 700px;
  margin: 0.5rem auto 0 auto;
  line-height: 1.6;
}

/* === Conteneur Principal du Formulaire (Carte) === */
.devis-form-container {
  max-width: 650px;
  margin: 2rem auto 4rem auto;
  padding: 2.5rem;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(45, 73, 107, 0.1);
  border: 1px solid #e9ecef;
}

/* === Étapes du Formulaire et Labels === */
.form-step {
  margin-bottom: 2rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
}

/* === Champs de Sélection (Dropdowns) === */
.form-select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 6px;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cpath%20fill%3D%22%23343a40%22%20d%3D%22M8%2010.293l-4.146-4.147a.5.5%200%200%200-.708.708l4.5%204.5a.5.5%200%200%200%20.708%200l4.5-4.5a.5.5%200%200%200-.708-.708L8%2010.293z%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  cursor: pointer;
}

.form-select:focus {
  border-color: #4A7C85;
  box-shadow: 0 0 0 0.25rem rgba(74, 124, 133, 0.25);
  outline: 0;
}

/* === Conteneur pour la Sélection de Panne (Dropdown + Image) === */
.panne-selection-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.panne-selection-container .form-select {
  flex-grow: 1;
  min-width: 0;
}

.panne-image-container {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f8f9fa;
  overflow: hidden;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.panne-image-container:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.panne-image-container img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  display: block;
}

/* === Section des Résultats de l'Estimation === */
.devis-result {
  margin-top: 2rem; /* Ajusté pour mobile */
  padding: 1.5rem;  /* Ajusté pour mobile */
  background-color: #f0f7fa;
  border-radius: 8px;
}

.result-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1.5rem;
}

/* --- Section Prix --- */
.result-prix-section {
  flex: 2 1 280px;
  min-width: 250px;
}

.result-prix-section .result-title {
  font-size: 0.9rem;
  color: #556b82;
  margin-bottom: 0.3rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-prix-section .prix-estimatif {
  font-size: 2.8rem;
  font-weight: 700;
  color: #368A99;
  margin-bottom: 0.4rem;
  line-height: 1.1;
}

.result-prix-section .result-details {
  font-size: 0.95rem;
  color: #6c757d;
  line-height: 1.4;
}

/* --- Section Durée --- */
.result-duree-section {
  flex: 1 1 180px;
  text-align: right;
  padding-left: 1.5rem;
  border-left: 1px solid #d0dde4;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

/* Icône de durée (style barre verticale simple) - COMMENTÉE / SUPPRIMÉE */
/*
.result-duree-section::before {
  content: '';
  display: block;
  width: 8px;
  height: 28px;
  background-color: #AEBCC5;
  margin: 0 0 0.6rem 0;
  border-radius: 2px;
}
*/

.result-duree-section::after {
  content: none;
}

.result-duree-section .duree-title {
  font-size: 0.85rem;
  color: #556b82;
  margin-bottom: 0.2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-duree-section .duree-estimative {
  font-size: 1.5rem;
  font-weight: 600;
  color: #343a40;
}

/* === Actions (Boutons) === */
.result-actions {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e6eb;
}

.result-actions .btn {
  margin: 0.5rem;
}

/* Styles Généraux des Boutons */
.btn {
  display: inline-block;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.85rem 1.8rem;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 6px;
  transition: all .2s ease-in-out;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn:active {
  transform: translateY(0px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn-primary {
  background-color: #4A7C85;
  border-color: #4A7C85;
}
.btn-primary:hover {
  background-color: #3e6b73;
  border-color: #3a636b;
  color: #ffffff;
}

.btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
}
.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
  color: #ffffff;
}

/* === Section Informations de Stock === */
.stock-info-container {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e6eb;
}

.stock-info-container .stock-title {
  font-size: 0.9rem;
  color: #556b82;
  margin-bottom: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0; /* Augmenté pour mobile */
  font-size: 0.9rem; /* Ajusté pour mobile */
  color: #495057;
  border-bottom: 1px dashed #e9ecef;
}
.stock-list-item:last-child {
  border-bottom: none;
}

.stock-location-name {
  flex-grow: 1;
  padding-right: 0.5rem; /* Ajouté */
}

.stock-status {
  font-weight: 700;
  padding-left: 0.5rem; /* Ajusté */
  white-space: nowrap;
  font-size: 0.9rem; /* Ajouté */
}

.stock-status.disponible {
  color: #28a745;
}

.stock-status.indisponible {
  color: #dc3545;
}

.no-stock-info {
    font-style: italic;
    color: #6c757d;
    padding: 0.5rem 0;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 768px) { /* Tablettes et grands téléphones */
  .devis-page-section .page-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
  .devis-page-section .page-header p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .devis-form-container {
    padding: 1.5rem;
    margin: 1rem auto 2rem auto;
    box-shadow: 0 5px 15px rgba(45, 73, 107, 0.08);
  }

  .form-label {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }
  .form-select {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }
  .form-step {
    margin-bottom: 1.5rem;
  }

  /* Section Résultats */
  .devis-result {
    margin-top: 2rem; /* Garder un espacement suffisant */
    padding: 1.5rem;
  }

  .result-prix-section .result-title,
  .result-duree-section .duree-title {
    font-size: 0.8rem;
  }
  .result-prix-section .prix-estimatif {
    font-size: 2.2rem;
  }
  .result-prix-section .result-details {
    font-size: 0.9rem;
  }
  .result-duree-section .duree-estimative {
    font-size: 1.25rem;
  }

  /* Section Stock */
  .stock-info-container .stock-title {
    font-size: 0.85rem;
    text-align: left; /* Par défaut à gauche */
  }
  .stock-list-item,
  .stock-location-name, /* Assurer la cohérence */
  .stock-status {
    font-size: 0.9rem;
  }

  /* Boutons d'action */
  .result-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }
  .result-actions .btn { /* Appliquer .btn ici aussi */
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) { /* Petits téléphones */
  .devis-page-section .page-header h1 {
    font-size: 1.6rem;
  }
  .devis-page-section .page-header p {
    font-size: 0.9rem;
  }

  .devis-form-container {
    padding: 1rem;
    border-radius: 8px;
  }

  .result-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .result-prix-section,
  .result-duree-section {
    text-align: center;
    border-left: none;
    padding-left: 0;
    padding-right: 0;
    flex-basis: auto;
    align-items: center;
  }
  .result-duree-section {
    border-top: 1px solid #e0e6eb;
    padding-top: 1rem;
    margin-top: 1rem;
  }
  /* Si .result-duree-section::before est commenté/supprimé, la ligne ci-dessous n'est plus nécessaire ici non plus.
  .result-duree-section::before {
    margin: 0 auto 0.6rem auto;
  }
  */

  .result-actions .btn {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }
  .result-actions .btn + .btn {
    margin-top: 0.75rem;
  }

  .panne-selection-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .panne-image-container {
    width: 80px; /* Taille fixe pour une meilleure consistance */
    height: 80px;
    margin-top: 0.75rem;
    align-self: center;
  }

  /* Section Stock pour très petits écrans */
  .stock-info-container {
    margin-top: 1rem;
    padding-top: 1rem;
  }
  .stock-info-container .stock-title {
    font-size: 0.8rem;
    text-align: center; /* Centrer le titre */
  }
  .stock-list-item,
  .stock-location-name,
  .stock-status {
    font-size: 0.85rem; /* Tailles de police légèrement réduites */
  }
}