/* Core */
@import "./core/variables.css";
@import "./core/layout.css";

/* UI */
@import "./ui/topbar.css";
@import "./ui/icons.css";
@import "./ui/header.css";
@import "./ui/messages.css";
@import "./ui/options.css";
@import "./ui/input.css";

/* States */
@import "./states/visibility.css";
@import "./states/animations.css";

/* RGPD */
@import "./rgpd/modal.css";

/* =====================================================================
   BOUTON PREMIUM — FORCE LOAD (ANTI WP / ANTI CACHE)
   ===================================================================== */

#ahg-sc-bubble-button {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;

    padding: 12px 18px !important;
    border-radius: 999px !important;

    border: none !important;
    outline: none !important;
    background: #C89B7B !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;

    color: #fff !important;

    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1 !important;

    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity .25s ease,
        transform .25s ease;

    pointer-events: auto !important;
}

/* ---------------------------------------------------------
   ÉTATS BOUTON — SORTIE PREMIUM
--------------------------------------------------------- */

#ahg-sc-bubble-button.hidden,
#ahg-sc-bubble-button.is-hiding {
    opacity: 0 !important;
    transform: translateY(8px) scale(.96) !important;
    pointer-events: none !important;
}

/* ---------------------------------------------------------
   ÉTAT BOUTON — ENTRÉE
--------------------------------------------------------- */

#ahg-sc-bubble-button.is-showing {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

/* Icône bouton */
#ahg-sc-bubble-button svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: currentColor;
}

/* =====================================================================
   FENÊTRE CHAT — ANIMATION PREMIUM
   ===================================================================== */

#ahg-sc-window {
    opacity: 0;
    transform: translateY(12px) scale(.98);
    pointer-events: none;

    transition:
        opacity .28s ease,
        transform .28s ease;
}

/* Fenêtre visible */
#ahg-sc-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* =====================================================================
   ACCESSIBILITÉ & ROBUSTESSE
   ===================================================================== */

#ahg-sc-window,
#ahg-sc-bubble-button {
    -webkit-tap-highlight-color: transparent;
}

/* =====================================================================
   LEAD MODAL (override anti thème)
   ===================================================================== */

/* IMPORTANT : adapte le sélecteur racine selon ton HTML :
   - si ton wrapper s'appelle #ahg-sc-lead-overlay -> garde ça
   - si tu as changé en #ahg-sc-lead-sheet -> remplace partout
*/
#ahg-sc-window #ahg-sc-lead-overlay,
#ahg-sc-window #ahg-sc-lead-sheet{
  font-family: var(--ahg-font-family);
}

/* ✅ Plus d’espace entre le texte "si nécessaire" et les champs */
#ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-sub,
#ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-sub{
  margin-bottom: 18px !important;
}

/* ✅ On masque les libellés au-dessus des champs (placeholders only) */
#ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-label,
#ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-label{
  display: none !important;
}

/* Croix : pas de fond au hover, juste opacité */
#ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-close,
#ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-close{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 6px !important;
  line-height: 1 !important;
}

#ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-close:hover,
#ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-close:hover{
  background: transparent !important;
  box-shadow: none !important;
  opacity: .7 !important; /* doux, uniquement sur la croix */
}

#ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-close:active,
#ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-close:active{
  background: transparent !important;
  box-shadow: none !important;
  opacity: .55 !important;
}

/* =====================================================================
   Inputs Prénom / Nom / Email : COPIE CONFORME DU CHAMP MESSAGE (#ahg-sc-text)
   ===================================================================== */

#ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-input,
#ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-input{
  width: 100% !important;
  box-sizing: border-box !important;

  padding: 12px 16px !important;

  border: none !important;
  border-radius: 20px !important;

  background: #f9f9f9 !important;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.06),
    0 4px 12px rgba(0,0,0,0.08) !important;

  font-size: 15px !important;
  font-family: var(--ahg-font-family) !important;

  outline: none !important;
}

#ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-input:hover,
#ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-input:hover,
#ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-input:focus,
#ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-input:focus{
  outline: none !important;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.10),
    0 8px 20px rgba(0,0,0,0.15) !important;
  background: #ffffff !important;
}

#ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-input::placeholder,
#ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-input::placeholder{
  color: rgba(0,0,0,.35) !important;
}

/* iOS: empêcher zoom clavier (copie conforme de input.css) */
@media (max-width: 768px){
  #ahg-sc-window #ahg-sc-lead-overlay .ahg-sc-lead-input,
  #ahg-sc-window #ahg-sc-lead-sheet  .ahg-sc-lead-input{
    font-size: 16px !important;
  }
}
border-box;
}
/* ===============================
   SMARTCHAT — LINKS FIX
   =============================== */

.ahg-sc-msg a {
    color: inherit;              /* hérite de la couleur du message */
    text-decoration: underline;  /* rend le lien visible */
    cursor: pointer;
}

.ahg-sc-msg a:hover {
    text-decoration: none;
    opacity: 0.85;
}

.ahg-sc-msg a:visited {
    color: inherit;
}

/* Sécurité : on s'assure que les clics passent */
.ahg-sc-msg {
    pointer-events: auto;
}

.ahg-sc-msg a {
    pointer-events: auto;
}