/* Project: Oranea — Lithium (V3.4)
 * Base layout + structure principale
 */

.lithium-root {
  max-width: 860px;
  margin: 24px auto;
  border-radius: 18px;
  padding: 18px;
  background: var(--li-bg);
  color: var(--li-fg);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: background .3s ease, color .3s ease;
  position: relative;
  z-index: 1; /* ✅ Conserve le plan de base sans masquer les modaux */
}

.li-header, .li-main { display: flex; flex-direction: column; gap: 16px; }
.li-header { align-items: center; position: relative; }

.li-header-left, .li-header-right {
  position: absolute; top: 0; display: flex; gap: 8px;
}
.li-header-left { left: 0; }
.li-header-right { right: 0; }

.li-icon-btn {
  background: transparent;
  border: 1px solid var(--li-btn-border);
  color: var(--li-fg);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all .2s ease;
}
.li-icon-btn:hover { background: var(--li-btn-bg); transform: scale(1.08); }

.li-orb {
  width: 72px; height: 72px; border-radius: 50%;
  margin: 8px auto 2px;
  background: radial-gradient(45% 45% at 50% 30%, #52f6e9 0%, #32d3ff 50%, rgba(0,0,0,0) 70%);
  box-shadow: 0 0 30px rgba(82,246,233,.45), 0 0 60px rgba(50,211,255,.25);
  animation: pulse-orb 2.4s ease-in-out infinite alternate;
}

.li-title { font-size: 28px; text-align: center; margin: 0; letter-spacing: .5px; }
.li-subtitle { font-size: 14px; opacity: .8; margin: 0; text-align: center; }

.li-panel {
  background: var(--li-panel);
  border: 1px solid var(--li-border);
  border-radius: 10px;
  padding: 12px;
}

.lithium-messages {
  height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.li-msg {
  padding: 10px 12px;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.45;
  animation: fade-in-up .18s ease;
  white-space: pre-wrap; /* ✅ interprète les \n en retours visuels */
}

/* ✅ Logo Oranea remplaçant la sphère animée */
.li-logo {
  width: 90px;
  height: 90px;
  margin: 8px auto 4px;
}
.li-logo img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  object-fit: contain;
}
.li-logo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 0 12px rgba(82,246,233,0.6));
  animation: pulse-orb 2.8s ease-in-out infinite alternate;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at center, transparent 68%, var(--li-bg) 72%);
}

.li-msg-bot { background: var(--li-bot); border: 1px solid var(--li-border); }
.li-msg-user { background: var(--li-user); border: 1px solid var(--li-border); align-self: flex-end; }
.li-msg-error { background: #ffebee; color: #b71c1c; border: 1px solid #ffcdd2; }
.li-msg-welcome { font-style: italic; opacity: .9; }

.li-selectors-row { display: flex; gap: 12px; }
/* ✅ Styles améliorés pour les menus */
.lithium-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--li-border);
  background: var(--li-input-bg);
  color: var(--li-select-text, var(--li-fg));
  font-size: 15px;
  appearance: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ✅ Effet de lueur douce quand un menu est actif */
.li-selectors-row:focus-within {
  box-shadow: 0 0 12px rgba(82,246,233,0.25);
  border-radius: 12px;
  transition: box-shadow 0.3s ease;
}

.lithium-select:focus {
  border-color: #36d9ff;
  box-shadow: 0 0 6px rgba(54,217,255,0.5);
  outline: none;
}

/* Couleur du placeholder (première option vide) */
.lithium-select option[value=""] {
  color: var(--li-select-placeholder, #8fa3b5);
}

.li-composer {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px; align-items: end;
}
.li-input {
  width: 100%; padding: 12px;
  border-radius: 12px; border: 1px solid var(--li-border);
  background: var(--li-input-bg); color: var(--li-fg);
  resize: vertical; min-height: 100px;
}
.li-send {
  background: linear-gradient(180deg, #63f0e0, #1ec2ff);
  color: #04222a; border: none; border-radius: 14px;
  padding: 12px 16px; font-weight: 700; cursor: pointer;
  transition: transform .15s ease;
}
.li-send:hover { transform: scale(1.05); }

.li-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.li-btn {
  background: var(--li-btn-bg); color: var(--li-fg);
  border: 1px solid var(--li-btn-border);
  border-radius: 12px; padding: 10px 12px;
  cursor: pointer; transition: all .2s ease;
}
.li-btn-secondary { background: var(--li-btn-secondary); }
.li-btn:hover { filter: brightness(1.05); }

.li-status { font-size: 12px; opacity: .8; text-align: center; }

.li-accordion { margin-top: 4px; }
.li-acc-toggle {
  width: 100%; text-align: left;
  background: var(--li-panel); border: 1px solid var(--li-border);
  color: var(--li-fg); border-radius: 10px;
  padding: 8px 10px; cursor: pointer;
}
.li-acc-panel {
  padding: 10px; border: 1px solid var(--li-border);
  border-top: none; border-radius: 0 0 10px 10px;
  background: var(--li-panel);
}

.li-fullscreen {
  position: fixed; inset: 12px; z-index: 9999;
  max-width: none; width: calc(100vw - 24px);
  height: calc(100vh - 24px); overflow: auto;
}

/* ✅ Contraste fort des menus (tous navigateurs) */
.lithium-select,
.lithium-select option,
.lithium-select optgroup {
  color: var(--li-select-text, var(--li-fg));
  background-color: var(--li-input-bg);
  /* Chrome/Safari : force la couleur des champs natifs */
  -webkit-text-fill-color: var(--li-select-text, var(--li-fg));
}

/* Placeholder (première option vide) plus lisible mais distinct */
.lithium-select option[value=""] {
  color: var(--li-select-placeholder, #8fa3b5);
  -webkit-text-fill-color: var(--li-select-placeholder, #8fa3b5);
}

/* Bordure un peu plus contrastée au focus */
.lithium-select:focus {
  border-color: #36d9ff;
  box-shadow: 0 0 6px rgba(54,217,255,0.5);
  outline: none;
}

/* ==========================================================
   🎨 HEADER ORANEA — style révisé v3.4.1
   Élément central du chatbot (logo, titre, sous-titre, boutons)
   ========================================================== */

/* Conteneur principal */
.li-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 10px;
}

/* --- Logo sphérique --- */
.li-logo {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden; /* masque le carré noir */
  background: radial-gradient(
    circle at center,
    rgba(82,246,233,0.3) 0%,    /* halo interne */
    rgba(82,246,233,0.1) 40%,   /* dégradé bleu clair */
    var(--li-bg) 80%,           /* fond du chatbot */
    var(--li-bg) 100%
  );
  box-shadow: 0 0 25px rgba(82,246,233,0.4);
}

.li-logo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  mix-blend-mode: lighten; /* fusionne la sphère avec le halo */
  opacity: 0.95;
}

.li-logo img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 0 12px rgba(82,246,233,0.6));
}

/* --- Titre principal "Oranea" --- */
.li-title {
  color: #4ee8f7; /* cyan lumineux en harmonie avec le logo */
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.5px;
  margin-top: 0;
  margin-bottom: 4px;
  text-shadow: 0 0 8px rgba(78,232,247,0.35);
  text-align: center;
}

/* --- Sous-titre --- */
.li-subtitle {
  color: #b8d4e0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.3px;
  margin: 0 0 6px 0;
  text-align: center;
  opacity: 0.95;
}

/* --- Boutons d’action (thème, vitesse, plein écran) --- */
.li-header-left,
.li-header-right {
  position: absolute;
  top: 0;
  display: flex;
  gap: 10px;
}

/* Agrandissement des boutons + halo au survol */
.li-icon-btn {
  background: transparent;
  border: 1px solid var(--li-btn-border);
  color: var(--li-fg);
  border-radius: 10px;
  padding: 8px 10px;          /* un peu plus grand */
  font-size: 18px;            /* icônes légèrement agrandies */
  cursor: pointer;
  transition: all 0.25s ease;
}
.li-icon-btn:hover {
  background: linear-gradient(180deg, rgba(78,232,247,0.15), rgba(0,0,0,0.15));
  box-shadow: 0 0 6px rgba(78,232,247,0.35);
  transform: scale(1.08);
}

/* Optionnel : effet d’apparition en fondu du header */
.li-header {
  animation: fade-in-up 0.5s ease;
}

.lithium-root {
  transition: background 0.6s ease, color 0.6s ease, filter 0.6s ease;
}

