:root {
  /* Palette principale */
  --primary: #2f6a3a;
  --primary-soft: #e6f3ea;

  --secondary: #355c7d;
  --secondary-soft: #e5edf6;

  --accent: #d32f2f;
  --accent-soft: #ffebee;

  --highlight: #2196f3;
  --highlight-soft: #e3f2fd;

  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-alt: #f9fafb;

  --border-subtle: #e0e4ea;

  --text-main: #263238;
  --text-soft: #607d8b;

  --block-size: 8px;

  /* Boîtes d'aide / infos */
  --help-bg: #e8f5e9;
  --help-border: #c8e6c9;
  --info-bg: #e3f2fd;
  --info-border: #bbdefb;
  --compare-bg: #fff3e0;
  --compare-border: #ffb74d;
  --vs-bg: #f3e5f5;
  --vs-border: #ce93d8;

  /* Couleurs pour les textes informatifs */
  --info-yellow-bg: #fffde7;
  --info-yellow-border: #fbc02d;
  --info-green-bg: #e8f5e9;
  --info-green-border: #4caf50;
  --info-red-bg: #ffebee;
  --info-red-border: #ef5350;
  --info-blue-bg: #e3f2fd;
  --info-blue-border: #2196f3;
}

/* ============================= */
/* BASE GLOBALE                  */
/* ============================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background-color: var(--bg);
  margin: 0;
  padding: 0 0 40px;
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text-main);
}

h1 {
  font-size: 1.8rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.05rem;
}

a {
  color: var(--highlight);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================= */
/* LAYOUT GÉNÉRAL                */
/* ============================= */

.container {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  background: var(--surface);
  padding: 8px 20px 30px; 
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

/* Tabs / contenus d’onglets */

.tab-content {
  display: none;
  animation: fadeIn 0.5s;
}

.tab-content.active {
  display: block;
}

.sub-tab-content {
  display: none;
  animation: fadeIn 0.3s;
}

.sub-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= */
/* HEADER STICKY & TABS          */
/* ============================= */

.main-header-wrapper {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.6rem 1.5rem;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.title-group {
  cursor: pointer;
}

.title-group h1 {
  color: var(--primary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.title-group p {
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-top: 0.15rem;
  font-style: italic;
}

/* Tabs principaux */

.tabs {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.tab-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 4px rgba(47, 106, 58, 0.35);
}

.tab-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Sous-onglets */

.sub-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.sub-tab-btn {
  padding: 6px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sub-tab-btn:hover {
  background: #e0e7ff;
  color: #1e293b;
}

.sub-tab-btn.active {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

/* ============================= */
/* COMPOSANTS GÉNÉRIQUES         */
/* ============================= */

/* Cards */

.card {
  background: var(--surface);
  border-radius: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge--primary {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(46, 125, 50, 0.3);
}

.badge--accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(211, 47, 47, 0.3);
}

.badge--muted {
  background: #eceff1;
  color: #455a64;
  border-color: #cfd8dc;
}

/* Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background-color: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.18s, transform 0.1s, box-shadow 0.18s, opacity 0.15s;
}

.btn:hover {
  background-color: #25552f;
  box-shadow: 0 2px 6px rgba(44, 94, 46, 0.35);
  transform: translateY(-1px);
}

.btn:disabled {
  background-color: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border-subtle);
}

.btn--danger {
  background: var(--accent);
  color: #fff;
}

.btn--small {
  padding: 5px 10px;
  font-size: 0.8rem;
}

/* === Boutons colonne "Identification Protéine" === */

/* Style de base commun */
.btn-blast-synth,
.btn-blast-inhib,
.btn-upload-synth,
.btn-upload-inhib,
.btn-nohit-synth,
.btn-nohit-inhib {
  display: block;
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  border: none;
  font-size: 0.78rem;
  line-height: 1.1;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

/* === COLONNE GAUCHE : Synthèse (verts) === */

/* BLAST Synthèse : vert soutenu */
.btn-blast-synth {
  color: #ffffff;
  background: linear-gradient(to right, #16a34a, #15803d); /* verts */
}

/* Upload Synthèse : vert un peu différent pour varier */
.btn-upload-synth {
  color: #ffffff;
  background: linear-gradient(to right, #22c55e, #16a34a);
}

/* Aucun hit Synthèse : vert très clair, texte foncé */
.btn-nohit-synth {
  color: #14532d;
  background: #dcfce7; /* vert très pâle */
}

/* === COLONNE DROITE : Inhibition (rouges) === */

/* BLAST Inhibition : rouge soutenu */
.btn-blast-inhib {
  color: #ffffff;
  background: linear-gradient(to right, #dc2626, #b91c1c); /* rouges */
}

/* Upload Inhibition : variante de rouge */
.btn-upload-inhib {
  color: #ffffff;
  background: linear-gradient(to right, #f97373, #dc2626);
}

/* Aucun hit Inhibition : rouge très clair, texte foncé */
.btn-nohit-inhib {
  color: #7f1d1d;
  background: #fee2e2; /* rouge très pâle */
}

/* Hover léger pour tout le monde */
.btn-blast-synth:hover,
.btn-blast-inhib:hover,
.btn-upload-synth:hover,
.btn-upload-inhib:hover,
.btn-nohit-synth:hover,
.btn-nohit-inhib:hover {
  filter: brightness(1.05);
}

/* Focus clavier */
.btn-blast-synth:focus,
.btn-blast-inhib:focus,
.btn-upload-synth:focus,
.btn-upload-inhib:focus,
.btn-nohit-synth:focus,
.btn-nohit-inhib:focus {
  outline: 2px solid #4b5563;
  outline-offset: 1px;
}

/* BOUTON ORANGE COMPARE AVEC MEILLEURE LISIBILITÉ TEXTE */
.btn-compare {
  background-color: #f97316; /* un peu plus sombre */
  color: #ffffff;
  padding: 6px 14px;
  font-size: 0.85rem;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.btn-compare:hover:enabled {
  background-color: #ea580c;
}
.btn-compare:disabled {
  background-color: #fed7aa;
  color: #7c2d12;
  text-shadow: none;
}

.btn-midi {
  background-color: #7b1fa2;
  color: #fff;
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  margin-left: 10px;
}

.btn-midi:hover {
  background-color: #9c27b0;
}

.btn-midi.exact {
  background: #7b1fa2;
}

.btn-midi.exact:hover {
  background: #9c27b0;
}

/* Champs */

input,
select,
textarea {
  font-family: inherit;
  font-size: 0.9rem;
}

/* Statuts & toast */

.status {
  margin: 10px 0;
  padding: 10px;
  border-radius: 6px;
  display: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.status.success {
  background: #c8e6c9;
  color: #2e7d32;
  display: block;
}

.status.error {
  background: #ffcdd2;
  color: #c62828;
  display: block;
}

#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #111827;
  color: #f9fafb;
  text-align: center;
  border-radius: 6px;
  padding: 12px 16px;
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  font-size: 0.95rem;
}

#toast.show {
  visibility: visible;
  animation: fadein 0.4s, fadeout 0.4s 2.4s;
}

@keyframes fadein {
  from {
    bottom: 12px;
    opacity: 0;
  }
  to {
    bottom: 24px;
    opacity: 1;
  }
}

@keyframes fadeout {
  from {
    bottom: 24px;
    opacity: 1;
  }
  to {
    bottom: 12px;
    opacity: 0;
  }
}

/* ============================= */
/* PAGE ACCUEIL                  */
/* ============================= */

.home-hero {
  background: linear-gradient(120deg, var(--primary-soft), #ffffff);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 20px;
  border: 1px solid rgba(200, 230, 201, 0.9);
}

.hero-content {
  z-index: 2;
}

.hero-content h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 8px;
}

.hero-content p {
  font-size: 0.98rem;
  color: var(--text-soft);
}


/* --- AJOUT POUR LE GIF --- */
.hero-visual {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    /* Limite la hauteur pour ne pas casser la grille */
    max-height: 160px; 
    display: flex;
    align-items: center;
}

.hero-visual img {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Astuce : rend le fond blanc du GIF transparent sur le dégradé */
    mix-blend-mode: multiply; 
    opacity: 0.9;
}
/* ------------------------ */



/* SWITCH DEVELOPPEUR */

.dev-switch-wrapper {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.15);
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Login box */

.login-box {
  background: #ffffff;
  padding: 18px 16px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
  width: 260px;
  z-index: 2;

  /* === AJOUT POUR LE POSITIONNEMENT === */
  /* Option 1 (Recommandée) : Centre la boite dans la colonne de droite. 
     Cela l'aligne généralement parfaitement entre le 4 et le 5. */
  margin: 0 auto; 
  
  /* Option 2 (Si vous voulez un décalage manuel précis) : 
     Décommentez la ligne ci-dessous et ajustez les pixels si l'option 1 ne suffit pas. */
  /* margin-left: 40px; */
}

.login-box h4 {
  margin-top: 0;
  color: var(--primary);
  margin-bottom: 12px;
}

.login-input {
  width: 100%;
  padding: 8px 9px;
  margin-bottom: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.9rem;
}

.login-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.login-btn:hover {
  background: #25552f;
}

.login-links {
  font-size: 0.8rem;
  text-align: center;
  margin-top: 10px;
  color: var(--text-soft);
}



.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.auth-tab.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.auth-toggle-link {
  font-size: 0.8rem;
  color: var(--text-soft);
  text-align: center;
  margin-top: 6px;
  cursor: pointer;
}

.auth-toggle-link span {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}




/* Animation Accueil */

.anim-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.floating-note {
  position: absolute;
  font-size: 1.8rem;
  opacity: 0.15;
  animation: floatUp 8s infinite linear;
  color: var(--primary);
}

.floating-aa {
  position: absolute;
  font-family: monospace;
  font-weight: bold;
  color: var(--accent);
  opacity: 0.12;
  font-size: 1.3rem;
  animation: floatSide 15s infinite linear;
}

@keyframes floatUp {
  0% {
    transform: translateY(60px) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-260px) rotate(15deg);
    opacity: 0;
  }
}

@keyframes floatSide {
  0% {
    transform: translateX(-60px);
  }
  100% {
    transform: translateX(600px);
  }
}

/* Frise Chronologique */

.process-timeline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 32px;
  position: relative;
  padding: 0 20px;
  gap: 10px;
}

.process-timeline::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: #e0e4ea;
  z-index: 0;
}

.process-step {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 18%;
  background: #ffffff;
  padding-top: 10px;
}

.step-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.3rem;
  box-shadow: 0 3px 9px rgba(44, 94, 46, 0.3);
}

.step-title {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.step-desc {
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* ============================= */
/* UPLOAD / CONTROLES ANALYSE    */
/* ============================= */

.upload-section {
  border: 2px dashed var(--secondary);
  padding: 26px;
  text-align: center;
  border-radius: 10px;
  background: #f9fff9;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  margin-bottom: 20px;
}

.upload-section:hover {
  background: #edf7ed;
  border-color: var(--primary);
}

.split-view {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.split-col {
  flex: 1;
  min-width: 280px;
}

.upload-small {
  padding: 20px;
  border: 2px dashed #cbd5e1;
  background: #fafafa;
  border-radius: 8px;
}

.upload-small.loaded {
  border-color: var(--primary);
  background-color: var(--help-bg);
}

/* Barre de contrôles */

.controls {
  display: flex;
  gap: 16px;
  margin: 18px 0;
  justify-content: center;
  background: #eceff1;
  padding: 10px 14px;
  border-radius: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.9rem;
}

.controls label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-soft);
}

.controls input[type="number"],
.controls select {
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

/* Timeline */

.timeline-container {
  margin: 24px 0;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: none;
}

.timeline-info {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 10px;
  height: 20px;
  font-weight: 600;
}

.timeline-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

/* BLOCS NOTE : CONTRASTE RENFORCÉ */
.note-block {
  width: var(--block-size);
  height: 22px;
  background-color: #e2e8f0; /* silence */
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.note-block:hover {
  border-color: #94a3b8;
}

/* blocs contenant au moins une note d'un motif détecté */
.note-block.active {
  background-color: #fda4af;
  border-color: #fb7185;
}

.note-block.highlight {
  background-color: var(--highlight) !important;
  border-color: #1565c0;
  z-index: 10;
  box-shadow: 0 0 4px 2px rgba(33, 150, 243, 0.5);
}

/* ============================= */
/* TABLEAUX GÉNÉRIQUES           */
/* ============================= */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 0.9rem;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background-color: var(--primary);
  color: #fff;
  position: relative;
  font-weight: 600;
  text-align: left;
}

tbody tr:hover {
  background-color: #f1f5f9;
  cursor: pointer;
}

tbody tr.selected-row {
  background-color: var(--highlight-soft);
  border-left: 4px solid var(--highlight);
}

/* Séquences */

.amino-sequence {
  font-family: "Courier New", monospace;
  color: var(--accent);
  font-weight: 600;
}

.note-sequence {
  color: #1976d2;
  font-family: "Courier New", monospace;
  font-weight: 600;
}

/* Copie colonne */

.copy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.75rem;
  transition: background 0.15s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================= */
/* CALCULATEUR AA → NOTES        */
/* ============================= */

.calc-input-area {
  width: 100%;
  height: 100px;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.calc-input-area:disabled {
  background-color: #f9f9f9;
  cursor: not-allowed;
  border-color: #e5e7eb;
}

.calc-controls {
  text-align: center;
  margin-bottom: 20px;
}

.calc-result-table th {
  background-color: #455a64;
}

/* ============================= */
/* SECTIONS RÉSULTATS CALCUL     */
/* ============================= */

.sequence-input-section {
  background: #f1f8e9;
  border: 2px solid #4a8c4d;
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.sequence-display {
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  margin: 10px 0;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  color: #2c5e2e;
  font-weight: bold;
  word-break: break-all;
}

.result-section {
  margin-top: 24px;
  padding: 16px 18px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.result-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #2c5e2e;
  border-bottom: 2px solid #4a8c4d;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-title.inhib {
  color: #c62828;
  border-bottom-color: #d32f2f;
}

/* ============================= */
/* MODALES (Exact / Standard)    */
/* ============================= */

.exact-modal,
.standard-modal,
.blast-upload-modal,
.analyzer-settings-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  justify-content: center;
  align-items: center;
}

.exact-modal-content,
.standard-modal-content,
.blast-upload-content,
.analyzer-settings-content {
  background: #ffffff;
  padding: 24px 22px;
  border-radius: 14px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.4);
  position: relative;
}

.blast-upload-content {
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}

.exact-modal-content h2,
.standard-modal-content h2,
.blast-upload-content h2 {
  color: var(--primary);
  margin-top: 0;
}

.close-modal {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.9rem;
  cursor: pointer;
  color: #9ca3af;
}

.close-modal:hover {
  color: #111827;
}

.exact-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  margin: 8px 0;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-weight: 600;
}

.exact-btn.inhib {
  background: var(--accent);
}

.exact-btn:hover {
  filter: brightness(0.95);
}

.blast-textarea {
  width: 100%;
  height: 300px;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  padding: 10px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  resize: vertical;
}

/* Paramètres analyseur */

.analyzer-settings-content {
  max-width: 400px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.setting-row input {
  width: 60px;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
}

/* ============================= */
/* STATS & TABLEAU BLAST         */
/* ============================= */

.stats-filters {
  background: #f3f4f6;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 50;
  font-size: 0.9rem;
}

.stats-filters label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  color: var(--text-soft);
}

.stats-filters input,
.stats-filters select {
  padding: 6px 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.85rem;
}

/* === WRAPPERS POUR SCROLL HORIZONTAL DES TABLES === */

.stats-table-wrapper,
.personal-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;   /* scroll horizontal si besoin */
  overflow-y: auto;   /* scroll vertical limité */
  
  /* MODIFICATION ICI : Passage de 600px à 1800px */
  /* Cela permet d'afficher environ 10 blocs de résultats (Main + 5 sous-lignes) */
  max-height: 1800px; 
  
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
}


/* ============================= */
/* TABLEAUX UNIFIÉS (STATS & PERSO) */
/* ============================= */

/* 1. Base commune */
.stats-table,
#personalTable {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.85rem; /* Taille uniforme pour les deux */
  table-layout: auto;
}

/* 2. En-têtes (Headers) */
.stats-table thead,
#personalTable thead {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #5e35b1;
}

.stats-table th,
#personalTable th {
  background-color: #5e35b1;
  color: #ffffff;
  padding: 9px 8px; /* Padding identique et aéré */
  text-align: center;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  border-bottom: 2px solid #4527a0;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.stats-table th:hover,
#personalTable th:hover {
  background-color: #7e57c2;
}

/* 3. Cellules (Body) */
.stats-table td,
#personalTable td {
  padding: 8px 8px; /* Même espacement pour tout le monde */
  border-bottom: 1px solid #e0e4ea;
  vertical-align: middle;
  word-wrap: break-word;
  font-size: 0.85rem; /* Correction : on évite la réduction à 0.85em */
  text-align: center;
}

/* 4. Effet de survol des lignes */
.stats-table tbody tr:hover,
#personalTable tbody tr:hover {
  background-color: #f3e5f5;
}

/* 5. Alignements spécifiques (Cellule principale à gauche) */
.stats-table .main-cell,
#personalTable .main-cell {
  text-align: left;
  background-color: #fdfdfd;
  font-weight: 500;
  border-right: 1px solid #e0e0e0;
}

/* 6. Densité pour les sous-lignes (Sub-rows) */
.stats-table .sub-row td,
#personalTable .sub-row td {
  padding-top: 4px;
  padding-bottom: 4px;
  line-height: 1.2;
  font-size: 0.85rem;
}

/* 7. Largeurs de colonnes (S'applique aux deux tableaux) */
.stats-table th:nth-child(1), #personalTable th:nth-child(1) { min-width: 75px; }   /* Class. */
.stats-table th:nth-child(2), #personalTable th:nth-child(2) { min-width: 85px; }   /* Date */
.stats-table th:nth-child(3), #personalTable th:nth-child(3) { min-width: 140px; }  /* Fichier MIDI */
.stats-table th:nth-child(4), #personalTable th:nth-child(4) { min-width: 50px; }   /* Rang */
.stats-table th:nth-child(5), #personalTable th:nth-child(5) { min-width: 75px; }   /* Param. */
.stats-table th:nth-child(6), #personalTable th:nth-child(6) { min-width: 120px; }  /* Séquence Notes */
.stats-table th:nth-child(7), #personalTable th:nth-child(7) { min-width: 130px; }  /* Séquence AA */
.stats-table th:nth-child(8), #personalTable th:nth-child(8) { min-width: 70px; }   /* Max Score */
.stats-table th:nth-child(9), #personalTable th:nth-child(9) { min-width: 80px; }   /* Total Score */
.stats-table th:nth-child(10), #personalTable th:nth-child(10) { min-width: 70px; } /* Ratio */
.stats-table th:nth-child(11), #personalTable th:nth-child(11) { min-width: 70px; } /* E-value */
.stats-table th:nth-child(12), #personalTable th:nth-child(12) { min-width: 60px; } /* Per.Ident */
.stats-table th:nth-child(13), #personalTable th:nth-child(13) { min-width: 60px; } /* Acc Len */
.stats-table th:nth-child(14), #personalTable th:nth-child(14) { min-width: 190px; } /* Accession */
.stats-table th:nth-child(15), #personalTable th:nth-child(15) { min-width: 80px; } /* Actions */


/* --- Zone "Mon espace" réorganisée --- */

/* Conteneur header + sous-onglets */
.personal-header-layout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

/* Colonne gauche : titre + texte intro */
.personal-header-text {
    max-width: 52%;        /* <-- Texte moins large */
    min-width: 260px;
}

/* Colonne droite : sous-onglets verticaux (option desktop) */
.personal-subtabs-column {
    max-width: 48%;
    min-width: 260px;
}

/* Barre des sous-onglets : sticky pour rester visible au scroll */
.personal-subtabs-sticky {
    position: sticky;
    top: 80px;
    z-index: 5;
    background: #f9fafb;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    display: flex;          /* au lieu de inline-flex */
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;            /* occupe toute la colonne de droite */
}

/* Boutons de sous-onglet : style compact type "pill" */
.personal-subtabs-sticky .sub-tab-btn {
    margin: 0;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Layout en dessous de la barre : contenu plein large */
.personal-main-content {
    margin-top: 16px;
}

/* Version mobile : barre au-dessus, en pleine largeur */
@media (max-width: 900px) {
    .personal-header-layout {
        flex-direction: column;
        align-items: stretch;
    }
    .personal-header-text,
    .personal-subtabs-column {
        max-width: 100%;
    }
    .personal-subtabs-sticky {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }
}




/* Par défaut, la barre de sous-onglets perso est cachée. personal-hero
   Elle sera affichée par switchTab('personal-tab'). */
#personal-subtabs-global {
  display: none;
}

/* Barre sous les onglets principaux */
.subtabs-global-bar {
  margin: 6px auto 0 auto;
  padding: 6px 10px;
  max-width: 1200px;            /* à adapter si ta .container a une autre largeur */
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  background: #f9fafb;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(148, 163, 184, 0.25);
}

/* Boutons de sous-onglets */
.subtab-global-btn {
  border: none;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.subtab-global-btn:hover {
  background: #e5e7eb;
}

.subtab-global-btn.active {
  background: #1f2937;
  color: #f9fafb;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.5);
}

/* Petit style pour le titre dans #personal-tab (optionnel) */
.personal-page-title {
  margin-top: 0px;
  margin-bottom: 4px;
  font-size: 1.4rem;
  color: #111827;
}

.personal-page-subtitle {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: #4b5563;
}

/* Responsive */
@media (max-width: 900px) {
  .subtabs-global-bar {
    border-radius: 16px;
    justify-content: center;
  }
}

/* ============================= */
/* STYLES LÉGENDE & ÉTOILES      */
/* ============================= */

/* Grille de la légende */
.legend-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.legend-item-compact {
    background: #f9fafb;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

/* Ligne titre (étoiles + texte) */
.legend-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Titre (Historique, Structurel...) */
.legend-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
}

/* Critères (E-value...) */
.legend-criteria {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
}

/* Couleurs des étoiles */
.legend-stars {
    font-weight: bold;
    font-size: 1rem;
}
.stars-5 { color: #dc2626; } /* Rouge */
.stars-4 { color: #f59e0b; } /* Orange */
.stars-3 { color: #f59e0b; } /* Orange (idem) */
.stars-2 { color: #fcd34d; } /* Jaune */
.stars-1 { color: #9ca3af; } /* Gris */


/* Densité pour les sous-lignes */
.stats-table .sub-row td,
#personalTable .sub-row td {
  padding-top: 3px;
  padding-bottom: 3px;
  line-height: 1.2;
}


/* TABLEAU DE CLASSIFICATION (Style propre) */
.classification-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
    font-size: 0.9rem;
}

.classification-table th {
    background: #f1f5f9;
    color: #374151;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.classification-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.classification-table tr:last-child td {
    border-bottom: none;
}

/* Colonne Niveau */
.class-name {
    font-weight: 700;
    margin-top: 4px;
    color: #333;
}

/* Colonne Critères */
.tech-criteria {
    font-family: "Segoe UI", sans-serif;
    color: #555;
    line-height: 1.4;
    background-color: #fafafa; /* Légère teinte pour séparer */
    border-right: 1px solid #f1f5f9;
    border-left: 1px solid #f1f5f9;
}

/* Colonne Lecture */
.intuitive-text {
    color: #4b5563;
    line-height: 1.5;
}

/* Couleurs spécifiques des lignes (bordure gauche) */
.row-5 { border-left: 4px solid #dc2626; }
.row-5 td:first-child .class-name { color: #dc2626; }

.row-4-struct { border-left: 4px solid #e65100; background-color: #fff8e1; } /* Fond léger orange */
.row-4-except { border-left: 4px solid #f59e0b; }
.row-4-except td:first-child .class-name { color: #f59e0b; }

.row-3 { border-left: 4px solid #f59e0b; }
.row-2 { border-left: 4px solid #fcd34d; }
.row-1 { border-left: 4px solid #9ca3af; opacity: 0.8; }

/* Tooltips simples (data-tooltip) */

.stats-table th[data-tooltip]:hover::after,
#personalTable th[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: fixed;
  top: var(--tooltip-top);
  left: var(--tooltip-left);
  transform: translate(-50%, -120%);
  background: #111827;
  color: #f9fafb;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: normal;
  width: 220px;
  z-index: 100000;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.35);
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}



/* caché par défaut : affiché seulement sur personal-tab via switchTab */
#personal-subtabs-global {
  display: none;
}

/* Rectange arrondi sous la barre d’onglets, qui contient le texte Mon espace */
.personal-header-intro {
  max-width: 1200px;
  margin: 6px auto 0 auto;
  padding: 8px 18px 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(148, 163, 184, 0.23);
  display: none; /* contrôlé par JS */
}

.personal-header-title {
  margin: 0;
  font-size: 1rem;
  color: #111827;
}

.personal-header-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.85rem;
  color: #4b5563;
}

/* Barre de sous-onglets (déjà en place chez toi, rappel) */
.subtabs-global-bar {
  margin: 6px auto 0 auto;
  padding: 6px 10px;
  max-width: 1200px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  background: #f9fafb;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(148, 163, 184, 0.25);
}

.subtab-global-btn { /* idem que tu avais */ }

.personal-page-subtitle {
  margin: 3px 0 0 0;
  font-size: 0.9rem;
  color: #4b5563;
}

/* Tooltip riche classification (Class.) */

.rich-tooltip-container {
  position: relative;
}

.rich-tooltip-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 450px;
  background: #111827;
  color: #f9fafb;
  padding: 14px;
  border-radius: 8px;
  z-index: 100000;
  font-weight: normal;
  text-align: left;
  font-size: 0.85rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  white-space: normal;
  line-height: 1.5;
}

.rich-tooltip-container:hover .rich-tooltip-content {
  display: block;
}

/* Utilitaires table */

.truncate-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  display: block;
}

.aa-cell-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  max-width: 100%;
}

.truncate-aa {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
  display: block;
}

.copy-icon-btn {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 5px;
  color: #6b7280;
  flex-shrink: 0;
}

.copy-icon-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

/* Classification visuelle */

.star-rating {
  display: block;
  margin-bottom: 5px;
  font-size: 1.1em;
}

.star-rating.stars-5 { color: #ff0000; }
.star-rating.stars-4 { color: #ff6b00; }
.star-rating.stars-3 { color: #ffa500; }
.star-rating.stars-2 { color: #ffd700; }
.star-rating.stars-1 { color: #9ca3af; }

.classification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}

.classification-badge.stars-5 {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}
.classification-badge.stars-4 {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffb74d;
}
.classification-badge.stars-3 {
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffd54f;
}
.classification-badge.stars-2 {
  background: #fffde7;
  color: #f9a825;
  border: 1px solid #ffeb3b;
}
.classification-badge.stars-1 {
  background: #f5f5f5;
  color: #666666;
  border: 1px solid #e0e0e0;
}

/* Date */

.date-display {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: center;
  text-align: center;
}

.date-display .date-part {
  font-weight: 600;
  font-size: 0.8rem;
}

.date-display .time-part {
  font-size: 0.7rem;
  color: #6b7280;
}

/* Actions colonne */

.action-cell {
  white-space: nowrap;
  text-align: center;
}

.action-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.action-btn-small {
  padding: 6px 10px;
  margin: 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #ffffff;
  width: 40px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn-small.reblast { background: #0277bd; }
.action-btn-small.reblast:hover { background: #01579b; }
.action-btn-small.delete { background: #d32f2f; }
.action-btn-small.delete:hover { background: #b71c1c; }
.action-btn-small.download { background: #388e3c; }
.action-btn-small.download:hover { background: #2e7d32; }

/* Organisme / accession */

.organism-badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--highlight-soft);
  color: #1565c0;
  border: 1px solid #90caf9;
}




/* Compare section */

.compare-section {
  background-color: var(--compare-bg);
  border: 2px solid var(--compare-border);
  padding: 16px 18px;
  border-radius: 10px;
  margin-top: 18px;
  display: none;
  font-size: 0.9rem;
}

.compare-section.visible {
  display: block;
}

.checkbox-container {
  display: inline-block;
  margin-right: 6px;
}

.shared-pattern-row {
  background-color: #fff8e1;
}

.shared-pattern-row:hover {
  background-color: #ffecb3;
}

.freq-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.freq-a {
  background-color: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.freq-b {
  background-color: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #ce93d8;
}







/* ============================= */
/* TABLE DE NOTES AA             */
/* ============================= */

.ref-table-wide {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  margin-top: 10px;
}

.ref-table-wide th {
  padding: 9px 6px;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ref-table-wide td {
  padding: 7px 6px;
  border: 1px solid #e0e4ea;
  text-align: center;
}

.ref-table-wide tbody tr:nth-child(odd) {
  background-color: #fafafa;
}
.ref-table-wide tbody tr:nth-child(even) {
  background-color: #ffffff;
}

.ref-table-wide td:first-child {
  font-weight: 600;
  font-size: 1.05rem;
  background-color: #eceff1;
}

.ref-table-wide td:nth-child(4),
.ref-table-wide td:nth-child(5),
.ref-table-wide td:nth-child(6),
.ref-table-wide td:nth-child(7),
.ref-table-wide td:nth-child(8) {
  background-color: #f1f8e9;
}

.ref-table-wide td:nth-child(4) {
  font-family: "Courier New", monospace;
  color: #2e7d32;
  font-weight: 600;
}

.ref-table-wide td:nth-child(9),
.ref-table-wide td:nth-child(10),
.ref-table-wide td:nth-child(11),
.ref-table-wide td:nth-child(12),
.ref-table-wide td:nth-child(13) {
  background-color: #ffebee;
}

.ref-table-wide td:nth-child(9) {
  font-family: "Courier New", monospace;
  color: #c62828;
  font-weight: 600;
}

/* Légende classifications (Stats) */

.classification-legend {
  background: #ffffff;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.classification-legend h3 {
  margin-top: 0;
  color: #5e35b1;
  margin-bottom: 12px;
}

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

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  background: #f9fafb;
}

.legend-stars {
  font-size: 1.1rem;
  min-width: 90px;
}

.legend-stars.stars-5 {
  color: #ff0000;
}
.legend-stars.stars-4 {
  color: #ff6b00;
}
.legend-stars.stars-3 {
  color: #ffa500;
}
.legend-stars.stars-2 {
  color: #ffd700;
}
.legend-stars.stars-1 {
  color: #9ca3af;
}

.legend-criteria {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ============================= */
/* ONGLET INFOS / STERNHEIMER    */
/* ============================= */

.info-content {
  line-height: 1.7;
  color: var(--text-main);
  max-width: 1100px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.info-content h2 {
  color: var(--primary);
  font-size: 1.7rem;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid #3498db;
}

.info-content h3 {
  color: #374151;
  font-size: 1.3rem;
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 4px solid #e74c3c;
}

.info-content h4 {
  color: #4b5563;
  font-size: 1.05rem;
  margin: 18px 0 8px;
  font-weight: 600;
}

.info-content p {
  margin: 10px 0;
  text-align: justify;
}

.info-content ul {
  padding-left: 20px;
  margin: 10px 0;
}

.info-content li {
  margin-bottom: 8px;
}

/* Boîtes d'info */

.info-box {
  padding: 16px 16px 14px;
  margin: 18px 0;
  border-radius: 6px;
  border-left-width: 5px;
  border-left-style: solid;
  font-size: 0.93rem;
}

.info-box.important {
  background: var(--info-yellow-bg);
  border-color: var(--info-yellow-border);
}

.info-box.insight {
  background: var(--info-blue-bg);
  border-color: var(--info-blue-border);
}

.info-box.warning {
  background: var(--info-red-bg);
  border-color: var(--info-red-border);
}

.info-box.success {
  background: var(--info-green-bg);
  border-color: var(--info-green-border);
}

.info-box.protocol {
  background: #f5f5f5;
  border-color: #9c27b0;
}

/* Style spécifique pour la box "Score d'Entropie" */
.info-box.insight.entropy-box {
  background: var(--info-yellow-bg);   /* jaune pâle */
  border-color: var(--info-yellow-border);
}

/* Résumés colorés */

.info-summary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 20px 18px;
  margin: 28px 0;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.25);
}

.info-summary h4 {
  color: #ffffff;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.info-summary ul {
  margin-left: 18px;
}

.info-summary li {
  margin: 6px 0;
  line-height: 1.6;
}

/* Table des matières */

.toc {
  background: #ecf0f1;
  padding: 18px 18px 16px;
  margin: 18px 0;
  border-radius: 10px;
  border-left: 5px solid #3498db;
}

.toc ul {
  list-style: none;
  margin-left: 14px;
  padding-left: 0;
}

.toc li {
  margin: 8px 0;
}

.toc a {
  color: #2980b9;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.toc a:hover {
  text-decoration: underline;
}

/* Séquences mise en avant */

.aa-sequence-box,
.music-sequence-box {
  padding: 12px 14px;
  margin: 10px 0;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 1rem;
}

.aa-sequence-box {
  background: var(--info-yellow-bg);
  border: 2px solid var(--info-yellow-border);
}

.music-sequence-box {
  background: var(--info-green-bg);
  border: 2px solid var(--info-green-border);
}

.stat-box {
  display: inline-block;
  background: #3498db;
  color: #ffffff;
  padding: 4px 9px;
  margin: 3px 3px 3px 0;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.85rem;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0;
}


/* === SECTION DISCLAIMER (AJOUT) === */

/* Conteneur principal */
.disclaimer-section {
    max-width: 100%;
    margin: 18px 0 24px 0;
}

/* Le bloc dépliant (fond et bordure) */
.disclaimer-details {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 8px;
    padding: 10px;
}

/* Le titre cliquable */
.disclaimer-summary {
    cursor: pointer;
    font-weight: bold;
    color: #e65100;
    padding: 5px;
}

/* Le contenu caché (texte et liste) */
.disclaimer-content {
    padding: 15px;
    color: #333;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Le premier paragraphe à l'intérieur */
.disclaimer-content p {
    margin-top: 0;
}

/* La liste à puces */
.disclaimer-content ul {
    margin-bottom: 0;
}


/* ============================= */
/* ESPACE PERSONNEL / DASHBOARD  */
/* ============================= */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #2f6a3a 0%, #4a8c4d 100%);
  color: #ffffff;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.18);
  flex-wrap: wrap;
  gap: 18px;
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.avatar-circle {
  width: 48px;
  height: 48px;
  background: #ffffff;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.user-info h2 {
  margin: 0;
  font-size: 1.1rem;
}

.plan-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.dashboard-stats {
  display: flex;
  gap: 24px;
  flex: 1;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0 12px;
}

.stat-box-dash {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Actions dashboard */

.dashboard-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.btn-dash-action {
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  width: 160px;
  text-align: center;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn-dash-action.premium {
  background: #ffd700;
  color: #333333;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.2);
}

.btn-dash-action.premium:hover {
  background: #ffea00;
  transform: translateY(-1px);
}

.btn-dash-action.security {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-dash-action.security:hover {
  background: rgba(255, 255, 255, 0.28);
}

.btn-dash-action.logout {
  background: rgba(211, 47, 47, 0.9);
  color: #ffffff;
}

.btn-dash-action.logout:hover {
  background: #d32f2f;
}

.personal-content {
  background: #ffffff;
  padding: 18px 18px 20px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

/* Split panel légende / compte */

.dashboard-split-panel {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: nowrap; /* garde les 2 colonnes côte à côte tant que possible */
}

.panel-left-legend {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.panel-title {
  margin-top: 0;
  margin-bottom: 8px;
  color: #4b5563;
  font-size: 0.95rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 5px;
}

/* Légende compacte */

.legend-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.legend-item-compact {
  background: #f9fafb;
  padding: 6px 8px;
  border-radius: 5px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;        /* le contenu ne force pas la largeur */
  overflow: hidden;    /* coupe un débordement éventuel */
}

/* Ligne 1 : étoiles + titre */
.legend-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;     /* titre peut passer à la ligne si besoin */
  text-align: center;
}

/* étoiles compactes */
.legend-header-row .legend-stars {
  font-size: 0.9rem;
  line-height: 1;
}

/* texte du titre */
.legend-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  white-space: nowrap; /* garde sur une ligne tant que possible */
}

/* Ligne 2 : critères */
.legend-criteria {
  font-size: 0.8rem;
  color: #6b7280;
  text-align: center;
  line-height: 1.2;
}

/* Panel compte */

.panel-right-account {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(to bottom, #fdfbfb, #f4f4f4);
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.account-mini-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0e0e0;
}

.avatar-mini {
  width: 32px;
  height: 32px;
  background: #2c3e50;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.acc-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

.plan-badge-mini {
  font-size: 0.7rem;
  background: #95a5a6;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-block;
  margin-top: 2px;
}

.account-actions-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.btn-mini-action {
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  text-align: left;
  transition: background 0.15s;
}

.btn-mini-action:hover {
  background: #f3f4f6;
}

.btn-mini-action.premium {
  border-color: #f1c40f;
  color: #d35400;
  background: #fffdf0;
  font-weight: 600;
}

.btn-mini-action.logout {
  color: #c0392b;
  border-color: #e6b0aa;
}

.btn-mini-action.logout:hover {
  background: #fdedec;
}

/* Titre historique perso */

.history-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
  margin: 10px 0 8px;
}

.history-title-bar h3 {
  margin: 0;
  color: var(--primary);
}

.title-stats {
  display: flex;
  gap: 8px;
}

.stat-pill {
  background: #e3f2fd;
  color: #1565c0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid #bbdefb;
}

.stat-pill.fav {
  background: #fff8e1;
  color: #f57f17;
  border-color: #ffe082;
}

/* Densité pour le tableau personnel */
#personalTable {
  width: 100%;
  table-layout: auto;
  font-size: 0.85rem;
}

#personalTable th,
#personalTable td {
  padding-top: 5px;
  padding-bottom: 5px;
  padding-left: 4px;
  padding-right: 4px;
}

#personalTable .sub-row td {
  padding-top: 3px;
  padding-bottom: 3px;
  line-height: 1.2;
}



/* ============================= */
/* ANALYSEUR STRUCTURE AVANCÉ    */
/* ============================= */

.dual-upload {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.upload-card {
  border: 2px dashed #90caf9;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  background: #e3f2fd;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  width: 100%;
  max-width: 480px;
  position: relative;
}

.upload-card:hover {
  background: #bbdefb;
  border-color: #2196f3;
}

.upload-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder {
  font-size: 1.05rem;
  color: #1565c0;
  font-weight: 600;
}

/* Cartes métriques */

.metric-card {
  background: #ffffff;
  padding: 16px 18px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.metric-card h4 {
  margin: 0;
  min-width: 120px;
  color: #111827;
  font-size: 0.95rem;
}

.progress-bar {
  flex-grow: 1;
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 1s ease-out;
}

/* Verdict global */

.verdict {
  text-align: center;
  margin-top: 24px;
  padding: 16px;
  background: #fff3e0;
  border-radius: 12px;
  border: 1px solid #ffcc80;
}

.score-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 auto 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}

/* Version compacte (nouveau layout) */

.analysis-flex-wrapper {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex-wrap: wrap;
}

.metrics-column {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.metric-card-compact {
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-card-compact h4 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: #374151;
  font-weight: 600;
}

.progress-bar-compact {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 3px;
}

.verdict-box-compact {
  width: 180px;
  flex-shrink: 0;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 10px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.score-circle-compact {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 8px 0;
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.18);
}

/* ============================= */
/* FREEMIUM / RESTRICTIONS       */
/* ============================= */

.premium-blur {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
  opacity: 0.6;
}

.premium-lock-overlay {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
}

.premium-lock-btn {
  background: linear-gradient(45deg, #f57c00, #ff9800);
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 124, 0, 0.35);
  transition: transform 0.15s;
}

.premium-lock-btn:hover {
  transform: scale(1.04);
}

/* ============================= */
/* FREEMIUM / RESTRICTIONS       */
/* ============================= */

.premium-blur {
  filter: blur(4px);
  user-select: none;
  /* MODIF : On laisse le pointer-events auto pour que le JS puisse capter le clic */
  pointer-events: auto !important; 
  opacity: 0.6;
  cursor: pointer !important;
}

.premium-lock-overlay {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 50; /* Augmenté pour être sûr d'être au-dessus */
  pointer-events: none; /* L'overlay laisse passer le clic, sauf sur le bouton */
}

/* Le bouton dans l'overlay doit être cliquable */
.premium-lock-btn {
  pointer-events: auto; 
  background: linear-gradient(45deg, #f57c00, #ff9800);
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 124, 0, 0.35);
  transition: transform 0.15s;
}

.premium-lock-btn:hover {
  transform: scale(1.04);
}

/* Upload désactivé */
.upload-card.disabled {
  background-color: #f5f5f5;
  border-color: #dddddd;
  cursor: pointer !important; /* Force la main */
  position: relative;
  overflow: hidden;
  pointer-events: auto !important; /* CRUCIAL : Autorise le clic sur la boîte */
}

/* On désactive les interactions sur les enfants, MAIS on laisse le clic remonter au parent */
.upload-card.disabled * {
  pointer-events: none; 
  opacity: 0.5;
}

.upload-card.disabled::after {
  content: "🔒 Réservé aux membres Premium";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.98);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #e0e0e0;
  font-weight: 600;
  color: #e65100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 10;
  pointer-events: none; /* Le clic traverse le texte pour aller sur la card */
}

/* ============================= */
/* CONTENU REPLIABLE / THÉORIE   */
/* ============================= */

.toggle-link {
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 16px;
  display: block;
  font-weight: 600;
  text-align: left;
  padding: 0;
  color: var(--text-soft);
}

.toggle-link.theory {
  color: #0277bd;
}

.collapsible-content {
  display: none;
  margin-top: 12px;
  padding: 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.collapsible-content.visible {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

.theory-section {
  background-color: var(--info-bg);
  border: 1px solid var(--info-border);
}

.formula-box {
  background: #ffffff;
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid #bbdefb;
  font-family: monospace;
  margin: 4px 0;
}




/* Styles pour la modale Premium */
.premium-features-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.p-feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fff8e1; /* Fond jaune très clair */
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ffe082;
}

.p-icon {
    font-size: 1.5rem;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.p-desc strong {
    display: block;
    color: #e65100;
    margin-bottom: 4px;
    font-size: 1rem;
}

.p-desc p {
    margin: 0;
    font-size: 0.9rem;
    color: #5d4037;
    line-height: 1.4;
}




/* ============================= */
/* OVERLAYS SPÉCIFIQUES JS       */
/* ============================= */

#calc-premium-overlay {
  /* Ces styles s'ajoutent à ceux définis en ligne dans le JS */
  transition: background 0.2s;
}

#calc-premium-overlay:hover {
  /* Petit effet visuel au survol pour montrer que c'est interactif */
  background: rgba(255, 255, 255, 0.1) !important; 
}



/* ============================= */
/* RÉPONSIVE                     */
/* ============================= */



@media (max-width: 992px) {
  .home-hero {
    grid-template-columns: 1fr;
  }
  .dashboard-stats {
    border-left: none;
    border-right: none;
  }
}

/* Frise Chronologique : fond vert fixe + surbrillance bleue qui se déplace sur la ligne */

.process-timeline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 32px;
  position: relative;
  padding: 0 20px;
  gap: 10px;

  overflow: hidden;
  border-radius: 12px;
  background: #e8f5e9; /* vert très clair fixe */
}

/* ligne horizontale au centre */
.process-timeline::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: #cbd5e1; /* gris clair de base */
  z-index: 1;
}

/* petit segment bleu foncé qui glisse le long de la ligne */
.process-timeline::after {
  content: "";
  position: absolute;
  top: 25px;             /* centré sur la ligne */
  height: 5px;
  width: 18%;            /* longueur du segment visible */
  background: #2563eb;   /* bleu assez foncé */
  border-radius: 999px;
  z-index: 2;
  animation: timeline-segment 6s linear infinite;
}

/* contenu au-dessus de la ligne */
.process-timeline > * {
  position: relative;
  z-index: 3;
}

.process-step {
  position: relative;
  text-align: center;
  width: 18%;
  background: transparent;
  padding-top: 12px;
}

.step-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.3rem;
  box-shadow: 0 3px 9px rgba(44, 94, 46, 0.3);
}

.step-title {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.step-desc {
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* Animation : le segment parcourt la ligne de gauche à droite */
@keyframes timeline-segment {
  0% {
    left: 40px;          /* début de la ligne */
  }
  100% {
    left: calc(100% - 40px - 18%); /* fin de la ligne moins la largeur du segment */
  }
}

/* Responsive : mobile */

@media (max-width: 768px) {
  .container {
    padding: 14px 12px 22px;
    margin-top: 1rem;
  }

  .home-hero {
    padding: 18px;
  }

  .process-timeline {
    flex-direction: column;
    align-items: stretch;
  }

  .process-timeline::before,
  .process-timeline::after {
    display: none; /* pas de ligne animée en mobile, pour ne pas surcharger */
  }

  .process-step {
    width: 100%;
    margin-bottom: 10px;
  }

  .dashboard-split-panel {
    flex-direction: column;   /* ici seulement, pas en desktop */
  }

  .panel-right-account {
    width: 100%;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  #structure-analyzer-subtab > div[style*="display: flex"] {
    flex-direction: column !important;
  }

  #structure-analyzer-subtab > div[style*="display: flex"] > div {
    width: 100% !important;
    flex: none !important;
    position: static !important;
  }
}


.help-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    font-size: 1rem;
    margin-left: 8px;
}

.help-tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 260px;
    background-color: #1f2937;
    color: #f9fafb;
    text-align: left;
    border-radius: 6px;
    padding: 8px 10px;
    position: absolute;
    z-index: 10;
    bottom: 105%;          /* ⬅️ au lieu de 125% */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    line-height: 1.3;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.help-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.help-tooltip:hover .help-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Tooltip graphique BLAST */
.chart-tooltip-trigger {
    position: relative;
    display: inline-block;
}
.chart-tooltip-box {
    visibility: hidden;
    opacity: 0;
    width: 320px;
    background-color: #1f2937;
    color: #f9fafb;
    text-align: left;
    border-radius: 6px;
    padding: 10px 12px;
    position: absolute;
    z-index: 10;
    top: 105%;
    left: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.chart-tooltip-box::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 12px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #1f2937 transparent;
}
.chart-tooltip-trigger:hover .chart-tooltip-box {
    visibility: visible;
    opacity: 1;
}


/* --- AJOUT CSS FOOTER --- */
body {
    /* On ajoute un padding en bas pour que le footer ne cache pas le contenu */
    padding-bottom: 60px; 
    position: relative;
    min-height: 100vh;
}

.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f1f8e9; /* Vert très pâle assorti au thème */
    border-top: 1px solid #c8e6c9;
    padding: 10px 20px;
    text-align: center;
    font-size: 0.85em;
    color: #555;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.footer-link {
    color: #2c5e2e;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 1px dotted #2c5e2e;
}

.footer-link:hover {
    color: #1b5e20;
    border-bottom: 1px solid #1b5e20;
}

/* Style spécifique pour la modale légale (basé sur tes autres modales) */
.legal-content {
    text-align: left; 
    max-height: 80vh; 
    overflow-y: auto;
    line-height: 1.6;
}
.legal-content h3 {
    color: #2c5e2e;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-top: 20px;
}
.legal-content p {
    margin-bottom: 10px;
    color: #333;
}


.pill-link {
    display: inline-block;
    background-color: #eefdf2; /* Fond vert très clair */
    color: #2f855a;            /* Texte vert foncé (thème Musibio) */
    padding: 4px 12px;         /* Espace intérieur */
    border-radius: 50px;       /* Bords très arrondis (effet pill) */
    text-decoration: none;     /* Pas de soulignement */
    font-size: 0.9rem;         /* Texte légèrement plus petit */
    font-weight: 600;          /* Texte un peu gras */
    margin-left: 8px;          /* Espace après le texte précédent */
    border: 1px solid #c6f6d5; /* Légère bordure verte */
    transition: all 0.2s ease;
    vertical-align: middle;    /* Alignement avec le texte */
}

.pill-link:hover {
    background-color: #c6f6d5; /* Changement de couleur au survol */
    transform: translateY(-1px); /* Petit effet de levier */
}


/* --- BADGES ENTROPIE DANS LES TABLEAUX --- */
.entropy-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.85em;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-block;
}
.entropy-badge:hover {
    transform: scale(1.1);
}
.entropy-low { background-color: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }   /* Rouge */
.entropy-mid { background-color: #fff3e0; color: #ef6c00; border: 1px solid #ffe0b2; }   /* Orange */
.entropy-high { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }  /* Vert */



/* --- POPUP ENTROPIE (Layout Horizontal & Dense) --- */

#entropyModal {
    display: none; 
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.7); /* Plus sombre */
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#entropyModal.open { opacity: 1; }

#entropyModal .modal-content {
    background: white;
    width: 95%;
    max-width: 800px; /* Assez large pour le layout horizontal */
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', sans-serif;
    transform: scale(0.98);
    transition: transform 0.2s ease;
}

#entropyModal.open .modal-content { transform: scale(1); }

/* Header */
.entropy-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px; padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.entropy-header h3 { margin: 0; font-size: 1.2rem; color: #0f172a; }

.close-btn-marked {
    width: 32px; height: 32px;
    border-radius: 50%; background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 18px; color: #64748b;
    transition: all 0.2s;
}
.close-btn-marked:hover { background: #ef4444; color: white; transform: rotate(90deg); }

/* --- LAYOUT GRID PRINCIPAL (C'est ici que la magie opère) --- */
.entropy-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% Gauche, 50% Droite */
    gap: 20px;
    margin-bottom: 15px;
}

/* Colonne Gauche */
.entropy-col-left { display: flex; flex-direction: column; gap: 10px; }

/* Colonne Droite */
.entropy-col-right { 
    display: flex; flex-direction: column; 
    background: #f8fafc; 
    border-radius: 8px; 
    padding: 10px; 
    border: 1px solid #e2e8f0;
}

/* Score Card */
.entropy-score-card-compact {
    display: flex; align-items: center; gap: 15px;
    padding: 15px; border-radius: 10px; border: 1px solid #e2e8f0;
    background: #fff;
}
.entropy-score-big { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.entropy-details h4 { margin: 0; font-size: 1rem; font-weight: 700; }
.entropy-details p { margin: 4px 0 0 0; font-size: 0.8rem; line-height: 1.3; opacity: 0.9; }

/* Sequence Viewer */
#entropySequenceViewer {
    font-family: 'Courier New', monospace; font-size: 0.75rem;
    background: #f1f5f9; padding: 8px; border-radius: 6px;
    border: 1px solid #e2e8f0; color: #475569;
    height: 60px; overflow-y: auto; word-break: break-all;
}

/* Stats Row (dans col droite) */
.entropy-stats-row { display: flex; gap: 10px; margin-bottom: 10px; }
.stat-box-mini {
    flex: 1; background: white; padding: 5px 10px;
    border-radius: 6px; border: 1px solid #e2e8f0; text-align: center;
}
.stat-box-mini span { display: block; font-size: 0.6rem; color: #94a3b8; text-transform: uppercase; }
.stat-box-mini strong { font-size: 1rem; color: #334155; }


/* Cache les boutons et modales liés au Premium */
.btn-mini-action.premium,
.premium-lock-btn,
#premiumModal,
#limitPromoModal {
    display: none !important;
}


/* Chart */
#entropyChart {
    height: 80px; display: flex; align-items: flex-end; gap: 3px;
    padding-bottom: 4px; border-bottom: 1px solid #cbd5e1;
}
.entropy-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.entropy-bar { width: 100%; border-radius: 2px 2px 0 0; min-height: 2px; transition: height 0.4s ease; }
.entropy-bar-label { font-size: 8px; color: #94a3b8; margin-top: 2px; }

/* Footer Examples */
.examples-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
    padding-top: 15px; border-top: 1px solid #f1f5f9;
}
.example-btn-compact {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border: 1px solid #e2e8f0; background: white;
    border-radius: 8px; cursor: pointer; transition: all 0.2s; text-align: left;
}
.example-btn-compact:hover { background: #eff6ff; border-color: #3b82f6; transform: translateY(-2px); }
.example-btn-compact strong { display: block; font-size: 0.85rem; color: #334155; }
.example-btn-compact span { font-size: 0.7rem; color: #94a3b8; }



/* Mobile Responsive */
@media (max-width: 700px) {
    .entropy-layout-grid { grid-template-columns: 1fr; }
    .examples-grid { grid-template-columns: 1fr; }
}

/* AI Report animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
	
