/* ========================================
   RESET & BASE - STYLES DE BASE
   ======================================== */

/*
 * RESET UNIVERSEL
 * Le sélecteur * cible TOUS les éléments HTML
 * margin: 0; padding: 0; → Supprime les marges par défaut des navigateurs
 * box-sizing: border-box; → Fait en sorte que padding et border soient inclus dans la largeur/hauteur
 * Exemple: un div de width: 100px avec padding: 10px fera toujours 100px de large (et non 120px)
 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*
 * STYLE DU BODY (corps de la page)
 * font-family: Définit la police par défaut pour tout le site
 * 'Inter' est une police moderne et lisible
 * Les autres polices sont des "fallbacks" (polices de secours) si Inter n'est pas disponible
 * 
 * IMPORTANT: On ne met PLUS overflow: hidden sur le body
 * Car ça empêche de scroller sur certaines pages (comme la page tarifs)
 * Chaque page spécifique gère son propre overflow si nécessaire
 */
body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  text-decoration: none;
}

/* ========================================
   SYSTÈME DE THÈMES - VARIABLES CSS
   ======================================== */

/*
 * COMMENT FONCTIONNENT LES THÈMES ?
 * 
 * 1. On utilise les VARIABLES CSS (aussi appelées "custom properties")
 *    Format: --nom-variable: valeur;
 *    Utilisation: color: var(--nom-variable);
 * 
 * 2. Chaque thème est défini par un attribut data-theme sur le body
 *    Exemple: <body data-theme="lyra">
 * 
 * 3. Le sélecteur body[data-theme="lyra"] cible uniquement le body qui a cet attribut
 * 
 * 4. Quand on change le thème en JavaScript, toutes les couleurs changent automatiquement !
 *    Car tous les éléments utilisent var(--primary), var(--accent), etc.
 * 
 * AVANTAGES:
 * - Un seul changement d'attribut HTML change tout le design
 * - Pas besoin de modifier chaque élément individuellement
 * - Code très maintenable et facile à étendre
 */

/* ===== THÈME LYRA (Défaut) ===== */
/*
 * Thème principal de Lyra - Élégant et professionnel
 * Palette: Bleu nuit + Beige doré
 */
body[data-theme="lyra"] {
  --primary: #0a1628; /* Bleu nuit très foncé - Fond principal */
  --secondary: #0f1c2e; /* Bleu nuit moyen - Sidebars, panels */
  --tertiary: #14222d; /* Bleu nuit clair - Cartes, éléments en relief */
  --accent: #f5d5b8; /* Beige doré - Couleur d'accent, boutons, liens */
  --text-primary: #ffffff; /* Blanc - Texte principal */
  --text-secondary: #cccccc; /* Gris clair - Texte secondaire, moins important */
  --text-editor: #333333; /* Gris foncé - Texte dans la zone d'écriture */
  --bg-editor: #fafafa; /* Blanc cassé - Fond de la zone d'écriture */
  --hover: #f5d5b826; /* Beige avec transparence (26 = opacité en hexa) - Effet au survol */
}

/* ===== THÈME CLAIR ===== */
/*
 * Thème lumineux pour écrire de jour
 * Palette: Blanc + Bleu ciel
 */
body[data-theme="light"] {
  --primary: #ffffff;
  --secondary: #f5f5f5;
  --tertiary: #e8e8e8;
  --accent: #4a90e2; /* Bleu ciel */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-editor: #333333;
  --bg-editor: #ffffff;
  --hover: #4a90e226;
}

/* ===== THÈME SOMBRE ===== */
/*
 * Thème sombre classique pour écrire la nuit
 * Palette: Noir grisé + Violet
 * Réduit la fatigue oculaire
 */
body[data-theme="dark"] {
  --primary: #1a1a1a;
  --secondary: #2a2a2a;
  --tertiary: #3a3a3a;
  --accent: #bb86fc; /* Violet clair */
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-editor: #e0e0e0;
  --bg-editor: #2a2a2a;
  --hover: #bb86fc26;
}

/* ===== THÈME DARK FANTASY ===== */
/*
 * Ambiance mystérieuse et magique
 * Palette: Violet profond + Or
 * Parfait pour écrire de la fantasy sombre
 */
body[data-theme="dark-fantasy"] {
  --primary: #1c0b2e; /* Violet très foncé, presque noir */
  --secondary: #2d1548;
  --tertiary: #3e1f5c;
  --accent: #d4af37; /* Or */
  --text-primary: #e8d7ff; /* Violet très clair, presque blanc */
  --text-secondary: #b896d4;
  --text-editor: #e8d7ff;
  --bg-editor: #2d1548;
  --hover: #d4af3726;
}

/* ===== THÈME ROMANCE ===== */
/*
 * Ambiance douce et romantique
 * Palette: Rose poudré + Rose vif
 * Idéal pour écrire des romances
 */
body[data-theme="romance"] {
  --primary: #fff5f7; /* Rose très pâle */
  --secondary: #ffe5eb;
  --tertiary: #ffd5e0;
  --accent: #e91e63; /* Rose vif */
  --text-primary: #5d4e60; /* Prune foncé */
  --text-secondary: #8b7d91;
  --text-editor: #5d4e60;
  --bg-editor: #ffffff;
  --hover: #e91e6326;
}

/* ===== THÈME DARK ROMANCE ===== */
/*
 * Ambiance passionnée et intense
 * Palette: Bordeaux + Rose sombre
 * Pour les romances sombres et dramatiques
 */
body[data-theme="dark-romance"] {
  --primary: #2b1319; /* Bordeaux très foncé */
  --secondary: #3d1e28;
  --tertiary: #4f2937;
  --accent: #ff6b9d; /* Rose sombre */
  --text-primary: #ffd6e8;
  --text-secondary: #d4a5ba;
  --text-editor: #ffd6e8;
  --bg-editor: #3d1e28;
  --hover: #ff6b9d26;
}

/* Fantasy */
body[data-theme="fantasy"] {
  --primary: #0a2540;
  --secondary: #1b3a5f;
  --tertiary: #2c4f7e;
  --accent: #4ecdc4;
  --text-primary: #e0f2f7;
  --text-secondary: #b0d4db;
  --text-editor: #e0f2f7;
  --bg-editor: #1b3a5f;
  --hover: #4ecdc426;
}

/* Aventure */
body[data-theme="adventure"] {
  --primary: #2c1810;
  --secondary: #3d2818;
  --tertiary: #4e3820;
  --accent: #ff8c42;
  --text-primary: #f5e6d3;
  --text-secondary: #c9b9a1;
  --text-editor: #f5e6d3;
  --bg-editor: #3d2818;
  --hover: #ff8c4226;
}

/* Thriller */
body[data-theme="thriller"] {
  --primary: #0d0d0d;
  --secondary: #1a1a1a;
  --tertiary: #272727;
  --accent: #ff4444;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-editor: #f0f0f0;
  --bg-editor: #1a1a1a;
  --hover: #ff444426;
}

/* Comtemporain */
body[data-theme="contemporary"] {
  --primary: #2e2e2e;
  --secondary: #6e6e6e;
  --tertiary: #b5b5b5;
  --accent: #3a7afe;
  --text-primary: #1c1c1c;
  --text-secondary: #5a5a5a;
  --text-editor: #121212;
  --bg-editor: #fafafa;
  --hover: #ededed;
}

/* ===== LAYOUT ===== */
.editor-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: var(--primary);
}

/* ===== HEADER TOOLBAR ===== */
.header-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  background-color: var(--tertiary);
  padding: 0 20px;
  border-bottom: 1px solid var(--secondary);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
}

.project-title-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background 0.3s;
}

.project-title-input:hover,
.project-title-input:focus {
  background: var(--hover);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 15px;
}

.toolbar-divider {
  width: 1px;
  height: 30px;
  background-color: var(--text-secondary);
  opacity: 0.3;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toolbar-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s;
}

.toolbar-btn:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.header-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.theme-btn {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

.theme-btn:hover {
  background: var(--accent);
  transform: rotate(15deg);
}

.focus-btn {
  background: var(--accent);
  color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.focus-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ===== SIDEBAR LEFT ===== */
.sidebar-left {
  width: 280px;
  background-color: var(--secondary);
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid var(--tertiary);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sidebar-header h3 {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}

.add-chapter-btn {
  background: var(--accent);
  color: var(--primary);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.add-chapter-btn:hover {
  transform: scale(1.1);
}

.delete-chapter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  transition: color 0.2s ease;
}

.delete-chapter-btn:hover {
  color: var(--accent);
}

.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter-item {
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.chapter-item:hover {
  background: var(--hover);
}

.chapter-item.active {
  background: var(--hover);
  border-left: 3px solid var(--accent);
}

.chapter-title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}

.chapter-words {
  color: var(--text-secondary);
  font-size: 12px;
}


/* ===== EDITOR MAIN ===== */
.editor-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-editor);
  overflow: hidden;
}

.editor-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 60px 80px;
}

.editor-content {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 32px;
  color: var(--text-editor);
  outline: none;
  min-height: 100%;
  white-space: pre-wrap;
}

.editor-footer {
  padding: 20px 80px;
  border-top: 1px solid var(--tertiary);
  background-color: var(--bg-editor);
}

.word-count {
  color: var(--text-editor);
  font-size: 16px;
  font-weight: 500;
}

/* ===== SIDEBAR RIGHT ===== */
.sidebar-right {
  width: 440px;
  display: flex;
  background-color: var(--secondary);
  border-left: 1px solid var(--tertiary);
}

.tools-icons {
  width: 80px;
  background-color: var(--primary);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 10px;
}

.tool-icon {
  width: 60px;
  height: 60px;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 24px;
  color: var(--text-secondary);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-icon:hover {
  background: var(--hover);
}

.tool-icon.active {
  background: var(--hover);
  color: var(--accent);
}

.tools-panel {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.tool-content {
  display: none;
}

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

.tool-content h3 {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

#editor blockquote,
#focusEditor blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  font-style: italic;
}
/* Corrections Panel */
.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.suggestion-item {
  background: var(--tertiary);
  padding: 15px;
  border-radius: 8px;
}

.suggestion-type {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.suggestion-text {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 20px;
  margin-bottom: 10px;
}

.suggestion-actions {
  display: flex;
  gap: 8px;
}

.suggestion-btn {
  background: var(--accent);
  color: var(--primary);
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.suggestion-btn:hover {
  transform: scale(1.05);
}

.suggestion-btn.reject {
  background: transparent;
  border: 1px solid var(--text-secondary);
  color: var(--text-secondary);
}

.suggestion-btn.info {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* Characters Panel */
.characters-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.character-card {
  background: var(--tertiary);
  padding: 15px;
  border-radius: 8px;
  display: flex;
  gap: 15px;
}

.character-avatar {
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}

.character-info {
  flex: 1;
}

.character-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}

.character-role {
  color: var(--accent);
  font-size: 12px;
  margin-bottom: 8px;
}

.character-traits {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}

.add-character-btn {
  width: 100%;
  background: transparent;
  border: 2px dashed var(--accent);
  color: var(--accent);
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.add-character-btn:hover {
  background: var(--hover);
}

/* Analysis Panel */
.analysis-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

.stat-item {
  background: var(--tertiary);
  padding: 15px;
  border-radius: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-value {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--primary);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s;
}

.analysis-section {
  background: var(--tertiary);
  padding: 15px;
  border-radius: 8px;
}

.analysis-section h4 {
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 10px;
}

.timeline-check {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Bouton supprimer personnage */
.character-card {
  position: relative;
}

.character-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff4444;
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  opacity: 0.7;
}

.character-delete-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ===== AI ASSISTANT ===== */
.ai-assistant {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 120px;
  height: 60px;
  background: var(--accent);
  border-radius: 30px;
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.ai-assistant:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.ai-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-icon {
  font-size: 20px;
}

.ai-notification {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 12px;
  height: 12px;
  background: #ff4444;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* AI Popup */
.ai-popup {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 350px;
  background: var(--secondary);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s;
  border: 2px solid var(--accent);
}

.ai-popup.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.ai-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s;
}

.ai-popup-close:hover {
  color: var(--text-primary);
}

.ai-popup-message {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.ai-popup-avatar {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ai-popup-text {
  flex: 1;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 22px;
}

.ai-popup-text strong {
  color: var(--accent);
}

/* ===== FOCUS MODE ===== */
.focus-container {
  height: 100vh;
  background-color: var(--bg-editor);
  position: relative;
}

.focus-editor-wrapper {
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
  overflow-y: auto;
}

.focus-editor {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 36px;
  color: var(--text-editor);
  outline: none;
  width: 100%;
  max-width: 800px;
  white-space: pre-wrap;
}

.floating-panel {
  position: fixed;
  top: 200px;
  left: 100px;
  width: 280px;
  background: var(--secondary);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  cursor: move;
  z-index: 1000;
}

.floating-panel-header {
  background: var(--accent);
  color: var(--primary);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
}

.floating-panel-controls {
  display: flex;
  gap: 8px;
}

.panel-minimize,
.panel-close {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 20px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s;
}

.panel-minimize:hover,
.panel-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

.floating-panel-content {
  padding: 15px;
}

.character-card-mini {
  background: var(--tertiary);
  padding: 15px;
  border-radius: 8px;
}

.character-info-mini {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 20px;
}

.character-info-mini strong {
  color: var(--accent);
  display: block;
  margin-bottom: 5px;
}

.character-traits-mini {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 8px;
}

.focus-word-count {
  position: fixed;
  bottom: 20px;
  left: 320px;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
}

.focus-ai-assistant {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 120px;
  height: 60px;
  background: var(--accent);
  border-radius: 30px;
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.focus-ai-assistant:hover {
  transform: translateY(-5px);
}

.exit-focus-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.exit-focus-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== THEME MODAL ===== */
.theme-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.theme-modal.show {
  display: flex;
}

.theme-modal-content {
  background: var(--secondary);
  border-radius: 16px;
  padding: 30px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.theme-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.theme-modal-header h2 {
  color: var(--text-primary);
  font-size: 24px;
}

.theme-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 32px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.theme-modal-close:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.theme-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.theme-category h3 {
  color: var(--accent);
  font-size: 16px;
  margin-bottom: 15px;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}

.theme-option {
  cursor: pointer;
  transition: all 0.3s;
}

.theme-option:hover {
  transform: translateY(-5px);
}

.theme-preview {
  width: 100%;
  height: 100px;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 3px solid transparent;
  transition: all 0.3s;
  position: relative;
}

.theme-option:hover .theme-preview {
  border-color: var(--accent);
}

.theme-name {
  text-align: center;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

/* Theme Previews */
.lyra-preview {
  background: linear-gradient(135deg, #0a1628 0%, #f5d5b8 100%);
}

.light-preview {
  background: linear-gradient(135deg, #ffffff 0%, #4a90e2 100%);
}

.dark-preview {
  background: linear-gradient(135deg, #1a1a1a 0%, #bb86fc 100%);
}

.dark-fantasy-preview {
  background: linear-gradient(135deg, #1c0b2e 0%, #d4af37 100%);
}

.romance-preview {
  background: linear-gradient(135deg, #fff5f7 0%, #e91e63 100%);
}

.dark-romance-preview {
  background: linear-gradient(135deg, #2b1319 0%, #ff6b9d 100%);
}

.fantasy-preview {
  background: linear-gradient(135deg, #0a2540 0%, #4ecdc4 100%);
}

.adventure-preview {
  background: linear-gradient(135deg, #2c1810 0%, #ff8c42 100%);
}

.thriller-preview {
  background: linear-gradient(135deg, #0d0d0d 0%, #ff4444 100%);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
  .sidebar-right {
    width: 360px;
  }
}

@media (max-width: 1200px) {
  .sidebar-left {
    width: 240px;
  }

  .editor-wrapper {
    padding: 40px 60px;
  }
}

/* ========================================
   HOME PAGE STYLES
   ======================================== */

/* Hide editor styles on home page */
.home-page .editor-container,
.home-page .focus-container,
.home-page .ai-assistant,
.home-page .ai-popup,
.home-page .theme-modal {
  display: none !important;
}

.home-page {
  overflow-x: hidden;
  overflow-y: auto;
}

/* ===== HOME HEADER ===== */
.home-header {
  background-color: var(--primary);
  padding: 15px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--tertiary);
}

.home-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-logo {
  display: flex;
  align-items: center;
  gap: 0; /* Pas d'espace ! */
  text-decoration: none;
}

.home-nav-menu {
  display: flex;
  gap: 40px;
}

.home-nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s;
  position: relative;
  padding: 8px 0;
}

.home-nav-link:hover {
  color: var(--accent);
}
/* Logo Lyra - PROPRE ET FINAL */
.home-logo {
  display: flex;
  align-items: center;
}

.home-logo a {
  display: flex;
  align-items: center;
  gap: 0; /* Pas d'espace ! */
  text-decoration: none;
  transition: all 0.3s;
  padding: 0;
}

.home-logo a:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 15px rgba(255, 107, 157, 0.5));
}

.home-logo-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  margin: 0;
  padding: 0;
}

.home-logo-icon {
  font-size: 36px;
}

.home-logo-text {
  font-size: 35px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 3px;
  line-height: 1;
  margin: 0 0 0 -15px;
  padding: 0;
  display: inline-block;
}
.home-nav-link.active {
  color: var(--accent);
}

.home-nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.home-nav-actions {
  display: flex;
  gap: 15px;
}

.home-btn-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.home-btn-secondary:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
}

.home-btn-primary {
  background: var(--accent);
  border: none;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.home-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ===== HOME HERO ===== */
.home-hero {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: stretch;
  padding-top: 80px;
  position: relative;
}

.home-side-panel {
  width: 60px;
  background-color: var(--accent);
  flex-shrink: 0;
}

/*.home-side-left {
  /* Future: AI characters on left */
/*}

.home-side-right {
  /* Future: AI characters on right */
/*}*/

.home-hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 100px;
  text-align: center;
}

.home-hero-title {
  font-size: 52px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 40px;
  line-height: 1.3;
  max-width: 900px;
}

.home-hero-description {
  font-size: 18px;
  color: var(--text-primary);
  line-height: 1.8;
  max-width: 800px;
  margin-bottom: 50px;
}

.home-hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.home-btn-cta {
  background: var(--accent);
  border: none;
  color: var(--primary);
  padding: 18px 40px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.home-btn-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ===== HOME FEATURES ===== */
.home-features {
  background: #ffffff;
  padding: 100px 0;
}

.home-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.home-feature-card {
  text-align: center;
  padding: 30px;
  transition: all 0.3s;
}

.home-feature-card:hover {
  transform: translateY(-10px);
}

.home-feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.home-feature-title {
  font-size: 20px;
  font-weight: 700;
  color: #0a1628;
  margin-bottom: 15px;
}

.home-feature-text {
  font-size: 15px;
  color: #666666;
  line-height: 1.6;
}

/* ===== HOME MODALS ===== */
.home-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.home-modal.show {
  display: flex;
}

.home-modal-content {
  background: var(--secondary);
  border-radius: 16px;
  padding: 40px;
  max-width: 450px;
  width: 90%;
}

.home-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.home-modal-header h2 {
  color: var(--text-primary);
  font-size: 28px;
}

.home-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 32px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.home-modal-close:hover {
  background: var(--hover);
  color: var(--text-primary);
}

.home-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-form-group label {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.home-form-group input {
  background: var(--tertiary);
  border: 2px solid transparent;
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s;
}

.home-form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.home-form-group input::placeholder {
  color: var(--text-secondary);
}

.home-btn-full {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

.home-form-footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 10px;
}

.home-form-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.home-form-footer a:hover {
  text-decoration: underline;
}

/* ===== HOME RESPONSIVE ===== */
@media (max-width: 1200px) {
  .home-hero-title {
    font-size: 42px;
  }

  .home-hero-content {
    padding: 60px 60px;
  }

  .home-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-nav-menu {
    display: none;
  }

  .home-hero {
    flex-direction: column;
  }

  .home-side-panel {
    width: 100%;
    height: 40px;
  }

  .home-hero-content {
    padding: 40px 20px;
  }

  .home-hero-title {
    font-size: 32px;
  }

  .home-hero-description {
    font-size: 16px;
  }

  .home-features-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .home-container {
    padding: 0 20px;
  }
}

/* Ancien style de l'icône emoji (à garder pour compatibilité) */
.home-logo-icon {
  font-size: 32px;
  display: none; /* Caché si on utilise l'image */
}
/* ========================================
   AUTH PAGES STYLES (LOGIN/SIGNUP)
   ======================================== */

/* Hide other page elements on auth pages */
.auth-page .editor-container,
.auth-page .focus-container,
.auth-page .ai-assistant,
.auth-page .ai-popup,
.auth-page .theme-modal,
.auth-page .home-header,
.auth-page .home-hero,
.auth-page .home-features {
  display: none !important;
}

.auth-page {
  overflow: hidden;
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ===== AUTH LEFT (Form Side) ===== */
.auth-left {
  width: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

.auth-content {
  width: 100%;
  max-width: 480px;
}

/* Logo */
.auth-logo {
  margin-bottom: 40px;
}

.auth-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  width: fit-content;
}

.auth-logo-icon {
  font-size: 32px;
}

.auth-logo-text {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
}

/* Header */
.auth-header {
  margin-bottom: 40px;
}

.auth-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.auth-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form-group label {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.auth-form-group input[type="text"],
.auth-form-group input[type="email"],
.auth-form-group input[type="password"] {
  background: var(--tertiary);
  border: 2px solid transparent;
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s;
}

.auth-form-group input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--secondary);
}

.auth-form-group input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.auth-hint {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: -4px;
}

/* Checkbox */
.auth-checkbox {
  margin-top: 5px;
}

.auth-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.auth-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.auth-checkbox-label a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-checkbox-label a:hover {
  text-decoration: underline;
}

/* Form Options (Remember me + Forgot password) */
.auth-form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -5px;
}

.auth-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Submit Button */
.auth-btn-submit {
  background: var(--accent);
  border: none;
  color: var(--primary);
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
}

.auth-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 30px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tertiary);
}

/* Social Login */
.auth-social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn-social {
  background: var(--tertiary);
  border: 2px solid var(--tertiary);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.auth-btn-social:hover {
  border-color: var(--accent);
  background: var(--secondary);
}

.auth-social-icon {
  font-weight: 700;
  font-size: 18px;
}

.auth-btn-google .auth-social-icon {
  color: #4285f4;
}

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--tertiary);
}

.auth-footer p {
  color: var(--text-secondary);
  font-size: 15px;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-left: 5px;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ===== AUTH RIGHT (Animation Side) ===== */
.auth-right {
  width: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.auth-animation {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Placeholder for future animation */
.auth-placeholder {
  text-align: center;
  opacity: 0.3;
}

.auth-placeholder-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.auth-placeholder-text {
  color: #666666;
  font-size: 18px;
  font-weight: 500;
}

/* ===== AUTH RESPONSIVE ===== */
@media (max-width: 1024px) {
  .auth-left,
  .auth-right {
    width: 50%;
  }

  .auth-content {
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .auth-container {
    flex-direction: column;
  }

  .auth-left {
    width: 100%;
    min-height: 100vh;
  }

  .auth-right {
    display: none;
  }

  .auth-form-row {
    grid-template-columns: 1fr;
  }

  .auth-title {
    font-size: 28px;
  }
}

/* ========================================
   PRICING PAGE STYLES
   ======================================== */

/*
 * MASQUER LES ÉLÉMENTS NON NÉCESSAIRES
 * Sur la page tarifs, on cache l'éditeur et les popups
 */
.pricing-page .editor-container,
.pricing-page .focus-container,
.pricing-page .ai-assistant,
.pricing-page .ai-popup,
.pricing-page .theme-modal {
  display: none !important;
}

/*
 * CONFIGURATION DE LA PAGE TARIFS
 * 
 * background-color: Fond de la page
 * min-height: 100vh; → Au moins la hauteur de l'écran (vh = viewport height)
 * 
 * IMPORTANT: On ne met PAS overflow: hidden ici !
 * overflow: hidden empêcherait le scroll → Bug corrigé !
 */
.pricing-page {
  background-color: var(--primary);
  min-height: 100vh;
  /* overflow-y: auto permet le scroll vertical si le contenu dépasse */
  overflow-y: auto;
}

/* ===== PRICING HERO ===== */
.pricing-hero {
  padding: 120px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
}

.pricing-hero-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
}

.pricing-hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== PRICING PLANS ===== */
.pricing-plans {
  padding: 60px 0 80px;
  background-color: var(--secondary);
}

.pricing-grid {
  /* display: grid; */
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Pricing Card */
.pricing-card {
  background: var(--tertiary);
  border-radius: 16px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.pricing-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pricing-card-popular {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

.pricing-card-popular:hover {
  transform: scale(1.05) translateY(-10px);
}


      /* ── Sous-prix ────────────────────────────────────────────── */
      .pricing-subprice {
        font-size: 12px;
        color: var(--text-secondary);
        margin-top: 4px;
        min-height: 18px;
        transition: opacity 0.2s;
      }

      /* ── Feature catégorie (mini-titre dans la liste) ─────────── */
      .pricing-feature-category {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: var(--text-secondary);
        opacity: 0.7;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--secondary);
      }

      /* ── Garantie ─────────────────────────────────────────────── */
      .pricing-guarantee {
        text-align: center;
        font-size: 13px;
        color: var(--text-secondary);
        margin-top: 20px;
        opacity: 0.8;
      }

      .pricing-guarantee span {
        color: var(--accent);
        font-weight: 600;
      }
.pricing-popular-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary);
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Card Header */
.pricing-card-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--secondary);
}

.pricing-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.pricing-badge-muse {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.pricing-badge-constellation {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pricing-card-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.pricing-card-price {
  margin-bottom: 15px;
}

.pricing-amount {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
}

.pricing-period {
  font-size: 18px;
  color: var(--text-secondary);
}

.pricing-card-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Card Features */
.pricing-card-features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

.pricing-feature-icon {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 16px;
}

.pricing-feature-highlight {
  color: var(--accent);
  font-weight: 600;
  margin-top: 5px;
  padding-top: 15px;
  border-top: 1px solid var(--secondary);
}

/* Card Action */
.pricing-card-action {
  margin-top: auto;
}

.pricing-btn {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.pricing-btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.pricing-btn-outline:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
}

.pricing-btn-primary {
  background: var(--accent);
  border: 2px solid var(--accent);
  color: var(--primary);
}

.pricing-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ===== PRICING FAQ ===== */
.pricing-faq {
  padding: 80px 0;
  background-color: var(--primary);
}

.pricing-faq-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 50px;
}

.pricing-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-faq-item {
  background: var(--tertiary);
  padding: 30px;
  border-radius: 12px;
  transition: all 0.3s;
}

.pricing-faq-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.pricing-faq-question {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.pricing-faq-answer {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== PRICING CTA ===== */
.pricing-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  text-align: center;
}

.pricing-cta-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 15px;
}

.pricing-cta-text {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.pricing-cta-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 18px 40px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pricing-cta-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ===== PRICING RESPONSIVE ===== */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .pricing-card-popular {
    transform: scale(1);
  }

  .pricing-card-popular:hover {
    transform: translateY(-10px);
  }
}

@media (max-width: 768px) {
  .pricing-hero-title {
    font-size: 36px;
  }

  .pricing-faq-grid {
    grid-template-columns: 1fr;
  }

  .pricing-cta-title {
    font-size: 32px;
  }
}

/* ========================================
   PROFILE PAGE STYLES
   ======================================== */

.profile-page .editor-container,
.profile-page .focus-container,
.profile-page .ai-assistant,
.profile-page .ai-popup,
.profile-page .theme-modal {
  display: none !important;
}

.profile-page {
  background-color: var(--primary);
  min-height: 100vh;
  overflow-y: auto;
}

/* ===== PROFILE CONTAINER ===== */
.profile-container {
  padding-top: 80px;
  min-height: 100vh;
}

/* ===== PROFILE HEADER ===== */
.profile-header {
  position: relative;
  margin-bottom: 80px;
}

.profile-background {
  height: 300px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.profile-background-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.profile-background-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.profile-avatar-section {
  text-align: center;
  margin-top: -75px;
  position: relative;
  z-index: 10;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid var(--primary);
  margin: 0 auto 20px;
  position: relative;
  overflow: hidden;
  background: var(--tertiary);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-btn:hover {
  transform: scale(1.1);
}

.profile-username {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.profile-author-name {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ===== PROFILE CONTENT ===== */
.profile-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ===== PROFILE SECTIONS ===== */
.profile-section {
  background: var(--tertiary);
  border-radius: 16px;
  padding: 30px;
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.profile-section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 25px;
}

.profile-edit-btn {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.profile-edit-btn:hover {
  background: var(--accent);
  color: var(--primary);
}

/* ===== STATISTICS ===== */
.profile-stats-section {
  background: linear-gradient(
    135deg,
    var(--tertiary) 0%,
    var(--secondary) 100%
  );
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.profile-stat-card {
  background: var(--secondary);
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s;
}

.profile-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.profile-stat-icon {
  font-size: 36px;
  margin-bottom: 15px;
}

.profile-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.profile-stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== PROFILE FORM ===== */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-form-group label {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.profile-form-group input[type="text"],
.profile-form-group input[type="email"],
.profile-form-group input[type="number"],
.profile-form-group input[type="password"],
.profile-form-group select,
.profile-form-group textarea {
  background: var(--secondary);
  border: 2px solid transparent;
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s;
}

.profile-form-group input:disabled,
.profile-form-group select:disabled,
.profile-form-group textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.profile-form-group input:not(:disabled):focus,
.profile-form-group select:not(:disabled):focus,
.profile-form-group textarea:not(:disabled):focus {
  outline: none;
  border-color: var(--accent);
}

.profile-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
}

.profile-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
}

.profile-form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ===== BUTTONS ===== */
.profile-btn-primary {
  background: var(--accent);
  color: var(--primary);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.profile-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.profile-btn-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.profile-btn-secondary:hover {
  background: var(--accent);
  color: var(--primary);
}

.profile-btn-danger {
  background: transparent;
  border: 2px solid #ff4444;
  color: #ff4444;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.profile-btn-danger:hover {
  background: #ff4444;
  color: white;
}

/* ===== SUBSCRIPTION CARD ===== */
.profile-subscription-card {
  background: var(--secondary);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
}

.profile-subscription-badge {
  display: inline-block;
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.profile-subscription-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.profile-subscription-price {
  font-size: 32px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}

.profile-subscription-info {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 25px;
}

.profile-subscription-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* ===== DANGER ZONE ===== */
.profile-danger-section {
  border: 2px solid #ff4444;
}

.profile-danger-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-danger-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--secondary);
  border-radius: 8px;
}

.profile-danger-item h4 {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.profile-danger-item p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .profile-content {
    padding: 0 20px 40px;
  }

  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-form-row {
    grid-template-columns: 1fr;
  }

  .profile-subscription-actions,
  .profile-danger-item {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-danger-item button {
    width: 100%;
  }
}

/* ========================================
   STYLES POUR LE FORMULAIRE PERSONNAGE
   ======================================== */

/* Formulaire de création de personnage */
.character-form {
  background: var(--secondary);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--tertiary);
  border: 2px solid transparent;
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
}

/* Upload photo personnage */
.character-photo-upload {
  display: flex;
  align-items: center;
  gap: 15px;
}

.photo-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--accent);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  font-size: 32px;
  opacity: 0.5;
}

.btn-upload {
  background: var(--tertiary);
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-upload:hover {
  background: var(--accent);
  color: var(--primary);
}

/* Boutons du formulaire */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-cancel {
  background: transparent;
  border: 2px solid var(--text-secondary);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-cancel:hover {
  background: var(--text-secondary);
  color: var(--primary);
}

.btn-save {
  background: var(--accent);
  border: none;
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Carte personnage améliorée */
.character-card {
  background: var(--secondary);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 12px;
  position: relative;
  display: flex;
  gap: 15px;
  transition: all 0.3s;
}

.character-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.character-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}

.character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-info {
  flex: 1;
}

.character-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 4px;
}

.character-role {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 6px;
}

.character-traits {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.character-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff4444;
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  opacity: 0.7;
}

.character-delete-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ========================================
   STYLES POUR L'ANALYSE
   ======================================== */

.analysis-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.stat-item {
  background: var(--secondary);
  padding: 15px;
  border-radius: 10px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
}

.progress-bar {
  background: var(--tertiary);
  height: 8px;
  border-radius: 4px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-fill {
  background: var(--accent);
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.analysis-section {
  background: var(--secondary);
  padding: 20px;
  border-radius: 10px;
}

.analysis-section h4 {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.timeline-check {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* Liste des suggestions */
.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Item de suggestion */
.suggestion-item {
  background: var(--secondary);
  padding: 15px;
  border-radius: 10px;
  border-left: 3px solid var(--accent);
  transition: all 0.3s;
}

.suggestion-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Header de la suggestion */
.suggestion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.suggestion-icon {
  font-size: 18px;
}

.suggestion-type {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Texte de la suggestion */
.suggestion-text {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Actions */
.suggestion-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.suggestion-btn {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.suggestion-btn:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
}

.suggestion-btn.accept {
  border-color: #4caf50;
  color: #4caf50;
}

.suggestion-btn.accept:hover {
  background: #4caf50;
  color: white;
}

.suggestion-btn.reject {
  border-color: #ff4444;
  color: #ff4444;
}

.suggestion-btn.reject:hover {
  background: #ff4444;
  color: white;
}

.suggestion-btn.info {
  border-color: var(--accent);
  color: var(--accent);
}

.suggestion-btn.info:hover {
  background: var(--accent);
  color: var(--primary);
}

/* ========================================
   Dashboard PAGE STYLES
   ======================================== */

.dashboard-page {
  background-color: var(--primary);
  min-height: 100vh;
  overflow-y: auto;
}

/* Masquer l'éditeur sur la page dashboard */
.dashboard-page .editor-container,
.dashboard-page .focus-container,
.dashboard-page .ai-assistant,
.dashboard-page .ai-popup,
.dashboard-page .theme-modal {
  display: none !important;
}

/* Container */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 40px 60px;
}

/* Header Section */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.dashboard-title-section {
  flex: 1;
}

.dashboard-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.dashboard-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

.dashboard-btn-create {
  background: var(--accent);
  color: var(--primary);
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
}

.dashboard-btn-create:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn-icon {
  font-size: 20px;
  font-weight: 700;
}

/* Statistics Cards */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--tertiary);
  padding: 25px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-icon {
  font-size: 36px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  border-radius: 12px;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filters */
.dashboard-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.5;
}

.search-box input {
  width: 100%;
  background: var(--tertiary);
  border: 2px solid transparent;
  color: var(--text-primary);
  padding: 12px 15px 12px 45px;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-select {
  background: var(--tertiary);
  border: 2px solid transparent;
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

/* Project Card */
.project-card {
  background: var(--tertiary);
  border-radius: 12px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.project-title-area {
  flex: 1;
}

.project-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.project-genre {
  display: inline-block;
  background: var(--secondary);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.project-actions {
  display: flex;
  gap: 8px;
}

.project-action-btn {
  background: var(--secondary);
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
}

.project-action-btn:hover {
  background: var(--accent);
  color: var(--primary);
  transform: scale(1.1);
}

.project-action-btn.delete:hover {
  background: #ff4444;
  color: white;
}

.project-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-stats {
  display: flex;
  gap: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--secondary);
}

.project-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

.project-stat-icon {
  font-size: 16px;
}

.project-stat-value {
  font-weight: 600;
  color: var(--text-primary);
}

.project-date {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 10px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.empty-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--tertiary);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 25px 30px;
  border-bottom: 2px solid var(--secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 32px;
  cursor: pointer;
  transition: all 0.3s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background: var(--secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 30px;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 2px solid var(--secondary);
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.btn-cancel {
  background: transparent;
  border: 2px solid var(--text-secondary);
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-cancel:hover {
  background: var(--text-secondary);
  color: var(--primary);
}

.btn-primary {
  background: var(--accent);
  border: none;
  color: var(--primary);
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 80px 20px 40px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .dashboard-title {
    font-size: 32px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-filters {
    flex-direction: column;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   WRITING PROFILE PAGE
   ======================================== */

.writing-profile-page {
  background: var(--primary);
  min-height: 100vh;
}

/* Container */
.writing-profile-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 40px 60px;
}

/* Header */
.wp-header {
  text-align: center;
  margin-bottom: 50px;
}

.wp-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  background: linear-gradient(45deg, var(--accent), #c06cf9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wp-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Current Profile Card */
.wp-current-profile {
  background: linear-gradient(
    135deg,
    var(--tertiary) 0%,
    var(--secondary) 100%
  );
  border-radius: 20px;
  padding: 50px;
  text-align: center;
  margin-bottom: 50px;
  border: 2px solid rgba(255, 107, 157, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.wp-profile-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.wp-profile-type {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
}

.wp-profile-message {
  font-size: 18px;
  color: var(--text-primary);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 30px;
}

.wp-profile-patterns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.wp-pattern-badge {
  background: rgba(255, 107, 157, 0.15);
  border: 2px solid rgba(255, 107, 157, 0.4);
  color: var(--accent);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* Stats Grid */
.wp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-bottom: 50px;
}

.wp-stat-card {
  background: var(--tertiary);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s;
}

.wp-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.wp-stat-icon {
  font-size: 40px;
  margin-bottom: 15px;
}

.wp-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.wp-stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Section */
.wp-section {
  background: var(--tertiary);
  border-radius: 15px;
  padding: 40px;
  margin-bottom: 40px;
}

.wp-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.wp-section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.wp-clear-btn {
  background: transparent;
  border: 2px solid #ff4444;
  color: #ff4444;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.wp-clear-btn:hover {
  background: #ff4444;
  color: white;
}

/* Empty State */
.wp-empty-state {
  text-align: center;
  padding: 60px 20px;
}

.wp-empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.wp-empty-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.wp-empty-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.wp-btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 14px 30px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s;
}

.wp-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 107, 157, 0.4);
}

/* Sessions Timeline */
.wp-sessions-timeline {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.wp-session-item {
  background: var(--secondary);
  border-radius: 12px;
  padding: 25px;
  border-left: 4px solid var(--accent);
  transition: all 0.3s;
}

.wp-session-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.wp-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.wp-session-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.wp-session-time-badge {
  background: rgba(255, 107, 157, 0.15);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.wp-session-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.wp-session-stat {
  text-align: center;
}

.wp-session-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.wp-session-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Understanding Section */
.wp-understanding {
  background: linear-gradient(
    135deg,
    var(--tertiary) 0%,
    var(--secondary) 100%
  );
}

.wp-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.wp-info-card {
  background: var(--tertiary);
  padding: 25px;
  border-radius: 12px;
  border: 2px solid rgba(255, 107, 157, 0.1);
}

.wp-info-icon {
  font-size: 36px;
  margin-bottom: 15px;
}

.wp-info-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.wp-info-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.wp-info-card strong {
  color: var(--accent);
}

/* ── Footer principal ──────────────────────────────────────────────── */
.lyra-footer {
  background-color: var(--secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 60px 0 0;
  margin-top: auto;
}

.lyra-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

/* ── Colonne marque ────────────────────────────────────────────────── */
.lyra-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 16px;
}

.lyra-footer-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.lyra-footer-logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent);
}

.lyra-footer-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 20px;
}

/* ── Réseaux sociaux ───────────────────────────────────────────────── */
.lyra-footer-social {
  display: flex;
  gap: 12px;
}

.lyra-footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--tertiary);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
  text-decoration: none;
}

.lyra-footer-social-link:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ── Colonnes liens ────────────────────────────────────────────────── */
.lyra-footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.lyra-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lyra-footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lyra-footer-links a:hover {
  color: var(--accent);
}

/* ── Badge "Bientôt" dans le footer ───────────────────────────────── */
.lyra-footer-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(108, 99, 255, 0.18);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 1px 7px;
  letter-spacing: 0.3px;
}

/* ── Barre basse ───────────────────────────────────────────────────── */
.lyra-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 18px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lyra-footer-bottom-sep {
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 1024px) {
  .wp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wp-info-grid {
    grid-template-columns: 1fr;
  }
}

/*pop up message*/
.lyra-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary);
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 2000;
}

@media (max-width: 768px) {
  .writing-profile-container {
    padding: 80px 20px 40px;
  }

  .wp-title {
    font-size: 36px;
  }

  .wp-current-profile {
    padding: 30px 20px;
  }

  .wp-profile-icon {
    font-size: 60px;
  }

  .wp-profile-type {
    font-size: 28px;
  }

  .wp-stats-grid {
    grid-template-columns: 1fr;
  }

  .wp-session-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .lyra-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .lyra-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .lyra-footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 16px 36px;
  }
  .lyra-footer-bottom {
    flex-direction: column;
    gap: 4px;
  }
}

/**/
