ul.chapitres-par-annee.accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.2s;
}
ul.chapitres-par-annee.accordion.open {
  max-height: 1000px;
  padding-bottom: 0.5em;
}
.toggle-annee {
  display: inline-block;
  background: #e0e3ea;
  color: inherit;
  border-radius: 5px;
  padding: 2px 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-annee:hover,
.toggle-annee:focus {
  background: #cfd4de;
}
table.auto-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}
table.auto-table td {
  padding: 0.4em 1.2em;
  border: 1px solid #ddd;
}
ul.chapitres-par-annee {
  list-style: none;
  margin: 0;
  padding-left: 0;
}
.btn-float-add {
  position: fixed;
  right: 32px;
  top: 32px;
  z-index: 2000;
  background: #16213e;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.18),
    0 1.5px 6px rgba(0, 0, 0, 0.1);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn-float-add {
  position: fixed;
  right: 32px;
  top: 32px;
  z-index: 2000;
  background: #fff;
  border-radius: 50%;
  border: 3px solid #16213e;
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.18),
    0 1.5px 6px rgba(0, 0, 0, 0.1);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s,
    border-color 0.2s;
  cursor: pointer;
}
.btn-float-add:hover {
  background: #fffde7;
  border-color: #16213e;
  box-shadow: 0 8px 32px rgba(255, 214, 0, 0.1), 0 3px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.08);
}

.search-loupe-icon {
  position: absolute;
  top: 50%;
  margin-top: 4px;
  margin-left: -29px;
  width: 26px;
  height: 26px;
  background: url("icones/search.png") no-repeat center center;
  background-size: 26px 26px;
  border-radius: 4px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.search-input-main {
  border-width: 1px;
  border-style: solid;
  border-radius: 6px;
}
.search-engine-zone {
  gap: 0 !important;
}

.results-count {
  margin-bottom: 1rem;
}

.search-loupe-btn:hover,
.search-loupe-btn:focus {
  background: #0f3460 !important;
  color: #fff !important;
}

.search-loupe-btn img {
  display: block;
  margin: auto;
  width: 22px;
  height: 22px;
}
.search-result-item-card.no-cover .result-actions-separator {
  display: block;
}
.search-result-item-card.no-cover {
  display: block !important;
  gap: 0 !important;
  align-items: initial !important;
}
.search-result-item-card.no-cover .result-content-flex {
  display: block !important;
}
.search-result-item-card.no-cover .result-content {
  width: 100%;
}
.search-result-item-card {
  display: flex;
  flex-direction: column;
  min-height: 180px;
  position: relative;
}
.result-content-flex {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
}
@media (max-width: 600px) {
  .result-content-flex {
    flex-direction: column;
    gap: 0.7rem;
  }
}
.result-content-flex {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
}
@media (max-width: 600px) {
  .result-content-flex {
    flex-direction: column;
    gap: 0.7rem;
  }
}
.result-cover {
  margin-bottom: 0;
  flex-shrink: 0;
}
.result-content {
  flex: 1 1 0%;
}
.result-actions-separator {
  border-top: 1px solid #e0e0e0;
  margin-top: 1rem;
  padding-top: 1rem;
  display: block;
  gap: 0.7em;
  align-items: center;
  width: 100%;
}
.search-result-item-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  padding: 1.2rem 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.result-cover-image {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  display: block;
  border-radius: 0 !important;
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.18),
    0 1.5px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  transform-origin: center center;
}

.result-cover-image:hover {
  transform: rotate(-7deg) scale(1.04);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
}

.btn-chapitre {
  background: #16213e;
  color: #fff !important;
  border: none;
  border-radius: 6px;
  padding: 0.45em 1.2em;
  font-size: 1rem;
  min-height: 32px;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 1px 4px rgba(25, 118, 210, 0.07);
  text-decoration: none;
  font-weight: 500;
  margin-right: 0.5em;
}
.btn-chapitre:hover {
  background: #0f3460;
  color: #fff !important;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.btn-secondary {
  background-color: #6c757d;
  color: white;
}
.btn-secondary:hover {
  background-color: #5a6268;
}
.search-engine-zone {
  position: relative;
}
.loading-indicator {
  font-size: 1rem;
  color: #1976d2;
  background: transparent;
  min-height: 1.2em;
  min-width: 0;
  text-align: left;
  margin-top: 0.1em;
}
.search-engine-zone {
  min-width: 0;
}
.search-input-main {
  flex: 1 1 0%;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
}
.search-input-main {
  width: 100%;
  box-sizing: border-box;
}
.admin-form-row {
  display: flex;
  gap: 1rem;
}

.admin-form-flex {
  flex: 1;
}

.admin-form-small {
  max-width: 150px;
}

.admin-input-small {
  max-width: 150px;
}

.admin-help-text {
  color: #6c757d;
}

#contenu {
  border-radius: 0 0 5px 5px !important;
  border-top: none !important;
}

.chapter-header-container {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.chapter-cover-container {
  flex-shrink: 0;
}

.chapter-cover-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  transform-origin: center center;
}

.chapter-cover-image:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.chapter-content-container {
  flex: 1;
}

.chapter-subtitle {
  color: #6c757d;
  font-weight: normal;
  margin-top: 0.2rem;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.chapter-meta {
  margin: 0.3rem 0;
  color: #6c757d;
  font-size: 1.1rem;
  font-weight: normal;
}

.chapter-link {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

.chapter-link a {
  color: #667eea;
  text-decoration: none;
}

.chapter-link a:hover {
  text-decoration: underline;
}

a.btn-chapitre:hover,
a.btn-chapitre:focus,
a.btn-chapitre {
  text-decoration: none !important;
}

.disques-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.disque-card {
  background: white;
  border-radius: 0px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 250px;
  margin: 0 auto;
}

.disque-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.disque-cover {
  position: relative;
  width: 100%;
  max-width: 250px;
  max-height: 250px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.disque-cover-image {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border: 1px solid #000;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.disque-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.disque-card:hover .disque-overlay {
  opacity: 1;
}

.disque-info {
  color: white;
  text-align: center;
  max-width: 100%;
}

.disque-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  line-height: 1.3;
  color: white;
}

.disque-subtitle {
  color: #e9ecef;
  font-style: italic;
  margin: 0 0 1rem 0;
  font-size: 1rem;
  line-height: 1.4;
}

.disque-meta {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.disque-artist {
  font-weight: normal;
  color: white;
  font-size: 1.1rem;
}

.disque-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.disque-actions .btn {
  width: 100%;
  max-width: 180px;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
}

.icone-plateform {
  max-width: 20px;
  max-height: 20px;
  vertical-align: middle;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: white;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  margin: 2rem 0;
  position: relative;
}

hr::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 3px;
  background: #667eea;
  border-radius: 2px;
}

.header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(138, 43, 226, 0.1) 50%,
    transparent 70%
  );
  pointer-events: none;
}

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

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.header nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon {
  width: 24px;
  height: 24px;
  filter: invert(1);
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.admin-link {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.main {
  padding-top: 100px;
  padding-bottom: 50px;
  min-height: 100vh;
  position: relative;
  box-sizing: border-box;
}

.main:has(.hero) {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
}

.hero {
  width: 100%;
  padding: 4rem 0;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3a 50%, #2d1b69 100%);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-cover {
  position: relative;
  max-width: 300px;
  margin: 0 auto;
  perspective: 1000px;
}

.hero-cover a {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.cover-image {
  width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 5px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  background: transparent;
  display: block;
  cursor: pointer;
  transform-origin: center center;
}

.hero-cover a:hover .cover-image {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 10px 25px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-text-content {
  padding-right: 2rem;
  color: white;
}

.hero-text-content h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ffd700;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: #a8a8ff;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-description {
  font-size: 1.1rem;
  color: #e0e0e0;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-text-content h2 {
    font-size: 2.5rem;
  }

  .hero-cover {
    max-width: 250px;
  }
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: #c74545;
  color: white;
  border: 3px solid #a73030;
}

.btn-primary:hover {
  background-color: #b03e3e;
  border-color: #8b2a2a;
  transform: translateY(-3px) scale(1.02);
}

.btn-secondary {
  background-color: #1a1a2e;
  color: #4ecdc4;
  border: 3px solid #0f1419;
}

.btn-secondary:hover {
  background-color: #2d2d50;
  color: #4ecdc4;
  border-color: #000000;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: #8a2be2;
  border: 3px solid #8a2be2;
}

.btn-outline:hover {
  background-color: #8a2be2;
  color: white;
  border-color: #6a1b9a;
  transform: translateY(-2px);
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.admin-btn-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

.admin-btn-primary {
  background: #667eea;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  min-height: 48px;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-btn-primary:hover {
  background: #5a67d8;
  color: white;
}

.admin-btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  min-height: 48px;
  box-sizing: border-box;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.admin-btn-secondary:hover {
  background: #5a6268;
  color: white;
  text-decoration: none;
}

.chapitres-preview {
  margin-bottom: 4rem;
  padding: 3rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 249, 250, 0.8) 100%
  );
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.chapitres-preview h3 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #8a2be2 50%, #4ecdc4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

.chapitres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.chapitre-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.chapitre-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #ff6b6b 0%, #8a2be2 50%, #4ecdc4 100%);
  transition: width 0.3s ease;
}

.chapitre-card:hover::before {
  width: 100%;
  opacity: 0.05;
}

.chapitre-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(138, 43, 226, 0.2);
}

.chapitre-card h4 {
  color: #1a1a2e;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.chapitre-card p {
  color: #6c757d;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.livre-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.sidebar {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  height: fit-content;
  position: sticky;
  top: 7rem;
}

.sidebar h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1.1rem;
}

.chapitre-liste {
  list-style: none;
}

.chapitre-liste li {
  margin-bottom: 0.3rem;
}

.chapitre-liste a {
  display: block;
  padding: 0.3rem 0.5rem;
  color: #6c757d;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  line-height: 1.3;
}

.chapitre-liste a:hover,
.chapitre-liste a.active {
  background-color: #eaf3fa;
  color: #16213e;
}

.contenu-principal {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contenu-principal h2 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.contenu-principal .meta {
  color: #6c757d;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.contenu-texte {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2c3e50;
  margin-top: 10px;
}

.contenu-texte h3 {
  margin: 2rem 0 1rem;
  color: #2c3e50;
  font-size: 1.4rem;
}

.contenu-texte h4 {
  margin: 1.5rem 0 0.8rem;
  color: #495057;
  font-size: 1.2rem;
}

.contenu-texte p {
  margin-bottom: 1.2rem;
  text-align: justify;
}

.contenu-texte ul,
.contenu-texte ol {
  margin: 1rem 0 1rem 2rem;
}

.contenu-texte li {
  margin-bottom: 0.5rem;
}

.contenu-texte blockquote {
  background: #f8f9fa;
  border-left: 4px solid #667eea;
  padding: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.navigation-chapitres {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.navigation-top {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding-top: 0;
  padding-bottom: 1rem;
  border-top: none;
  border-bottom: 1px solid #e9ecef;
}

.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.admin-nav {
  display: flex;
  gap: 1rem;
}

.table {
  width: 100%;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.table tr:hover {
  background-color: #f8f9fa;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
  min-height: 200px;
  resize: vertical;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.form-check input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.form-check label {
  margin-bottom: 0;
  line-height: 1.4;
  cursor: pointer;
}

.alert {
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert-info {
  background-color: #cce7ff;
  border: 1px solid #99d5ff;
  color: #004085;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.footer {
  background: rgba(26, 26, 46, 0.8);
  color: #a0a0a0;
  padding: 0.5rem 0;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  backdrop-filter: blur(5px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  font-size: 0.8rem;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem; /* Petit espace entre le texte et l'icône */
}

.footer-content p {
  margin: 0;
}

.admin-icon {
  width: 14px;
  height: 14px;
  filter: invert(0.6);
  transition: filter 0.3s ease;
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  margin-top: 4px;
}

.admin-link {
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  text-decoration: none;
}

.admin-link:hover .admin-icon {
  filter: invert(1);
}

.footer p {
  padding: 0;
  margin: 0;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}

.no-content {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .header nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .livre-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .sidebar {
    position: static;
  }

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

  .admin-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .admin-nav {
    justify-content: center;
  }

  .actions {
    flex-direction: column;
  }

  .navigation-chapitres {
    flex-direction: column;
    gap: 1rem;
  }
}

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

.chapitre-card {
  animation: fadeInUp 0.6s ease forwards;
}

.chapitre-card:nth-child(2) {
  animation-delay: 0.1s;
}

.chapitre-card:nth-child(3) {
  animation-delay: 0.2s;
}

.chapitre-card:nth-child(4) {
  animation-delay: 0.3s;
}

.chapitre-card:nth-child(5) {
  animation-delay: 0.4s;
}

.chapitre-card:nth-child(6) {
  animation-delay: 0.5s;
}

html {
  scroll-behavior: smooth;
}

@media (max-width: 480px) {
  .navigation-chapitres {
    flex-direction: column;
    gap: 1rem;
  }

  .table {
    font-size: 0.9rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
  }
}

.btn-icon {
  border: none;
  background: transparent;
  padding: 0.25rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.btn-icon-large {
  padding: 0.5rem;
  background-color: rgba(40, 167, 69, 0.1);
  border-radius: 8px;
}

.btn-icon-large:hover {
  background-color: rgba(40, 167, 69, 0.2);
}

.action-icon {
  width: 20px;
  height: 20px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.action-icon-large {
  width: 28px;
  height: 28px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.btn-icon:hover .action-icon,
.btn-icon:hover .action-icon-large {
  opacity: 1;
}

.btn-nav {
  border: none;
  background: #eaf3fa;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s ease, border-radius 0.3s ease, width 0.3s ease,
    padding 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 40px;
  height: 40px;
  position: relative;
  color: #6c757d;
}

.btn-nav:hover {
  background: #eaf3fa;
  border-radius: 25px;
  width: auto;
  min-width: 40px;
  color: #6c757d;
  max-width: 300px;
  padding: 0 1rem 0 3rem;
  gap: 0;
  justify-content: flex-start;
}

.nav-arrow {
  width: 20px;
  height: 20px;
  opacity: 0.8;
  transition: opacity 0.3s ease, left 0.3s ease;
  flex-shrink: 0;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.btn-nav-prev:hover {
  padding: 0 3rem 0 1rem;
}

.btn-nav-prev .nav-arrow {
  right: 10px;
  left: auto;
  transform: translateY(-50%) scaleX(-1);
}

.nav-arrow-prev {
  transform: scaleX(-1);
}

.nav-title {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.3s ease, max-width 0.3s ease;
}

.btn-nav:hover .nav-title {
  opacity: 1;
  max-width: 250px;
}

.btn-nav:hover .nav-arrow {
  opacity: 1;
}

.footnote-ref {
  color: #8b5a3c;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.85em;
  vertical-align: super;
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(139, 90, 60, 0.1);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.footnote-ref:hover {
  background: rgba(139, 90, 60, 0.2);
  color: #5d3e2b;
}

.footnotes {
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.footnote-item {
  margin-bottom: 0.5rem;
}

.footnote-number {
  color: #8b5a3c;
  font-weight: bold;
  margin-right: 0.5rem;
  font-size: 0.65em;
}

.footnote-content {
  display: inline;
  line-height: 1.4;
  font-size: 0.75em;
}

.footnote-backlink {
  margin-left: 0.5rem;
  color: #a0a0a0;
  text-decoration: none;
  font-size: 0.65em;
  opacity: 0.7;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.footnote-backlink:hover {
  opacity: 1;
  color: #8b5a3c;
}

.footnote-ref,
.footnote-backlink {
  scroll-margin-top: 100px;
}

.spotify-player {
  margin: 2rem 0 1rem 0;
}

.spotify-player iframe {
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.editor-toolbar {
  background: #f8f9fa;
  padding: 0.5rem;
  border: 2px solid #e9ecef;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.editor-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #495057;
  transition: all 0.2s ease;
}

.editor-btn:hover {
  background: #e9ecef;
  border-color: #ced4da;
  color: #212529;
}

.editor-textarea {
  border-radius: 0 0 5px 5px !important;
  border-top: none !important;
}

.admin-form-container {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-column-flex {
  flex: 1;
}

.form-column-fixed {
  max-width: 150px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-neutral-primary {
  background: #6c757d;
  border-color: #6c757d;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-neutral-secondary {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  text-decoration: none;
}

.btn-neutral-outline {
  background: transparent;
  color: #6c757d;
  border: 1px solid #dee2e6;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  text-decoration: none;
}

.form-help-text {
  color: #6c757d;
}

.form-input-narrow {
  max-width: 150px;
}

.pdf-info-box {
  background: #fff;
  box-shadow: 0 4px 24px rgba(44, 62, 80, 0.12), 0 1.5px 6px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 2rem 2rem 1rem 2rem;
  margin: 2rem auto 0 auto;
  max-width: 600px;
}

.pdf-info-box p {
  color: #222;
  font-size: 1.08rem;
  margin-bottom: 1.2rem;
  text-align: justify;
}
