:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,.08);
  --card2: rgba(255,255,255,.06);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --line: rgba(255,255,255,.12);
  --accent: #ff7a00;
  --accent2: #7c3aed;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --radius: 18px;
	
  --glow: radial-gradient(900px 600px at 15% 10%, rgba(124,58,237,.28), transparent 55%);

  --topbar-bg: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  --hero-bg:   linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));

  --input-bg: rgba(0,0,0,.18);
  --field-bg: rgba(0,0,0,.16);
  --out-bg:   rgba(255,255,255,.05);

  --link-bg: rgba(255,255,255,.06);
  --link-text: rgba(255,255,255,.86);

  --modal-bg: linear-gradient(180deg, rgba(18,25,45,.96), rgba(12,16,30,.96));
  --modal-border: rgba(255,255,255,.16);
  --backdrop: rgba(0,0,0,.55);

  --select-bg: #191F2D;
  --select-option-bg: #191F2D;
  --focus-ring: #191F2D;

  --section-title: rgba(255,255,255,.80);
  --section-border: rgba(243, 122, 31, 0.62);

  --tag-active-bg: rgb(0, 65, 124);

  --bb-result-text: bisque;
	 /* modal note */
  --note-bg: rgba(255,255,255,.06);
  --note-border: rgba(255,255,255,.12);
  --note-text: rgba(255,255,255,.88);
	  /* tags */
  --tag-bg: rgba(255,255,255,.06);
  --tag-border: rgba(255,255,255,.14);
  --tag-text: var(--muted);

  --tag-hover-bg: rgba(255,255,255,.10);
  --tag-hover-border: rgba(255,255,255,.22);
  --tag-hover-text: var(--text);

  --tag-active-bg: rgba(0,113,187,.35);
  --tag-active-border: rgba(0,113,187,.55);
  --tag-active-text: rgba(255,255,255,.95);
	  --tag-shadow: none;
  --tag-active-shadow: none;
	  /* badge */
  --badge-bg: rgba(255,255,255,.06);
  --badge-border: rgba(255,255,255,.14);
  --badge-text: rgba(255,255,255,.78);
  --badge-shadow: none;
	
	--bbResult_back: rgba(0,0,0,.25);

		--general_border: 1px solid rgba(255,255,255,.16);
	--search_border: 1px solid rgba(255,255,255,.14)

}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}

/* Calque lueur fixé au viewport */
body::before{
  content:"";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 900px;              /* ajuste selon le rendu voulu */
  pointer-events: none;
  z-index: 0;

/*  background:
    radial-gradient(900px 600px at 15% 10%, rgba(124,58,237,.28), transparent 55%),
    radial-gradient(900px 600px at 85% 0%, rgba(255,122,0,.22), transparent 55%),
    radial-gradient(800px 600px at 70% 95%, rgba(34,197,94,.12), transparent 55%);
	
	  background:
    radial-gradient(900px 600px at 15% 10%,
      rgba(124,58,237,.28),
      transparent 55%);*/
	
	background: var(--glow);

}

/* Contenu passe au-dessus */
body > *{
  position: relative;
  z-index: 1;
}

a{ color: inherit; text-decoration:none; }
.container{
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 26px 0 70px;
}

/* Header */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  /*background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));*/
	background: var(--topbar-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  /*position: sticky;*/
  top: 14px;
  backdrop-filter: blur(10px);
  z-index: 50;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 220px;
}
.brand img{
  height: 67px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(151, 151, 151, 0.44);
  padding: 6px;
  object-fit: contain;
}
.brand .txt{
  display:flex;
  flex-direction:column;
  line-height: 1.1;
}
.brand .txt b{ font-size: 14px; letter-spacing: .2px; }
.brand .txt span{ font-size: 12px; color: var(--muted); }

.slogan_boxylab {    position: absolute;
    font-size: 10px;
    margin-top: 45px;
    margin-left: 56px;
}

.cta{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 13px;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(135deg, rgba(255,122,0,.92), rgba(124,58,237,.78));
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 10px 25px rgba(255,122,0,.15);
}
.btn:hover{ filter: brightness(1.05); }

/* Hero */
.hero{
  margin-top: 18px;
  padding: 26px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  /*background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));*/
	background: var(--hero-bg);

  box-shadow: var(--shadow);
}
.hero h1{
  margin: 0 0 8px;
  font-size: clamp(22px, 3.2vw, 34px);
  letter-spacing: -0.3px;
}
.hero p{
  margin: 0 0 16px;
  color: var(--muted);
 /* max-width: 72ch;*/
}

/* Search */
.searchbar{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top: 14px;
  flex-wrap:wrap;
}
.search{
  flex: 1;
  min-width: 240px;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 14px;
  /*border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);*/
	background: var(--input-bg);
	border: var(--search_border);

}
.search input{
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.tagrow{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
/*.tag{
  cursor:pointer;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  font-size: 13px;
  color: var(--muted);
  user-select:none;
}
.tag:hover{ color: var(--text); border-color: rgba(255,255,255,.22); }
.tag.active{
  color: var(--text);
  border-color: rgba(255,255,255,.28);
	background: var(--tag-active-bg);

}*/
.tag{
  cursor:pointer;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--tag-border);
  background: var(--tag-bg);
  font-size: 13px;
  color: var(--tag-text);
  user-select:none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
	box-shadow: var(--tag-shadow);
}

.tag:hover{
  color: var(--tag-hover-text);
  border-color: var(--tag-hover-border);
  background: var(--tag-hover-bg);
  transform: translateY(-1px);
}

.tag.active{
  color: var(--tag-active-text);
  border-color: var(--tag-active-border);
  background: var(--tag-active-bg);
  box-shadow: var(--tag-active-shadow);

}


/* Sections + cards */
.section{ margin-top: 18px; }
.section h2, .section-final h2 {
  margin: 22px 4px 10px;
  font-size: 27px;
  letter-spacing: .2px;
  /*color: rgba(255,255,255,.80);
  border: 1px solid rgba(243, 122, 31, 0.62);*/
	color: var(--section-title);
border: 1px solid var(--section-border);
  border-radius: 12px;
  padding: 9px 10px;
  text-align: center;
}
.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
@media (max-width: 880px){
  .grid{ grid-template-columns: 1fr; }
  .brand{ min-width: auto; }
}

.card{
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), var(--card2));
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  overflow:hidden;
}
.card .head{
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}
.card .head .title{
  display:flex;
  flex-direction:column;
  gap: 3px;
}
.card .head b{ font-size: 14px; }
.card .head span{ font-size: 12px; color: var(--muted); }
/*.badge{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.78);
  white-space: nowrap;
}*/
.badge{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--badge-border);
  background: var(--badge-bg);
  color: var(--badge-text);
  box-shadow: var(--badge-shadow);
  white-space: nowrap;
}



.card .body{
  padding: 14px;
  display:grid;
  gap: 10px;
}
.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px){ .row{ grid-template-columns: 1fr; } }

.field{
  padding: 10px 12px;
  border-radius: 14px;
   /*border: 1px solid rgba(255,255,255,.14);
 background: rgba(0,0,0,.16);*/
  background: var(--field-bg);
  border: var(--general_border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.field input, .field select{
  width: 100%;
  border:0;
  outline:0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.field select{ cursor:pointer; }
.label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  padding-left: 4px;
}

.out{
  /*  border: 1px solid rgba(255,255,255,.14);
background: rgba(255,255,255,.05);*/
	background: var(--out-bg);
	border: var(--general_border);
  border-radius: 14px;
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.out b{ font-size: 14px; }
.out span{ font-size: 12px; color: var(--muted); }

.more{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,.14);
}
.link{
  /*color: rgba(255,255,255,.86);*/
  font-weight: 600;
  font-size: 13px;
  cursor:pointer;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  /*background: rgba(255,255,255,.06);*/
	color: var(--link-text);
background: var(--link-bg);

}
.link:hover{ border-color: rgba(255,255,255,.22); }

footer{
  margin-top: 26px;
  /*color: rgba(255,255,255,.55);*/
	color:var(--muted);
  font-size: 12px;
  text-align:center;
}

/* ===== Modal "Voir toutes" ===== */
.modal{ position: fixed; inset: 0; display: none; z-index: 200; }
.modal.show{ display:block; }
.modal-backdrop{
  position:absolute; inset:0;
  /*background: rgba(0,0,0,.55);*/
	background: var(--backdrop);
  backdrop-filter: blur(4px);
}
.modal-panel{
  position: relative;
  width: min(1100px, 92vw);
  /*margin: 8vh auto 0;*/
	margin: 12px auto 0;
  border-radius: var(--radius);
  /*border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(180deg, rgba(18,25,45,.96), rgba(12,16,30,.96));*/
	border: 1px solid var(--modal-border);
background: var(--modal-bg);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  overflow: hidden;
}
.modal-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.modal-title{ display:flex; flex-direction:column; gap:3px; }
.modal-title b{ font-size: 14px; }
.modal-title span{ font-size: 12px; color: var(--muted); }
.modal-x{
  cursor:pointer;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
}
.modal-body{ padding: 14px; }
.modal-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Note BoxyBoy (par défaut = normal) */
#bbAnalysesNote{
  color: var(--muted); /* ou la couleur que tu veux */
}

/* Seulement en mode erreur */
#bbAnalysesNote.is-error{
  color: #ff3b30;      /* rouge */
  font-weight: 600;
}

@media (max-width: 620px){ .modal-grid{ grid-template-columns: 1fr; } }
.modal-foot{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.10);
}
/* ===== Responsive header (mobile) ===== */
@media (max-width: 720px){
  .topbar{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .brand{
    min-width: 0;
    width: 100%;
  }

  .brand img{
    height: 54px; /* un peu plus petit */
  }
	
	.slogan_boxylab {
    position: absolute;
    font-size: 7.65px;
    margin-top: 37px;
    margin-left: 44px;
}

  .cta{
    width: 100%;
    justify-content: space-between;
  }

  .pill{
    flex: 1;
    justify-content: center;
    padding: 9px 10px;
    font-size: 12px;
  }

  .btn{
    white-space: nowrap;
  }
}

/* Très petits écrans : on simplifie */
@media (max-width: 420px){
  .pill{ display:none; }  /* optionnel mais ça rend le header nickel */
  .btn{ width: 100%; justify-content: center; }
}


/*Modal Note*/
/*.modal-note{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  border-radius:10px;
  font-size:12.5px;
  line-height:1.35;
  color: rgba(255,255,255,.85);
}*/
.modal-note{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid var(--note-border);
  background: var(--note-bg);
  border-radius:10px;
  font-size:12.5px;
  line-height:1.35;
  color: var(--note-text);
}


/* Info icon (note) */
.info-btn{
  width:26px;
  height:26px;
  border-radius:10px;
  border:1px solid rgba(59,130,246,.35);
  background: rgba(59,130,246,.10);
  color: #60a5fa; /* bleu */
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-weight:700;
  line-height:1;
  user-select:none;
}
.info-btn:hover{
  background: rgba(59,130,246,.18);
  border-color: rgba(59,130,246,.55);
}



/* Fix dropdown illisible (texte blanc / fond clair selon navigateur) */
/*select option {
  background: #191F2D!important;
  border-color: #191F2D!important;
}
.field select {  
	background: #191F2D;
  color: var(--text);}*/
select option{
  background: var(--select-option-bg) !important;
}
.field select{
  background: var(--select-bg);
  color: var(--text);
}



/* Optionnel: améliore le rendu sur certains navigateurs */
/*select:focus,
select:focus-visible{
  outline: 2px solid #191F2D;   
  outline-offset: 2px;
  border-color: #191F2D;
  box-shadow: none;             
}*/

select:focus,
select:focus-visible{
  outline: 2px solid var(--focus-ring); /* couleur du contour */
  outline-offset: 2px;
  border-color: var(--focus-ring);
  box-shadow: none;
}


:root{ color-scheme: dark; }
:root[data-theme="light"]{ color-scheme: light; }
select{ color-scheme: inherit; }





.row{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:12px;
}







/*======================================================*/
/* BoxyBoy: bouton + modal synthèse IA                  */
/*======================================================*/

.boxyboy-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  padding:0;
}
.boxyboy-btn:hover{ background: rgba(255,255,255,.10); }
/*.boxyboy-btn img{ width:26px; height:26px; display:block; }*/

.bb-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:12px;
}
.bb-form textarea{
  min-height:90px;
  resize:vertical;
}
.bb-result{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  border-radius:10px;
  font-size:13px;
  line-height:1.4;
  white-space:pre-wrap;
	position: relative; 
}
.bb-hint{
  margin-top:8px;
  font-size:12px;
  color: rgba(255,255,255,.65);
}
#bbResult{font-size: 15px;
  /*  color: bisque;*/
	color: var(--bb-result-text); 
}


/*.bb-copybar{
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 6px 0;
  backdrop-filter: blur(6px);
}

.bb-pre{
  white-space: pre-wrap;
  margin: 0;
}*/

/*DATE PICKER*/
.bb-dob-mobile{ display:none; }

@media (hover:none) and (pointer:coarse){
  .bb-dob-desktop{ display:none; }
  .bb-dob-mobile{ display:block; }
}









/* === Séparation Catégories / Outils === */
.tagrow{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.tag-cats{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tag-tools{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto; /* pousse à droite */
  flex-wrap:wrap;
}

.tag-label{
  font-size:12px;
  color:var(--muted);
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:6px 2px;
}

/* style "tool" (différent des catégories) */
.tag-tool{
  border:1px solid rgba(255,255,255,.30);
  background: rgba(255,255,255,.12);
  font-weight:600;
}

.tag-tool:hover{
  background: rgba(255,255,255,.16);
}

/* focus visible (clavier/accessibilité) */
.tag-tool:focus{
  outline:2px solid rgba(255,255,255,.35);
  outline-offset:2px;
}

/* BoxyBoy */
.boxyboy-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  /*box-shadow: 0 10px 26px rgba(0,0,0,.25);
  border-color: rgba(255,255,255,.45);*/
	border: 2px solid rgb(0, 113, 187);
}

/*.boxyboy-btn img{
  height:18px;
  width:18px;
  display:block;
}*/

.boxyboy-btn .bb-text{
  font-weight:800;
}

/* Mobile: Outils sur une ligne séparée (très visible) */
@media (max-width: 720px){
  .tag-tools{
    margin-left:0;
    width:100%;
    padding-top:8px;
    border-top:1px solid rgba(255,255,255,.12);
  }
}


/* Copier en bas, sans bande floue en haut */
.bb-copybar{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

.bb-copybar-bottom{
  margin-top: 10px;
}

/* PRE BoxyBoy : redimensionnable (manette en bas à droite) */
#bbResult .bb-pre{
  display: block;
  width: 100%;
  box-sizing: border-box;

  white-space: pre-wrap;
  word-break: break-word;

  overflow: auto;   /* obligatoire pour que resize fonctionne */
  resize: vertical;     /* => manette en bas à droite  both pu vertical*/

  min-height: 140px;
  max-height: 55vh; /* évite que ça déborde de l’écran */

  margin: 0;
  padding: 12px 12px 18px;

  border: 1px solid rgba(255,255,255,.12);
  /*background: rgba(0,0,0,.25);*/
	background: var(--bbResult_back);
  border-radius: 10px;
}




/* =========================================
   BoxyBoy Modal popup: scroll propre sur mobile
   ========================================= */



/* IMPORTANT : ton .modal.show met display:block.
   On force #bbModal à être flex quand il est visible */
#bbModal.show{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
}

/* Mobile : en haut */
@media (max-width: 720px){
  #bbModal.show{ align-items:flex-start; }
}

/* Le panel doit être "contenu" et ne pas dépendre du contenu */
#bbModal .modal-panel{
  margin:0; /* override ton margin: 12px auto 0; */
  display:flex;
  flex-direction:column;

  /* viewport safe (desktop + mobile) */
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);

  overflow:hidden; /* on clippe, et c'est .modal-body qui scroll */
}

/* >>> LA LIGNE QUI MANQUAIT <<< */
#bbModal .modal-body{
  flex: 1 1 auto;  /* prend l'espace restant */
  min-height: 0;   /* autorise le shrink (sinon footer peut être poussé) */
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* footer ne shrink pas */
#bbModal .modal-foot{
  flex: 0 0 auto;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}


/* ==============================
   BoxyBoy - Loading / Progress
   ============================== */

:root{
  --boxylab-blue: #2563eb; /* <-- remplace par TON bleu officiel si tu veux */
}

.bb-loading{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.bb-loading-top{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.bb-loading-top b{
  font-size:14px;
}

.bb-loading-top .bb-mini{
  font-size:12px;
  opacity:.75;
}

.bb-progress{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
  position:relative;
}

.bb-progress > span{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:40%;
  background: var(--boxylab-blue);
  border-radius:999px;
  animation: bbIndeterminate 1.1s infinite ease-in-out;
}

@keyframes bbIndeterminate{
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

/* Désactive le bouton Analyser quand busy */
#bbRun[disabled]{
  opacity:.55;
  cursor:not-allowed;
}




/* ===== BoxyBoy AFTER ANSWER (teaser chat) ===== */
.bb-after{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding: 12px;
	  margin-top: 12px;
}

.bb-after-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
	color: #b8b8b8;
}
.bb-after-head b{ font-size:14px; }
.bb-after-head span{
  font-size:12px;
  color: var(--muted);
}

.bb-composer{
  display:flex;
  gap:10px;
  align-items:stretch;
}

.bb-input{
  flex:1;
  resize: vertical;
  min-height: 70px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  outline: none;
}

.bb-send{
  white-space:nowrap;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
}
.bb-send:hover{
  border-color: rgba(255,255,255,.22);
}

.bb-lock{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: rgba(255,255,255,.75); /* neutre */
}

.bb-send:hover .bb-lock{
  color: rgba(255,255,255,.92);
}


.bb-after-foot{
  margin-top: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap: wrap;
}

.bb-open{
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.92);
  padding: 8px 10px;
  cursor:pointer;
}

.bb-small{
  font-size:12px;
  color: var(--muted);
}

/* Mobile: textarea au-dessus, boutons en dessous */
@media (max-width: 640px){
  .bb-composer{ flex-direction: column; }
  .bb-send{ width:100%; justify-content:center; }
  .bb-open{ width:100%; }
}









/*Bouton partager*/
.share-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:12px;
  border:2px solid rgb(0, 113, 187);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  padding:0;
  color: rgba(255,255,255,.92);
}

.share-btn:hover{
  background: rgba(255,255,255,.10);
}








/* Carte avec valeur saisie */
.card.is-filled{
  border-color: rgba(0,113,187,.55);
  box-shadow:
    0 10px 30px rgba(0,0,0,.22),
    0 0 0 2px rgba(0,113,187,.22) inset;
}

/* Optionnel: rendre l’en-tête un peu plus “vivant” */
.card.is-filled .head{
  border-bottom-color: rgba(0,113,187,.22);
}




/* Badge "résultats saisis" */
.fill-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid rgba(0,113,187,.35);
  background: rgba(0,113,187,.10);
  /*color: rgba(255,255,255,.92);*/
	 color: var(--text);
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  user-select:none;
}

.fill-chip:hover{
  border-color: rgba(0,113,187,.55);
  background: rgba(0,113,187,.14);
}

.fill-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  background: rgb(0,113,187);
  box-shadow: 0 0 0 0 rgba(0,113,187,.45);
  animation: fillPulse 1.6s infinite;
}

@keyframes fillPulse{
  0%   { box-shadow: 0 0 0 0 rgba(0,113,187,.45); }
  70%  { box-shadow: 0 0 0 8px rgba(0,113,187,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,113,187,0); }
}

.fill-chip.is-on{
  border-color: rgba(0,113,187,.75);
  background: rgba(0,113,187,.18);
}
/* Quand le chip est en mode "afficher tout" */
#fillChip.is-showall{
  border-color: rgba(187, 61, 0, 0.75) !important;
  background: rgba(187, 88, 0, 0.18) !important;
}
/* Le chip reste visible en haut */
#fillChip{
  position: sticky;
  top: 10px;
  z-index: 50;
}
@media (max-width: 720px){
  #fillChip{
    position: sticky;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 80;
  }
}









/* bouton thème */
.theme-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
}
.theme-btn:hover{ background: rgba(255,255,255,.10); }
.theme-ic svg{ display:block; }




















/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
/* THEME CLAIR : on override tes variables */
:root[data-theme="light"]{
  /* Base */
  --bg: #eef3ff;                 /* bleu perle */
  --text: rgba(10,15,25,.92);
  --muted: rgba(10,15,25,.62);
  --line: rgba(15,23,42,.12);
  --shadow: 0 18px 60px rgba(15,23,42,.12);
  --radius: 18px;

  /* Glow (lueur) */
  --glow:
    radial-gradient(900px 600px at 18% 8%,  rgba(124,58,237,.14), transparent 55%),
    radial-gradient(900px 600px at 86% 2%,  rgba(255,122,0,.12),  transparent 55%),
    radial-gradient(900px 600px at 70% 96%, rgba(0,113,187,.10), transparent 60%);

  /* Surfaces */
  --card:  rgba(255,255,255,.78);
  --card2: rgba(255,255,255,.62);

  --topbar-bg: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.68));
  --hero-bg:   linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,250,255,.88));

  /* Inputs */
  --input-bg: rgba(255,255,255,.72);
  --field-bg: rgba(255,255,255,.66);
  --out-bg:   rgba(255,255,255,.55);

  /* Links / chips */
  --link-bg: rgb(196, 223, 241);
  --link-text: rgba(10,15,25,.86);

  /* Modal */
  --modal-bg: linear-gradient(180deg, rgba(255,255,255,.96), rgba(245,248,255,.96));
  --modal-border: rgba(15,23,42,.14);
  --backdrop: rgba(15,23,42,.36);

  /* Select */
  --select-bg: #ffffff;
  --select-option-bg: #ffffff;
  --focus-ring: rgba(0,113,187,.55);

  /* Section title */
  --section-title: rgba(10,15,25,.86);
  --section-border: rgba(0,113,187,.28);  /* plus “BoxyLab” que orange en light */

  /* Modal note (pearl) */
  --note-bg: linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,249,255,.92));
  --note-border: rgba(0,113,187,.24);
  --note-text: rgba(10,15,25,.90);

  /* Tags (premium + pop) */
  --tag-bg: rgba(255,255,255,.78);
  --tag-border: rgba(15,23,42,.12);
  --tag-text: rgba(10,15,25,.70);

  --tag-hover-bg: rgba(255,255,255,.92);
  --tag-hover-border: rgba(0,113,187,.22);
  --tag-hover-text: rgba(10,15,25,.92);

  --tag-active-bg: linear-gradient(135deg, rgba(0,113,187,.18), rgba(124,58,237,.12));
  --tag-active-border: rgba(0,113,187,.36);
  --tag-active-text: rgba(10,15,25,.92);

  --tag-shadow: 0 10px 22px rgba(15,23,42,.06);
  --tag-active-shadow: 0 12px 26px rgba(0,113,187,.12);

  /* Badge (petit “bijou” iOS) */
  --badge-bg: linear-gradient(135deg, rgba(0,113,187,.16), rgba(124,58,237,.10));
  --badge-border: rgba(0,113,187,.30);
  --badge-text: rgba(10,15,25,.92);
  --badge-shadow: 0 10px 24px rgba(15,23,42,.08);

  /* BoxyBoy result text */
  --bb-result-text: rgba(10,15,25,.92);

--bbResult_back: rgba(160, 233, 255, 0.25);
	
	--general_border: 1px solid rgba(0,113,187,.24);
	--search_border: 1px solid rgba(0,113,187,.24);
}


/* ajustements (optionnels) pour le clair */
:root[data-theme="light"] .modal-panel{
  border: 1px solid rgba(0,0,0,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(245,247,251,.96));
}
:root[data-theme="light"] .theme-btn{
  border:1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.03);
}
:root[data-theme="light"] .theme-btn:hover{ background: rgba(0,0,0,.06); }

/* Icone BoxyBoy*/
.bb-ic{ width:29px; height:29px; display:block; }

/* par défaut (dark) => on cache la version light */
.bb-ic-light{ display:none; width: 38px; height:38px; }

/* en light => on cache dark et on montre light */
:root[data-theme="light"] .bb-ic-dark{ display:none;}
:root[data-theme="light"] .bb-ic-light{ display:block;}


/*
:root[data-theme="light"] .search, .field, .out {border: 1px solid rgba(0,113,187,.24)}
*/







/* ===== Favoris / Récents ===== */
.head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.head-right{ display:flex; align-items:center; gap:8px; }

.fav-btn{
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  line-height:1;
  padding:0; /* important: pas de padding sinon width/height perd son sens */
}
.fav-btn:hover{ background: rgba(255,255,255,.10); }
.fav-btn.is-on{
  border-color: rgba(255,193,7,.55);
  background: rgba(255,193,7,.12);
  box-shadow: 0 0 10px rgba(255, 215, 0, .25);
}

.recent-row{
  margin-top: 10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.recent-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  cursor:pointer;
  font-size:12.5px;
}
.recent-chip:hover{ background: rgba(255,255,255,.10); }

/*PWA*/
.install-btn{
  cursor:pointer;
  border:1px solid rgba(255,255,255,.18);
}

