/* Suppression des liserés orange par défaut */
* {
  outline: none !important;
}

/* ---------------------------------
   Overlay pour bloquer mobile/tablette
   (extrait depuis index.html)
   --------------------------------- */
#mobileBlock {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  color: #fff;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  font-family: sans-serif;
}

#mobileBlock .box {
  max-width: 720px;
}

/* Note: l'affichage effectif est contrôlé par `js/mobile-block.js` */

/* ================================
   Responsive: mobile / tablette
   Bloque l'accès et adapte le rendu
   ================================ */
@media (max-width: 1024px) {
  /* Afficher l'overlay en CSS au cas où JS est désactivé */
  #mobileBlock {
    display: flex !important;
  }

  /* Empêcher toute interaction avec le jeu */
  .game-container {
    filter: blur(1px);
    pointer-events: none;
    user-select: none;
  }

  /* Limiter le scrolling de la page pour l'overlay */
  body {
    overflow: hidden;
  }

  /* Adapter la zone de jeu sur écrans plus petits */
  .apartment-container {
    background-size: cover;
    background-position: center;
    min-height: 60vh;
    margin: 10px;
    border-radius: 6px;
  }

  .game-header h2 {
    font-size: 1.4rem;
  }

  .character {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 600px) {
  #mobileBlock {
    padding: 1rem !important;
  }
  #mobileBlock .box h1 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
  }
  #mobileBlock .box p {
    font-size: 0.95rem;
  }
}

*:focus {
  outline: none !important;
  box-shadow: none !important;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: none !important;
}

/* === Bloc de pierre cliquable (retour accueil) === */
.stone-block-link {
  position: absolute;
  left: 287px; /* On garde la même position, on élargit vers la droite */
  top: 240px;
  width: 200px; /* Largeur augmentée de 50px sur la droite */
  height: 120px;
  z-index: 10;
  cursor: url("images/pointeur.png") 16 16, pointer !important;
  background: rgba(255, 200, 80, 0); /* complètement transparent hors survol */
  border-radius: 12px;
  transition: box-shadow 0.2s, background 0.2s;
}

/* === Zone de survol pour le tableau === */
.frame-hover-area {
  position: absolute;
  left: 730px; /* Position du cadre ajustée : 290 + 60 = 350 */
  top: 220px; /* Position du cadre calculée : (600-320)/2 - 80 = 60 */
  width: 400px;
  height: 600px;
  z-index: 5;
  cursor: url("images/pointeur.png") 16 16, pointer;
  background: transparent;
  transition: background 0.8s ease, transform 0.1s ease;
  box-sizing: border-box;
  /* Bordure rouge supprimée pour rendre la zone invisible */
}

.stone-block-link:hover {
  box-shadow: 0 0 18px 6px rgba(255, 200, 80, 0.18);
  background: rgba(255, 200, 80, 0.1);
}

/* ========================================
   SYSTÈME D'AUTHENTIFICATION GLOBAL
   ======================================== */

/* Barre d'authentification dans jeux.html */
.auth-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #226d54;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.auth-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
}

/* Boutons d'authentification génériques */
.auth-buttons {
  display: flex;
  gap: 10px;
}

.auth-buttons .btn-primary,
.auth-buttons .btn-secondary,
.user-info .btn-primary,
.user-info .btn-secondary {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Georgia", serif;
  min-width: 110px;
  text-align: center;
  white-space: nowrap;
}

.auth-buttons .btn-primary,
.user-info .btn-primary {
  background: linear-gradient(135deg, #8b4513, #a0522d);
  color: #f5deb3;
}

.auth-buttons .btn-secondary,
.user-info .btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-buttons .btn-primary:hover,
.user-info .btn-primary:hover {
  background: linear-gradient(135deg, #a0522d, #8b4513);
  transform: translateY(-1px);
}

.auth-buttons .btn-secondary:hover,
.user-info .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Informations utilisateur dans le header */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info #userDisplayName {
  color: #f5deb3;
  font-weight: bold;
  font-size: 1rem;
  font-family: "Georgia", serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  min-width: 120px;
}

/* Styles pour les modals d'authentification */
.auth-switch {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(139, 69, 19, 0.3);
}

.auth-switch p {
  color: #ddc9a3;
  margin: 0;
}

.auth-switch a {
  color: #8b4513;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.auth-switch a:hover {
  color: #a0522d;
  text-decoration: underline;
}

/* ========================================
   FORMULAIRE DE CRÉATION DE PERSONNAGE
   ======================================== */
.character-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.character-modal.show {
  display: flex;
  opacity: 1;
}

.character-form-container {
  background: linear-gradient(135deg, #5c3e1f 0%, #3d2914 100%);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  color: #f5deb3;
  position: relative;
  font-family: "Georgia", serif;
}

.character-form-header {
  background: #31405a;
  padding: 20px;
  border-radius: 12px 12px 0 0;
  text-align: center;
  position: relative;
}

.character-form-header h2 {
  margin: 0;
  color: white;
  font-size: 1.8rem;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.character-form {
  padding: 30px;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

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

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #f5deb3;
  font-size: 1.1rem;
  font-family: "Georgia", serif;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: #2f1b14;
  color: #f5deb3;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: "Georgia", serif;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
  outline: none;
  border-color: #a0522d;
  box-shadow: 0 0 10px rgba(160, 82, 45, 0.3);
  background: #3d2914;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="password"]::placeholder {
  color: #ffffff;
}

.class-description {
  margin: 20px 0;
  padding: 15px;
  background: rgba(34, 109, 84, 0.1);
  border: 1px solid #226d54;
  border-radius: 8px;
  min-height: 60px;
}

.class-description p {
  margin: 0;
  line-height: 1.5;
  color: #f5deb3;
}

.type-description {
  margin: 20px 0;
  padding: 15px;
  background: rgba(34, 109, 84, 0.1);
  border: 1px solid #226d54;
  border-radius: 8px;
  min-height: 60px;
}

.type-description p {
  margin: 0;
  line-height: 1.5;
  color: #f5deb3;
}

.deity-description {
  margin: 20px 0;
  padding: 15px;
  background: rgba(34, 109, 84, 0.1);
  border: 1px solid #226d54;
  border-radius: 8px;
  min-height: 60px;
}

.deity-description p {
  margin: 0;
  line-height: 1.5;
  color: #f5deb3;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.btn-primary,
.btn-secondary {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.btn-primary {
  background: linear-gradient(135deg, #8b4513, #a0522d);
  color: #f5deb3;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
  border: none;
  font-family: "Georgia", serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #a0522d, #8b4513);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(160, 82, 45, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #2f1b14, #3d2914);
  color: #ddc9a3;
  border: none;
  font-family: "Georgia", serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #3d2914, #5c3e1f);
  color: #f5deb3;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(101, 67, 33, 0.4);
}
.account-content {
  padding: 30px;
}

.account-section {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(245, 222, 179, 0.12);
  border-radius: 12px;
  border: 1px solid rgba(210, 180, 140, 0.15);
}

.account-section h3 {
  margin: 0 0 20px 0;
  color: #8b4513;
  font-size: 1.3rem;
  font-weight: bold;
  padding-bottom: 10px;
  font-family: "Georgia", serif;
}

.account-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: bold;
  color: #f3e8d3;
  min-width: 140px;
}

.info-value {
  color: #226d54;
  font-weight: 500;
  text-align: right;
  flex: 1;
}

.no-character {
  text-align: center;
  padding: 30px;
  color: #ddc9a3;
}

.no-character p {
  margin-bottom: 20px;
  font-style: italic;
}

/* === Styles pour les actions du compte === */
.account-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.account-actions .btn-secondary {
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 250px;
  text-align: center;
}

.action-help {
  color: #ddc9a3;
  font-style: italic;
  text-align: center;
  font-size: 0.9rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info #userDisplayName {
  color: #f5deb3;
  font-weight: bold;
  font-size: 1rem;
  font-family: "Georgia", serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  min-width: 120px;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
/* === Bandes verticales autour du carrousel === */
.carousel-section {
  position: relative;
  z-index: 1;
  background-color: #1a1a1a;
}
.carousel-section::before {
  left: 0;
  right: 50%;
  border-radius: 0 20px 20px 0;
}
.carousel-section::after {
  left: 50%;
  right: 0;
  border-radius: 20px 0 0 20px;
}
.carousel-container {
  position: relative;
  z-index: 2;
}
/* =============================
   Images du carrousel (meilleur cadrage)
   ============================= */
.carousel-slide img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: 0 19%;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  background: #222;
}
/* Cadrage spécifique pour l'image de la grotte du loup dans le carrousel */
.carousel-slide img[src*="loup.png"],
.carousel-slide img[src*="loup.jpg"] {
  object-position: 50% 35% !important;
}
/* Annule la bordure et l'ombre pour les images du hero */
.story-hero-image {
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* =============================
   Styles spécifiques aux récits
   ============================= */

/* Botaniste */
.story-hero-image[src*="botaniste.png"] {
  width: auto;
  max-width: 500px;
  height: 70vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
}

/* Parapluie */
.story-hero-image[src*="parapluie.png"] {
  width: auto;
  max-width: 520px;
  height: 65vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
}

/* Flamel */
.story-hero-image.flamel-image {
  width: auto;
  max-width: 540px;
  height: 65vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
}

.story-hero-background {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}
/* ========================================
   PORTFOLIO CSS - VERSION NETTOYÉE ET ORGANISÉE
   Dernière mise à jour : 8 juillet 2025
   ======================================== */

/* ========================================
   1. BASE & RESET
   ======================================== */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Décale le contenu principal pour ne pas passer sous la sidebar */
body {
  margin-left: 0;
}

body {
  font-family: Arial, sans-serif;
  background: rgb(243, 232, 211);
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Images générales dans les articles */
.simple-article img,
.story-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================
   2. HEADER & NAVIGATION
   ======================================== */
.header-booki {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #226d54;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Conteneur pour navigation + bouton (desktop seulement) */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Logo avec animation */
.logo img {
  display: block;
  height: 45px;
  transition: transform 0.3s;
  cursor: pointer;
}

.logo img.wiggle {
  animation: plume-wiggle 0.6s;
}

@keyframes plume-wiggle {
  0% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(-15deg);
  }
  40% {
    transform: rotate(10deg);
  }
  60% {
    transform: rotate(-10deg);
  }
  80% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Zone de navigation */
.nav-zone {
  display: flex;
  align-items: center;
}

/* Navigation */
.nav-booki {
  display: flex;
  gap: 140px;
  align-items: center;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: block;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  padding-right: 40px;
}

.dropdown-toggle::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown-toggle:hover {
  background: #31405a;
  color: #7ec3ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Enlever la surbrillance bleu foncé pour le menu "Les articles" */
.dropdown-toggle[title="Les articles"]:hover {
  background: transparent;
  color: white;
  transform: none;
  box-shadow: none;
}

/* Enlever la surbrillance bleu foncé pour le menu "Les récits" */
.dropdown-toggle[title="Les récits"]:hover {
  background: transparent;
  color: white;
  transform: none;
  box-shadow: none;
}

/* Enlever la surbrillance bleu foncé pour le menu "Les jeux" */
.dropdown-toggle[title="Les jeux"]:hover {
  background: transparent;
  color: white;
  transform: none;
  box-shadow: none;
}

.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: #232b36;
  min-width: 180px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  /* SUPPRIMER overflow: hidden pour permettre aux sous-menus de déborder */
  /* overflow: hidden; */
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover:not(.dropdown-submenu-toggle) {
  background: #7ec3ff;
  color: #1a1a1a;
  padding-left: 25px;
  font-weight: 500;
}

/* === Animation pour l'icône du menu "Les articles" === */
.dropdown-toggle svg,
.dropdown-toggle img {
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Filtre de couleur pour harmoniser l'icône des récits avec celle des articles */
.dropdown-toggle[title="Les récits"] img {
  filter: hue-rotate(20deg) saturate(1.2) brightness(0.9);
}

/* Animation de oscillation douce pour l'icône des articles */
@keyframes gentle-float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-2px) rotate(1deg);
  }
  50% {
    transform: translateY(-1px) rotate(0deg);
  }
  75% {
    transform: translateY(-2px) rotate(-1deg);
  }
}

.dropdown-toggle[title="Les articles"]:hover svg,
.dropdown-toggle[title="Les articles"]:hover img {
  animation: gentle-float 0.8s ease-in-out infinite;
  transform: scale(1.1);
  filter: drop-shadow(0 2px 8px rgba(126, 195, 255, 0.3));
}

.dropdown-toggle[title="Les récits"]:hover svg,
.dropdown-toggle[title="Les récits"]:hover img {
  animation: gentle-float 0.8s ease-in-out infinite;
  transform: scale(1.1);
  filter: hue-rotate(20deg) saturate(1.2) brightness(0.9)
    drop-shadow(0 2px 8px rgba(126, 195, 255, 0.3));
}

.dropdown-toggle[title="Les jeux"]:hover svg,
.dropdown-toggle[title="Les jeux"]:hover img {
  animation: gentle-float 0.8s ease-in-out infinite;
  transform: scale(1.1);
  filter: drop-shadow(0 2px 8px rgba(126, 195, 255, 0.3));
}

/* Animation des lignes internes au survol (seulement pour SVG) */
.dropdown-toggle[title="Les articles"]:hover svg line {
  stroke-dasharray: 14;
  stroke-dashoffset: 14;
  animation: write-text 0.6s ease-out forwards;
}

@keyframes write-text {
  to {
    stroke-dashoffset: 0;
  }
}

/* Sous-menus - Version ultra-simplifiée et fonctionnelle */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu-toggle {
  display: block;
  color: white;
  text-decoration: none;
  padding: 12px 40px 12px 20px;
  transition: background 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.dropdown-submenu-toggle:hover {
  background: #7ec3ff;
  color: #1a1a1a;
}

.dropdown-submenu-toggle .arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  transition: transform 0.3s ease, color 0.3s ease;
  color: #888;
}

.dropdown-submenu-toggle:hover .arrow {
  color: #1a1a1a;
}

.dropdown-submenu:hover .arrow {
  transform: translateY(-50%) rotate(90deg);
}

.dropdown-submenu-content {
  position: absolute;
  top: 0;
  left: 100%;
  background: #1a2332;
  min-width: 250px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  margin-left: 10px;
  /* Utiliser opacity pour des transitions fluides */
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* Affichage au survol - géré par JavaScript maintenant */
/* .dropdown-submenu:hover .dropdown-submenu-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
} */

.dropdown-submenu-content a {
  display: block !important;
  color: white !important;
  text-decoration: none !important;
  padding: 10px 15px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  transition: background 0.3s ease !important;
}

.dropdown-submenu-content a:last-child {
  border-bottom: none !important;
}

.dropdown-submenu-content a:hover {
  background: #7ec3ff !important;
  color: #1a1a1a !important;
}

/* ========================================
   STYLES POUR LE TROISIÈME NIVEAU DE MENU (SUB-SUBMENU)
   ======================================== */

.dropdown-sub-submenu {
  position: relative;
}

.dropdown-sub-submenu-toggle {
  display: block;
  color: white;
  text-decoration: none;
  padding: 12px 40px 12px 20px;
  transition: background 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.dropdown-sub-submenu-toggle:hover {
  background: #7ec3ff;
  color: #1a1a1a;
}

.dropdown-sub-submenu-toggle .arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  transition: transform 0.3s ease, color 0.3s ease;
  color: #888;
}

.dropdown-sub-submenu-toggle:hover .arrow {
  color: #1a1a1a;
}

.dropdown-sub-submenu:hover .arrow {
  transform: translateY(-50%) rotate(90deg);
}

.dropdown-sub-submenu-content {
  position: absolute;
  top: 0;
  left: 100%;
  background: #0d1117;
  min-width: 280px;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  margin-left: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.dropdown-sub-submenu-content a {
  display: block !important;
  color: white !important;
  text-decoration: none !important;
  padding: 12px 18px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: background 0.3s ease !important;
  font-size: 0.9rem !important;
}

.dropdown-sub-submenu-content a:last-child {
  border-bottom: none !important;
}

.dropdown-sub-submenu-content a:hover {
  background: #7ec3ff !important;
  color: #1a1a1a !important;
}

/* ========================================
   FIN DES STYLES TROISIÈME NIVEAU
   ======================================== */

/* Bouton mode sombre */
.dark-mode-btn {
  background: #31405a;
  border: none;
  border-radius: 20px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  color: white;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 80px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-left: 20px;
}

.dark-mode-btn svg {
  display: block;
}

.dark-mode-btn .sun-icon {
  display: block;
}

.dark-mode-btn .moon-icon {
  display: none;
}

body.dark-mode .dark-mode-btn .sun-icon {
  display: none;
}

body.dark-mode .dark-mode-btn .moon-icon {
  display: block;
}

.dark-mode-btn:hover {
  background: #3a3a3a;
  color: #7ec3ff;
}

/* ========================================
   3. PAGE D'ACCUEIL
   ======================================== */
.banniere {
  text-align: center;
  padding: 20px 0;
}

.banniere img {
  max-width: 100%;
  height: auto;
}

.portfolio-presentation {
  padding: 40px 20px;
  text-align: center;
}

.presentation-container {
  max-width: 800px;
  margin: 0 auto;
}

.presentation-content h2 {
  color: #226d54;
  font-size: 2rem;
  margin-bottom: 20px;
}

.presentation-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

/* ========================================
   4. CAROUSEL
   ======================================== */
.carousel-section {
  padding: 40px 20px;
}

.carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  height: 400px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-title {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  color: #333;
  transition: all 0.3s ease;
  z-index: 15;
}

.carousel-btn:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-btn.carousel-prev {
  left: 20px;
}

.carousel-btn.carousel-next {
  right: 20px;
}

.carousel-caption {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  color: white;
  z-index: 12;
  text-align: center;
}

.carousel-caption h3 {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
  color: white;
  display: inline-block;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

button.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50% !important;
  border: 2px solid white;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  outline: none;
  min-width: 12px;
  min-height: 12px;
  max-width: 12px;
  max-height: 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50% !important;
  border: 2px solid white;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  outline: none;
  min-width: 12px;
  min-height: 12px;
  max-width: 12px;
  max-height: 12px;
}

.indicator.active,
.indicator:hover {
  background: white;
}

/* ========================================
   5. ARTICLES SIMPLES
   ======================================== */
.simple-article {
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  line-height: 1.6;
  background: #f4f4f4;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

  /* Protection contre la copie */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.simple-article h1 {
  color: #226d54;
  font-size: 2.2rem;
  margin: 0 0 20px 0;
  text-align: center;
  border-bottom: 2px solid #226d54;
  padding-bottom: 10px;
}

.simple-article h2 {
  color: #31405a;
  font-size: 1.5rem;
  margin: 25px 0 15px 0;
  border-left: 4px solid #226d54;
  padding-left: 15px;
}

.simple-article p {
  margin: 0 0 15px 0;
  text-align: justify;
}

/* ========================================
   6. PRÉSENTATION MODERNE DES RÉCITS
   ======================================== */
.story-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0;
}

.story-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.story-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.story-hero-image {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 54%;
  height: 94%;
  opacity: 1;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

/* Ajustement spécifique pour l'image de Flamel */
.story-hero-image.flamel-image {
  width: 50%;
}

.story-hero-content {
  position: absolute;
  bottom: 120px;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 7px;
  color: white;
  text-align: center;
}

.story-meta {
  font-size: 1rem;
  margin: 0;
  opacity: 0.9;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
}

.story-date {
  color: #7ec3ff;
  font-weight: 500;
}

.story-separator {
  color: #ccc;
}

.story-author {
  color: #fff;
  font-weight: 500;
}

.story-category {
  background: #226d54;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.story-tag {
  background: #31405a;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Conteneur pour aligner métadonnées et titre sur une ligne */
.story-header-line {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 30px;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 30px;
  border-radius: 12px;
  backdrop-filter: blur(5px);
  flex-direction: row;
  text-align: center;
}

.story-title {
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
  color: white;
  white-space: nowrap;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.story-excerpt {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  opacity: 0.95;
}

.story-excerpt p {
  margin: 0;
}

.story-notice {
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid #7ec3ff;
  padding: 15px 20px;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.story-notice p {
  margin: 0;
  color: #f0f0f0;
}

.story-content {
  max-width: 800px;
  margin: -100px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 5;
}

.story-body {
  background: #f4f4f4;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  line-height: 1.6;

  /* Protection contre la copie */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.story-body p {
  margin: 0 0 20px 0;
  text-align: justify;
  color: #333;
}

.presentation-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 40px 20px;
}
/* ========================================
   7. FOOTER
   ======================================== */
footer {
  background: #1a1a1a;
  padding: 30px 20px;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-btn {
  display: inline-block;
  background: #31405a;
  color: white;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-btn:hover {
  background: #7ec3ff;
  color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================
   8. MODE SOMBRE
   ======================================== */
body.dark-mode {
  background: #1a1a1a;
  color: #e0e0e0;
}

body.dark-mode .header-booki {
  background: #2d2d2d;
}

body.dark-mode .dropdown-menu {
  background: #3a3a3a;
}

body.dark-mode .dropdown-menu a:hover {
  background: #7ec3ff;
  color: #1a1a1a;
}

body.dark-mode .dropdown-submenu-content {
  background: #2a2a2a;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

body.dark-mode .dropdown-submenu-content a:hover {
  background: #7ec3ff;
  color: #1a1a1a;
}

body.dark-mode .banniere {
  background: #2a2a2a;
}

body.dark-mode .portfolio-presentation {
  background: #1a1a1a;
}

body.dark-mode .presentation-content h2 {
  color: #7ec3ff;
}

body.dark-mode .presentation-content p {
  color: #e0e0e0;
}

body.dark-mode .carousel-container {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.dark-mode .carousel-btn {
  background: rgba(126, 195, 255, 0.8);
}

body.dark-mode .carousel-btn:hover {
  background: #7ec3ff;
}

body.dark-mode .simple-article {
  background: #2a2a2a;
  color: #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .simple-article h1 {
  color: #7ec3ff;
  border-bottom-color: #7ec3ff;
}

body.dark-mode .simple-article h2 {
  color: #e0e0e0;
  border-left-color: #7ec3ff;
}

body.dark-mode .story-hero-background {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
}

body.dark-mode .story-category {
  background: #7ec3ff;
  color: #1a1a1a;
}

body.dark-mode .story-tag {
  background: #4a5568;
  color: #e0e0e0;
}

body.dark-mode .story-body {
  background: #2a2a2a;
  color: #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .story-body p {
  color: #e0e0e0;
}

body.dark-mode footer {
  background: #000000;
}

body.dark-mode .contact-btn {
  background: #3a3a3a;
  color: #7ec3ff;
}

body.dark-mode .contact-btn:hover {
  background: #7ec3ff;
  color: #1a1a1a;
}

/* ========================================
   9. RESPONSIVE TABLETTE & MOBILE
   ======================================== */

/* Tablette (≤ 1024px) */
@media (max-width: 1024px) {
  .header-booki {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .nav-zone {
    align-self: center;
  }
  .nav-booki {
    gap: 40px;
  }
  .dark-mode-btn {
    margin-left: 0;
    align-self: center;
    width: auto;
    min-width: 80px;
  }
  .carousel-container {
    height: 300px;
    max-width: 95vw;
  }
  .presentation-container,
  .story-content,
  .simple-article {
    max-width: 95vw;
    padding: 20px 10px;
  }
  .story-hero-content {
    bottom: 40px;
    padding: 5px;
  }
  .story-header-line {
    gap: 10px;
    padding: 6px 10px;
  }
  /* Ajustement des images pour tablette */
  .story-hero-image {
    width: 70%;
    height: 85%;
    top: 5%;
  }
  .story-hero-image.flamel-image {
    width: 65%;
    height: 85%;
  }
  .banniere img {
    max-width: 90%;
    height: auto;
  }
  /* Images dans les articles */
  .simple-article img,
  .story-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
  }
  /* Ajustement des menus déroulants pour tablette */
  .dropdown-menu {
    min-width: 180px;
    max-width: 250px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }
  .dropdown:hover .dropdown-menu {
    transform: translateX(-50%) translateY(0);
  }
  .dropdown-toggle::after {
    right: 10px;
  }
  .dropdown-menu a {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  /* Ajustement des sous-menus pour tablette */
  .dropdown-submenu-content {
    position: absolute !important;
    top: 0 !important;
    left: 100% !important;
    min-width: 220px !important;
    margin-left: 10px !important;
  }

  .dropdown-submenu-content a {
    padding: 10px 15px !important;
    font-size: 0.85rem !important;
  }
  /* Ajustement des indicateurs du carousel pour tablette */
  button.indicator,
  .indicator {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    border: 2px solid white;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    outline: none;
    min-width: 10px;
    min-height: 10px;
    max-width: 10px;
    max-height: 10px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
  }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  .header-booki {
    flex-direction: column;
    align-items: center;
    padding: 10px 5vw;
    gap: 10px;
  }
  .logo img {
    height: 38px;
  }
  .nav-zone {
    width: 100%;
    align-self: center;
    justify-content: center;
  }
  .nav-booki {
    flex-direction: row;
    gap: 5px;
    margin: 0;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .dark-mode-btn {
    width: auto;
    margin-left: 0;
    margin-top: 5px;
    min-width: 80px;
    align-self: center;
  }
  .dropdown {
    width: auto;
    flex: 0 1 auto;
  }
  .dropdown-toggle {
    width: auto;
    text-align: center;
    padding: 10px 30px 10px 8px;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  .dropdown-menu {
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    min-width: 200px;
    max-width: 300px;
    border-radius: 8px;
    width: auto;
  }
  .dropdown:hover .dropdown-menu {
    transform: translateX(-50%) translateY(0);
  }
  .dropdown-toggle::after {
    right: 8px;
  }
  .dropdown-menu a {
    padding: 10px 12px;
    font-size: 0.85rem;
    text-align: left;
  }
  /* Ajustement des sous-menus pour mobile */
  .dropdown-submenu-content {
    position: static !important;
    background: #0f1419 !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: none !important;
    pointer-events: auto !important;
    z-index: 9999 !important;
  }

  .dropdown-submenu:hover .dropdown-submenu-content {
    display: block !important;
  }

  .dropdown-submenu-content a {
    padding: 15px 25px !important;
    font-size: 0.9rem !important;
    border-left: 3px solid #7ec3ff !important;
    display: block !important;
    color: white !important;
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  .dropdown-submenu-content a:hover,
  .dropdown-submenu-content a:active,
  .dropdown-submenu-content a:focus {
    background: #7ec3ff !important;
    color: #1a1a1a !important;
  }
  .carousel-container {
    height: 180px;
    min-height: 140px;
    max-width: 99vw;
  }

  /* Ajustement du formulaire de personnage pour mobile */
  .character-form-container {
    width: 95%;
    margin: 10px;
    max-height: 85vh;
  }

  .character-form-header {
    padding: 15px;
  }

  .character-form-header h2 {
    font-size: 1.4rem;
  }

  .character-form {
    padding: 20px;
  }

  .form-group label {
    font-size: 1rem;
  }

  .form-group input[type="text"],
  .form-group select {
    padding: 10px;
    font-size: 0.9rem;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 15px;
  }
  .carousel-caption h3 {
    font-size: 1rem;
  }
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    top: 60%;
  }
  .carousel-btn.carousel-prev {
    left: 5px;
  }
  .carousel-btn.carousel-next {
    right: 5px;
  }
  .carousel-indicators {
    bottom: 8px;
    gap: 5px;
  }
  button.indicator,
  .indicator {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    border: 1px solid white;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    outline: none;
    min-width: 8px;
    min-height: 8px;
    max-width: 8px;
    max-height: 8px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
  }
}

/* Très petits écrans (≤ 480px) */
@media (max-width: 480px) {
  .header-booki {
    padding: 6px 2vw;
  }
  .logo img {
    height: 30px;
  }
  .nav-booki {
    gap: 2px;
  }
  .dropdown-toggle {
    padding: 8px 25px 8px 6px;
    font-size: 0.85rem;
  }
  .dropdown-toggle::after {
    right: 6px;
  }
  .story-hero-image,
  .story-hero-image.flamel-image {
    width: 90%;
    height: 50%;
    top: 15%;
    min-height: 150px;
    max-height: 250px;
  }
  .story-title {
    font-size: 0.95rem;
  }
  .carousel-container {
    height: 110px;
    min-height: 80px;
  }
}

/* Ajustement des sous-sous-menus pour mobile (troisième niveau) */
.dropdown-sub-submenu-content {
  position: static !important;
  background: #050a0f !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  display: none !important;
  pointer-events: auto !important;
  z-index: 9999 !important;
}

.dropdown-sub-submenu:hover .dropdown-sub-submenu-content {
  display: block !important;
}

.dropdown-sub-submenu-content a {
  padding: 12px 35px !important;
  font-size: 0.85rem !important;
  border-left: 3px solid #5aa3e0 !important;
  display: block !important;
  color: white !important;
  text-decoration: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.dropdown-sub-submenu-content a:hover,
.dropdown-sub-submenu-content a:active,
.dropdown-sub-submenu-content a:focus {
  background: #5aa3e0 !important;
  color: #1a1a1a !important;
}

/* ========================================
   CHAMP DE RECHERCHE
   ======================================== */
.search-container {
  position: relative;
  margin-left: 0;
}

#search-input {
  padding: 8px 15px;
  border: 2px solid #31405a;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 0.8rem;
  width: 220px;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

#search-input:focus {
  border-color: #7ec3ff;
  background: white;
  box-shadow: 0 0 10px rgba(126, 195, 255, 0.3);
}

#search-input::placeholder {
  color: #666;
  font-style: italic;
  font-size: 0.75rem;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #232b36;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  margin-top: 5px;
}

.search-results.show {
  display: block;
}

.search-result-item {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.3s ease;
  color: white;
  text-decoration: none;
  display: block;
}

.search-result-item:hover {
  background: #7ec3ff;
  color: #1a1a1a;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 500;
  font-size: 0.9rem;
}

.search-result-category {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 2px;
}

.search-no-results {
  padding: 15px;
  text-align: center;
  color: #888;
  font-style: italic;
}

/* Mode sombre pour la recherche */
body.dark-mode #search-input {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-color: #7ec3ff;
}

body.dark-mode #search-input:focus {
  background: #2a2a2a;
  border-color: #7ec3ff;
}

body.dark-mode #search-input::placeholder {
  color: #ccc;
}

body.dark-mode .search-results {
  background: #3a3a3a;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

body.dark-mode .search-result-item:hover {
  background: #7ec3ff;
  color: #1a1a1a;
}

/* ========================================
   CURSEUR BAGUETTE DE SUREAU HARRY POTTER
   ======================================== */
/* Baguette normale pour le toggle "Harry Potter" - structure page d'accueil */
.dropdown-sub-submenu-toggle:hover {
  cursor: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='elderWand' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23B8956A;stop-opacity:1' /%3E%3Cstop offset='30%25' style='stop-color:%23A0875B;stop-opacity:1' /%3E%3Cstop offset='70%25' style='stop-color:%23897249;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%236B5940;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M28 28 L6 6' stroke='url(%23elderWand)' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M6 6 L8 8' stroke='%23D4C096' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M8 8 L10 10' stroke='%23C2AE82' stroke-width='3.5' stroke-linecap='round'/%3E%3Cpath d='M10 10 L12 12' stroke='%23B09D70' stroke-width='3' stroke-linecap='round'/%3E%3Cellipse cx='7' cy='7' rx='2' ry='1.2' fill='%23D4C096' transform='rotate(45 7 7)'/%3E%3Cellipse cx='9' cy='9' rx='1.5' ry='0.8' fill='%23C2AE82' transform='rotate(45 9 9)'/%3E%3Ccircle cx='11' cy='11' r='0.8' fill='%23B09D70'/%3E%3Ccircle cx='6' cy='6' r='1' fill='%23F0E6D2'/%3E%3Cpath d='M6 6 L7 7 M7 7 L8 8 M8 8 L9 9' stroke='%23E8DCC0' stroke-width='0.8'/%3E%3C/svg%3E")
      16 16,
    pointer !important;
}

/* PAS de baguette sur "Fanfiction" - curseur normal seulement */

/* Baguette normale pour les récits Harry Potter uniquement - l'effet Lumos est géré par JavaScript */
.dropdown-sub-submenu-content a:hover,
.dropdown-submenu-content a[href*="parapluie"]:hover,
.dropdown-submenu-content a[href*="botaniste"]:hover,
.dropdown-submenu-content a[href*="flamel"]:hover,
.dropdown-submenu-content a[href*="tresor-fondateurs"]:hover {
  cursor: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='elderWand' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23B8956A;stop-opacity:1' /%3E%3Cstop offset='30%25' style='stop-color:%23A0875B;stop-opacity:1' /%3E%3Cstop offset='70%25' style='stop-color:%23897249;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%236B5940;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M28 28 L6 6' stroke='url(%23elderWand)' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M6 6 L8 8' stroke='%23D4C096' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M8 8 L10 10' stroke='%23C2AE82' stroke-width='3.5' stroke-linecap='round'/%3E%3Cpath d='M10 10 L12 12' stroke='%23B09D70' stroke-width='3' stroke-linecap='round'/%3E%3Cellipse cx='7' cy='7' rx='2' ry='1.2' fill='%23D4C096' transform='rotate(45 7 7)'/%3E%3Cellipse cx='9' cy='9' rx='1.5' ry='0.8' fill='%23C2AE82' transform='rotate(45 9 9)'/%3E%3Ccircle cx='11' cy='11' r='0.8' fill='%23B09D70'/%3E%3Ccircle cx='6' cy='6' r='1' fill='%23F0E6D2'/%3E%3Cpath d='M6 6 L7 7 M7 7 L8 8 M8 8 L9 9' stroke='%23E8DCC0' stroke-width='0.8'/%3E%3C/svg%3E")
      16 16,
    pointer !important;
}

/* ========================================
   STORY PAGES - MISE EN PAGE LIVRE
   ======================================== */

/* Page de livre individuelle */
.story-page {
  min-height: 100vh;
  padding: 40px 0;
  border-radius: 20px;
  margin-bottom: 60px;
  border-bottom: 3px solid #ddd;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
}

.story-page:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.story-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #ccc 50%,
    transparent 100%
  );
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ========================================
   PAGINATION POUR LES PAGES D'HISTOIRE
   ======================================== */

/* Masquer toutes les pages sauf la première */
.story-page {
  display: none;
}

.story-page.active {
  display: block;
}

/* Contrôles de pagination */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 40px 0;
  padding: 20px;
}

.pagination-btn {
  background: #226d54;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
  background: #1a5c47;
  transform: translateY(-2px);
}

.pagination-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.page-indicator {
  font-size: 18px;
  font-weight: bold;
  color: #226d54;
  margin: 0 15px;
}

/* Navigation au clavier */
.keyboard-hint {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-top: 10px;
}

/* Effet de transition entre les pages */
.story-page.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Navigation entre les parties de l'histoire */
.story-navigation {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  padding: 20px;
  background: #f8f8f8;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
}

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

.current-part {
  background: #226d54;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
}

.part-link {
  background: #f0f0f0;
  color: #666;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.part-link:hover {
  background: #226d54;
  color: white;
  transform: translateY(-2px);
}

.story-navigation-bottom {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.next-part-btn {
  background: #226d54;
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.next-part-btn:hover {
  background: #1a5c47;
  transform: translateY(-2px);
}

/* Sections séparées dans une page */
.story-section {
  margin-bottom: 80px;
  padding-bottom: 60px;

  border-radius: 5px;
  padding-top: 40px;
  padding-left: 20px;
  padding-right: 20px;
  background: #eaecde;

  padding-top: 40px;
  border-radius: 8px;
  padding-left: 20px;
  padding-right: 20px;
  background: #fff;
  border: 2px solid #226d54;

  box-shadow: 0 4px 12px rgba(34, 109, 84, 0.1);
}

.story-section:not(:last-child) {
  box-shadow: 0 4px 12px rgba(34, 109, 84, 0.15);
}

.story-section h2 {
  margin-bottom: 30px;
  margin-top: 20px;
  text-align: center;
}

.story-section .text-indicator {
  text-align: center;
  font-weight: bold;
  color: #666;
  margin-top: 30px;
}

.story-section:last-child {
  margin-bottom: 40px;
}

.story-section:first-child {
  padding-top: 20px;
  margin-top: 20px;
}

/* ========================================
   INTERFACE D'AUTHENTIFICATION
   ======================================== */

/* Barre d'authentification principale (index.html) */
.auth-bar {
  background: transparent;
  border-bottom: none;
  padding: 10px 0;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
 


  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.auth-bar.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Barre d'authentification toujours visible dans la page des jeux */
body:has(#gameCanvas) .auth-bar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

/* Adaptation des boutons pour la page des jeux - Style bibliothèque */
body:has(#gameCanvas) .auth-buttons .btn-primary {
  background: linear-gradient(135deg, #8b4513, #a0522d);
  color: #f5deb3;
  border: none;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-family: "Georgia", serif;
}

body:has(#gameCanvas) .auth-buttons .btn-primary:hover {
  background: linear-gradient(135deg, #a0522d, #8b4513);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(160, 82, 45, 0.3);
}

body:has(#gameCanvas) .auth-buttons .btn-secondary {
  background: linear-gradient(135deg, #2f1b14, #3d2914);
  color: #ddc9a3;
  border: none;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  font-family: "Georgia", serif;
}

body:has(#gameCanvas) .auth-buttons .btn-secondary:hover {
  background: linear-gradient(135deg, #3d2914, #5c3e1f);
  color: #f5deb3;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(101, 67, 33, 0.4);
}

body:has(#gameCanvas) .user-info span {
  color: #f5deb3;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  font-family: "Georgia", serif;
}

/* Style pour le logo interactif */
.logo {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.auth-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  min-height: 50px;
  margin-right: -20px;
}

/* Interface d'authentification pour les jeux */
.auth-section {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  padding: 8px 15px;
  border-radius: 0;
  color: #f3e8d3;
  font-size: 14px;
  font-weight: 500;
}

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

.auth-buttons .btn-primary,
.auth-buttons .btn-secondary {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-width: 100px;
  text-align: center;
}

.auth-buttons .btn-primary {
  background: #226d54;
  color: #f3e8d3;
  border: 2px solid #226d54;
}

.auth-buttons .btn-primary:hover {
  background: #1e5d4a;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 109, 84, 0.3);
}

.auth-buttons .btn-secondary {
  background: #f3e8d3;
  color: #226d54;
  border: 2px solid #226d54;
}

.auth-buttons .btn-secondary:hover {
  background: #226d54;
  color: #f3e8d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 109, 84, 0.3);
}

.user-info .btn-primary,
.user-info .btn-secondary {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px;
  font-weight: 500;
  min-width: 100px;
  text-align: center;
}

.user-info .btn-primary {
  background: linear-gradient(135deg, #8b4513, #a0522d);
  color: #f5deb3;
  border: none;
  font-family: "Georgia", serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.user-info .btn-primary:hover {
  background: linear-gradient(135deg, #a0522d, #8b4513);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(160, 82, 45, 0.3);
}

.user-info .btn-secondary {
  background: linear-gradient(135deg, #2f1b14, #3d2914);
  color: #ddc9a3;
  border: none;
  font-family: "Georgia", serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.user-info .btn-secondary:hover {
  background: linear-gradient(135deg, #3d2914, #5c3e1f);
  color: #f5deb3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(101, 67, 33, 0.4);
}

/* Formulaire d'authentification */
.auth-switch {
  text-align: center;
  margin-top: 15px;
  color: #666;
  font-size: 14px;
}

.auth-switch a {
  color: #226d54;
  text-decoration: none;
  font-weight: 500;
}

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

/* ========================================
   INTERFACE D'ADMINISTRATION
   ======================================== */

.admin-btn {
  background: linear-gradient(135deg, #c41e3a, #8b0000) !important;
  border: none !important;
  color: #ffffff !important;
  padding: 8px 16px !important;
  font-size: 0.9rem !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-family: "Georgia", serif !important;
  min-width: 110px !important;
  text-align: center !important;
  white-space: nowrap !important;
  font-weight: 500 !important;
}

.admin-btn:hover {
  background: linear-gradient(135deg, #8b0000, #c41e3a) !important;
  transform: translateY(-1px) !important;
}

.users-table {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.users-header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr;
  gap: 10px;
  background: linear-gradient(135deg, #3d2914, #2f1b14);
  padding: 15px;
  font-weight: bold;
  color: #f5deb3;
  border-bottom: 2px solid #8b4513;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr;
  gap: 10px;
  padding: 12px 15px;
  background: rgba(139, 69, 19, 0.1);
  border-bottom: 1px solid rgba(139, 69, 19, 0.2);
  transition: background 0.3s ease;
}

.user-row:hover {
  background: rgba(139, 69, 19, 0.2);
}

.user-row:last-child {
  border-bottom: none;
}

.user-col {
  display: flex;
  align-items: center;
  color: #f5deb3;
  font-family: "Georgia", serif;
}

.delete-user-btn {
  background: linear-gradient(135deg, #8b0000, #c41e3a) !important;
  color: white !important;
  border: none !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-family: "Georgia", serif !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.delete-user-btn:hover {
  background: linear-gradient(135deg, #c41e3a, #ff0000) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4) !important;
}
/* Styles pour le récapitulatif */
.recap-content {
  margin: 20px 0;
}

.recap-section {
  margin-bottom: 25px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.recap-section h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.1em;
}

.recap-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.recap-item:last-child {
  border-bottom: none;
}

.recap-label {
  font-weight: 600;
  color: #495057;
}

.recap-value {
  color: #007bff;
  font-weight: 500;
}
/* Styles pour le modal de fiche personnage */
.character-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(24, 24, 28, 0.98);
  backdrop-filter: blur(6px);
}

.character-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.character-sheet {
  background: linear-gradient(135deg, #23232b 0%, #18181c 100%);
  border-radius: 18px;
  padding: 32px;
  max-width: 820px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 174, 255, 0.1), 0 2px 8px rgba(0, 0, 0, 0.7);
  position: relative;
  border: none;
}
.character-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid #00aeff;
  background: transparent;
}
.character-header h2 {
  color: #fff;
  margin: 0;
  font-size: 2.1rem;
  font-family: "Segoe UI", "Arial", sans-serif;
  letter-spacing: 1px;
  font-weight: 700;
}
.close-btn {
  background: #23232b;
  color: #00aeff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px #00aeff;
}

.close-btn:hover {
  background: #00aeff;
  color: #23232b;
  transform: scale(1.1);
}

.form-section {
  margin-bottom: 28px;
  padding: 22px 20px;
  background: #23232b;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 174, 255, 0.08);
  border: 1px solid #23232b;
}
.form-section h3 {
  color: #fff;
  margin: 0 0 18px 0;
  font-size: 1.25rem;
  font-family: "Segoe UI", "Arial", sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-weight: 500;
  color: #b9c6d3;
  margin-bottom: 6px;
  font-family: "Segoe UI", "Arial", sans-serif;
  font-size: 1rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px;
  border: 2px solid #23232b;
  border-radius: 6px;
  font-size: 15px;
  background: #18181c;
  color: #eaf6ff;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00aeff;
  box-shadow: 0 0 0 2px #00aeff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px;
  background: #23232b;
  border-radius: 6px;
  border: 1px solid #23232b;
}
.stat-group label {
  font-weight: 500;
  color: #b9c6d3;
  min-width: 80px;
  font-size: 14px;
}
.stat-group input {
  width: 62px;
  text-align: center;
  border: 1px solid #23232b;
  border-radius: 4px;
  padding: 7px;
  background: #18181c;
  color: #eaf6ff;
}
.stat-group input:focus {
  border-color: #00aeff;
}
.stat-modifier {
  font-weight: bold;
  color: #00aeff;
  min-width: 35px;
  text-align: center;
  background: rgba(0, 174, 255, 0.08);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: 0 0 4px #00aeff;
}
.skills-container,
.equipment-container {
  background: #23232b;
  padding: 15px;
  border-radius: 7px;
  border: 1px solid #23232b;
}
.skills-input,
.equipment-input {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.skills-input input,
.equipment-input input {
  flex: 1;
  padding: 9px;
  border: 1px solid #23232b;
  border-radius: 4px;
  background: #18181c;
  color: #eaf6ff;
}
.btn-small {
  padding: 9px 16px;
  background: #00aeff;
  color: #18181c;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  transition: background 0.3s;
  box-shadow: 0 2px 8px rgba(0, 174, 255, 0.12);
}
.btn-small:hover {
  background: #0090d0;
  color: #fff;
}
.skills-list,
.equipment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-item,
.equipment-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 174, 255, 0.08);
  padding: 5px 12px;
  border-radius: 15px;
  border: 1px solid #23232b;
  font-size: 13px;
  color: #eaf6ff;
}
.remove-btn {
  background: #23232b;
  color: #00aeff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 4px #00aeff;
}
.remove-btn:hover {
  background: #00aeff;
  color: #23232b;
}

.btn-primary,
.btn-secondary {
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-primary {
  background: #00aeff;
  color: #18181c;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 174, 255, 0.12);
}
.btn-primary:hover {
  background: #0090d0;
  color: #fff;
  transform: translateY(-2px);
}
.btn-secondary {
  background: #23232b;
  color: #00aeff;
  border: 2px solid #00aeff;
  font-weight: bold;
}
.btn-secondary:hover {
  background: #00aeff;
  color: #23232b;
}

/* Suppression des styles de notification */
/* .notification styles supprimés */

/* Responsive */
@media (max-width: 768px) {
  .character-sheet {
    padding: 18px;
    margin: 8px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .action-buttons {
    flex-direction: column;
  }
}

/* Champ "Nom du personnage" */
.input-uniform {
    background: #18181c !important;
    color: #eaf6ff !important;
    border: 2px solid #23232b !important;
}

form select,
.form-group select {
    background: #18181c !important;
    color: #eaf6ff !important;
    border: 2px solid #23232b !important;
}

.btn-green-outline {
  border: 2px solid #28a745;
  color: #28a745;
  background: transparent;
  padding: 12px 25px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 120px;
}
.btn-green-outline:hover {
  background: #e6f9ec;
  color: #218838;
  border-color: #218838;
}

/* Forcer le curseur personnalisé sur TOUS les éléments de la modal */
#characterModal,
#characterModal *,
#characterModal *::before,
#characterModal *::after {
    cursor: url('images/pointeur.png'), default !important;
}

/* Forcer spécifiquement sur les éléments de formulaire */
#characterModal select,
#characterModal select *,
#characterModal option,
#characterModal input,
#characterModal button,
#characterModal label,
#characterModal div {
    cursor: url('images/pointeur.png'), default !important;
}

/* Pour tous les états des éléments interactifs */
#characterModal select:hover,
#characterModal select:focus,
#characterModal select:active,
#characterModal option:hover,
#characterModal option:focus,
#characterModal input:hover,
#characterModal input:focus,
#characterModal button:hover,
#characterModal button:focus {
    cursor: url('images/pointeur.png'), pointer !important;
}

/* ========================================
   STYLES POUR LE JEU (jeux.html)
   ======================================== */

/* Styles pour la fenêtre modale de chargement */
.loading-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.loading-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-modal-content {
    width: 95%;
    max-width: 900px;
    height: 85%;
    max-height: 700px;
    background: linear-gradient(135deg, #0a1330, #1a2040, #2a3050);
    border: 3px solid #d4af37;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.loading-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('images/illustration/lemur.png');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
}

.loading-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 19, 48, 0.7);
    border-radius: 12px;
}

.loading-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 700px;
    padding: 50px 30px;
    color: #f4e4c1;
    font-family: 'Georgia', serif;
}

.loading-title {
    font-size: 3.5em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: #d4af37;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 175, 55, 0.5); }
    to { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.6); }
}

.loading-subtitle {
    font-size: 1.4em;
    margin-bottom: 50px;
    opacity: 0.8;
    font-style: italic;
}

.progress-container {
    width: 100%;
    max-width: 500px;
    height: 22px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #d4af37;
    border-radius: 12px;
    margin: 40px auto;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #ffd700, #d4af37);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.progress-text {
    margin-top: 20px;
    font-size: 1.3em;
    opacity: 0.9;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

.magic-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #d4af37;
    border-radius: 50%;
    animation: float 6s infinite ease-in-out;
    opacity: 0.7;
    box-shadow: 0 0 6px #d4af37;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(100%) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
        transform: scale(1);
    }
    90% {
        opacity: 0.7;
        transform: scale(1);
    }
    100% {
        transform: translateY(-100%) scale(0);
        opacity: 0;
    }
}

/* Styles pour l'interface de jeu */
.game-container {
    width: 100%;
    height: 100%;
    color: #f4e4c1;
    font-family: 'Georgia', serif;
    display: flex;
    flex-direction: column;
}

.game-header {
  --logo-size: 72px;
  position: relative;
  text-align: center;
  padding: 20px;
  background: rgba(23, 46, 51);
  border-bottom: 2px solid #192b39;
}

/* center group that keeps title centered and logo right next to it */
.header-center {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

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

.header-buttons {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.game-header img.logo {
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

.game-header h2 {
    margin: 0 0 10px 0;
    color: #d4af37;
    font-size: 1.8em;
}

.game-header p {
    margin: 0;
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 13px;
}

@media (max-width: 1024px) {
  .game-header {
    --logo-size: 64px;
    padding: 20px;
  }
  
  .game-header img.logo {
    width: var(--logo-size);
    height: var(--logo-size);
  }
}

@media (max-width: 600px) {
  .game-header {
    --logo-size: 56px;
    padding: 20px;
  }
  
  .header-center {
    flex-direction: column;
    gap: 8px;
  }

  .game-header img.logo {
    width: var(--logo-size);
    height: var(--logo-size);
    margin: 0;
    display: block;
  }
}

.apartment-container {
    flex: 1;
    position: relative;
    background-image: url('images/jeux/lespieces/rezpubmoldu/rezlanterne.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #2a2a2a;
    border: 2px solid #192b39;
    margin: 20px;
    border-radius: 10px;
    overflow: hidden;
    cursor: crosshair;
    min-height: 400px;
}

.character {
    position: absolute;
  width: 49px;
  height: 49px;
    z-index: 100;
    transition: none;
}

.character-sprite {
    font-size: 24px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    animation: characterGlow 2s ease-in-out infinite alternate;
}

.character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@keyframes characterGlow {
    from { filter: drop-shadow(0 0 3px #d4af37); }
    to { filter: drop-shadow(0 0 8px #ffd700); }
}
