/* ===== Formulaire ===== */
/* ===== Formulaire — commun (vertical par défaut) ===== */
.cie-form{max-width:340px;border:1px solid #eee;padding:20px;border-radius:6px;font-family:sans-serif}
.cie-form h3{margin:0 0 16px;border-bottom:3px solid #d63031;display:inline-block;padding-bottom:4px}
.cie-form label{display:block;color:#888;font-size:13px;margin:14px 0 4px}
.cie-form .cie-field:first-of-type label{margin-top:0}
.cie-form input,.cie-form select{width:100%;padding:10px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box}
.cie-form button{width:100%;margin-top:18px;padding:12px;background:#d63031;color:#fff;border:0;border-radius:4px;cursor:pointer;font-weight:bold}

/* ===== Disposition HORIZONTALE : [cie_recherche layout="horizontal"] ===== */
.cie-form--h{
  max-width:100%;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:10px 22px;
  align-items:end;
}
.cie-form--h h3{grid-column:1 / -1;margin-bottom:6px}
.cie-form--h label{margin:0 0 6px}
.cie-form--h .cie-field{display:flex;flex-direction:column;margin:0}
.cie-form--h button{width:100%;margin:0;height:42px}

/* Ordre exact comme l'image :
   ligne 1 = Catégorie | Type   | Référence
   ligne 2 = Marque    | Modèle | Bouton   */
.cie-form--h .cie-f-cat   {grid-column:1;grid-row:2}
.cie-form--h .cie-f-type  {grid-column:2;grid-row:2}
.cie-form--h .cie-f-ref   {grid-column:3;grid-row:2}
.cie-form--h .cie-f-marque{grid-column:1;grid-row:3}
.cie-form--h .cie-f-modele{grid-column:2;grid-row:3}
.cie-form--h .cie-f-submit{grid-column:3;grid-row:3}

/* Sur mobile : l'horizontal repasse en vertical automatiquement */
@media (max-width:768px){
  .cie-form--h{grid-template-columns:1fr}
  .cie-form--h .cie-f-cat,.cie-form--h .cie-f-type,.cie-form--h .cie-f-ref,
  .cie-form--h .cie-f-marque,.cie-form--h .cie-f-modele,.cie-form--h .cie-f-submit{
    grid-column:1;grid-row:auto
  }
}

/* ===== Résultats ===== */
.cie-res{margin-top:20px}
.cie-res-count{font-size:13px;color:#888;margin-bottom:12px}
.cie-res-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.cie-res-card{border:1px solid #eee;border-radius:8px;padding:10px;text-align:center;background:#fff}
.cie-res-card img{width:100%;height:auto;border-radius:6px}
.cie-res-name{display:block;font-size:14px;font-weight:500;margin:8px 0 4px;color:#222}
.cie-res-ref{display:block;font-size:12px;color:#999;margin-bottom:8px}
.cie-res-cta{display:block;padding:8px;background:#d63031;color:#fff;border-radius:6px;font-size:13px;text-decoration:none}
.cie-res-empty,.cie-res-load{color:#888;font-size:14px;padding:14px 0}

/* ===== Sélecteur "Mon véhicule" : bouton + pastille ===== */
.cie-veh-open{
  display:inline-flex !important;align-items:center;gap:7px;
  background:#fff !important;border:1px solid #e2e2e2 !important;
  border-radius:999px !important;
  padding:3px 12px 3px 3px !important;
  margin:0 0 0 8px !important;
  cursor:pointer;font-size:12px !important;color:#222 !important;font-weight:500;
  line-height:1 !important;height:auto !important;width:auto !important;
  box-shadow:none !important;text-transform:none !important;
  transition:background .15s,border-color .15s;
}
.cie-veh-open:hover{background:#f6f6f6 !important;border-color:#ccc !important}
.cie-veh-ico{
  width:26px;height:26px;border-radius:50% !important;background:#d63031;color:#fff;
  display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0 !important;
}
.cie-veh-ico svg{width:16px;height:16px;display:block}
.cie-veh-chev{color:#bbb;font-size:15px;line-height:1;font-style:normal}
.cie-veh-chip{display:inline-flex;align-items:center;gap:7px;background:#d63031;color:#fff;padding:5px 12px;border-radius:999px;font-size:12px}
.cie-veh-chip button{background:none;border:none;color:#fff;cursor:pointer;font-size:15px;line-height:1;padding:0 0 0 4px}

/* ===== Tiroir off-canvas ===== */
.cie-drawer-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);opacity:0;visibility:hidden;transition:opacity .25s;z-index:99998}
.cie-drawer-overlay.open{opacity:1;visibility:visible}
.cie-drawer{position:fixed;top:0;right:0;height:100%;width:380px;max-width:88vw;background:#fff;
  transform:translateX(100%);transition:transform .28s ease;z-index:99999;display:flex;flex-direction:column;box-shadow:-4px 0 24px rgba(0,0,0,.18)}
.cie-drawer.open{transform:translateX(0)}
.cie-drawer-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid #eee;font-weight:bold;font-size:16px}
.cie-drawer-close{background:none;border:none;font-size:26px;line-height:1;cursor:pointer;color:#666}
.cie-drawer-body{padding:18px;overflow-y:auto;flex:1}
.cie-veh-lbl{display:block;font-size:12px;color:#888;margin-bottom:10px}
.cie-veh-step{margin-bottom:18px}
.cie-veh-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:8px}
.cie-veh-grid button{padding:11px;border:1px solid #ccc;border-radius:6px;background:#fff;cursor:pointer;font-size:14px;transition:opacity .15s}
.cie-veh-grid button:hover{border-color:#d63031}
.cie-veh-load,.cie-veh-empty{font-size:13px;color:#999}
.cie-noscroll{overflow:hidden}
/* ===== Tableau de compatibilité (fiche produit) ===== */
.cie-compat{margin:0 0 22px}
.cie-compat-titre{font-size:14px;font-weight:600;margin:0 0 8px;text-transform:uppercase;letter-spacing:.04em;color:#222}
.cie-compat-table{width:100%;border-collapse:collapse;margin:0}
.cie-compat-table th,
.cie-compat-table td{padding:11px 0;border:0;border-bottom:1px solid #ececec;font-size:14px;line-height:1.4}
.cie-compat-table th{text-align:left;font-weight:400;color:#333}
.cie-compat-table td{text-align:right;font-weight:700;color:#d63031}
.cie-compat-table tr:last-child th,
.cie-compat-table tr:last-child td{border-bottom:0}
.cie-compat-reste{margin:8px 0 0;font-size:13px;color:#777}

/* ===== Bouton flottant "Choisir mon véhicule" ===== */
.cie-fab{position:fixed;right:22px;bottom:90px;z-index:99990}

.cie-fab .cie-fab-btn{
  display:inline-flex !important;align-items:center !important;
  background:#d63031 !important;color:#fff !important;border:none !important;
  border-radius:999px !important;height:54px !important;width:auto !important;
  padding:0 !important;margin:0 !important;
  cursor:pointer;overflow:hidden !important;line-height:1 !important;
  box-shadow:0 4px 16px rgba(214,48,49,.45) !important;
  transition:box-shadow .2s !important;
}
.cie-fab .cie-fab-btn:hover{background:#d63031 !important;border-color:transparent !important;box-shadow:0 6px 22px rgba(214,48,49,.55) !important}

.cie-fab .cie-fab-ico{
  width:54px !important;height:54px !important;flex:none !important;
  display:inline-flex !important;align-items:center !important;justify-content:center !important;
  background:transparent !important;border-radius:0 !important;
}
.cie-fab .cie-fab-ico svg{width:24px !important;height:24px !important;display:block}

.cie-fab .cie-fab-txt{
  white-space:nowrap;font-size:15px;font-weight:500;color:#fff !important;
  max-width:0 !important;opacity:0 !important;padding:0 !important;
  transition:max-width .25s ease,opacity .2s ease,padding .25s ease;
}
.cie-fab .cie-fab-btn:hover .cie-fab-txt{max-width:240px !important;opacity:1 !important;padding-right:22px !important}
/* Véhicule sélectionné : le bouton flottant reste ouvert avec le nom */
.cie-fab.cie-fab-active .cie-fab-txt{
  max-width:240px !important;opacity:1 !important;padding-right:22px !important;
}

@media (max-width:768px){
  .cie-fab{right:16px;bottom:140px}
  .cie-fab .cie-fab-btn{height:50px !important}
  .cie-fab .cie-fab-ico{width:50px !important;height:50px !important}
  .cie-fab .cie-fab-txt{display:none !important}
    .cie-fab.cie-fab-active .cie-fab-txt{display:inline !important}
}



/* Croix sur le bouton flottant */
.cie-fab-clear{
  display:inline-flex;align-items:center;justify-content:center;
  width:18px;height:18px;margin-left:8px;border-radius:50%;
  background:rgba(255,255,255,.25);font-size:14px;line-height:1;
}
.cie-fab-clear:hover{background:rgba(255,255,255,.45)}

/* Ligne "véhicule actuel" dans le tiroir */
.cie-drawer-actuel{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;padding:10px 12px;margin-bottom:16px;
  background:#fbeaea;border:1px solid #f3c9c9;border-radius:8px;
}
.cie-drawer-actuel-nom{font-weight:600;color:#d63031;font-size:14px}
.cie-drawer-clear{
  background:#d63031;color:#fff;border:none;border-radius:6px;
  padding:6px 12px;font-size:13px;cursor:pointer;
}
.cie-drawer-clear:hover{background:#b71c1c}