/* ============================= AgentLeads CSS - Version Externalis�e ============================= */

/* ============================= Widget Trouver un vehicule ============================= */
#agl-panel {
  position: fixed;
  right: 18px;
  bottom: 20px;
  width: 520px;
  max-width: 92vw;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  display: none;
  overflow: hidden;
}

/* ============================= BOUTON TRIGGER ============================= */
#agl-btn {
  position: fixed;
  right: 18px;
  bottom: 65px;
  z-index: 99999;
  padding: 12px 14px;
  border: 0;
  border-radius: 999px;
  background: #2c3ec4;
  color: #fff;
  font: 600 14px system-ui;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(44, 62, 196, 0.4);
  transition: all 0.3s ease;
}

#agl-btn:hover {
  background: #1a2a8f;
  transform: scale(1.05);
}

/* ============================= HEADER ============================= */
#agl-head {
  background: #2c3ec4;
  color: #fff;
  padding: 10px 12px;
  font: 600 14px system-ui;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#agl-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

#agl-head-title {
  flex: 1;
}

#agl-head-feature {
  font-size: 12px;
  font-weight: 400;
  color: #fff;
  opacity: 1;
  transition: opacity 0.3s ease;
  line-height: 1.35;
  min-height: 16px;
  text-align: center;
}

/* Bouton son/speaker dans la zone de saisie (à côté du micro) */
#agl-sound {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 50%;
  flex-shrink: 0;
}

#agl-sound:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

#agl-sound svg {
  width: 20px;
  height: 20px;
}

#agl-reset {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

#agl-reset:hover {
  background: rgba(255, 255, 255, 0.1);
}

#agl-x {
  background: transparent;
  border: 0;
  color: #fff;
  font: 700 18px system-ui;
  cursor: pointer;
  padding: 0;
  margin: 0;
  min-width: 20px;
}

/* ============================= BODY ============================= */
#agl-body {
  display: flex;
  flex-direction: column;
  height: 85vh;
  max-height: 85vh;
}

#agl-chatlog {
  flex: 1;
  overflow: auto;
  padding: 10px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}

/* ============================= MESSAGES ============================= */
.agl-msg {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  margin: 6px 0;
  font: 14px/1.35 system-ui;
}

.agl-msg.assistant {
  background: #f2f2f2;
  color: #333;
  border: 1px solid #e5e5e5;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.agl-msg.user {
  background: #2c3ec4;
  color: #fff;
  border: 1px solid #2c3ec4;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.agl-msg-cta {
  background: #28a745;
  color: #fff;
  border: 0;
  padding: 10px 16px;
  border-radius: 8px;
  margin-top: 8px;
  cursor: pointer;
  font: 600 13px system-ui;
  display: inline-block;
  transition: background 0.2s ease;
}

.agl-msg-cta:hover {
  background: #218838;
}

/* ============================= TYPING INDICATOR ============================= */
#agl-typing {
  display: none;
  font-size: 12px;
  color: #666;
  margin: 4px 0 4px 10px;
  font-style: italic;
}

/* ============================= COMPOSER ============================= */
#agl-composer {
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fff;
  display: flex;
  gap: 8px;
  align-items: center;
}

#agl-nl {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  font: 16px system-ui;
  transition: border-color 0.2s ease;
}

#agl-nl:focus {
  outline: none;
  border-color: #111;
}

#agl-send {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 999px;
  border: 0;
  background: #2c3ec4;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

#agl-send:hover {
  background: #333;
}

#agl-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#agl-send svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ============================= RESULTS AREA ============================= */
#agl-results {
  padding: 10px;
  overflow: auto;
  border-top: 1px solid #f0f0f0;
  max-height: 50vh;
  background: #fff;
}

.agl-empty {
  padding: 10px;
  border: 1px dashed #ddd;
  border-radius: 10px;
  color: #666;
  text-align: center;
  margin: 8px 0;
  font-size: 13px;
}

/* ============================= FOOTER PERMANENT ============================= */
#agl-footer {
  text-align: center;
  color: #999;
  font-size: 11px;
  padding: 8px 10px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

/* ============================= VEHICLE CARDS ============================= */
.agl-card {
  display: flex;
  gap: 12px;
  border: none;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  background: #fff;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.15);
}

.agl-card:hover {
  box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.2);
  border: none !important;
  outline: none !important;
}

.agl-card-checkbox-wrapper {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.agl-card-checkbox-wrapper .agl-vehicle-checkbox {
  position: relative;
  z-index: 10;
  margin: 0;
}

.agl-card img {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f5;
  display: block;
}

.agl-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.agl-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: #111;
}

.agl-sub {
  font-size: 12px;
  color: #666;
  margin: 2px 0;
}

.agl-link {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agl-link a {
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #2c3ec4;
  border: none;
  border-radius: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.agl-link a:hover {
  background: #1a2a8f;
  color: #fff;
}

/* === 3 boutons carte produit === */
.agl-card-buttons {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.agl-card-buttons .agl-btn-fiche {
  font-weight: 600;
  font-size: 11px;
  text-decoration: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  background: #2c3ec4;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.agl-card-buttons .agl-btn-fiche:hover {
  background: #1a2a8f;
}

.agl-card-buttons .agl-btn-tech {
  font-weight: 600;
  font-size: 11px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  background: #F5751C;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.agl-card-buttons .agl-btn-tech:hover {
  background: #D4620F;
}

.agl-card-buttons .agl-btn-compare {
  font-weight: 600;
  font-size: 11px;
  color: #555;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  background: #f5f5f5;
  border: 1.5px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.agl-card-buttons .agl-btn-compare:hover {
  background: #eee;
  border-color: #bbb;
}

/* Bouton ♥ Je le veux : place sous l'image */
.agl-card-checkbox-wrapper .agl-btn-like {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  font-weight: 600;
  font-size: 12px;
  color: #F5751C;
  background: #fff;
  border: 1.5px solid #F5751C;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.agl-card-checkbox-wrapper .agl-btn-like:hover {
  background: #FFF3E0;
}
.agl-card-checkbox-wrapper .agl-btn-like .agl-like-icon {
  font-size: 14px;
  line-height: 1;
}
/* Etat selectionne */
.agl-card-checkbox-wrapper .agl-btn-like.agl-liked {
  background: #F5751C;
  color: #fff;
  border-color: #F5751C;
  box-shadow: 0 2px 6px rgba(245,117,28,0.3);
}
.agl-card-checkbox-wrapper .agl-btn-like.agl-liked:hover {
  background: #e05d00;
}

/* === Fiche technique - table === */
.ft-label {
  font-weight: 600;
  color: #555;
  padding: 7px 10px;
  border-bottom: 1px solid #f0f0f0;
  width: 40%;
  vertical-align: top;
}

.ft-value {
  color: #222;
  padding: 7px 10px;
  border-bottom: 1px solid #f0f0f0;
}

/* === Onglets modale Fiche technique === */
.agl-ft-tab {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.agl-ft-tab:hover {
  background: #eef0ff;
  color: #2c3ec4;
}

.agl-ft-tab.active {
  color: #2c3ec4;
  border-bottom-color: #F5751C;
  background: #fff;
}

.agl-price {
  margin-top: 8px;
}

.agl-price-main {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.agl-infos {
  font-size: 11px;
  color: #777;
  margin: 4px 0 6px;
  line-height: 1.3;
}

.agl-infos span {
  white-space: nowrap;
}

.agl-type-badge {
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
  color: #111;
  display: inline-block;
  text-transform: uppercase;
}

/* ============================= BADGE COMPATIBILITÉ ============================= */
/* Badge de compatibilité - fond gris uniforme (icône gérée dans le JS) */
.compatibility-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: #f0f0f0;
  color: #333;
}

/* ============================= ÉQUIPEMENTS RECHERCHÉS ============================= */
.vehicle-matched-equipments {
  font-size: 13px;
  color: #27AE60;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 6px;
  line-height: 1.4;
}

/* ============================= BADGE COULEUR DIVERS COLORIS ============================= */
.agl-color-badge {
  font-size: 13px;
  margin-top: 6px;
  margin-bottom: 6px;
  padding: 6px 10px;
  background: #e6e6ff;
  border-left: 3px solid #2c3ec4;
  border-radius: 4px;
  line-height: 1.4;
}

.agl-badge-warning {
  display: inline-block;
  background: #2c3ec4;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-right: 6px;
}

.agl-color-note {
  color: #666;
  font-size: 12px;
}

/* ============================= BADGE OCCASION (DÉSACTIVÉ - REDONDANT) ============================= */
/* Badge sur l'image supprimé car redondant avec l'info dans les caractéristiques */
.agl-badge-occasion {
  display: none !important;
}

/* Stylisation améliorée des conditions véhicule dans les caractéristiques */
.agl-card .vehicle-condition-occasion {
  background-color: #F5751C;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  display: inline-block;
}

.agl-card .vehicle-condition-neuf {
  background-color: #F5751C;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  display: inline-block;
}

.agl-credit {
  font-size: 13px;
  color: #c00;
  margin-top: 4px;
  font-weight: 600;
}

.agl-credit-details {
  font-size: 10px;
  color: #999;
  margin-top: 2px;
}

/* ============================= PAGINATION ============================= */
.agl-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 8px;
}

.agl-page-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font: 600 13px system-ui;
  color: #111;
  transition: background 0.2s ease;
}

.agl-page-btn:hover {
  background: #e8e8e8;
}

.agl-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.agl-page-btn.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.agl-page-info {
  font-size: 12px;
  color: #666;
  padding: 0 8px;
}

/* ============================= CHECKBOXES VEHICULES ============================= */
.agl-vehicle-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.agl-vehicle-checkbox:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  border-color: #28a745;
}

.agl-vehicle-checkbox:checked {
  background: #28a745;
  border-color: #28a745;
}

.agl-vehicle-checkbox:checked::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 14px;
}

/* ============================= LEAD GATE MODAL ============================= */
#agl-lg-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 100000;
}

#agl-lg {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 560px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 100001;
  font: 14px/1.4 system-ui;
}

.agl-lg-head {
  padding: 14px 16px 6px;
}

.agl-lg-title {
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 4px;
}

.agl-lg-sub {
  color: #666;
  font-size: 13px;
  margin: 0 0 8px;
}

.agl-lg-body {
  padding: 2px 16px 16px;
}

.agl-lg-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.agl-lg-field {
  flex: 1 1 0;
  min-width: 180px;
}

.agl-lg-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13px;
}

.agl-lg-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font: 14px system-ui;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.agl-lg-field input:focus {
  outline: 0;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.07);
}

.agl-lg-error {
  color: #c00;
  font-size: 12px;
  margin-top: 6px;
  display: none;
}

.agl-lg-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0;
}

.agl-lg-note {
  color: #777;
  font-size: 12px;
  margin-top: 8px;
}

.agl-lg-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.agl-lg-primary {
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.agl-lg-primary:hover {
  background: #333;
}

.agl-lg-secondary {
  background: transparent;
  color: #111;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.agl-lg-secondary:hover {
  background: #f5f5f5;
}

.agl-lg-x {
  position: absolute;
  right: 10px;
  top: 8px;
  background: transparent;
  border: 0;
  font: 700 18px system-ui;
  cursor: pointer;
  color: #999;
}

.agl-lg-x:hover {
  color: #333;
}

/* ============================= EXIT INTENT ============================= */
#agl-exit-intent {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 440px);
  background: #fff;
  border-radius: 14px;
  padding: 28px 20px 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 100002;
  text-align: center;
}

#agl-exit-intent h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

#agl-exit-intent p {
  margin: 0 0 16px;
  color: #666;
}

#agl-exit-intent ul {
  text-align: left;
  margin: 0 0 16px 20px;
  padding: 0;
}

/* Bouton X fermeture popup exit-intent */
#agl-exit-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

#agl-exit-close:hover {
  color: #333;
  background: #f0f0f0;
}

/* Conteneur des boutons exit-intent */
.agl-exit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

/* Bouton primaire "Je veux mon offre !" */
#agl-exit-intent .agl-exit-primary {
  background: #28a745;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  font: 700 14px system-ui;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
  max-width: 280px;
}

#agl-exit-intent .agl-exit-primary:hover {
  background: #218838;
}

/* Bouton secondaire "Non merci" */
#agl-exit-intent .agl-exit-secondary {
  background: transparent;
  color: #666;
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 10px 20px;
  font: 600 13px system-ui;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 280px;
}

#agl-exit-intent .agl-exit-secondary:hover {
  background: #f5f5f5;
  border-color: #999;
  color: #333;
}

/* ============================= BOUTON COMPARER ============================= */
#agl-compare-btn {
  margin-top: 8px;
  background: #F5751C;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  display: none;
  transition: background 0.2s ease;
}

#agl-compare-btn:hover {
  background: #D4620F;
}

/* ============================= MODAL COMPARATEUR ============================= */
#agl-compare-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  z-index: 100000;
}

#agl-compare-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 900px);
  max-height: 80vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 100001;
  overflow: hidden;
  /* Flexbox pour séparer header fixe et body scrollable */
  flex-direction: column;
}

#agl-compare-header {
  background: #F5751C;
  color: #fff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#agl-compare-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

#agl-compare-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

#agl-compare-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

#agl-compare-body {
  padding: 15px;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(80vh - 60px);
  flex: 1;
}

#agl-compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

/* Header sticky - reste visible lors du scroll vertical */
#agl-compare-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  padding: 12px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid #ddd;
  font-size: 14px;
  vertical-align: top;
  min-width: 150px;
  color: #000;
  /* Ombre sous le header pour le différencier du contenu */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

#agl-compare-table th {
  background: #f0f0f0;
  padding: 12px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid #ddd;
  font-size: 14px;
  vertical-align: top;
  min-width: 150px;
  color: #000;
}

#agl-compare-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  font-size: 14px;
  color: #000; /* Texte noir fonce pour meilleure lisibilite */
  font-weight: 600;
}

#agl-compare-table tr:nth-child(even) {
  background: #fafafa;
}

#agl-compare-table tr:hover {
  background: #e6e6ff;
}

.agl-compare-img {
  width: 120px !important;
  height: 90px !important;
  max-width: 120px !important;
  max-height: 90px !important;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  display: block;
}

.agl-compare-vehicle-title {
  font-weight: 600;
  font-size: 13px;
  color: #111;
  line-height: 1.3;
  max-width: 180px;
  word-wrap: break-word;
}

/* Bouton "Voir la fiche" sous chaque vignette dans le header */
.agl-btn-voir-fiche {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background-color: #2c3ec4;
  color: white !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.agl-btn-voir-fiche:hover {
  background-color: #1a2a8f;
  color: white !important;
}

.agl-compare-link {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 10px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.agl-compare-link:hover {
  background: #333;
}

.agl-compare-label {
  font-weight: 700;
  color: #000;
  background: #f0f0f0;
  padding: 10px;
  white-space: nowrap;
  font-size: 14px;
}

/* ============================= Accordéons Comparateur ============================= */

/* Header d'accordéon (ligne cliquable) */
.agl-accordion-header td {
  background: #f8f8f8 !important;
  padding: 12px 15px !important;
  cursor: pointer;
  border-top: 2px solid #2c3ec4 !important;
  border-bottom: 1px solid #ddd !important;
  user-select: none;
}

.agl-accordion-header:hover td {
  background: #f0f0f0 !important;
}

/* Header fixe (Caractéristiques - toujours ouvert, pas cliquable) */
.agl-accordion-fixed td {
  cursor: default !important;
  background: #F5751C !important;
  color: white !important;
}

.agl-accordion-fixed:hover td {
  background: #F5751C !important;
}

/* Conteneur icône + titre + flèche */
.agl-accordion-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Icône accordéon */
.agl-accordion-icon {
  font-size: 16px;
}

/* Titre accordéon */
.agl-accordion-title {
  font-weight: 700;
  font-size: 14px;
  /* Pas de flex:1 pour que la flèche reste collée au texte */
}

/* Flèche accordéon - Collée après le texte, grande et bleue */
.agl-accordion-arrow {
  font-size: 20px;
  font-weight: bold;
  color: #2c3ec4;
  transition: transform 0.3s ease;
  margin-left: 6px; /* Juste après le texte, collée à la fin du mot */
}

.agl-accordion-open .agl-accordion-arrow {
  transform: rotate(180deg);
}

.agl-accordion-fixed .agl-accordion-arrow {
  display: none;
}

/* Contenu caché */
.agl-accordion-hidden {
  display: none !important;
}

/* Contenu visible */
.agl-accordion-visible {
  display: table-row !important;
}

/* Style équipement présent - Vert foncé bien visible */
.equip-yes {
  color: #1e7e34 !important;
  font-weight: bold;
  font-size: 18px;
  text-align: center;
}

/* Style équipement absent - Gris plus visible */
.equip-no {
  color: #999 !important;
  text-align: center;
  font-size: 16px;
}

/* Style label équipement demandé dans la recherche - Rouge pour mise en évidence */
.equip-requested {
  color: #dc3545 !important;
  font-weight: bold;
}

/* Compteur d'équipements dans le header */
.agl-accordion-count {
  background: #FF6B00;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.agl-accordion-fixed .agl-accordion-count {
  background: rgba(255,255,255,0.3);
}

/* ============================= Widget Reprise ============================= */
:root {
  --gna-orange: #F5751C;
  --gna-orange-d: #D4620F;
}

#reprise-btn {
  position: fixed !important;
  right: 18px !important;
  bottom: 20px !important;
  z-index: 99998 !important;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: #F5751C !important;
  color: #fff;
  font: 600 14px/1 system-ui;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}

#reprise-btn:hover {
  filter: brightness(.95);
}

#reprise-btn:focus-visible {
  outline: 2px solid rgba(0, 0, 0, .35);
  outline-offset: 2px;
}

#reprise-panel {
  position: fixed !important;
  right: 18px;
  bottom: 40px;
  width: 520px;
  max-width: 92vw;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
  z-index: 100000 !important;
  overflow: hidden;
}

#reprise-head {
  background: #F5751C !important;
  color: #fff;
  padding: 10px 12px;
  font: 600 14px/1 system-ui;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#reprise-title {
  line-height: 1;
}

#reprise-close {
  cursor: pointer;
  opacity: .9;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
}

#reprise-body {
  display: flex;
  flex-direction: column;
  height: 68vh;
  max-height: 68vh;
}

#reprise-chat {
  flex: 1;
  padding: 12px;
  overflow: auto;
  background: #f8fafc;
}

.msg {
  max-width: 85%;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: 12px;
  font: 14px system-ui;
}

.bot {
  background: #fff;
  border: 1px solid #e5e7eb;
}

.you {
  background: #2c3ec4;
  color: #fff;
  margin-left: auto;
}

.sys {
  background: #eef4ff;
  border: 1px dashed #cbd5e1;
  font-size: 13px;
}

.muted {
  color: #6b7280;
  font-size: 12px;
  margin-top: 6px;
}

#reprise-inputbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  align-items: center;
}

#reprise-input {
  flex: 1;
  font: 14px system-ui;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

#reprise-send {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 999px;
  border: 0;
  background: #2c3ec4;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#reprise-send svg {
  width: 18px;
  height: 18px;
  display: block;
}

#reprise-footer {
  text-align: center;
  color: #999;
  font-size: 11px;
  padding: 8px 10px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  flex-shrink: 0;
}

.form-row {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.form-col {
  flex: 1;
}

.form-col input,
.form-col select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: 14px system-ui;
}

.error {
  color: #b91c1c;
  font-size: 12px;
  margin: 4px 0 0;
}

.quick {
  margin: 6px 6px 0 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font: 13px system-ui;
  display: inline-block;
}

.quick[disabled] {
  opacity: .5;
  cursor: default;
}

#reprise-panel .estimation-line {
  color: #d32f2f !important;
  font-weight: 700;
}

.recap-h {
  font-weight: 700;
  margin: 8px 0 4px;
}

/* ============================= RESPONSIVE ============================= */
@media (max-width: 768px) {
  #agl-panel {
    width: calc(100vw - 36px);
    right: 18px;
    left: 18px;
  }

  #agl-btn {
    right: 18px;
  }

  /* Header mobile optimisé */
  #agl-head {
    padding: 8px 10px;
    gap: 6px;
  }

  #agl-head-title {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #agl-reset {
    font-size: 10px;
    padding: 3px 6px;
  }

  #agl-reset .reset-text-long {
    display: none;
  }

  #agl-reset .reset-text-short {
    display: inline;
  }

  #agl-x {
    font-size: 16px;
    min-width: 18px;
  }

  #agl-compare-modal {
    width: 95vw;
    max-height: 90vh;
  }

  #agl-compare-table {
    font-size: 11px;
  }

  .agl-compare-img {
    width: 80px !important;
    height: 60px !important;
  }

  .agl-compare-vehicle-title {
    font-size: 11px;
  }
}

/* Desktop: afficher texte long du bouton reset */
#agl-reset .reset-text-short {
  display: none;
}

#agl-reset .reset-text-long {
  display: inline;
}

@media (max-height: 640px) {
  #agl-btn {
    bottom: 76px;
  }

  #reprise-btn {
    bottom: 20px;
  }

  #reprise-panel {
    bottom: 80px;
  }
}

/* ============================= INPUT PLAQUE IMMATRICULATION STYLE FR (v2 - Bandes G/D) ============================= */
.al-plate-wrap {
  max-width: 100%;
  margin: 10px 0;
}

.al-plate-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

.al-plate-help {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 10px;
  color: #666;
}

.al-plate {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 420px;
  height: 70px;
  border: 2px solid #111;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.al-plate-band {
  width: 70px;
  min-width: 70px;
  background: #1847b7;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
}

.al-plate-band-left {
  border-right: 1px solid rgba(255,255,255,0.25);
}

.al-plate-band-right {
  border-left: 1px solid rgba(255,255,255,0.25);
}

.al-plate-stars {
  font-size: 10px;
  letter-spacing: 1px;
  opacity: 0.9;
  line-height: 1;
}

.al-plate-country {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.al-plate-input {
  flex: 1;
  border: 0;
  outline: 0;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 14px;
  background: #fff;
  color: #111;
  font-family: system-ui, -apple-system, sans-serif;
  min-width: 0;
}

.al-plate-input::placeholder {
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.4;
  color: #666;
}

.al-plate:focus-within {
  box-shadow: 0 0 0 3px rgba(24,71,183,0.25);
  border-color: #1847b7;
}

/* Bande droite : FR centré */
.al-plate-fr-label {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: center;
}

.al-plate-hint {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.75;
  color: #666;
}

.al-plate-hint.valid {
  color: #16a34a;
  opacity: 1;
}

.al-plate-hint.info {
  color: #ca8a04;
  opacity: 1;
}

/* Bouton Continuer pour la plaque */
.al-plate-continue {
  margin-top: 12px;
  width: 100%;
  padding: 12px 20px;
  background: #F5751C;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.al-plate-continue:hover {
  background: #e0640f;
  transform: translateY(-1px);
}

.al-plate-continue:active {
  transform: translateY(0);
}

/* Lien passer cette étape */
.al-plate-skip {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
}

.al-plate-skip:hover {
  color: #333;
}

/* Responsive mobile */
@media (max-width: 400px) {
  .al-plate {
    height: 60px;
  }

  .al-plate-band {
    width: 55px;
    min-width: 55px;
    gap: 2px;
  }

  .al-plate-stars {
    font-size: 8px;
  }

  .al-plate-country {
    font-size: 22px;
  }

  .al-plate-input {
    font-size: 20px;
    letter-spacing: 1px;
    padding: 0 8px;
  }

  .al-plate-fr-label {
    font-size: 22px;
  }
}
/* CSS Document */

