@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css");
/* ===== colors.css ===== */
/* ============================================================ */
/* ==================== PALETTE UNIFORMISÉE =================== */
/* ============================================================ */

:root {
  /* 🎨 Couleurs de base */
  --color-bg-main:           #282828;
  --color-surface:           #3a3a3a;
  --color-sidebar:           #323232;
  --color-header:            #424242;
  --color-border:            rgba(255, 255, 255, 0.04);
  --color-shadow:            rgba(0,0,0,0.4);

  --color-text:              #f0f0f0;
  --color-muted:             #bbb;
  --color-placeholder:       #aaa;

  /* 🔘 Boutons */
  --color-btn-bg:            #f0f0f0;
  --color-btn-hover:         #2a72de;
  --color-btn-muted:         #444;

  --color-btn-text:          #000000;
  --color-btn-hover-text:    #f0f0f0;

  --color-btn-shadow:        rgba(0,0,0,0.2);

  /* 🎵 Accents & Badges */
  --color-accent:            #3b82f6;
  --color-accent-hover:      #2563eb;

  /* 🟥 Alertes & erreurs */
  --color-error:             #ff4d4d;
  --color-success:           #2ecc71;
  --color-success-hover:     #27ae60;
  --color-warning:           #e60000;

  /* 📊 Panels & audit */
  --color-panel-blue:        #3b82f6;
  --color-panel-red:         #ff4d4d;
  --color-panel-green:       #2ecc71;

  /* 🔵 Liens & interactions */
  --color-link:              #3b82f6;
  --color-link-hover:        #2563eb;

  /* 🎛️ Inputs & modales */
  --color-input-bg:          #222;
  --color-input-hover-bg:    #2e2e2e;
  --color-input-focus-bg:    #2d2d2d;
  --color-input-alt-bg:      #2a2a2a;
  --color-input-border:      #555;

  --color-modal-bg:          #2a2a2a;
  --color-focus:             #3b82f6;

  /* 📦 Upload / Dropzone */
  --color-dropzone-bg:       #2b2b2b;
  --color-dropzone-hover:    #3a3a3a;
  --color-dropzone-border:   #ccc;
  --color-dropzone-drag:     #444;
  --color-dropzone-active:   #2563eb;

  /* 📋 Scrollbar */
  --color-scrollbar:         #555;

  /* Sound */
  --color-sound-hover:       #555;

  /* 📁 Catégories */
  --color-category-header:   #999;
  --color-category-bg:       #ddd;

  /* 🧩 Tabs */
  --tab-bg-social:           #3a3a3a;
  --tab-bg-social-active:    #1e1e1e;

  --tab-bg-origine:          #3a3e44;
  --tab-bg-origine-active:   #47484a;

  --shadow-elevation:        0px 4px 10px rgba(0, 0, 0, 0.5);
}

/* ===== global.css ===== */
/* ===================================================== */
/* =================== STYLES GÉNÉRAUX ================= */
/* ===================================================== */

/* 📌 CORPS DU SITE */
body {
  font-family: Arial, sans-serif;
  background-color: var(--color-bg-main);
  margin: 0;
  overflow-x: hidden;
  color: var(--color-text); /* au lieu de white */
  font-size: 14px;
}

html {
  scroll-behavior: smooth;
}

/* 🌐 Scrollbar personnalisée (valable pour tous les conteneurs scrollables) */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2); /* clair sur fond sombre */
  border-radius: 3px;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

/* ===== buttons.css ===== */
/* ===================================================== */
/* ================== BOUTONS — GLOBAL ================= */
/* ===================================================== */

/* Base commune à tous les boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-weight: 700;
  line-height: 1;
  height: 44px;                 /* hauteur cohérente */
  min-width: 100px; /* largeur mini optionnelle (ex: .modal__actions) */
  border-radius: 12px;           /* rayon par défaut si .btn-rounded non présent */
  border: 1px solid transparent; /* chaque variante ajuste */
  cursor: pointer;
  user-select: none;
  transition:
    background-color .25s ease,
    color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    transform .18s ease;
}

/* États communs */
.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }

/* Utilitaires */
.btn-full    { width: 100%; }
.btn-rounded { border-radius: 50px; }

/* Focus visible (accessibilité) — fallback si variante ne surcharge pas */
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-focus, #3b82f6) 35%, transparent);
}

/* ===================================================== */
/* ===================== VARIANTES ===================== */
/* ===================================================== */

/* ===== PRIMAIRE (clair) ===== */
.btn-primary {
  --_bg:         var(--color-btn-primary,      var(--color-btn-bg));
  --_text:       var(--color-btn-primary-text, var(--color-btn-text));
  --_hover-bg:   var(--color-btn-primary-hover,      var(--color-btn-hover));
  --_hover-text: var(--color-btn-primary-hover-text, var(--color-btn-hover-text));

  background-color: var(--_bg);
  color: var(--_text);
  border-color: transparent;
  box-shadow: 0 4px 6px var(--color-btn-shadow, rgba(0,0,0,.25));
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--_hover-bg);
  color: var(--_hover-text);
}
.btn-primary:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(0,0,0,.20),
    0 0 0 4px var(--color-focus, #3b82f6);
}

/* ===== SECONDAIRE (gris qui se détache du fond modal) ===== */
.btn-secondary{
  --_text:       var(--btn-secondary-fg, #eaeaea);
  --_bg:         var(--btn-secondary-bg, #3a3a3a);
  --_border:     var(--btn-secondary-border, rgba(255,255,255,.12));
  --_hover-bg:   var(--btn-secondary-bg-hover, #bdbdbd);
  --_hover-bord: var(--btn-secondary-border-hover, rgba(255,255,255,.18));
  --_hover-text: #000; /* 👈 nouveau */

  background: var(--_bg);
  color: var(--_text);
  border-color: var(--_border);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

.btn-secondary:hover:not(:disabled){
  background: var(--_hover-bg);
  border-color: var(--_hover-bord);
  color: var(--_hover-text); /* 👈 texte noir au hover */
}

/* ===== LIEN (texte) ===== */
.btn-link {
  background: transparent;
  border: 0;
  color: var(--color-muted);
  padding: 6px 8px;
  font-weight: 600;
  height: auto;
  min-width: 0;
}
.btn-link:hover { color: var(--color-focus, #3b82f6); text-decoration: underline; }

/* option : .btn-ghost (transparente avec bordure légère) */
.btn-ghost{
  background: transparent;
  color: var(--color-text, #fff);
  border-color: var(--color-border, #3a3a3a);
}
.btn-ghost:hover{
  border-color: var(--color-focus, #3b82f6);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-focus, #3b82f6) 25%, transparent);
}

/* ===================================================== */
/* ============= BOUTONS AVEC ICÔNE RONDS ============== */
/* ===================================================== */

.btn-icon-circle {
  --btn-size: 40px;
  inline-size: var(--btn-size);
  block-size: var(--btn-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background-color: var(--color-btn-bg);
  color: var(--color-btn-text);
  border: none;
  border-radius: 50%;
  cursor: pointer;

  box-shadow: 0 4px 6px var(--color-btn-shadow);
  transition:
    background-color .25s ease,
    color .25s ease,
    transform .18s ease,
    opacity .18s ease;
  line-height: 1;
}
.btn-icon-circle i,
.btn-icon-circle svg{
  font-size: 1.25rem; /* 20px */
  width: 1.25rem;
  height: 1.25rem;
  color: currentColor;
  transition: transform .18s ease;
}
.btn-icon-circle:not(:disabled):hover{
  background-color: var(--color-btn-hover);
  color: var(--color-btn-hover-text);
  transform: scale(1.08);
}
.btn-icon-circle:not(:disabled):hover i,
.btn-icon-circle:not(:disabled):hover svg{
  transform: scale(1.05);
}
.btn-icon-circle:focus{ outline: none; }
.btn-icon-circle:focus-visible{
  box-shadow:
    0 0 0 2px var(--color-focus, #3b82f6),
    0 4px 6px var(--color-btn-shadow);
}
.btn-icon-circle:disabled{
  opacity: .55;
  cursor: not-allowed;
}
.btn-icon-circle--sm { --btn-size: 32px; }
.btn-icon-circle--lg { --btn-size: 48px; }
.btn-icon-circle--ghost{
  background-color: transparent;
  color: var(--color-btn-text);
  box-shadow: none;
  outline: 1px solid transparent;
}
.btn-icon-circle--ghost:not(:disabled):hover{
  background-color: rgba(255,255,255,.08);
  color: var(--color-btn-hover-text);
}
.btn-icon-circle.is-active{
  background-color: var(--color-btn-hover);
  color: var(--color-btn-hover-text);
}

/* Respecte le réglage d’accessibilité */
@media (prefers-reduced-motion: reduce){
  .btn, .btn-icon-circle,
  .btn-icon-circle i, .btn-icon-circle svg{
    transition: none;
  }
}

/* ===================================================== */
/* =============== CONTENEURS & CAS D’USAGE ============ */
/* ===================================================== */

/* Boutons avec icônes dans la liste des sons */
.button-container {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

/* Menu profil : pile verticale (garde ta mise en page) */
.profile-menu .button-container {
  flex-direction: column;
  gap: 100px;
  margin-left: unset;
}

/* S'inscrire du menu profil : full width */
#signup-btn { width: 100%; }

/* Admin panel : pleine largeur dans le menu */
#admin-panel { width: 100%; text-align: center; }

/* Liens “mot de passe oublié ?” (compat anciennes classes) */
#login-form .forgot-password-btn,
#signup-form .forgot-password-btn{
  all: unset;
  color: var(--color-muted);
  font-size: 12px;
  cursor: pointer;
  display: inline-block;
  text-align: right;
  padding: 5px 0;
  transition: color .25s ease;
}
#login-form .forgot-password-btn:hover,
#signup-form .forgot-password-btn:hover{
  color: var(--color-focus, #3b82f6);
  text-decoration: underline;
}

/* Images dans les boutons (si utilisés) */
button img { width: 20px; height: 20px; }

/* ===================================================== */
/* ==================== AUDIO (legacy) ================= */
/* ===================================================== */
.play-btn {
  margin-top: 10px;
  background-color: var(--color-btn-muted);
  color: var(--color-text);
  padding: 5px 10px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color .3s;
}

/* ===================================================== */
/* === OPTIONNEL : largeur mini homogène en modales ==== */
/* ===================================================== */
.modal__actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;
}

/* ===== errors.css ===== */
/* ===================================================== */
/* ========= STYLES GLOBAUX DES PAGES D'ERREUR ========= */
/* ===================================================== */

.error-page {
  padding: 0;
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--color-text);
  font-size: 16px;
}

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ===================================================== */
/* ================== MESSAGES GÉNÉRAUX ================= */
/* ===================================================== */

.error-message {
  color: var(--color-error);
  font-size: 12px;
  margin-top: -10px;
  margin-bottom: 10px;
  display: none;
  align-items: center;
  gap: 10px;
  font-weight: normal;
}

.error-message a {
  font-size: 12px;
  color: var(--color-muted);
  text-align: center;
  margin-top: 8px;
  text-decoration: none;
}

.error-message a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* ===================================================== */
/* ========== MESSAGES D'ERREUR POUR SIGNUP ============ */
/* ===================================================== */

#signup-form .error-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  font-size: 14px;
  margin-top: -10px;
}

#signup-form .error-message {
  display: flex;
  gap: 8px;
  margin: 0;
  font-weight: bold;
}

/* ===================================================== */
/* ====================== LOGO ========================= */
/* ===================================================== */

.error-logo {
  width: 350px;
  height: auto;
  max-width: 100%;
  margin-top: -10px;
  margin-bottom: -10px;
}

/* ===== responsive.css ===== */
/* ===================================================== */
/* ================ STYLES RESPONSIVES ================= */
/* ===================================================== */

/* 📱 MODE MOBILE & TABLETTES - max-width: 768px */
@media (max-width: 768px) {
  /* 📌 MENU PRINCIPAL */
  .menu {
    transform: translateX(-100%);
    position: fixed;
    z-index: 1000;
    width: 200px;
    height: 100vh;
    transition: transform 0.3s ease-in-out;
  }

  .menu.closed {
    transform: translateX(-100%);
  }

  .menu-toggle,
  .menu.closed ~ .menu-toggle {
    left: 0;
  }

  .sound-list,
  section {
    margin: 0;
  }

  .header-content {
    margin-left: 0;
  }

  /* 📄 Pages d'erreur */
  .error-title {
    font-size: 24px;
  }

  .error-message {
    font-size: 16px;
  }

  .error-logo {
    width: 250px;
  }

  .error-btn {
    font-size: 16px;
    padding: 10px 20px;
  }
}

/* 📱 Téléphones - max-width: 600px */
@media (max-width: 600px) {
  .search-wrapper {
    padding: 0;
  }
}

/* 📱 Très petits écrans - max-width: 480px */
@media (max-width: 480px) {
  .error-title {
    font-size: 20px;
  }

  .error-message {
    font-size: 14px;
  }

  .error-logo {
    width: 200px;
  }

  .error-btn {
    font-size: 14px;
    padding: 8px 15px;
  }
}

/* ===== header.css ===== */
/* ========================= */
/* ===== HEADER GENERAL ==== */
/* ========================= */

header {
  background-color: var(--color-header);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: var(--color-btn-text);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100vw; /* étend jusqu'au bord de l'écran */
  max-width: 100vw;
  box-sizing: border-box; /* inclut le padding dans la largeur */
  z-index: 500;
  flex-wrap: nowrap; /* important */
  height: 106px;
}

/* =============================== */
/* === CATEGORIES SÉLECTIONNÉES == */
/* =============================== */

#category-display {
  position: absolute;
  top: 105%;
  left: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 999;
  transition: all 0.5s ease;
}

#category-display.active {
  display: block;
}

.selected-category {
  background: linear-gradient(145deg, #3b82f6, #1e40af); /* dégradé bleu électrique */
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  display: inline-block;
  margin: 4px 4px 0;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Animation uniquement si classe spéciale */
.selected-category.animate-in {
  opacity: 0;
  transform: scale(0.95);
  animation: fadeInScale 0.3s ease-out forwards;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.selected-category.fade-out {
  animation: fadeOutScale 200ms ease forwards;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.selected-category.no-transition {
  transition: none !important;
  animation: none !important;
}

@keyframes fadeOutScale {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

.selected-category:hover {
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
  transform: scale(1.05);
}


/* ============================ */
/* ===== ICONES DU HEADER ==== */
/* ============================ */

.header-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.notes-icon {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-btn-bg);
  border-radius: 50%;
  box-shadow: 0 2px 5px var(--color-shadow);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.notes-icon:hover {
  background-color: var(--color-btn-hover);
  transform: scale(1.1);
}

.notes-icon i {
  font-size: 16px;
  color: var(--color-btn-text);
}

.notes-icon:hover i {
  color: var(--color-btn-hover-text);
  transform: scale(1.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  margin-left:200px;
  transition: margin-left 0.3s ease-in-out;
}

.menu.closed ~ .header-content {
  margin-left: 0;
}

/* ===== menu.css ===== */
/* ======================================= */
/* ============ LOGO ET MARQUE =========== */
/* ======================================= */

.logo-container {
  display: flex;
  align-items: center;
}

.icon {
  width: 100px;
  height: auto;
}

.logo {
  font-family: 'Dosis', sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: var(--color-text);
  margin-left: 10px;
}

/* Logo dans la barre latérale */
.menu-logo {
  position: relative;
  background: var(--color-sidebar);
  padding: 20px 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
}

.menu-logo img {
  max-width: 80%;
  height: auto;
}

/* ======================================= */
/* ============ STRUCTURE MENU =========== */
/* ======================================= */

.menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 100vh;
  background: var(--color-sidebar);
  box-shadow: 4px 0px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
}

.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.menu-content {
  flex-grow: 1;
  overflow-y: auto;
  background-color: var(--tab-bg-social); /* valeur par défaut */
  transition: opacity 0.3s, background-color 0.3s, transform 0.3s;
  overflow-y: auto; /* active le scroll si nécessaire */
}

/* ======================================= */
/* ============ ÉLÉMENTS DU MENU ========= */
/* ======================================= */

.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 14px;
  transition: background 0.3s ease;
}

.menu a:hover {
  background-color: var(--color-hover);
}

/* Miniatures (catégories & sous-catégories) */
.category-thumb,
.category-image {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ======================================= */
/* ========== TOGGLE BURGER ============== */
/* ======================================= */

.menu-toggle {
  position: fixed;
  top: 28px;              /* ✅ placé manuellement en cohérence avec le logo */
  width: 30px;
  height: 50px;
  background-color: var(--color-sidebar);
  color: var(--color-text);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 22px;
  border: none;
  border-radius: 0 10px 10px 0;
  z-index: 1100;
  box-shadow: 4px 0px 12px rgba(0, 0, 0, 0.6);
  overflow: visible;
  transition: transform 0.3s ease-in-out;
}

.menu-toggle::before {
  content: "";
  position: absolute;
  left: -12px;
  width: 12px;
  height: 75px;
  background-color: var(--color-sidebar);
  z-index: 2;
}

.menu-toggle.no-transition {
  transition: none !important;
}

/* Quand le menu est fermé */
.menu.closed {
  transform: translateX(-100%);
}

.menu.closed + .sound-list {
  margin-left: 15px;
}

.menu.closed ~ .menu-toggle {
  left: 0;
}

/* ======================================= */
/* ============ CATÉGORIES =============== */
/* ======================================= */

.category-title {
  font-weight: bold;
  color: var(--color-text);
  padding: 5px 10px;
  font-size: 16px;
  text-transform: uppercase;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.subcategory {
  margin-left: 10px;
}

.category-title:first-of-type {
  margin-top: 5px;
}

.category-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 80%;
  height: 1px;
  background-color: var(--color-border);  
  transform: translateX(-50%);
}

/* On cache par défaut les traits */
.category-title:first-of-type::before,
.category-title.first-visible::before {
  content: none !important;
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.3s ease;
}

.category-filter:hover {
  background-color: var(--color-hover);
}

/* Conteneur global des onglets */
.category-tabs {
  display: flex;
  justify-content: space-around;
  padding: 0;
  margin: 0;
  transition: opacity 0.3s, background-color 0.3s, transform 0.3s;
  border-radius: 10px 10px 0 0;
}

/* Wrapper individuel de chaque onglet */
.tab-wrapper {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  transition: opacity 0.3s, background-color 0.3s, transform 0.3s;
  border-radius: 10px 10px 0 0;
}

#wrapper-social {
  position: relative;
  background-color: var(--tab-bg-social);
  border-top-right-radius: 10px;
  transition: opacity 0.3s, background-color 0.3s, transform 0.3s;
}

#wrapper-origine {
  position: relative;
  background-color: var(--tab-bg-origine); /* valeur par défaut */
  border-top-left-radius: 10px;
  transition: opacity 0.3s, background-color 0.3s, transform 0.3s;
}

/* === Arrondi entre les deux onglets === */
/* Onglet SOCIAL actif → creuse dans ORIGINE */
#wrapper-social.active::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 0;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at top right, transparent 9.9px, var(--tab-bg-social) 10px);
  z-index: 1;
  pointer-events: none;
}

#wrapper-origine.active::after {
  content: "";
  position: absolute;
  left: -10px;
  bottom: 0;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at top left, transparent 9.9px, var(--tab-bg-origine) 10px);
  z-index: 1;
  pointer-events: none;
}

/* Le bouton lui-même */
.tab {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: white;
  opacity: 0.5;
  transition: opacity 0.3s, background-color 0.3s, transform 0.3s;
  padding: 4px;
}

/* Onglet actif */
.tab.active {
  opacity: 1;
  transform: scale(1.2); /* décale la loupe légèrement */
}

/* Contenu du menu scrollable */
.tab-wrapper {
  cursor: pointer;
}

.category-search {
  padding: 10px 12px;
  background-color: var(--color-sidebar);
}

.category-search input {
  width: 100%;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background-color: #2b2b2b;
  color: white;
  font-size: 14px;
  transition: background-color 0.3s;
}

.category-search input::placeholder {
  color: #aaa;
}

.category-search input:focus {
  outline: none;
  background-color: #333;
}

#search-bar-category {
margin: 0 5px 10px 5px;
}

/* Style du conteneur de l'icône */
.icon-container {
    width: 34px;
    height: 34px;
    background-color: #313131; /* Gris */
    border-radius: 4px;
    display: flex;
    align-items: center;  /* Centre verticalement */
    justify-content: center; /* Centre horizontalement */
    margin: 2px;  /* Optionnel : pour un léger espacement entre les icônes */
}

/* Style pour les icônes */
.icon-container i {
    max-width: 20px;   /* La taille maximale de l'icône */
    max-height: 20px;  /* La taille maximale de l'icône */
}


/* ===== footer.css ===== */
/* ===================================================== */
/* =================== STYLE DU FOOTER ================= */
/* ===================================================== */

footer {
  position: fixed;
  bottom: 0;
  right: 0;
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  padding: 0 3px 0 8px;
  border-radius: 20px 0 0 0;
  font-size: 10px;
  box-shadow: 0 2px 5px var(--color-shadow);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* option : petit séparateur • avant le lien */
footer p{ margin:0; }

footer p::after{
  content:"•";
  margin:0 8px;
  opacity:.6;            /* style léger */
}

footer:hover {
  opacity: 1;
}

footer{
  display: flex;
  align-items: center;
  white-space: nowrap;/* reste sur une seule ligne */
}

footer a{
  color: var(--color-link);
  text-decoration: underline;
}

/* ===== search-bar.css ===== */
/* ========================== */
/* ===== BARRE DE RECHERCHE */
/* ========================== */

.search-wrapper {
  /* comportement neutre par défaut */
  width: auto;
}

.search-wrapper--full {
  width: 100%;
}

.search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
  min-width: 0; /* évite les débordements */
  margin-right: 10px;
}

.search-bar {
  display: flex;
  align-items: center;
  position: relative;
  flex: 1;                /* Permet d’utiliser tout l’espace disponible */
  min-width: 0;           /* Important pour éviter le débordement */
  max-width: 100%;
  margin-left: 26px;
}

.search-bar.no-margin {
  margin-left: 0;
}

.search-bar input {
  width: 100%;
  padding: 10px 40px 10px 46px; /* padding à gauche pour l’icône */
  font-size: 16px;
  border: 1px solid var(--color-border);
  border-radius: 25px;
  background-color: var(--color-input-bg, #2b2b2b);
  color: var(--color-text);
  transition: all 0.3s ease;
  outline: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  flex: 1;                /* L’input prend tout l’espace disponible */
  min-width: 0;           /* Permet de shrink avec son parent */
  width: 100%;
  box-sizing: border-box; /* Inclut le padding dans le width */
}

.search-bar input::placeholder {
  color: var(--color-muted);
  font-style: italic;
}

.search-bar input:focus {
  border-color: var(--color-focus, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
  background-color: var(--color-input-focus-bg, #2d2d2d);
}

.search-bar:focus-within i {
  transform: scale(1.2); /* décale la loupe légèrement */
  color: var(--color-focus, #3b82f6);
  transition: transform 0.2s ease, color 0.2s ease;
}

.search-bar input:hover {
  border-color: var(--color-focus, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
  background-color: var(--color-input-focus-bg, #2d2d2d);
}

/* Wrapper autour de l'icône pour l'effet de focus */
.search-icon-wrapper {
  position: absolute; /* Manquant ! */
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
  pointer-events: none;
  transform-origin: center;
}

/* L’icône en elle-même ne bouge pas */
.search-icon-wrapper i {
  font-size: 16px;
  color: var(--color-muted);
  transition: transform 0.25s ease;
}

.search-bar:focus-within .search-icon-wrapper i {
  color: var(--color-focus, #3b82f6);
  filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.5));
}

/* ============================= */
/* ===== BOUTON DE SUPPRESSION */
/* ============================= */

.clear-icon {
  position: absolute;
  top: 50%;
  right: 14px; /* bien à l’intérieur */
  transform: translateY(-50%);
  font-size: 26px;
  color: var(--color-border);
  cursor: pointer;
  transition: color 0.3s ease;
}

.clear-icon:hover {
  color: var(--color-link);
}

/* ===== sound-list.css ===== */
/* ===================================================== */
/* ============ LISTE DES SONS & ALIGNEMENT ============ */
/* ===================================================== */

.main-content {
  transition: margin-left 0.3s ease-in-out;
}

.main-content.no-transition {
  transition: none !important;
}

.sound-list {
  padding: 10px;
  margin: 15px;
  transition: transform 0.3s ease-in-out;
}

/* ===== sound-item.css ===== */
/* ===================================================== */
/* ============== STYLES GÉNÉRAUX DES SONS ============= */
/* ===================================================== */

.sound-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  gap: 10px;
  margin: 5px;
  background-color: var(--color-surface);
  color: var(--color-text);
  position: relative;
  cursor: pointer;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: background-color 0.3s;
  max-width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.sound-item:hover {
  background-color: var(--color-sound-hover);
}

/* ===================================================== */
/* ================ MINIATURES DES SONS ================ */
/* ===================================================== */

.sound-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 5px;
}

/* ===== sound-info.css ===== */
/* ===================================================== */
/* ================ INFORMATIONS DES SONS ============== */
/* ===================================================== */

.sound-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sound-name {
  font-size: 16px;
  font-weight: bold;
  flex-grow: 1;
  margin-right: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  min-width: 0;
}

.sound-origin {
  font-size: 14px;
  color: var(--color-muted);
  margin-top: 5px;
}

.sound-item .sound-name,
.sound-item .sound-origin {
  flex: 1;
}

.sound-item .sound-info {
  display: flex;
  justify-content: space-between;
  flex-grow: 1;
}

.sound-item .sound-info span {
  flex-shrink: 0;
}

/* ===== user-dropdown.css ===== */
/* ===================================================== */
/* ============ MENU DÉROULANT DU PROFIL ============== */
/* ===================================================== */

.welcome-message {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  margin: 5px;
}

.user-role {
  text-align: center;
  font-size: 14px;
  font-weight: normal;
  color: var(--color-muted);
  margin: 5px;
  margin-top: -15px;
}

.profile-menu {
  background-color: var(--color-modal-bg);
  color: white;
  position: absolute;
  top: 70px;
  right: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  padding: 15px;
  width: 300px;
  border-radius: 8px;
  overflow: hidden;
  display: none;
  z-index: 9999;
  flex-direction: column;
  gap: 5px;
}

.profile-container.active .profile-menu {
  display: flex;
}

#admin-panel {
  text-align: center;
}

/* ===== user-icon.css ===== */
/* ===================================================== */
/* ============== ICÔNE DE PROFIL ====================== */
/* ===================================================== */

.profile-container {
  position: relative;
}

.profile-icon {
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-btn-bg);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.profile-icon:hover { 
  background-color: var(--color-btn-hover);
  transform: scale(1.1);
}

.profile-icon i {
  font-size: 30px;
  color: var(--color-btn-text);
}

.profile-icon:hover i {
  color: var(--color-btn-hover-text);
  transform: scale(1.05);
}

/* ===== audio-player.css ===== */
/* ===================================================== */
/* ============ PLAYER AUDIO EN BAS DE PAGE ============ */
/* ===================================================== */

audio {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  width: 50%;
  max-width: 900px;
  margin: 0 auto;
  z-index: 9999;
}

@media (max-width: 768px) {
  audio {
    width: 90%;
  }
}

/* ===== share-wheel.css ===== */
/* ===================================================== */
/* ================= ROUE DE PARTAGE =================== */
/* ===================================================== */

.share-container {
  position: relative;
  display: inline-block;
}

.share-wheel {
  position: absolute;
  width: 100px;
  height: 100px;
  background-color: rgba(255, 255, 255, 0.05);  /* très léger blanc */
  backdrop-filter: blur(3px);                   /* plus doux */
  -webkit-backdrop-filter: blur(8px);           /* pour compatibilité Safari */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.share-wheel.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.share-option {
  position: absolute;
  width: 40px;
  height: 40px;
  background-color: var(--color-btn-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px var(--color-btn-shadow);
  transition: background-color 0.3s ease, transform 0.2s ease;
  opacity: 0;
}

.share-option i {
  font-size: 18px;
  color: var(--color-btn-text);
}

.share-option:hover {
  background-color: var(--color-btn-hover);
  transform: scale(1.1);
}

.share-option:hover i {
  color: var(--color-btn-hover-text);
  transform: scale(1.1);
}

.share-wheel.active .share-option:nth-child(1) {
  transform: rotate(0deg) translateY(-40px) rotate(0deg) scale(1);
  opacity: 1;
}
.share-wheel.active .share-option:nth-child(1):hover {
  transform: rotate(0deg) translateY(-40px) rotate(0deg) scale(1.1);
}

.share-wheel.active .share-option:nth-child(2) {
  transform: rotate(90deg) translateY(-40px) rotate(-90deg) scale(1);
  opacity: 1;
}
.share-wheel.active .share-option:nth-child(2):hover {
  transform: rotate(90deg) translateY(-40px) rotate(-90deg) scale(1.1);
}

.share-wheel.active .share-option:nth-child(3) {
  transform: rotate(180deg) translateY(-40px) rotate(-180deg) scale(1);
  opacity: 1;
}
.share-wheel.active .share-option:nth-child(3):hover {
  transform: rotate(180deg) translateY(-40px) rotate(-180deg) scale(1.1);
}

.share-wheel.active .share-option:nth-child(4) {
  transform: rotate(270deg) translateY(-40px) rotate(-270deg) scale(1);
  opacity: 1;
}
.share-wheel.active .share-option:nth-child(4):hover {
  transform: rotate(270deg) translateY(-40px) rotate(-270deg) scale(1.1);
}

/* missing: components/signup-form.css */
/* ===== login-form.css ===== */
/* ===================================================== */
/* ================= FORMULAIRE DE CONNEXION ========== */
/* ===================================================== */

.profile-menu form {
  display: flex;
  flex-direction: column;
}

.profile-menu label {
  font-size: 14px;
  margin-bottom: 5px;
  color: white;
}

.profile-menu input {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--color-input-border);
  border-radius: 5px;
  background-color: var(--color-input-bg);
  color: white;
}

.profile-menu input::placeholder {
  color: var(--color-placeholder);
}

.profile-menu a {
  font-size: 12px;
  color: var(--color-muted);
  text-align: center;
  margin-top: 8px;
  text-decoration: none;
}

.profile-menu a:hover {
  color: white;
  text-decoration: underline;
}

/* ===== modal.css ===== */
/* Modale générique */
.modal {
  position: fixed;
  inset: 0;
  display: none;              /* par défaut */
  z-index: 9999;
}
.modal.is-open {
  display: grid;              /* centre avec Grid */
  place-items: center;        /* H & V */
  padding: 6vh 16px;          /* un peu d’air aux bords sur petits écrans */
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(350px, calc(100vw - 32px));
  margin: 0;
  background: var(--color-modal-bg, #2f2f2f);
  color: var(--color-text, #fff);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  padding: 20px 20px 16px;
  animation: modal-in .18s ease-out;
}

@keyframes modal-in {
  from { transform: translateY(6px); opacity: .85; }
  to   { transform: translateY(0);   opacity: 1; }
}

.modal__title {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 600;
  text-align: center;         /* ⬅️ centré */
}

.modal__close {
  position: absolute;
  top: 8px; right: 8px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--color-text, #fff);
  font-size: 22px;
  cursor: pointer;
}
.modal__close:hover { background: rgba(255,255,255,.06); }

.modal__form .fl-field { margin-bottom: 14px; }

.modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Zone actions : boutons alignés à droite */
.modal__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

/* Empêche l’étirement */
.modal__actions > * { flex: 0 0 auto; }

/* Responsive : empile proprement sur mobile */
@media (max-width: 480px) {
  .modal__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

/* ===== Accent global (band + underline) ===================== */

/* Couleur d’accent configurable */
:root{
  --modal-accent: var(--color-focus, #3b82f6);
  --modal-accent-soft: color-mix(in srgb, var(--modal-accent) 65%, transparent);
}

/* Le ruban supérieur (band) : suit les arrondis grâce à overflow:hidden */
.modal--accent .modal__dialog{
  overflow: hidden; /* indispensable pour que le ruban épouse le radius */
  position: relative;
}

/* Ruban fin plaqué en haut, sur toute la largeur */
.modal--accent .modal__dialog::before{
  content:"";
  position: absolute;
  inset: 0 0 auto 0;        /* top:0; left:0; right:0 */
  height: 4px;              /* épaisseur du ruban */
  background: linear-gradient(90deg,
              color-mix(in srgb, var(--modal-accent) 80%, transparent) 0%,
              var(--modal-accent) 25%,
              var(--modal-accent) 75%,
              color-mix(in srgb, var(--modal-accent) 80%, transparent) 100%);
  pointer-events: none;
}

/* Soulignement du titre (underline) */
.modal__title--accent{
  position: relative;
  text-align: center;
  padding-bottom: 14px;      /* place pour le soulignement */
}

.modal__title--accent::after{
  content:"";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: clamp(56px, 10ch, 120px);   /* s’adapte un peu à la largeur */
  height: 3px;
  background: var(--modal-accent);
  border-radius: 999px;
  box-shadow: 0 2px 10px var(--modal-accent-soft);
}

/* ===== toast.css ===== */
/* timing + easing you can tune */
:root{
  --toast-in-dur:  .80s;
  --toast-out-dur: .55s;
  --toast-ease-in: cubic-bezier(.21,.83,.27,1); /* springy in */
  --toast-ease-out:cubic-bezier(.4,0,.2,1);     /* smooth out */
}

#toast-root{
  position: fixed;
  inset: 12px 0 auto 0; /* top-centered */
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 99999;
}

.toast{
  pointer-events: auto;
  min-inline-size: 280px;
  max-inline-size: min(92vw, 520px);
  margin: 8px auto;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(32,32,32,.96);
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  font-weight: 600;
  line-height: 1.35;

  /* smoother entry */
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  will-change: transform, opacity;
  animation: toast-in var(--toast-in-dur) var(--toast-ease-in) forwards;
}

.toast--success { background: color-mix(in srgb, #22c55e 28%, #202020); border-color: rgba(34,197,94,.35); }
.toast--error   { background: color-mix(in srgb, #ef4444 28%, #202020); border-color: rgba(239,68,68,.35); }
.toast--info    { background: color-mix(in srgb, #3b82f6 28%, #202020); border-color: rgba(59,130,246,.35); }

@keyframes toast-in{
  to{
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: none;
  }
}
@keyframes toast-out{
  from{
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: none;
  }
  to{
    opacity: 0;
    transform: translateY(-12px) scale(.98);
    filter: blur(1px);
  }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .toast{ animation-duration: .01ms; }
}

.toast.is-hiding{
  animation: toast-out var(--toast-out-dur) var(--toast-ease-out) forwards;
}

/* ===== floating-field.css ===== */
/* floating-field.css — champs à label flottant (style aligné à .search-bar input) */

/* === Variables globales (surchargables) === */
:root{
  --fl-fg: var(--color-text, #fff);
  --fl-muted: var(--color-muted, #aaa);
  --fl-border: var(--color-border, #3a3a3a);
  --fl-focus: var(--color-focus, #3b82f6);
  --fl-shadow: rgba(59,130,246,.30);

  --fl-input-bg: var(--color-input-bg, #2b2b2b);
  --fl-input-focus-bg: var(--color-input-focus-bg, #2d2d2d);
  --fl-panel-bg: var(--color-modal-bg, #2f2f2f);   /* ✅ fond du panneau par défaut */

  --fl-radius: 25px;
  --fl-font: 14px;
  --fl-label-fs: 12px;
  --fl-blend: 6px; /* épaisseur de la zone de fondu autour du milieu */
  --fl-border-w: 1px;   /* épaisseur bordure input */
  --fl-ring-w: 2px;     /* épaisseur halo focus */
}

/* Scope panel (pour harmoniser la “pastille” quand le label flotte) */
.profile-menu{
  --fl-input-bg: var(--color-input-bg, #2b2b2b); /* fond intérieur du champ */
  --fl-panel-bg: var(--color-modal-bg, #2f2f2f); /* fond du panneau */
}

/* Wrapper */
.fl-field{
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 20px 0;
  /* mapping pastille: repos vs flottant */
  --fl-bg-rest: var(--fl-input-bg);
  --fl-bg-float: var(--fl-panel-bg, transparent);
}

/* Input */
.fl-field .fl-input{
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: block;

  padding: 10px 16px;
  margin-bottom: 0;
  font-size: var(--fl-font);
  color: var(--fl-fg);

  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background-color: var(--fl-input-bg);

  outline: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
  border-width: var(--fl-border-w);
}

/* Hover / Focus (glow bleu) */
.fl-field .fl-input:hover,
.fl-field .fl-input:focus{
  background-color: var(--fl-bg-rest);
  border-color: var(--fl-focus);
  box-shadow: 0 0 0 2px var(--fl-shadow);
}

/* Placeholder caché (sert à :placeholder-shown) */
.fl-field .fl-input::placeholder{ color: transparent; }

/* Label (repos, centré verticalement) */
.fl-field label{
  position: absolute;
  left: 12px;
  top: calc(50% + var(--fl-label-tweak, 0px));
  transform: translateY(-50%);
  color: var(--fl-muted);
  pointer-events: none;
  z-index: 2;
  transition:
    top .18s ease, transform .18s ease, font-size .18s ease,
    color .18s ease, background-color .18s ease, box-shadow .18s ease;
  background:var(--fl-bg-rest);
  border-radius: 999px;
  margin-left: -6px;
  margin-right: -6px;
  padding: 0 calc(.5rem + 6px);
  box-shadow: 0 0 0 2px var(--fl-bg-rest); /* au repos, efface la couture éventuelle */
}

/* état flottant (focus/valeur) */
.fl-field .fl-input:focus + label,
.fl-field .fl-input:not(:placeholder-shown) + label,
.fl-field .fl-input:-webkit-autofill + label{
  top: 0;                       /* à cheval sur la bordure haute */
  transform: translateY(-50%);
  font-size: var(--fl-label-fs);
  color: var(--fl-fg);
  border-radius: 999px;
  box-shadow:
    0 0 0 var(--fl-border-w)                  var(--fl-bg-float),
    0 0 0 calc(var(--fl-border-w) + var(--fl-ring-w)) var(--fl-focus);
}

/* État erreur (appliquer .is-error au wrapper) */
.fl-field.is-error .fl-input{
  border-color: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(255,107,107,.20);
}
.fl-field.is-error .fl-input:focus + label{ color: #ff6b6b; }

/* Variantes taille (optionnel) */
.fl-field--sm .fl-input{ padding: 8px 12px; font-size: 14px; }
.fl-field--sm label{ left: 10px; }
.fl-field--lg .fl-input{ padding: 12px 18px; font-size: 18px; }
.fl-field--lg label{ left: 14px; }

/* Autofill WebKit */
.fl-field .fl-input:-webkit-autofill{
  -webkit-text-fill-color: var(--fl-fg);
  box-shadow: 0 0 0 1000px var(--fl-input-bg) inset;
  transition: background-color 9999s ease-out 0s;
}
.fl-field .fl-input:-webkit-autofill:focus{
  box-shadow:
    0 0 0 1000px var(--fl-input-focus-bg) inset,
    0 0 0 2px var(--fl-shadow);
  border-color: var(--fl-focus);
}

/* ========================================================= */
/* Select stylé comme un input flottant + chevron personnalisé */
/* ========================================================= */

.fl-field--select { cursor: pointer; }
.fl-field--select .fl-input { cursor: pointer; }

/* base visuelle identique aux inputs */
.fl-field select.fl-input{
  font-size: var(--fl-font);
  line-height: 1.2;
  height: 44px;
  padding: 10px 16px;          /* idem input */
  color: var(--fl-fg);
  background-color: var(--fl-input-bg);
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  outline: none;
  box-sizing: border-box;

  /* masquer la flèche native */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* espace pour la flèche custom */
  padding-right: 44px;

  /* chevron via gradients */
  --select-arrow: var(--fl-muted);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--select-arrow) 50%),
    linear-gradient(135deg, var(--select-arrow) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%,
    calc(100% - 44px) 0;
  background-size: 6px 6px, 6px 6px, 44px 100%;
  background-repeat: no-repeat;
}

/* IE/old Edge */
.fl-field select.fl-input::-ms-expand { display: none; }

/* hover/focus : même comportement + chevron en couleur focus */
.fl-field select.fl-input:hover,
.fl-field select.fl-input:focus{
  border-color: var(--fl-focus);
  box-shadow: 0 0 0 2px var(--fl-shadow);
  background-color: var(--fl-input-focus-bg);
  --select-arrow: var(--fl-focus);
}

/* options : même taille de police */
.fl-field select.fl-input option{
  font-size: var(--fl-font);
}


/* ======= toggle visibilité mot de passe ======= */
.fl-field.has-eye .fl-input { padding-right: 44px; }

.fl-eye {
  position: absolute;
  top: 50%;
  right: 10px;
  translate: 0 -50%;
  inline-size: 28px;
  block-size: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fl-muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.fl-eye:hover { color: var(--fl-focus); }
.fl-eye i { font-size: 16px; line-height: 1; }

.pw-hints {
  list-style: disc;
  margin: 0 0 22px;     /* espace sous la liste */
  padding-left: 20px;
  font-size: 12px;
  color: var(--color-muted);
}
.pw-hints li { margin: 3px 0; list-style: disc; }
.pw-hints li.valid { color: #22c55e; }
.pw-hints li.invalid { color: #ef4444; }

/* espace supplémentaire si le DERNIER item est valid (donc tout bon) */
.pw-hints li:last-child{ margin-bottom: 8px; }
.pw-hints li:last-child.valid{ margin-bottom: 14px; }

/* ===== form.overlay.css ===== */
/* ============================== */
/* 🎨 FORMULAIRE - CATÉGORIE / OVERLAY */
/* ============================== */

.overlay-form {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 40px 16px;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 2000;

  /* ✅ Scroll activé ici, pas hidden ! */
  overflow-y: auto;
}

.form-content {
  background-color: var(--color-modal-bg);
  padding: 30px;
  width: 100%;
  max-width: 450px;

  /* ✅ Empêche le dépassement dans overlay */
  max-height: calc(100vh - 80px); /* 40px top + 40px bottom padding */
  overflow-y: auto;

  border-radius: 12px;
  box-shadow: 0 4px 10px var(--color-shadow);
  box-sizing: border-box;
}

.form-content h2 {
  margin-bottom: 0;
  margin-top: 0;
  font-size: 1.5rem;
  color: var(--color-text);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1.5rem;
}

#category-form {
  display: flex;
  flex-direction: column;
}

#category-form label:not(.type-option) {
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: 10px;
  margin-top: 14px;
}

#icon-container label[for="icon-class"] {
  margin-top: 0px;
  margin-bottom: 10px;
  display: inline-block; /* nécessaire pour que margin-bottom s'applique */
}

#icon-container {
  display: block;
  visibility: visible;
  max-height: none;
}

#category-form input[type="text"],
#category-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-input-border);
  background-color: var(--color-input-bg);
  border-radius: 6px;
  font-size: 14px;
  color: var(--color-text);
  outline: none;
  box-sizing: border-box;
}

#category-form input:focus,
#category-form select:focus {
  border-color: var(--color-focus);
  background-color: var(--color-input-alt-bg);
}

#category-form input::placeholder {
  color: var(--color-placeholder);
}

.conditional-field {
  overflow: hidden;
  max-height: 0;
  margin: 0;
  transition: max-height 0.6s ease-in, margin 0.3s ease-in;
}

.conditional-field.instant {
  transition: none;
  max-height: 500px;
  margin: 10px 0;
}

.conditional-field.visible {
  max-height: 500px;
  margin: 10px 0;
}

.conditional-field.hidden {
  max-height: 0;
  margin: 0;
}

#parent-container,
#type-container {
  margin: 0;
}

#parent-container.visible {
  margin-top: 14px;
  margin-bottom: 0;
}

#type-container.visible {
  margin: 14px 0 0;
}

#type-container > .type-visual-toggle {
  margin-top: 14px;
}

/* ============================== */
/* 🎛 CHOIX TYPE (CAT / SOUS-CAT / ORIGINE / SOCIAL) */
/* ============================== */

.type-visual-toggle {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.type-option {
  flex: 1;
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #3a3a3a;
  color: rgba(255, 255, 255, 0.3);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.type-option i {
  font-size: 24px;
  margin-bottom: 6px;
  filter: grayscale(1);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.type-option span {
  font-weight: bold;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s ease;
}

input[name="type"]:checked + label,
input[name="is_sub"]:checked + label,
input[name="visual_mode"]:checked + label {
  color: white;
  border-color: var(--color-focus, #007BFF);
}

input[name="type"]:checked + label i,
input[name="is_sub"]:checked + label i,
input[name="visual_mode"]:checked + label i {
  filter: none;
  transform: scale(1.2);
}

input[name="type"]:checked + label span,
input[name="is_sub"]:checked + label span,
input[name="visual_mode"]:checked + label span{
  color: white;
}

.type-option.social,
.type-option.category,
.type-option.subcategory {
  background-color: rgb(58, 58, 58);
}

.type-option.origine {
  background-color: rgb(58, 62, 68);
}

.type-option.selected {
  background-color: #444;
  color: white;
  border-color: var(--color-focus, #007BFF);
}

.type-option.selected i {
  filter: none;
  transform: scale(1.2);
}

.type-option.selected span {
  color: white;
}

/* ============================== */
/* 🎨 DROPZONE ET MINIATURE */
/* ============================== */

.dropzone {
  position: relative;
  margin-top: 6px;
  background-color: var(--color-surface);
  border: 2px dashed var(--color-input-border);
  padding: 1rem;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone:hover,
.dropzone.dragover {
  background-color: var(--color-input-bg);
  border-color: var(--color-focus);
}

.dropzone-instruction {
  font-size: 14px;
  color: var(--color-text-muted);
}

.thumbnail-preview-wrapper {
  position: relative;
  margin-top: 10px;
  display: inline-block;
  max-width: 100%;
  padding: 0;
}

.thumbnail-preview-container {
  position: relative;
  display: inline-block;
}

.thumbnail-preview {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.thumbnail-remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: red;
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
  transition: background-color 0.2s ease;
  z-index: 10;
}

.thumbnail-remove-btn:hover {
  background-color: darkred;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

#image-container, #icon-container {
  display: none; /* Par défaut, caché */
  max-height: 0; /* Assurer que l'élément est caché */
  overflow: hidden; /* Cache tout dépassement */
}

#image-container.visible, #icon-container.visible {
  display: block; /* Affiche l'élément quand il a la classe 'visible' */
  max-height: 500px; /* Hauteur ajustée pour l'élément visible */
  transition: max-height 0.6s ease-in; /* Animation d'ouverture */
}

#image-container.hidden, #icon-container.hidden {
  max-height: 0; /* Cache les éléments correctement */
  display: none; /* Assure qu'ils sont invisibles */
  transition: max-height 0.6s ease-out; /* Animation de fermeture */
}

/* ============================== */
/* 🔍 SÉLECTEUR CATÉGORIE PARENTE */
/* ============================== */

.category-list-style {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.category-item {
  display: flex;
  align-items: center;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#parent-selector .category-item {
  border-radius: 0;
}

#parent-selector .category-item.selected,
#parent-selector .category-item:hover {
  border-radius: 6px;
}

.category-item:hover {
  background-color: var(--color-input-alt-bg);
}

.category-item .thumbnail-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  margin-right: 12px;
}

#parent-selector {
  margin-top: 10px;
  margin-bottom: 0;
  list-style: none;
  padding: 6px;
  border: 1px solid #555;
  border-radius: 6px;
  max-height: 160px;
  overflow-y: auto;
  background-color: #1e1e1e;
}

#parent-selector::-webkit-scrollbar {
  width: 6px;
}

#parent-selector::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 3px;
}

#parent-selector .category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #333;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#parent-selector .category-item:hover {
  background-color: #2a2a2a;
}

#parent-selector .category-item.selected {
  background-color: #0056d2;
  color: white;
}

#parent-selector .category-item:last-child {
  border-bottom: none;
}

#parent-selector .li-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#parent-selector .li-right {
  display: flex;
  gap: 6px;
}

/* ============================== */
/* 👉 RESPONSIVE */
/* ============================== */

@media (max-width: 480px) {
  .type-option {
    flex: 1 1 100%;
  }

  .form-content {
    padding: 20px;
  }
}

/* ===== form_overlay_dropzone.css ===== */


/* ===== image.cropper.css ===== */
/* ============================== */
/* ✂️ OVERLAY DE CROP IMAGE */
/* ============================== */

#cropper-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

#cropper-overlay.visible {
  display: flex;
}

.cropper-modal {
  max-height: none;
  overflow: visible;
}

.cropper-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 8px;
  padding-top: 20px;
}

/* 📸 Zone image superposée */
.cropper-image-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 400px;
  margin: 0 auto; /* ✅ centre horizontalement */
  display: table; /* astuce pour forcer centrage avec contenu inline-block */
}

/* ✅ Images superposées */
.cropper-image {
  width: 100%;
  max-height: 400px;
  display: block;
  border-radius: 4px;
  object-fit: contain;
}

/* Image colorée en dessous */
.cropper-image.base {
  z-index: 1;
}

/* 🟥 Zone de découpe */
#cropper-box {
  position: absolute;
  top: 100px;
  left: 100px;
  width: 200px;
  height: 200px;
  border: 2px solid white;
  z-index: 3;
  pointer-events: auto;
  box-sizing: border-box;
  background: transparent;
  border-radius: 4px;
  overflow: visible; /* ✅ permet à la poignée de sortir visuellement */
  user-select: none;        /* ❌ empêche la sélection */
  -webkit-user-drag: none;  /* ❌ empêche le drag d'image sous WebKit */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* 🎛️ Boutons d’action */
.form-actions {
  display: flex;
  justify-content: column;
  margin-top: 20px;
  gap: 12px;
}

.mask-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 3;
  pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  will-change: clip-path;
  border-radius: 4px;
}

.image-container {
  position: relative;
  display: inline-block;
  width: fit-content;
  height: fit-content;
}

/* ===== legal.css ===== */
/* Mentions légales — Dark */
body{margin:0;background:#1f1f1f;color:#eee;font:16px/1.6 system-ui,Segoe UI,Roboto,Arial,sans-serif}
.wrap{max-width:900px;margin:40px auto;padding:24px}
h1,h2{color:#fff;margin:0 0 12px}
h1{font-size:36px;text-align:center}
h2{font-size:20px;margin-top:16px}
a{color:#7ab8ff}
.card{background:#2a2a2a;border:1px solid rgba(255,255,255,.06);border-radius:12px;padding:16px;margin:12px 0}
.muted,small{color:#bbb}
ul{margin:8px 0 0 18px}
code{background:#222;padding:1px 6px;border-radius:6px}

/* ===== cookies.css ===== */
/* --- Cookie banner ------------------------------------------------------- */
.wrap-legal{
  margin: 0 40px 40px 40px;
  padding: 16px;
}

.cc-wrap{
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 99999;
  background:#2b2b2b; color:#eee;
  border:1px solid rgba(255,255,255,.1);
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.5);
  max-width:860px; margin:0 auto;
}
.cc-inner{
  padding:16px;
  display:flex;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;           /* évite les débordements */
}
.cc-inner p{ margin:0; line-height:1.6; }

/* actions : aligne à droite ; centré sous le texte quand ça wrappe */
.cc-actions{
  margin-left:auto;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  width:auto;
}
@media (max-width: 720px){
  .cc-actions{
    margin-left:0;
    width:100%;
    justify-content:center; /* sous le texte sur mobile */
  }
}

.cc-btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.14);
  background:#fff; color:#111;
  font-weight:700;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
}
.cc-btn:hover{ background:#2563eb; color:#fff; border-color:#2563eb; }
.cc-btn.secondary{ background:#3a3a3a; color:#eee; }
.cc-link{ color:#7ab8ff; text-decoration:underline; }

/* --- Modal --------------------------------------------------------------- */
.cc-modal{
  position:fixed; inset:0;
  display:none;
  align-items:center; justify-content:center;
  z-index:100000;
  background:rgba(0,0,0,.5);
}
.cc-card{
  background:#1f1f1f;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  max-width:520px; width:92%;
  padding:16px;
}
.cc-card h3{ margin:0 0 8px; color:#fff; }
.cc-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin:10px 0;
}
.cc-switch{ position:relative; display:inline-block; width:46px; height:26px; }
.cc-switch input{ display:none; }
.cc-slider{
  position:absolute; inset:0; cursor:pointer;
  background:#444; border-radius:999px; transition:.2s;
}
.cc-slider:before{
  content:"";
  position:absolute; left:3px; top:3px;
  height:20px; width:20px;
  background:#fff; border-radius:50%; transition:.2s;
}
.cc-switch input:checked + .cc-slider{ background:#2563eb; }
.cc-switch input:checked + .cc-slider:before{ transform:translateX(20px); }

/* Boutons réutilisables sur pages légales */
.legal-page .cc-btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.14);
  background:#fff; color:#111;
  font-weight:700; padding:10px 14px;
  border-radius:10px; cursor:pointer;
}
.legal-page .cc-btn:hover{ background:#2563eb; color:#fff; border-color:#2563eb; }

/* Aligner les boutons de la modale à droite */
.cc-card .cc-footer{
  display:flex; gap:8px; justify-content:flex-end;
}
/* Fallback si une règle parasite traîne */
.cc-card .cc-footer .cc-btn:first-child{ margin-left:auto; }

/* --- En-tête légal centré + bouton aligné à droite (si utilisé) --------- */
.legal-header{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap:12px;
  margin: 8px 0 16px;
}
.legal-header h1{
  grid-column:2;
  text-align:center;
  margin:16px 0;
}
.legal-header .legal-back{
  grid-column:3;
  justify-self:end;
}

/* Mobile */
@media (max-width: 640px){
  .legal-header{ grid-template-columns: 1fr auto; }
  .legal-header h1{
    grid-column:1 / -1;
    order:-1;
    text-align:center;
    margin-bottom:8px;
  }
  .legal-header .legal-back{ grid-column:2; justify-self:end; }
  .wrap-legal{ margin: 0 10px 10px 10px; padding:16px; }
}

/* --- Bouton flottant haut-droite (fab) ---------------------------------- */
/* à utiliser avec <button class="legal-back-fab btn-icon-circle">…</button> */
.legal-back-fab{
  position:fixed;
  top:calc(16px + env(safe-area-inset-top, 0px));
  right:calc(16px + env(safe-area-inset-right, 0px));
  z-index:1000;
  display:inline-flex; align-items:center; justify-content:center;
}

/* --- Ligne de boutons à droite dans la carte "Gestion du consentement" -- */
.consent-actions{ display:flex; align-items:center; gap:16px; }
.consent-actions .actions{
  margin-left:auto; display:flex; gap:10px; flex-wrap:wrap;
}
.consent-actions .note{ opacity:.9; }
@media (max-width:720px){
  .consent-actions{ flex-direction:column; align-items:flex-start; gap:10px; }
  .consent-actions .actions{ margin-left:0; }
}

.consent-actions{ display:block; }
.consent-actions .actions{
  margin-top:12px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}


/* ===== cookies.css ===== */
/* --- Cookie banner --- */
.cc-wrap{position:fixed;left:16px;right:16px;bottom:16px;z-index:99999;
  background:#2b2b2b;color:#eee;border:1px solid rgba(255,255,255,.1);
  border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.5);
  max-width:860px;margin:0 auto}
.cc-inner{padding:16px;display:flex;align-items:flex-start}
.cc-inner p{margin:0;line-height:1.6}
.cc-actions{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
.cc-link{color:#7ab8ff;text-decoration:underline}
@media (max-width:720px){.cc-inner{flex-direction:column}.cc-actions{margin-left:0}}

/* --- Modal --- */
.cc-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:100000;
  background:rgba(0,0,0,.5)}
.cc-card{background:#1f1f1f;border:1px solid rgba(255,255,255,.12);border-radius:12px;max-width:520px;width:92%;padding:16px}
.cc-card h3{margin:0 0 8px;color:#fff}
.cc-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0}
.cc-switch{position:relative;display:inline-block;width:46px;height:26px}
.cc-switch input{display:none}
.cc-slider{position:absolute;cursor:pointer;inset:0;background:#444;border-radius:999px;transition:.2s}
.cc-slider:before{content:"";position:absolute;height:20px;width:20px;left:3px;top:3px;background:white;border-radius:50%;transition:.2s}
.cc-switch input:checked + .cc-slider{background:#2563eb}
.cc-switch input:checked + .cc-slider:before{transform:translateX(20px)}

/* Boutons réutilisables sur pages légales */
.legal-page .cc-btn{appearance:none;border:1px solid rgba(255,255,255,.14);background:#fff;color:#111;
  font-weight:700;padding:10px 14px;border-radius:10px;cursor:pointer}
.legal-page .cc-btn:hover{background:#2563eb;color:#fff;border-color:#2563eb}

/* --- Alignement boutons sous le texte --- */
.cc-inner{
  flex-direction: column;        /* empile le texte puis les boutons */
  align-items: flex-start;       /* texte aligné à gauche */
}

.cc-actions{
  margin-left: 0;                /* ne pousse plus à droite */
  align-self: center;            /* centre le bloc boutons sous le texte */
  justify-content: center;       /* aligne les boutons au centre */
  width: auto;                   /* largeur naturelle */
}

