/* ======================
   RESET & BASE
   ====================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #020617;
  color: #e5e7eb;
}

a {
  color: #22c55e;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ======================
   HEADER / FOOTER
   ====================== */

.site-header {
  background: #020617;
  border-bottom: 1px solid #1e293b;
}

.site-main {
  padding: 24px 0 40px;
}

.site-footer {
  border-top: 1px solid #1e293b;
  padding: 16px 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Header interne */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-logo a {
  color: #e5e7eb;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Navigation */

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.site-nav a,
.nav-link {
  color: #e5e7eb;
  opacity: 0.85;
}
.site-nav a:hover,
.nav-link:hover {
  opacity: 1;
}

.nav-user {
  color: #9ca3af;
}

.nav-login-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #1e293b;
  background: radial-gradient(circle at top left, #22c55e33, #020617);
  font-size: 0.85rem;
  color: #e5e7eb;
}
.nav-login-btn:hover {
  background: #16a34a;
  color: #022c22;
}

.nav-user-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.nav-user-name {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.nav-user-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-small {
  font-size: 0.8rem;
  color: #9ca3af;
}
.nav-link-small:hover {
  color: #e5e7eb;
}

/* Toggle thème */

.theme-toggle {
  border: 1px solid #1f2937;
  background: #020617;
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #e5e7eb;
}
.theme-toggle:hover {
  background: #111827;
}
.theme-toggle-icon {
  display: inline-block;
}

/* ======================
   FORMULAIRES
   ====================== */

.search-form,
.song-form {
  margin-bottom: 24px;
  padding: 16px;
  background: #020617;
  border-radius: 8px;
  border: 1px solid #1e293b;
}

.field-group {
  margin-bottom: 12px;
}

.field-inline {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.field-inline > div {
  flex: 1;
}

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #9ca3af;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #1e293b;
  background: #0b1120;
  color: #e5e7eb;
  font: inherit;
}

textarea {
  resize: vertical;
}

button {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: #22c55e;
  color: #022c22;
  font-weight: 600;
  cursor: pointer;
}
button:hover {
  background: #16a34a;
}

.required {
  color: #f97316;
}

.field-help {
  display: block;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 4px;
}

/* ======================
   LISTE MORCEAUX / DÉTAIL
   ====================== */

.song-list {
  display: grid;
  gap: 16px;
}

.song-card {
  background: #020617;
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid #1e293b;
}
.song-card h3 {
  margin-top: 0;
  margin-bottom: 4px;
}
.song-card .meta {
  font-size: 0.85rem;
  color: #9ca3af;
}
.song-card .excerpt {
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Détail morceau */

.song-detail header {
  margin-bottom: 16px;
}
.song-detail .meta {
  font-size: 0.9rem;
  color: #9ca3af;
}

/* ======================
   PAROLES / EXPLICATION
   ====================== */

.lyrics-html {
  background: #020617;
  border-radius: 8px;
  border: 1px solid #1e293b;
  padding: 14px 14px 16px;
  font-size: 0.95rem;
  line-height: 1;
  white-space: pre-wrap;
}

/* Titres de sections (Intro, A, B...) */
.lyrics-html h3,
.tox .lyrics-section-title {
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a5b4fc;
}

/* Lignes de texte */
.lyrics-html p,
.tox .lyrics-line {
  margin: 0 0 2px;
}

/* Séparateur (équivalent des "----") */
.lyrics-html hr {
  border: none;
  border-top: 1px dashed #334155;
  margin: 10px 0;
}

/* Mot important */
.lyrics-html .lyrics-highlight,
.tox .lyrics-highlight {
  background: rgba(250, 204, 21, 0.25);
  padding: 0 2px;
  border-radius: 3px;
}

/* Parties chœur */
.lyrics-html .lyrics-choeur,
.tox .lyrics-choeur {
  background: rgba(56, 189, 248, 0.23);
  border-left: 3px solid #38bdf8;
  padding: 0 4px;
  border-radius: 3px;
}

/* Explication */

.explanation-html {
  margin-top: 8px;
  background: #020617;
  border-radius: 8px;
  border: 1px solid #1e293b;
  padding: 12px 14px;
  font-size: 0.95rem;
}

/* ======================
   COMMENTAIRES / MESSAGES
   ====================== */

.comments {
  margin-top: 24px;
}

.comment {
  background: #020617;
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid #1e293b;
  margin-bottom: 8px;
}

.comment-meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

.notice {
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.notice.success {
  background: #022c22;
  border: 1px solid #16a34a;
}
.notice.error {
  background: #451a1a;
  border: 1px solid #f97373;
}

/* ======================
   THÈME CLAIR
   ====================== */

body[data-theme="light"] {
  background: #f9fafb;
  color: #111827;
}

/* Header + footer */
body[data-theme="light"] .site-header {
  background: #ffffff;
  border-bottom-color: #e5e7eb;
}
body[data-theme="light"] .site-logo a {
  color: #111827;
}
body[data-theme="light"] .site-nav .nav-link {
  color: #111827;
}
body[data-theme="light"] .nav-link-small {
  color: #4b5563;
}
body[data-theme="light"] .nav-link-small:hover {
  color: #111827;
}
body[data-theme="light"] .nav-login-btn {
  background: #16a34a;
  border-color: #16a34a;
  color: #f9fafb;
}
body[data-theme="light"] .nav-login-btn:hover {
  background: #15803d;
}

/* Conteneurs / cartes */
body[data-theme="light"] .search-form,
body[data-theme="light"] .song-form,
body[data-theme="light"] .song-card,
body[data-theme="light"] .lyrics-html,
body[data-theme="light"] .explanation-html,
body[data-theme="light"] .comment,
body[data-theme="light"] .notice {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #111827;
}

/* Inputs */
body[data-theme="light"] input[type="text"],
body[data-theme="light"] input[type="number"],
body[data-theme="light"] input[type="email"],
body[data-theme="light"] input[type="password"],
body[data-theme="light"] textarea {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}

/* Liens globaux en mode clair */
body[data-theme="light"] a {
  color: #15803d;
}

/* Bouton toggle thème */
body[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}
body[data-theme="light"] .theme-toggle:hover {
  background: #e5e7eb;
}

/* Notices */
body[data-theme="light"] .notice.success {
  background: #ecfdf3;
  border-color: #bbf7d0;
}
body[data-theme="light"] .notice.error {
  background: #fef2f2;
  border-color: #fecaca;
}

/* Footer en mode clair */
body[data-theme="light"] .site-footer {
  background: #ffffff;
  border-top-color: #e5e7eb;
  color: #6b7280;
}

/* ======================
   MISE EN PAGE 3 COLONNES
   ====================== */

.page-3cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: flex-start;
  margin-top: 12px;
}

.page-2cols {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: flex-start;
  margin-top: 12px;
}

.page-col {
  min-width: 0;
}

.page-col-left {
  font-size: 0.85rem;
  opacity: 0.85;
}



.page-col-right {
  font-size: 0.9rem;
}

/* Responsive : empile les colonnes sur mobile */
@media (max-width: 1024px) {
  .page-3cols {
    grid-template-columns: 1fr;
  }
  .page-col-left {
    display: none;
  }
}

/* ======================
   BARRE D’INDEX A–Z
   ====================== */

.letter-filter {
  margin-top: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.letter-btn {
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: transparent;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
}

.letter-btn.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #022c22;
}

body[data-theme="light"] .letter-btn {
  border-color: #d1d5db;
}
body[data-theme="light"] .letter-btn.active {
  background: #16a34a;
  border-color: #16a34a;
  color: #f9fafb;
}

/* ======================
   LISTE DES DERNIERS MORCEAUX
   ====================== */

.latest-songs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.latest-song-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.latest-song-text {
  flex: 1;
  min-width: 0;
}

.latest-song-title a {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-song-meta {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
}

.latest-song-cover img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
}

/* Thème clair pour la colonne droite */
body[data-theme="light"] .page-col-right h3 {
  color: #111827;
}

/* ======================
   INDEX DES MORCEAUX (A–Z complet)
   ====================== */

.song-index {
  margin-top: 24px;
}

.song-index-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.song-index-group {
  flex: 1 1 160px;
  min-width: 140px;
}

.song-index-letter {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.song-index-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.song-index-group li {
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.song-index-meta {
  font-size: 0.75rem;
  opacity: 0.8;
}
/* Bouton "Demander un morceau" */

.ask-song-cta {
  margin-top: 32px;
  margin-bottom: 16px;
  text-align: center;
}

.btn-ask-song {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: #0ea5e9;
  color: #f9fafb;
  font-weight: 600;
  font-size: 0.95rem;
}
.btn-ask-song:hover {
  background: #0284c7;
  text-decoration: none;
}

/* mode clair */
body[data-theme="light"] .btn-ask-song {
  background: #0ea5e9;
  color: #f9fafb;
}
body[data-theme="light"] .btn-ask-song:hover {
  background: #0284c7;
}
/* ======================
   LAYOUT DASHBOARD 2 COLONNES
   ====================== */

.page-2cols {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 1.6fr);
  gap: 24px;
  align-items: flex-start;
  margin-top: 12px;
}

.page-col {
  min-width: 0;
}



.page-col-right {
  font-size: 0.9rem;
}

/* Responsive : une seule colonne sur petit écran */
@media (max-width: 1024px) {
  .page-2cols {
    grid-template-columns: 1fr;
  }
  .page-col-right {
    margin-top: 16px;
  }
}

/* ======================
   BARRE DE STATS
   ====================== */

.dash-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 16px;
}

.dash-stat {
  flex: 0 1 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #020617;
}

.dash-stat-label {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 2px;
}

.dash-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Mode clair */
body[data-theme="light"] .dash-stat {
  background: #ffffff;
  border-color: #e5e7eb;
}
body[data-theme="light"] .dash-stat-label {
  color: #6b7280;
}

/* ======================
   BOUTON "AJOUTER UN MORCEAU"
   ====================== */

.dash-welcome {
  margin-bottom: 16px;
}

.dash-add-song-wrap {
  margin: 0 0 24px;
}

.btn-primary-large {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: #22c55e;
  color: #022c22;
  font-weight: 700;
  font-size: 1rem;
  border: none;
}
.btn-primary-large:hover {
  background: #16a34a;
  text-decoration: none;
}

/* ======================
   TABLEAUX DASHBOARD
   ====================== */

.dash-section {
  margin-top: 24px;
}

.dash-section h3 {
  margin-bottom: 8px;
}

.dash-empty {
  font-size: 0.9rem;
  color: #9ca3af;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dash-table th,
.dash-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #1e293b;
  text-align: left;
}

.dash-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.dash-table tr:nth-child(even) {
  background-color: #020617;
}

/* texte secondaire dans les cellules (messages, infos) */
.dash-table-sub {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Mode clair pour les tableaux */
body[data-theme="light"] .dash-table th,
body[data-theme="light"] .dash-table td {
  border-color: #e5e7eb;
}

body[data-theme="light"] .dash-table tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Pour la table de demandes à droite, on la garde compacte */
.dash-table-requests td {
  vertical-align: top;
}
.dash-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 16px;
}

.dash-stat {
  flex: 0 1 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #020617;
}

.dash-stat-label {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 2px;
}

.dash-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
}

/* mode clair */
body[data-theme="light"] .dash-stat {
  background: #ffffff;
  border-color: #e5e7eb;
}
body[data-theme="light"] .dash-stat-label {
  color: #6b7280;
}
.dash-welcome {
  margin-bottom: 16px;
}

.dash-add-song-wrap {
  margin: 0 0 24px;
}

.btn-primary-large {
  display: inline-block;
  padding: 14px 30px;      /* plus gros */
  border-radius: 999px;
  background: #22c55e;
  color: #022c22;
  font-weight: 700;
  font-size: 1.05rem;      /* un poil plus grand */
  border: none;
}
.btn-primary-large:hover {
  background: #16a34a;
  text-decoration: none;
}
.site-header {
  background: #020617;
  border-bottom: 1px solid #1e293b;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo a {
  color: #e5e7eb;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
/* Boutons génériques du header */

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Rechercher = bouton "ghost" */
.nav-btn-ghost {
  background: transparent;
  border-color: #1f2937;
  color: #e5e7eb;
}
.nav-btn-ghost:hover {
  background: #111827;
}

/* Contribuer / Se connecter = bouton vert */
.nav-btn-primary {
  background: #22c55e;
  border-color: #22c55e;
  color: #022c22;
}
.nav-btn-primary:hover {
  background: #16a34a;
}

/* Mon compte = bouton outline discret */
.nav-btn-outline {
  background: transparent;
  border-color: #4b5563;
  color: #e5e7eb;
}
.nav-btn-outline:hover {
  background: #111827;
}

/* Déconnexion = bouton rouge */
.nav-btn-danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #f9fafb;
}
.nav-btn-danger:hover {
  background: #991b1b;
}

/* Administration = bouton mauve */
.nav-btn-admin {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #f9fafb;
}
.nav-btn-admin:hover {
  background: #6d28d9;
}

/* Bloc utilisateur */
.nav-user-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.nav-user-name {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.nav-user-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.theme-toggle {
  border: 1px solid #1f2937;
  background: #020617;
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #e5e7eb;
}
.theme-toggle:hover {
  background: #111827;
}
.theme-toggle-icon {
  display: inline-block;
}
/* Mode clair : header & boutons */

body[data-theme="light"] .site-header {
  background: #ffffff;
  border-bottom-color: #e5e7eb;
}

body[data-theme="light"] .site-logo a {
  color: #111827;
}

body[data-theme="light"] .nav-btn-ghost {
  border-color: #d1d5db;
  color: #111827;
}
body[data-theme="light"] .nav-btn-ghost:hover {
  background: #e5e7eb;
}

body[data-theme="light"] .nav-btn-outline {
  border-color: #d1d5db;
  color: #111827;
}
body[data-theme="light"] .nav-btn-outline:hover {
  background: #e5e7eb;
}

body[data-theme="light"] .nav-btn-primary {
  background: #16a34a;
  border-color: #16a34a;
  color: #f9fafb;
}
body[data-theme="light"] .nav-btn-primary:hover {
  background: #15803d;
}

body[data-theme="light"] .nav-btn-danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fef2f2;
}

body[data-theme="light"] .nav-btn-admin {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #f5f3ff;
}

body[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}
body[data-theme="light"] .theme-toggle:hover {
  background: #e5e7eb;
}
.nav-user-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Petit badge avec le nom dans le bouton "Mon compte" */
.nav-user-chip {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(148, 163, 184, 0.25);
  color: inherit;
}

/* Version claire */
body[data-theme="light"] .nav-user-chip {
  background: #e5e7eb;
}
/* Switch de mode pour le filtre lettres (Titre / Auteur) */
.letter-mode-switch {
  margin-top: 12px;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.letter-mode-label {
  opacity: 0.8;
}

.letter-mode-btn {
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: transparent;
  padding: 3px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.letter-mode-btn.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #022c22;
}

/* Mode clair */
body[data-theme="light"] .letter-mode-btn {
  border-color: #d1d5db;
}
body[data-theme="light"] .letter-mode-btn.active {
  background: #16a34a;
  border-color: #16a34a;
  color: #f9fafb;
}
/* LISTE MORCEAUX – version compacte */
.song-list {
  display: grid;
  gap: 8px;
}

/* Carte cliquable */
.song-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
}

/* Hover : pas de soulignement, fond qui change */
.song-card:hover {
  background: #ccffd3;           /* léger vert très clair */
  border-color: #22c55e;

}

.song-card-link,
.song-card-link:hover {
  display: block;
  color: inherit;
  text-decoration: none;          /* désactive le soulignement même si a:hover global */
  cursor: pointer;
}

/* Ligne titre + auteur */
.song-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

/* Titre en vert */
.song-card-title {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #16a34a;                 /* vert */
}

/* Auteur (et année) en noir */
.song-card-author {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #111827;                 /* noir/gris très foncé */
}

.song-card-year {
  opacity: 0.8;
}

/* Extrait : noir aussi, très compact */
.song-card-excerpt {
  margin-top: 2px;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #111827;                 /* noir */
}
body[data-theme="light"] .song-card {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #111827;
}
body[data-theme="light"] .song-card:hover {
  background: #ccffd3;
  border-color: #e5e7eb;
  color: #111827;
}
.btn-edit {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #e5e7eb;
  color: #111827;
  text-decoration: none;
}
.btn-edit:hover {
  background: #d1d5db;
  color: #111827;
  text-decoration: none;
}

.btn-link {
  font-size: 0.8rem;
  color: #15803d;
  text-decoration: none;
}
.btn-link:hover {
  text-decoration: underline;
}
/* Boutons dans la ligne auteur du morceau */

.author-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.btn-meta,
.btn-meta:hover {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid #1f2937;
  background: transparent;
  color: #e5e7eb;
  text-decoration: none;
  cursor: pointer;
}

.btn-meta:hover {
  background: #1f2937;
}

/* Mode clair */
body[data-theme="light"] .btn-meta,
body[data-theme="light"] .btn-meta:hover {
  border-color: #d1d5db;
  color: #111827;
}

body[data-theme="light"] .btn-meta {
  background: #f3f4f6;
}

body[data-theme="light"] .btn-meta:hover {
  background: #e5e7eb;
}

/* Section info auteur */
.author-info {
  margin-top: 24px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px dashed #334155;
  background: #020617;
  font-size: 0.9rem;
}

body[data-theme="light"] .author-info {
  background: #ffffff;
  border-color: #e5e7eb;
}
/* ======================
   PAGE D'ACCUEIL / HOME
   ====================== */

.home-layout {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 2.4fr);
  gap: 32px;
  align-items: stretch;
}

/* Colonne gauche : logo + gros boutons */
.home-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Bloc logo + texte */
.home-logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.home-logo-circle {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #022c22;
}

.home-logo-text h2 {
  margin: 0;
  font-size: 1.3rem;
}

.home-tagline {
  margin: 2px 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Gros boutons de la home */
.home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.home-btn:hover {
  background: #111827;
  transform: translateY(-1px);
  text-decoration: none;
}

.home-btn-primary {
  background: #22c55e;
  border-color: #22c55e;
  color: #022c22;
}

.home-btn-primary:hover {
  background: #16a34a;
}

/* Colonne droite : panneau de présentation */
.home-hero-panel {
  background: #020617;
  border-radius: 16px;
  border: 1px solid #1e293b;
  padding: 20px 22px;
  font-size: 0.96rem;
  line-height: 1.6;
}

.home-hero-panel h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

/* Mode clair */
body[data-theme="light"] .home-btn {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

body[data-theme="light"] .home-btn:hover {
  background: #e5e7eb;
}

body[data-theme="light"] .home-btn-primary {
  background: #16a34a;
  border-color: #16a34a;
  color: #f9fafb;
}

body[data-theme="light"] .home-btn-primary:hover {
  background: #15803d;
}

body[data-theme="light"] .home-hero-panel {
  background: #ffffff;
  border-color: #e5e7eb;
}

/* Responsive : une seule colonne sur mobile */
@media (max-width: 900px) {
  .home-layout {
    grid-template-columns: 1fr;
  }
}
/* === HEADER 2 LIGNES === */

.site-header {
  background: #020617;
  border-bottom: 1px solid #1e293b;
}

.header-inner-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 10px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-row-visitor {
  gap: 24px;
}

.header-logo-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo a {
  color: #e5e7eb;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.site-nav-visitor {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
}

.site-header a {
  text-decoration: none;           /* pas de soulignement dans le header */
}
.site-header a:hover {
  text-decoration: none;
}

.nav-link {
  color: #e5e7eb;
  opacity: 0.85;
}
.nav-link:hover {
  opacity: 1;
}

/* Ligne utilisateur */
.header-row-user {
  font-size: 0.85rem;
  gap: 12px;
}

.header-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-user-name {
  font-size: 0.85rem;
  color: #e5e7eb;
}

/* Pills (boutons header) */

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.nav-pill:hover {
  transform: translateY(-1px);
}

.nav-pill-ghost {
  background: #020617;
}

.nav-pill-green {
  background: #22c55e;
  border-color: #22c55e;
  color: #022c22;
}

.nav-pill-green:hover {
  background: #16a34a;
}

.nav-pill-admin {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #f9fafb;
}

.nav-pill-admin:hover {
  background: #7c3aed;
}

.nav-pill-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fef2f2;
}

.nav-pill-danger:hover {
  background: #b91c1c;
}

/* Mode clair du header */
body[data-theme="light"] .site-header {
  background: #ffffff;
  border-bottom-color: #e5e7eb;
}

body[data-theme="light"] .site-logo a {
  color: #111827;
}

body[data-theme="light"] .site-nav-visitor .nav-link {
  color: #111827;
}

body[data-theme="light"] .nav-user-name {
  color: #111827;
}

body[data-theme="light"] .nav-pill {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

body[data-theme="light"] .nav-pill-green {
  background: #16a34a;
  border-color: #16a34a;
  color: #f9fafb;
}

body[data-theme="light"] .nav-pill-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fef2f2;
}

body[data-theme="light"] .nav-pill-admin {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #f9fafb;
}

/* Responsive : empiler un peu sur petit écran */
@media (max-width: 800px) {
  .site-header .header-row-visitor {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav-visitor {
    flex-wrap: wrap;
  }
  .header-row-user {
    flex-direction: row;
    justify-content: space-between;
  }
}
/* =====================
   HEADER 2 LIGNES
   ===================== */

.site-header {
  background: #020617;
  border-bottom: 1px solid #1e293b;
}

.header-inner-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 10px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Ligne visiteur (logo + nav + thème + login) */

.header-row-visitor {
  gap: 16px;
}

.header-logo-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.site-logo {
  margin: 0;
}

.site-logo a {
  color: #e5e7eb;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Nav visiteur */
.site-nav-visitor {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
}

.site-header a {
  text-decoration: none;
}
.site-header a:hover {
  text-decoration: none;
}

.nav-link {
  color: #e5e7eb;
  opacity: 0.85;
}
.nav-link:hover {
  opacity: 1;
}

/* À droite : thème + login/logout */
.header-visitor-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-user-name {
  font-size: 0.85rem;
  color: #e5e7eb;
}

/* Toggle de thème */
.theme-toggle {
  border: 1px solid #1f2937;
  background: #020617;
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #e5e7eb;
}
.theme-toggle:hover {
  background: #111827;
}
.theme-toggle-icon {
  display: inline-block;
}

/* Séparateur entre les deux menus */
.header-separator {
  border-top: 1px solid #1e293b;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* Ligne utilisateur (contributeur/admin) */

.header-row-user {
  min-height: 32px;
  font-size: 0.85rem;
}

.site-nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-user-hint {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Pills / boutons du header */

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.nav-pill:hover {
  transform: translateY(-1px);
}

.nav-pill-ghost {
  background: #020617;
}

.nav-pill-green {
  background: #22c55e;
  border-color: #22c55e;
  color: #022c22;
}
.nav-pill-green:hover {
  background: #16a34a;
}

.nav-pill-admin {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #f9fafb;
}
.nav-pill-admin:hover {
  background: #7c3aed;
}

.nav-pill-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fef2f2;
}
.nav-pill-danger:hover {
  background: #b91c1c;
}

/* Mode clair pour le header */

body[data-theme="light"] .site-header {
  background: #ffffff;
  border-bottom-color: #e5e7eb;
}

body[data-theme="light"] .site-logo a {
  color: #111827;
}

body[data-theme="light"] .site-nav-visitor .nav-link {
  color: #111827;
}

body[data-theme="light"] .nav-user-name {
  color: #111827;
}

body[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}
body[data-theme="light"] .theme-toggle:hover {
  background: #e5e7eb;
}

body[data-theme="light"] .nav-pill {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

body[data-theme="light"] .nav-pill-green {
  background: #16a34a;
  border-color: #16a34a;
  color: #f9fafb;
}

body[data-theme="light"] .nav-pill-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fef2f2;
}

body[data-theme="light"] .nav-pill-admin {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #f9fafb;
}

/* Responsive */
@media (max-width: 900px) {
  .header-row-visitor {
    flex-wrap: wrap;
  }
  .site-nav-visitor {
    flex-wrap: wrap;
    justify-content: center;
  }
  .header-visitor-right {
    margin-left: auto;
  }
  .header-row-user {
    justify-content: flex-start;
  }
}
