@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* NoteLab.cloud - Styles de la Landing Page de Présentation (Hyper Notepad) */

:root {
  --bg-page: #0d0f12;
  --bg-card: #141519;
  --border-subtle: #242730;
  --border-glow: rgba(255, 255, 255, 0.08);

  --text-primary: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --btn-save-bg: #ffffff;
  --btn-save-text: #0f1117;
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, input, textarea, select, button {
  font-family: var(--font-main);
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 10% 20%, rgba(249, 115, 22, 0.05) 0px, transparent 40%),
    radial-gradient(at 90% 15%, rgba(59, 130, 246, 0.06) 0px, transparent 45%),
    radial-gradient(at 85% 85%, rgba(168, 85, 247, 0.06) 0px, transparent 50%),
    radial-gradient(at 15% 85%, rgba(16, 185, 129, 0.04) 0px, transparent 40%);
  background-attachment: fixed;
}

/* -------------------------------------------------------------
   1. GLOBAL TOP HEADER NAVBAR
   ------------------------------------------------------------- */
.landing-navbar {
  height: 56px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(13, 15, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand-logo-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.brand-bars {
  display: flex;
  gap: 3px;
  align-items: center;
}

.brand-bars span {
  width: 4px;
  height: 16px;
  border-radius: 2px;
}

.brand-bars span:nth-child(1) { background: #f97316; height: 12px; }
.brand-bars span:nth-child(2) { background: #3b82f6; height: 16px; }
.brand-bars span:nth-child(3) { background: #a855f7; height: 14px; }

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-link-item:hover {
  color: #ffffff;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-nav-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.4rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: #e5e7eb;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn-nav-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #3b82f6;
}

.user-nav-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.user-nav-profile img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.user-nav-name {
  font-size: 0.84rem;
  color: #fff;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.btn-theme-toggle:hover {
  color: #fff;
}

/* -------------------------------------------------------------
   2. PRESENTATION HERO & EMBEDDED NOTEPAD
   ------------------------------------------------------------- */
.landing-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.2rem 2.5rem 3.5rem;
}

.notepad-card-container {
  width: 100%;
  max-width: 1220px;
  height: calc(100vh - 120px);
  min-height: 520px;
  position: relative;
}

/* Effet Glow Multicolore Ambiant du mockup */
.notepad-card-glow {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border-glow);
  box-shadow: 
    0 0 60px -15px rgba(249, 115, 22, 0.16),
    0 0 80px -20px rgba(59, 130, 246, 0.22),
    0 0 70px -18px rgba(168, 85, 247, 0.2),
    0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header du bloc-notes */
.notepad-card-header {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-info-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.card-info-btn:hover {
  color: #fff;
}

.btn-card-save {
  background: var(--btn-save-bg);
  color: var(--btn-save-text);
  border: none;
  padding: 0.38rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s, opacity 0.2s, background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-card-save:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-card-save.saved {
  background: #22c55e;
  color: #fff;
}

/* Toolbar du bloc-notes */
.notepad-card-toolbar {
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.tb-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 5px 6px;
  border-radius: 5px;
  font-size: 0.88rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.tb-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.tb-btn.active {
  background: rgba(59, 130, 246, 0.16);
  color: #3b82f6;
}

.tb-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

.tb-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 0.2rem;
}

/* =============================================================
   CUSTOM DROPDOWN (FORMAT & POLICE PREVIEW)
   ============================================================= */
.custom-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.custom-dropdown-trigger {
  background: transparent;
  border: 1px solid transparent;
  color: #d1d5db;
  font-size: 0.84rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
}

.custom-dropdown-trigger:hover,
.custom-dropdown-container.open .custom-dropdown-trigger {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

.custom-dropdown-trigger .trigger-icon {
  color: #9ca3af;
  flex-shrink: 0;
}

.dropdown-chevron {
  color: #9ca3af;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.custom-dropdown-container.open .dropdown-chevron {
  transform: rotate(180deg);
  color: #60a5fa;
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: #16171d;
  border: 1px solid #282a36;
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  padding: 0.35rem;
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-dropdown-container.open .custom-dropdown-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dropdown-header-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #6b7280;
  padding: 0.4rem 0.6rem 0.25rem;
  user-select: none;
}

.dropdown-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 0.3rem 0;
}

.custom-dropdown-item {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}

.custom-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.custom-dropdown-item.active {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
}

.custom-dropdown-item .item-badge {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.custom-dropdown-item:hover .item-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.14);
}

.custom-dropdown-item.active .item-badge {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.custom-dropdown-item .item-badge svg {
  stroke: currentColor;
  display: block;
}

.custom-dropdown-item .item-font-preview {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.custom-dropdown-item:hover .item-font-preview {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.14);
}

.custom-dropdown-item.active .item-font-preview {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.custom-dropdown-item.active .item-font-preview {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.custom-dropdown-item .item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.custom-dropdown-item .item-title {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
}

.custom-dropdown-item .item-desc {
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.1;
}

.custom-dropdown-item .item-check {
  margin-left: auto;
  color: #3b82f6;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.custom-dropdown-item.active .item-check {
  opacity: 1;
  transform: scale(1);
}

.notepad-content-editor[data-font="inter"] {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
.notepad-content-editor[data-font="merriweather"] {
  font-family: 'Merriweather', Georgia, serif !important;
}
.notepad-content-editor[data-font="jetbrains-mono"] {
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace !important;
}
.notepad-content-editor[data-font="outfit"] {
  font-family: 'Outfit', 'Inter', sans-serif !important;
}
.notepad-content-editor[data-font="playfair"] {
  font-family: 'Playfair Display', Georgia, serif !important;
}

/* Zone de saisie principale */
.notepad-card-body {
  flex: 1;
  padding: 2.5rem 3.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notepad-title-input {
  background: none;
  border: none;
  outline: none;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.2rem;
  font-family: inherit;
}

.notepad-title-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.notepad-content-editor {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #d1d5db;
  min-height: 350px;
  user-select: text;
}

.notepad-content-editor:empty:before {
  content: attr(placeholder);
  color: var(--text-dim);
  pointer-events: none;
}

/* -------------------------------------------------------------
   3. MODAL DE CONNEXION GOOGLE (/signin)
   ------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: #17181e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.5rem 2.2rem;
  width: 90%;
  max-width: 390px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.btn-close-modal {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
}

.btn-close-modal:hover {
  color: #fff;
}

.modal-logo-bars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 1.25rem;
}

.modal-logo-bars span {
  width: 5px;
  height: 20px;
  border-radius: 2px;
}

.modal-logo-bars span:nth-child(1) { background: #f97316; height: 16px; }
.modal-logo-bars span:nth-child(2) { background: #3b82f6; height: 22px; }
.modal-logo-bars span:nth-child(3) { background: #a855f7; height: 18px; }

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.8rem;
}

.google-signin-box {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  margin-bottom: 1.5rem;
}

.modal-footer {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .landing-hero {
    padding: 1rem;
  }
  .notepad-card-body {
    padding: 1.5rem;
  }
}
