/* =====================================================
   IMPORTATION DE POLICES ET VARIABLES GLOBALES
   ===================================================== */
@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap");

:root {
  /* Couleurs principales */
  --primary-color: #1a73e8;
  --secondary-color: #4285f4;
  --danger-color: #dc3545;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --gray-color: #6c757d;
  --white-color: #ffffff;
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.1);

  /* Espacements */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 30px;

  /* Tailles de police */
  --font-xs: 12px;
  --font-sm: 14px;
  --font-md: 16px;
  --font-lg: 18px;
  --font-xl: 20px;
  --font-xxl: 24px;
  --border-radius: 4px;
  --transition-speed: 0.3s;
}

/* =====================================================
   RÉINITIALISATION ET STYLES DE BASE
   ===================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
  font-family: "Roboto Condensed", sans-serif;
  color: var(--dark-color);
  background-color: var(--light-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--secondary-color);
}

h2 {
  font-size: var(--font-xl);
  font-weight: bold;
  margin-bottom: var(--spacing-xs);
  display: block;
}

/* =====================================================
         ÉLÉMENTS DE BASE
         ===================================================== */
* {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: none;
  color: inherit;
}

h2 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  display: block;
  font-family: Din;
}

/* =====================================================
         CONTENEUR PRINCIPAL
         ===================================================== */
html,
body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: 1390px; /* 1360px contenu + 30px padding */
  margin: 0 auto;
  padding: var(--spacing-md);
  box-sizing: border-box;
  overflow-x: hidden;
}

/* =====================================================
         HEADER ET NAVIGATION
         ===================================================== */
/* =====================================================
   HEADER STYLE STUDIO
   ===================================================== */
header {
  background-color: rgb(56, 66, 109);
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

header .header-left {
  display: flex;
  align-items: center;
  flex-direction: row;
  height: 100%;
}

header img {
  height: 45px;
  width: auto;
  margin-right: 15px;
}

header .logo-spvm {
  height: 45px;
  width: auto;
  margin-right: 15px;
  margin-left: 10px;
}

header .title-relai {
  font-family: Inter24pt-Bold, Arial, sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: white;
  letter-spacing: 8px;
  text-transform: uppercase;
}

header .subtitle-relations {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: white;
  letter-spacing: 0px;
  margin-right: 20px;
}

/* Masquer subtitle-relations sur mobile */
@media screen and (max-width: 768px) {
  header .subtitle-relations {
    display: none;
  }
  
  /* Header pleine largeur sur mobile */
  header {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    padding-left: 10px !important;
    padding-right: 0 !important;
    justify-content: space-between !important;
  }
  
  /* Titre RELAI à droite avec padding */
  header .title-relai {
    margin-left: auto !important;
    padding-right: 10px !important;
  }
  
  header .header-left {
    flex: 1;
  }
}

.header-index {
  background-color: #2e4372;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

.header-title h1 {
  font-size: 24px;
  margin: 0;
}

.subtitle {
  font-size: 14px;
  color: #008ac9;
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: flex-start;
  margin-top: 5px;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.navbar .nav-button {
  font-family: "DinBold", sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: var(--spacing-sm) var(--spacing-lg);
  margin-right: 10px;
  border: none;
  background-color: var(--primary-color);
  color: var(--white-color);
  cursor: pointer;
  text-transform: uppercase;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-speed);
}

.navbar .nav-button:hover {
  background-color: var(--secondary-color);
}

.navbar .nav-button.active {
  background-color: var(--secondary-color);
}

/* =====================================================
         BOUTONS
         ===================================================== */
.button,
#fileInput {
  font-family: "DinBold", sans-serif;
  font-weight: bold;
  font-size: var(--font-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  border: none;
  background-color: var(--secondary-color);
  color: var(--white-color);
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
}

.button:hover {
  font-family: "DinBold", sans-serif;
  font-weight: bold;
  background-color: #00c22a;
  color: #fff;
}

.button.danger {
  font-family: "DinBold", sans-serif;
  font-weight: bold;
  background-color: #d9534f;
}

.button.danger:hover {
  background-color: #c9302c;
}

.button.archive {
  font-family: "DinBold", sans-serif;
  font-weight: bold;
  background-color: #ff8c00;
  color: #fff;
}

.button.archive:hover {
  background-color: #e67e00;
}

/* Style pour les événements archivés */
.event-archived {
  opacity: 0.6;
  background-color: #f8f9fa;
  border-left: 4px solid #ff8c00;
}

.event-archived .event-title {
  text-decoration: line-through;
  color: #6c757d;
}

/* =====================================================
   CLASSES POUR REMPLACER LES STYLES INLINE
   ===================================================== */

/* Conteneur audio list */
.audio-list-container {
  margin: 20px 0;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #ddd;
  display: block;
  flex-direction: column;
  gap: 10px;
}

.audio-list-title {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
}

/* ========================================
   AUDIO PLAYER CONTAINER - STRUCTURE COMPLÈTE
   ======================================== */

/* 
   STRUCTURE HTML GÉNÉRÉE PAR JAVASCRIPT :
   <div class="audio-player-container">
     <div class="audio-file-number">1.</div>
     <div class="input-audio-container">
       <input class="audio-rename-input" />
       <audio class="audio-player" />
     </div>
     <button class="button edit-btn">RENOMMER</button>
     <button class="button danger">SUPPRIMER</button>
   </div>
   
   ORDRE DES ÉLÉMENTS :
   1. Numéro du fichier (audio-file-number)
   2. Conteneur flex pour input + audio (input-audio-container)
   3. Bouton RENOMMER (button edit-btn)
   4. Bouton SUPPRIMER (button danger)
*/

/* Conteneur principal de chaque fichier audio */
.audio-player-container {
  margin: 0px 0;
  padding: 12px;
  background: white;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* 1. NUMÉRO DU FICHIER */
.audio-file-number {
  font-weight: bold;
  color: #333;
  font-size: 14px;
  min-width: 20px;
  text-align: center;
}

/* 2. CONTENEUR FLEX POUR INPUT + AUDIO */
.input-audio-container {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* 4. VARIANTES DU CONTENEUR */
.audio-player-container-pending {
  margin: 10px 0;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Conteneur dynamique (pour les nouveaux enregistrements) */
.player-container-dynamic {
  margin: 10px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 2px dashed #007bff;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Numéro de fichier */
.audio-file-number {
  color: #666;
  font-weight: bold;
  font-size: 16px;
  min-width: 20px;
  text-align: center;
}

/* 2A. CHAMP DE TEXTE POUR LE NOM DU FICHIER */
.audio-rename-input {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 3px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  flex-shrink: 0;
}

/* 2A.1. AFFICHAGE DU NOM DE FICHIER FIXE DANS AUDIO-PLAYER-CONTAINER */
.audio-player-container .audio-file-name-display {
  /* Styles pour l'affichage du nom fixe du fichier */
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  padding: 3px 6px !important;
  color: #333 !important;
  width: 30% !important;
  min-width: 30% !important;
  max-width: 30% !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  font-weight: 500 !important;
  /* Vous pouvez modifier ces propriétés spécifiquement */
}

/* 2A.1. ÉTATS DU CHAMP DE TEXTE */
.audio-rename-input-pending {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  flex: 1;
  min-width: 120px;
}

/* État focus (désactivé par défaut) */
.rename-input-focused {
  background-color: #f8f9fa;
  border-color: #ced4da;
  color: #6c757d;
}

/* État actif (en cours d'édition) */
.rename-input-active {
  background-color: white;
  border-color: #007bff;
  color: #333;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 2A.2. ÉTATS SPÉCIFIQUES DANS AUDIO-PLAYER-CONTAINER */
.audio-player-container .audio-rename-input.rename-input-focused {
  /* État focus spécifique dans audio-player-container */
  background-color: #f8f9fa !important;
  border-color: #ced4da !important;
  color: #6c757d !important;
  /* Vous pouvez modifier ces propriétés spécifiquement */
}

.audio-player-container .audio-rename-input.rename-input-active {
  /* État actif spécifique dans audio-player-container */
  background-color: white !important;
  border-color: #007bff !important;
  color: #333 !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
  /* Vous pouvez modifier ces propriétés spécifiquement */
}

/* 2A.3. CLASSE ULTRA-SPÉCIFIQUE POUR OVERRIDE */
.audio-player-container .audio-rename-input.rename-input-focused.audio-rename-input {
  /* Classe ultra-spécifique pour forcer l'override */
  background-color: #f8f9fa !important;
  border-color: #ced4da !important;
  color: #6c757d !important;
  /* Vous pouvez modifier ces propriétés spécifiquement */
}

.audio-player-container .audio-rename-input.rename-input-active.audio-rename-input {
  /* Classe ultra-spécifique pour forcer l'override */
  background-color: white !important;
  border-color: #007bff !important;
  color: #333 !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
  /* Vous pouvez modifier ces propriétés spécifiquement */
}

/* 2A.4. RÈGLES ULTRA-SPÉCIFIQUES POUR L'AFFICHAGE DU NOM FIXE */
div.audio-player-container span.audio-file-name-display {
  /* Classe avec maximum de spécificité - ne touche QUE l'affichage du nom */
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  color: #333 !important;
  width: 30% !important;
  min-width: 30% !important;
  max-width: 30% !important;
  font-weight: 500 !important;
  /* MODIFIEZ ICI SANS CRAINDRE D'AFFECTER LES AUTRES ÉLÉMENTS */
}

/* 2B. LECTEUR AUDIO */
.audio-player {
  flex: 1 !important;
  height: 40px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #f0f0f0 !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  min-width: 150px !important;
  max-width: none !important;
}

/* 2B.1. LECTEUR AUDIO SPÉCIFIQUE DANS AUDIO-PLAYER-CONTAINER */
.audio-player-container .audio-player {
  /* Styles spécifiques pour le lecteur dans audio-player-container */
  width: 70% !important;
  min-width: 70% !important;
  max-width: 70% !important;
  flex: none !important;
  /* MODIFIEZ ICI LA LARGEUR DU LECTEUR AUDIO */
}

/* 2B.2. RÈGLE ULTRA-SPÉCIFIQUE POUR FORCER L'APPLICATION */
div.audio-player-container div.input-audio-container audio.audio-player {
  width: 70% !important;
  min-width: 70% !important;
  max-width: 70% !important;
  flex: none !important;
  display: block !important;
  height: 40px !important;
  background: #f0f0f0 !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
}

/* 2B.3. RÈGLE ULTRA-SPÉCIFIQUE POUR LE CHAMP DE TEXTE */
div.audio-player-container div.input-audio-container input.audio-rename-input {
  width: 30% !important;
  min-width: 30% !important;
  max-width: 30% !important;
  flex: none !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  padding: 3px 6px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  background-color: white !important;
}

.audio-player-small {
  width: 180px;
  min-width: 120px;
  max-width: 220px;
  display: block;
}

.audio-player-flex {
  flex: 1;
  max-width: 300px;
}

/* Conteneur d'aperçu audio */
.audio-preview-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 3. BOUTONS D'ACTION */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

/* 3A. BOUTON RENOMMER/VALIDER */
.button.edit-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.2s;
}

.button.edit-btn:hover {
  background-color: #0056b3;
}

/* 3B. BOUTON SUPPRIMER */
.button.danger {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.2s;
}

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

.action-button {
  width: 40px;
  height: 40px;
}

/* Éléments cachés */
.hidden {
  display: none !important;
}

.hidden-flex {
  display: none !important;
}

.hidden-block {
  display: none !important;
}

/* Boutons d'enregistrement */
.recording-button {
  display: flex;
}

.recording-button-hidden {
  display: none;
}

.recording-animation {
  display: none;
}

.recording-animation-active {
  display: flex;
}

.recording-timer {
  display: block;
}

.recording-timer-hidden {
  display: none;
}

/* Messages alternatifs */
.alternative-message {
  margin: 10px 0;
  padding: 10px;
  background-color: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 4px;
  color: #8a6d3b;
}

/* Boutons de formulaire */
.form-button {
  display: inline-block;
}

/* Barre de progression */
.progress-bar {
  width: 0%;
  transition: width 0.1s ease;
}

/* Bouton de recherche */
.search-clear-button {
  display: block;
}

.search-clear-button-hidden {
  display: none;
}

/* =====================================================
   SECTION ÉLÉMENTS ARCHIVÉS
   ===================================================== */

.archived-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #ddd;
}

.archived-title {
  font-family: "SF Pro Display", sans-serif;
  font-size: 24px;
  font-weight: 740;
  color: #333;
  margin: 0 0 20px 0;
  text-align: left;
  letter-spacing: 0px;
}

/* Les éléments archivés utilisent les mêmes styles que les éléments normaux
   mais avec une teinte légèrement différente pour les distinguer */
.archived-section .file-row-flex {
  background-color: #f8f9fa;
  border-left: 4px solid #6c757d;
  opacity: 0.8;
}

.archived-section .file-row-flex:hover {
  background-color: #e9ecef;
  opacity: 1;
}

/* Styles spécifiques pour les titres des éléments archivés */
.archived-section .file-col.titre {
  color: #6c757d;
  font-style: italic;
}

.archived-section .file-col.date {
  color: #6c757d;
}

/* Styles pour les templates HTML - remplacement des styles inline */

/* Audio file item dans details.html */
.audio-file-item {
  margin: 20px 0;
  padding: 15px;
}

.audio-file-title {
  font-family: Din;
  margin: 0 0 10px 0;
  color: #333;
}

.audio-file-player {
  width: 100%;
  height: 30px;
}

.audio-file-player-with-margin {
  width: 100%;
  height: 30px;
  margin-left: 10px;
}

/* Layout flex pour admin.html */
.form-row-flex {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.form-group-date {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
}

.form-group-title {
  width: 1100px;
  min-width: 0;
  max-width: 1100px;
}

.form-group-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.custom-upload-with-margin {
  margin-right: 10px;
}

.stop-button-hidden {
  display: none !important;
}

/* Cacher complètement le bouton STOP séparé - inutile car RECORD se transforme en STOP */
.stop-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

.audio-preview-hidden {
  display: none;
}

.recording-indicator-hidden {
  display: none !important;
}

/* S'assurer que l'indicateur est caché par défaut même sur mobile */
.recording-indicator:not(.active) {
  display: none !important;
}

.file-name-display {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: #fff;
  margin-left: 10px;
}

.add-record-button {
  background-color: #28a745;
  margin-left: auto;
  margin-right: 10px;
}

.validate-button {
  min-width: 120px;
}

.cancel-button-hidden {
  display: none;
  margin-left: 10px;
}

.audio-preview-container-full {
  display: none;
  margin: 16px 0 0 0;
  width: 100%;
}

/* Search group */
.search-group-full {
  width: 100%;
  max-width: 1160px;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  position: relative;
}

.search-label {
  margin-right: 12px;
  min-width: 80px;
}

.search-input {
  flex: 1;
  min-width: 0;
}

.search-clear-button-positioned {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  color: #888;
  cursor: pointer;
  display: none;
}

/* Debug dot */
.debug-dot {
  position: fixed;
  right: 10px;
  bottom: 10px;
  width: 3px;
  height: 3px;
  background: #d3d3d3;
  border-radius: 50%;
  z-index: 9999;
}

/* Styles pour les éléments dynamiques JavaScript */
.recording-status-red {
  color: red;
}

.record-button-disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.rename-input-focused {
  background-color: #f5f5f5;
}

.rename-input-active {
  background-color: white;
}

.rename-input-inactive {
  background-color: #f5f5f5;
}

.audio-list-container-dynamic {
  margin: 20px 0;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #ddd;
  display: block;
  flex-direction: column;
  gap: 10px;
}

.list-title-dynamic {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
}

.player-container-dynamic {
  margin: 10px 0;
  padding: 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.audio-flex {
  flex: 1;
  max-width: 300px;
}

.number-element-dynamic {
  color: #666;
  font-weight: bold;
  font-size: 16px;
  min-width: 20px;
  text-align: center;
}

.rename-input-dynamic {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 3px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  flex-shrink: 0;
}

.visible-input-clickable {
  cursor: pointer;
  pointer-events: auto;
}

.date-wrapper-clickable {
  cursor: pointer;
}

.progress-bar-dynamic {
  width: 0%;
  transition: width 0.1s ease;
}

.download-button {
  font-family: "Inter_28pt-Medium", sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 6px 8px;
  border: none;
  background-color: var(--success-color);
  color: var(--white-color);
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
  display: inline-block;
  line-height: 1;
  min-width: 85px;
}

.download-button:hover {
  color: #ffffff;
  background-color: #218838;
}

.details-button {
  background-color: var(--info-color);
  color: var(--white-color);
  text-decoration: none;
  padding: 5px 10px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.details-button:hover {
  background-color: #138496;
  color: #fff;
}

/* Typographie pour details.html */
.details-content {
  font-family: "Din", sans-serif;
  letter-spacing: -0.5px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 32px 24px;
  margin: 32px auto;
  max-width: 800px;
}

/* Styles spécifiques pour les différents éléments textuels */
.details-content p,
.details-content div,
.details-content span,
.details-content li {
  font-family: "Din", sans-serif;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  line-height: 25px;
}

/* Pour le titre principal */
.details-title {
  font-family: "Din", sans-serif;
  font-weight: bold;
  letter-spacing: -0.4px;
}

/* Pour la description du fichier */
#fileDescription {
  font-family: "Din", sans-serif;
  letter-spacing: -0.4px;
  line-height: 1.4;
}

h3 {
  font-family: "Din", sans-serif;
  font-size: 11px;
  padding: 5px;
  font-weight: 500;
  letter-spacing: -0.5px;
  background-color: #dedede;
}

/* Pour tout autre contenu textuel */
.details-text {
  font-family: "Roboto", sans-serif;
  letter-spacing: -0.4px;
}

.hidden-input {
  display: none;
}

.custom-upload {
  font-family: "DinBold", "Inter_28pt", Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: -0.2px;
  background-color: var(--secondary-color);
  color: var(--white-color);
  border: none;
  border-radius: 0;
  padding: var(--spacing-xs) var(--spacing-sm);
  margin: var(--spacing-xs);
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
  transition: background-color var(--transition-speed);
  display: inline-block;
  min-width: 120px;
  min-width: 120px;
  box-sizing: border-box;
}
.custom-upload:hover {
  background-color: #00c22a;
  color: #fff;
}

/* =====================================================
         FORMULAIRES
         ===================================================== */
.upload-form {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-lg);
  box-sizing: border-box;
  width: 100%;
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px var(--shadow-color);
}

.form-group {
  margin-bottom: 0;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding-right: 0 !important;
}

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

.form-label {
  font-family: "Din", sans-serif;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #5e5e5e;
  display: block;
}

.form-input,
.form-textarea,
.custom-date-input,
#hiddenDateInput,
input[type="date"] {
  width:20% !important;
  max-width: 100% !important;
  font-family: "Inter_28pt", sans-serif;
  font-size: 14px;
  padding: 10px !important;
  background-color: rgb(240, 240, 240);
  resize: none;
  box-shadow: none;
  box-sizing: border-box !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
}

.form-textarea {
  height: 150px;
  resize: none;
}

.hidden-date-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 20;
  opacity: 0.01;
  color: transparent;
  background: transparent;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

/* =====================================================
         ÉDITEUR QUILL
         ===================================================== */
#descriptionInput {
  height: 200px;
  margin-bottom: var(--spacing-md);
  background-color: var(--light-color);
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.ql-header,
.ql-picker,
.ql-expanded,
.ql-clean {
  display: none !important;
}

.ql-container {
  font-size: 15px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.ql-editor {
  font-size: 15px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-family: "DIN", "DinBold", Arial, sans-serif !important;
  letter-spacing: -0.4px !important;
}

.ql-editor p,
.ql-editor span,
.ql-editor div {
  font-family: "DIN", "DinBold", Arial, sans-serif !important;
}

/* =====================================================
         STYLES DE TABLEAU TRADITIONNEL
         ===================================================== */
th {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 8px;
}

td {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

#fileTable {
  width: 94%;
}

/* Styles de base pour le tableau */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.styled-table th,
.styled-table td {
  padding: 0px;
  text-align: left;
}

/* Alignement spécifique des colonnes actions */
.styled-table th.action-column,
.styled-table td.action-column {
  text-align: right;
  width: 20px;
}

.action-column {
  min-width: 20px;
}

/* Style général des en-têtes */
.styled-table thead th {
  font-weight: bold;
  text-transform: uppercase;
  background-color: #f4f4f4;
}

/* Ligne hover */
.styled-table tbody tr:hover {
  background-color: #f9f9f9;
}

/* Colonnes spécifiques du tableau */
.styled-table th:nth-child(1),
.styled-table td:nth-child(1) {
  width: 7%;
  font-weight: 400;
  font-size: 10px;
}

.styled-table th:nth-child(2),
.styled-table td:nth-child(2) {
  width: 70%;
  font-weight: bold !important;
}

.styled-table th:nth-child(3),
.styled-table td:nth-child(3) {
  width: 20%;
}

.styled-table th:nth-child(4),
.styled-table td:nth-child(4) {
  width: 10%;
  text-align: right;
}

.styled-table td:nth-child(2) {
  font-weight: bold !important;
  color: #ffffff;
  font-style: normal !important;
  text-decoration: none !important;
  color: #ffffff !important;
}

.styled-table td:nth-child(3) {
  font-weight: bold;
  font-style: normal;
  text-decoration: none;
  color: #ffffff;
}

/* Tableau index */
.file-table-index {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: var(--white-color);
  box-shadow: 0 2px 4px var(--shadow-color);
  margin-bottom: var(--spacing-lg);
}

.file-table-index th,
.file-table-index td {
  font-family: "DIN", Arial, sans-serif;
  font-size: 14px;
  padding: var(--spacing-xs);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.file-table-index th {
  background-color: var(--light-color);
  color: var(--dark-color);
  text-transform: uppercase;
  font-weight: bold;
}

.file-table-index tbody tr:hover {
  background-color: var(--light-color);
}

.file-table-index tbody tr {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-spacing: 0;
}

.file-table-index td {
  padding: 0px 3px;
  vertical-align: middle;
  color: #6f6f6f;
}

.file-table-index th:nth-child(1),
.file-table-index td:nth-child(1) {
  width: 7%;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 9pt !important;
  font-weight: 600;
  color: #4c4c4c;
  letter-spacing: -0.35px;
}

.file-table-index th:nth-child(2),
.file-table-index td:nth-child(2) {
  width: 50%;
  font-family: "Inter", sans-serif !important;
  font-size: 10pt !important;
  font-weight: 640 !important;
  font-style: normal !important;
  text-decoration: none !important;
  color: #4b4b4b !important;
  letter-spacing: -0.40px;
}

.message.success {
  font-family: roboto;
  font-weight: 400;
  font-size: 12px;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.file-table-index th:nth-child(3),
.file-table-index td:nth-child(3) {
  width: 20%;
  text-align: right;
  font-weight: bold;
  font-style: normal;
  text-decoration: none;
  color: var(--dark-color);
}

.file-table-index th:nth-child(4),
.file-table-index td:nth-child(4) {
  width: 10%;
  text-align: right;
}

/* =====================================================
         LAYOUT FLEXBOX POUR MOBILE
         ===================================================== */
#fileContainer {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: var(--spacing-lg);
  gap: 0px;
}

/* Carte de fichier individuelle */
.file-card {
  display: flex;
  align-items: center;
  padding: 4px 15px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 1390px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0 !important;
}

/* Style spécifique pour la page relai */
body.upload-page .file-card {
  max-width: 1390px;
  padding: 4px 15px;
}

/* Éléments à l'intérieur de la carte */
.file-date {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 120px;
  color: #6f6f6f;
  font-size: 14px;
  font-weight: 400;
}

.file-title {
  flex: 1;
  min-width: 200px;
  font-family: "DIN", Arial, sans-serif !important;
  font-size: 12px;
  font-weight: bold;
  color: #222;
  padding: 0 10px;
  word-break: break-word;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.file-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.file-audio .audio-player-small {
  flex: 1 1 auto;
  min-width: 0;
}

.file-audio .file-actions {
  width: auto !important;
  margin: 0 !important;
  justify-content: flex-end;
}

.audio-player-small {
  width: 300px !important;
  min-width: 300px;
}

/* Force l'affichage du temps dans le lecteur audio */
.audio-player-small::-webkit-media-controls-panel {
  display: flex !important;
  background-color: #fafafa;
}

.audio-player-small::-webkit-media-controls-current-time-display,
.audio-player-small::-webkit-media-controls-time-remaining-display {
  display: flex !important;
  visibility: visible !important;
  min-width: 40px !important;
  overflow: visible !important;
  color: var(--dark-color);
  font-family: "Roboto", sans-serif;
}

.audio-player-small::-webkit-media-controls-timeline {
  transform: scale(1);
}

.audio-player-small::-webkit-media-controls-play-button {
  transform: scale(1);
}

.audio-player-small::-webkit-media-controls-timeline {
  transform: scale(1);
}

.audio-player-small::-webkit-media-controls-time-remaining-display,
.audio-player-small::-webkit-media-controls-current-time-display {
  display: flex !important;
  visibility: visible !important;
  color: var(--dark-color);
}

.file-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  margin-left: auto;
}

/* Style pour que les boutons aient tous la même largeur mais soient plus compacts */
.file-actions .button,
.file-actions a.button {
  font-family: "DinBold", sans-serif;
  font-weight: bold;
  min-width: 85px;
  text-align: center;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1;
}

/* =====================================================
         STYLE POUR LES CHAMPS DE DATE
         ===================================================== */
/* Style pour les champs de date personnalisés */
.custom-date-group {
  width: 100%;
  margin-bottom: 20px;
  position: relative;
  z-index: 100;
  /* S'assurer que la date est au-dessus de tout */
}

.custom-date-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
  cursor: pointer !important;
  user-select: none;
}

.hidden-date-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 20;
  opacity: 0.01;
  color: transparent;
  background: transparent;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

.custom-date-input {
  font-family: "Inter_28pt", Arial, sans-serif !important;
  font-size: 14px !important;
  letter-spacing: -0.2px !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 10px !important;
  background-color: rgb(240, 240, 240);
  border: none;
  color: #222;
  cursor: pointer;
  box-sizing: border-box !important;
  -webkit-appearance: none;
  appearance: none;
  text-align: center !important;
}

/* Supprimer l'icône calendrier sur Chrome/Webkit */
input[type="date"].custom-date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
  pointer-events: none;
}

.calendar-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: auto !important; /* Permettre les interactions */
  cursor: pointer !important;
  z-index: 2;
}

/* =====================================================
         LECTEUR AUDIO
         ===================================================== */
.audio-player {
  margin: 0 0 20px -10px;
  padding: 0px;
}

.audio-player-small {
  width: 100%;
  height: 40px;
}

/* Force l'affichage du temps dans le lecteur audio */
.audio-player-small::-webkit-media-controls-time-remaining-display,
.audio-player-small::-webkit-media-controls-current-time-display {
  display: flex !important;
  visibility: visible !important;
}

.audio-player-small::-webkit-media-controls-panel {
  display: flex !important;
  flex-wrap: nowrap !important;
}

.audio-player-small::-webkit-media-controls-timeline {
  flex-grow: 1 !important;
}

/* Styles pour le conteneur audio */
.file-audio {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =====================================================
         ÉLÉMENTS DIVERS
         ===================================================== */
.title-column {
  font-weight: bold !important;
  font-size: 16px !important;
  color: #2c2c2c !important;
}

#fileDate {
  font-family: "Franklin", Arial, sans-serif !important;
  font-weight: bold;
  font-size: 14px;
  color: #008ac9;
}

#fileDescription {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  margin-bottom: 8px;
  display: block;
}

/* =====================================================
         CONTAINER INDEX MOBILE
         ===================================================== */
#indexFileContainer {
  display: none;
  /* Caché par défaut, affiché sur mobile */
  flex-direction: column;
  gap: 15px;
  width: 100%;
  margin-top: 20px;
}

/* =====================================================
         STYLES SPÉCIFIQUES POUR DESKTOP
         ===================================================== */
@media screen and (min-width: 769px) {
  /* Styles pour desktop */
  .custom-date-group {
    width: 100% !important;
    margin-bottom: 15px !important;
    /* Forcer la même largeur que les autres groupes */
  }

  /* S'assurer que le champ date reste en haut quand le calendrier est ouvert */
  .custom-date-group:focus-within {
    z-index: 1000;
  }

  .form-input,
  .form-textarea,
  .custom-date-input,
  #hiddenDateInput,
  #titleInput,
  input[type="text"],
  input[type="date"] {
    width: 100% !important;
    min-height: 48px !important; /* Taille suffisante pour mobile */
    padding: 12px !important;
    font-size: 14px !important; /* Évite le zoom sur iOS */
    box-sizing: border-box !important;
    border-radius: 0 !important; /* Évite les arrondis étranges sur iOS */
    appearance: none !important; /* Supprime l'apparence native */
    -webkit-appearance: none !important;
    border: none !important;
  }

  /* Ajustements pour Chrome desktop */
  .custom-date-wrapper {
    cursor: pointer;
    width: 100% !important;
  }

  /* Rendre l'icône du calendrier interactive */
  .calendar-icon {
    pointer-events: auto;
    cursor: pointer;
  }
}

/* =====================================================
         MEDIA QUERIES - OPTIMISÉ AVEC LARGEURS UNIFORMES
         ===================================================== */
/* iPhone SE (320px-375px) */
@media screen and (max-width: 375px) {
  /* Conteneur principal */
  .container {
    padding: 0;
  }

  /* Header - Plus petit et optimisé */
  header {
    padding: 8px 15px;
  }

  header .title {
    margin-left: 28px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 0px;
    /* Supprimer l'espacement des lettres sur mobile */
    flex: 3;
    /* Donner plus d'espace au titre principal */
  }

  header .right {
    font-size: 8px;
    /* Encore plus petit */
    letter-spacing: 2px;
    flex: 1;
    /* Moins d'espace pour RELAI */
  }

  header img {
    height: 20px;
    padding: 2px;
  }

  /* Formulaires améliorés pour mobile avec largeur uniforme */
  .form-group-date {
    width: 100% !important;
  }

  /* Tous les inputs ont une largeur uniforme */
  .form-input,
  .form-textarea,
  .form-input-date,
  #titleInput,
  input[type="date"],
  input[type="text"],
  .custom-date-input,
  .custom-date-wrapper {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 14px !important;
    padding: 12px !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    background-color: rgb(240, 240, 240) !important;
  }

  /* Ajustement spécifique pour le wrapper de date */
  .custom-date-group {
    width: 100% !important;
    margin-bottom: 15px !important;
  }

  /* Éditeur Quill ajusté */
  .ql-container,
  .ql-editor {
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: "DIN", "DinBold", "Inter_28pt", Arial, sans-serif !important;
  }

  /* Champ date natif (styles spécifiques) */
  input[type="date"]::-webkit-datetime-edit,
  input[type="date"]::-webkit-datetime-edit-fields-wrapper,
  input[type="date"]::-webkit-inner-spin-button,
  input[type="date"]::-webkit-calendar-picker-indicator {
    width: auto !important;
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: 5px !important;
    margin-right: 5px !important;
  }

  /* Boutons formulaire ajustés */
  .form-group.form-group-actions {
    flex-wrap: wrap;
  }

  .custom-upload,
  .button {
    font-family: "DinBold", sans-serif;
    font-weight: bold;
    margin-bottom: 10px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Structure Flex optimisée */
  .file-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    width: 100%;
  }

  .file-date {
    width: 100%;
    font-size: 16px;
    margin-bottom: 5px;
  }

  .file-title {
    width: 100%;
    padding: 0;
    font-size: 14px;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .file-audio {
    width: 100%;
  }

  .file-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
    flex-wrap: wrap;
  }

  /* Lecteur audio pleine largeur */
  .audio-player-small {
    width: 100% !important;
    min-width: 100% !important;
    height: 45px;
  }

  #audioPlayer {
    width: 100% !important;
  }

  #audioPreviewContainer audio {
    width: 100% !important;
  }

  /* Ajustement des boutons pour mobile */
  .file-actions .button,
  .file-actions a.button,
  .file-actions .download-button {
    font-family: "DinBold", sans-serif;
    font-weight: bold;
    flex: 1;
    font-size: 11px;
    min-height: 44px;
    padding: 5px;
    margin: 2px;
    flex: 1 1 auto;
    min-width: 0;
  }

  /* Meilleure visibilité pour le statut d'enregistrement */
  #recordingStatus {
    font-size: 14px;
    margin-top: 5px;
    display: block;
    width: 100%;
  }

  /* Boutons d'enregistrement plus grands */
  /* Bouton RECORD adapté pour petits écrans */
  .record-button {
    width: 90px !important;
    height: 44px !important;
    min-height: 44px !important;
    font-size: 12px !important;
    padding: 10px 12px !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  
  .stop-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
  }

  .record-container {
    flex-wrap: wrap;
  }
  
  /* Zone d'actions avec wrap sur petits écrans */
  .form-group-actions {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
  }

  /* Animation d'enregistrement plus visible */
  .recording-pulse {
    width: 18px;
    height: 18px;
  }

  .recording-text {
    font-size: 14px;
  }

  /* Responsive design pour index.html */
  .file-table-index {
    display: none;
    /* Cacher le tableau sur mobile */
  }

  #indexFileContainer {
    display: flex;
    /* Afficher les cartes sur mobile */
  }

  /* Assurer que tous les éléments respectent la largeur disponible */
  audio {
    width: 100% !important;
  }
}

/* Tablettes et petits mobiles (376px-768px) */
@media screen and (min-width: 376px) and (max-width: 768px) {
  /* Header plus compact */
  header {
    padding: 10px 15px;
  }

  header .title {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 0.5px;
    flex: 3;
  }

  header .right {
    font-size: 14px !important;
    letter-spacing: 4px !important;
    font-weight: bold;
    flex: 1 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Formulaires avec largeur uniforme - MOBILE */
  .form-group-date {
    width: 100% !important;
  }
  
  /* Champ titre pleine largeur sur mobile */
  #titleInput,
  .input-titre,
  .form-group-title,
  .form-group-title input {
    width: 100% !important;
    min-width: 100% !important;
    flex: 1 1 100% !important;
  }
  
  /* Layout formulaire en colonne sur mobile */
  .form-row-flex {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .form-group-title {
    width: 100% !important;
  }

  .form-input,
  .form-textarea,
  .form-input-date,
  input[type="date"],
  input[type="text"],
  .custom-date-input,
  .custom-date-wrapper {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 16px !important;
    padding: 10px !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
  }

  /* Ajustement spécifique pour le wrapper de date */
  .custom-date-group {
    width: 100% !important;
    margin-bottom: 15px !important;
  }
  
  /* Boutons d'action en wrap sur mobile */
  .form-group-actions {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  /* Indicateur d'enregistrement - cacher par défaut */
  .recording-indicator {
    display: none !important;
  }
  .recording-indicator.active {
    display: flex !important;
  }

  /* Éditeur Quill ajusté */
  .ql-container,
  .ql-editor {
    width: 95% !important;
    font-family: "DIN", "DinBold", "Inter_28pt", Arial, sans-serif !important;
  }

  /* Ajustements audio */
  .file-audio {
    width: 100%;
    margin: 10px 0;
  }

  .audio-player-small {
    width: 100% !important;
    min-width: 100%;
    height: 40px;
  }

  /* Organisation des cartes */
  .file-card {
    flex-wrap: wrap;
    width: 100%;
    padding: 5px;
  }

  .file-date {
    width: 30%;
  }

  .file-title {
    width: 65%;
    min-width: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .file-actions {
    width: 100%;
    margin-top: 10px;
    justify-content: space-between;
  }

  .file-actions .button,
  .file-actions a.button,
  .file-actions .download-button {
    min-width: 0;
    padding: 6px 4px;
    font-size: 11px;
    font-family: "DinBold", sans-serif;
    font-weight: bold;
  }

  /* Responsive design pour index.html */
  .file-table-index {
    display: none;
    /* Cacher le tableau sur tablette */
  }

  #indexFileContainer {
    display: flex;
    /* Afficher les cartes sur tablette */
  }

  /* Forcer les balises audio à 100% de la largeur */
  audio {
    width: 100% !important;
  }

  /* Empêcher les débordements de texte */
  #fileTitle,
  #fileDescription {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

/* Écrans moyens (769px-1390px) */
@media screen and (min-width: 769px) and (max-width: 1390px) {
  .file-audio {
    width: 280px;
  }

  .audio-player-small {
    width: 280px !important;
    min-width: 280px;
  }

  /* Pour desktop, afficher le tableau et non les cards */
  .file-table-index {
    display: table;
  }

  #indexFileContainer {
    display: none;
  }
  .form-input,
  .form-textarea,
  .custom-date-input,
  #titleInput,
  input[type="text"],
  input[type="date"] {
    width: 100% !important; /* Changé de 98% à 100% */
  }

  .upload-form {
    padding: 0 20px;
  }
}

/* Grands écrans (>1390px) */
@media screen and (min-width: 1391px) {
  .container {
    max-width: 1390px; /* 1360px contenu + 30px padding */
  }

  .file-audio {
    width: 300px;
  }

  .audio-player-small {
    width: 300px !important;
    min-width: 300px;
  }

  .file-table-index {
    display: table;
  }

  #indexFileContainer {
    display: none;
  }

  .form-input,
  .form-textarea,
  .custom-date-input,
  #titleInput,
  input[type="text"],
  input[type="date"] {
    width: 100% !important;
  }

}

/* Styles pour la page de détails */
.details-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px; /* Augmenté de 20px à 40px */
}

.details-date {
  font-size: 1.2em;
  color: #666;
}

.details-title {
  font-size: 2em;
  margin-bottom: 30px; /* Augmenté de 20px à 30px */
}

.details-description {
  margin-bottom: 40px; /* Augmenté de 20px à 40px */
  line-height: 1.6;
}

.details-audio {
  margin-bottom: 40px; /* Augmenté de 20px à 40px */
}

.details-audio audio {
  width: 100%;
  height: 50px; /* Hauteur par défaut pour mobile */
}

/* Media query pour desktop */
@media screen and (min-width: 769px) {
  .details-audio audio {
    height: 150px; /* Hauteur augmentée pour desktop */
  }
}

/* Styles pour la page de détails */
.details-content {
  max-width: 800px;
  margin: 0;
  padding: 20px;
}

#fileDate {
  font-family: "Franklin", Arial, sans-serif !important;
  font-weight: bold;
  font-size: 14px;
  color: #008ac9;
}

#fileTitle {
  font-family: "Franklin", Arial, sans-serif !important;
  font-size: 2em;
  margin-bottom: 30px;
  text-align: left;
}

#fileDescription {
  margin-bottom: 40px;
  line-height: 1.6;
  text-align: left;
}

.audio-player {
  margin-bottom: 00px;
  text-align: left;
}

.audio-player audio {
  width: 100%;
  height: 50px; /* Hauteur par défaut pour mobile */
}

/* Media query pour desktop */
@media screen and (min-width: 769px) {
  .audio-player audio {
    height: 150px; /* Hauteur augmentée pour desktop */
  }
}

/* ENREGISTREMENT AUDIO */
.record-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recording-timer {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
  font-family: "Inter_28pt", Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #ff4444 !important;
}

.record-button {
  font-family: "DinBold", "Inter_28pt", Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: -0.2px;
  background-color: #ff4444;
  color: var(--white-color);
  border: none;
  border-radius: 0;
  padding: var(--spacing-xs) var(--spacing-sm);
  margin: var(--spacing-xs);
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
  transition: background-color var(--transition-speed);
  display: inline-block;
  min-width: unset;
  width: unset;
  height: 25px;
  box-shadow: none;
}

.record-button:hover {
  background-color: #c9302c;
  color: #fff;
}

.record-button.recording {
  background-color: #cc0000;
  animation: pulse 1.5s infinite;
}

.stop-button {
  font-family: "DinBold", "Inter_28pt", Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: -0.2px;
  background-color: #ff4444;
  color: var(--white-color);
  border: none;
  border-radius: 0;
  padding: var(--spacing-xs) var(--spacing-sm);
  margin: var(--spacing-xs);
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
  min-width: 120px;
  width: 120px;
  height: 25px;
  display: inline-block;
  box-sizing: border-box;
  transition: background-color var(--transition-speed);
}
.stop-button:hover {
  background-color: #c9302c;
  color: #fff;
}

.recording-indicator {
  display: none;
  align-items: center;
  gap: 0.5rem;
  color: #ff4444;
  font-weight: bold;
}

.recording-indicator.active {
  display: flex;
}

.recording-indicator .dot {
  width: 10px;
  height: 10px;
  background-color: #ff4444;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  /* Bouton RECORD plus grand et cliquable sur mobile */
  .record-button {
    width: 100px !important;
    height: 48px !important;
    min-height: 48px !important;
    font-size: 14px !important;
    padding: 12px 16px !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    position: relative !important;
    z-index: 100 !important;
    cursor: pointer !important;
  }
  
  /* Assurer que le bouton n'est pas masqué */
  .record-button:active {
    opacity: 0.7 !important;
    transform: scale(0.98) !important;
  }
  
  .stop-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  /* Timer d'enregistrement */
  .recording-timer {
    font-size: 16px !important;
    min-width: 50px !important;
  }
  
  /* ========================================
     RESPONSIVE - AUDIO PLAYER CONTAINER
     ======================================== */
  
  /* Conteneur principal sur mobile - LISTE DES ENREGISTREMENTS */
  .audio-player-container {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    padding: 8px !important;
  }
  
  /* Nom du fichier sur mobile - pleine largeur */
  .audio-player-container .audio-file-name-display {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 4px !important;
  }
  
  /* Lecteur audio sur mobile - PLEINE LARGEUR */
  .audio-player-container .audio-player,
  .audio-player-container audio {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Container audio list plus compact - AFFICHER TOUS LES FICHIERS */
  .audio-list-container {
    padding: 10px !important;
    margin: 10px 0 !important;
    display: block !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }
  
  /* S'assurer que TOUS les enfants sont visibles */
  .audio-list-container > * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .audio-list-container .audio-player-container {
    padding: 6px 0 !important;
    border-bottom: 1px solid #eee !important;
    display: flex !important;
    visibility: visible !important;
  }
  
  /* Conteneur input + audio sur mobile */
  .input-audio-container {
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    width: 100% !important;
  }
  
  /* Champ de texte sur mobile */
  .audio-rename-input {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    font-size: 10px;
  }
  
  /* Lecteur audio sur mobile */
  .audio-player {
    min-width: 120px !important;
    height: 35px !important;
  }
  
  /* Boutons d'action sur mobile */
  .action-buttons {
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .button {
    font-size: 10px;
    padding: 4px 8px;
  }
}

/* ========================================
   FIN SECTION AUDIO PLAYER CONTAINER
   ======================================== */

.record-button i {
  font-size: 24px;
}

.stop-button i {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.recording-progress {
  width: 200px;
  height: 4px;
  background-color: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background-color: #ff4444;
  transition: width 0.1s linear;
}

@media (max-width: 768px) {
  .recording-timer {
    font-size: 20px;
  }

  .recording-progress {
    width: 150px;
  }
}

.sort-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.sort-arrow {
  font-size: 10px;
  color: var(--gray-color);
  transition: color 0.2s ease;
}

.sort-arrow:hover {
  color: var(--dark-color);
}

.sort-arrow.active {
  color: var(--primary-color);
}

/* Pour les écrans mobiles */
@media (max-width: 768px) {
  .sort-arrows {
    display: none;
  }
  .file-date {
    width: auto;
  }
}

/* Pour les écrans mobiles */
@media (max-width: 768px) {
  .file-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 8px;
    max-width: 100%;
    gap: 4px;
    margin-bottom: 6px;
  }
  
  /* Preview audio pleine largeur mobile */
  #audioPreviewContainer,
  #audioPreviewContainer audio {
    width: 100% !important;
  }
}

#fileContainer .file-card,
#fileContainer .file-date,
#fileContainer .file-title,
#fileContainer .file-audio {
  font-family: "DIN", Arial, sans-serif;
  font-size: 10pt;
  letter-spacing: -0.2px;
  color: #6f6f6f;
}

#fileContainer .file-card {
  background: #fff;
  box-shadow: 0 2px 4px var(--shadow-color);
}
#fileContainer .file-date {
  color: #6f6f6f;
  font-weight: 400;
  font-size: 12px;
}
#fileContainer .file-title {
  color: #222;
  font-weight: bold;
}

.date-today {
  color: #28a745 !important;
  font-weight: bold !important;
}

#titleInput,
.form-input#titleInput,
input[type="text"]#titleInput {
  text-align: left !important;
}

/* Style pour le calendrier flatpickr en 12px */
.flatpickr-calendar,
.flatpickr-calendar * {
  font-family: "Franklin", Arial, sans-serif !important;
  font-size: 12px !important;
  letter-spacing: -0.2px !important;
}

.record-button {
  font-family: "DinBold", "Inter_28pt", Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: -0.2px;
  background-color: #ff4444;
  color: var(--white-color);
  border: none;
  border-radius: 0;
  padding: var(--spacing-xs) var(--spacing-sm);
  margin: var(--spacing-xs);
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
  min-width: 120px;
  width: 80px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: background-color var(--transition-speed);
}

#stopButton.stop-button {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}
.record-button:hover {
  background-color: #c9302c;
  color: #fff;
}

#stopButton.stop-button:hover {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Suppression du highlight sur les champs date et titre mais conservation du fond gris */
#titleInput:focus,
#titleInput:active,
input[type="date"]:focus,
input[type="date"]:active,
.custom-date-group:focus-within,
.custom-date-input:focus,
.custom-date-input:active {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.input-titre {
  text-align: left !important;
  font-family: "Franklin", Arial, sans-serif !important;
  font-size: 19px !important;
  letter-spacing: -0.2px !important;
  font-weight: 500 !important;
}
.input-date {
  text-align: center !important;
}

/* Forçage absolu des styles pour les champs titre et date */
input.input-titre,
.form-input.input-titre,
#titleInput.input-titre {
  text-align: left !important;
  font-family: "Franklin", Arial, sans-serif !important;
  font-size: 14px !important;
  letter-spacing: -0.2px !important;
  font-weight: 500 !important;
}
input.input-date,
.form-input.input-date,
#dateInput.input-date {
  text-align: center !important;
}

/* SUPPRESSION de la règle qui annule le gras sur la date du jour */
/* .file-table-index td:first-child, .file-date {
    font-weight: normal !important;
} */

.file-table-index td.date-today,
.file-table-index td.date-today * {
  color: #28a745 !important;
  font-weight: 500 !important;
  font-size: 13px;
}

.edit-btn {
  margin-right: 0px !important;
}

.file-actions .download-button {
  margin-right: 5px !important;
}

body.admin-page .file-table-index td:last-child {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 80px !important;
  max-width: 90px !important;
  background: transparent !important;
  border-left: none !important;
}

.file-table-index td:last-child > button {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  margin: 0 0 0 7px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
  vertical-align: middle !important;
  line-height: 1 !important;
  font-size: 18px !important;
}

.file-table-index td:last-child > button.edit-btn {
  background: #007bff !important;
  border: 1px solid #007bff !important;
}

.file-table-index td:last-child > button.danger {
  background: #dc3545 !important;
  border: 1px solid #dc3545 !important;
}

.file-table-index tr {
  height: 40px !important;
}

body.admin-page .audio-player-small {
  width: 400px !important;
  min-width: 400px !important;
}

body.admin-page .file-table-index {
  table-layout: fixed !important;
  width: fit-content !important;
  min-width: unset !important;
  max-width: unset !important;
}
body.admin-page main {
  overflow-x: auto !important;
}
body.admin-page .file-table-index th:nth-child(3),
body.admin-page .file-table-index td:nth-child(3) {
  width: 400px !important;
  min-width: 400px !important;
  max-width: 400px !important;
  box-sizing: border-box !important;
  padding: 0 !important;
}
body.admin-page .audio-player-small {
  width: 400px !important;
  min-width: 400px !important;
  max-width: 400px !important;
  box-sizing: border-box !important;
}
body.admin-page .file-table-index td:nth-child(3) {
  text-align: left !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  width: 400px !important;
  min-width: 400px !important;
  max-width: 400px !important;
}
body.admin-page .file-table-index td:nth-child(3) audio.audio-player-small {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
}
body.admin-page .audio-player-small {
  margin-left: 0 !important;
  display: block !important;
}

/* =====================
   ADMIN TABLE FLEXIBLE
   ===================== */
body.admin-page .file-table-index {
  width: 100%;
  border-collapse: separate;
  table-layout: fixed;
}
/* Largeurs faciles à éditer */
body.admin-page .file-table-index th:nth-child(1),
body.admin-page .file-table-index td:nth-child(1) {
  width: 10%;
  min-width: 80px;
}
body.admin-page .file-table-index th:nth-child(2),
body.admin-page .file-table-index td:nth-child(2) {
  width: 40%;
}
body.admin-page .file-table-index th:nth-child(3),
body.admin-page .file-table-index td:nth-child(3) {
  width: 35%;
}
body.admin-page .file-table-index th:nth-child(4),
body.admin-page .file-table-index td:nth-child(4) {
  width: 15%;
  min-width: 90px;
}

/* Audio player prend toute la colonne */
body.admin-page .audio-player-small {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: block;
  margin: 0;
  box-sizing: border-box;
}
body.admin-page .file-table-index td:nth-child(3) {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  text-align: left !important;
}

/* Actions alignées à droite, boutons carrés */
body.admin-page .file-table-index td:last-child {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  padding: 0 !important;
  min-width: 90px;
  max-width: 120px;
  background: transparent;
  border-left: none;
}
body.admin-page .file-table-index td:last-child > button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  margin: 0 0 0 7px;
  padding: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  vertical-align: middle;
  line-height: 1;
  font-size: 18px;
}
/* =====================
   FIN ADMIN TABLE FLEXIBLE
   ===================== */

/* =====================
   ADMIN FLEX LISTE
   ===================== */
body.admin-page .file-list-flex {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 20px;
  background: #fff;
  box-shadow: 0 2px 4px var(--shadow-color);
  border-radius: 0 0 8px 8px;
}
body.admin-page .file-list-header-flex {
  display: flex;
  width: 100%;
  font-family: "Franklin", Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  background: #f4f4f4;
  color: #343a40;
  border-bottom: 1px solid #dee2e6;
  padding: 0 0 0 0;
}
body.admin-page .file-row-flex {
  display: flex;
  width: 100%;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid #eee;
  background: #fff;
  transition: background 0.2s;
}
body.admin-page .file-row-flex:hover {
  background: #f9f9f9;
}
/* Largeurs faciles à éditer */
body.admin-page .file-col.date {
  font-family: Inter, Arial, sans-serif !important;
  font-size: 9pt !important;
  font-weight: 600;
  color: #4c4c4c;
  letter-spacing: -0.45px;
  flex: 0 0 10%;
  min-width: 80px;
  padding: 0 8px;
}
body.admin-page .file-col.date.date-today {
  color: #28a745 !important;
  font-weight: bold !important;
}
body.admin-page .file-col.titre,
.file-title {
  font-family: "Inter", sans-serif !important;
  font-size: 10pt !important;
  font-weight: 640;
  color: #4b4b4b;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 8px;
  letter-spacing: -0.35px;
  white-space: normal !important;
  overflow: visible !important;
}
body.admin-page .file-col.audio {
  flex: 1 1 0;
}

body.admin-page .file-col.audio .audio-player-small {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: block;
  margin: 0;
  box-sizing: border-box;
}
body.admin-page .file-col.actions {
  flex: 0 0 110px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
}

body.admin-page .file-col.actions > button {
  width: 35px;
  height: 35px;
  min-width: 35px;
  min-height: 35px;
  max-width: 35px;
  max-height: 35px;
  padding: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  vertical-align: middle;
  line-height: 1;
  font-size: 18px;
}
body.admin-page .file-col.actions > button:first-child {
  margin-left: 0;
}
/* =====================
   FIN ADMIN FLEX LISTE
   ===================== */

/* === Preview audio sous le formulaire admin (retour au style natif) === */
#audioPreviewContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  width: 100%;
  padding: 0 !important;
}

/* Suppression de toute customisation sur le lecteur audio de la preview */
/*
#audioPreviewContainer audio,
#audioPreviewContainer .audio-player-small {
    display: block !important;
    width: 100% !important;
    min-width: 120px !important;
    max-width: 100% !important;
    min-height: 24px !important;
    height: 32px !important;
    background: #fff !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
    margin: 0 auto !important;
}

#audioPreviewContainer audio::-webkit-media-controls-timeline {
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    border-radius: 9px !important;
    background: #e0e0e0 !important;
}

#audioPreviewContainer audio::-webkit-media-controls-play-button {
    transform: scale(1.2);
}
*/

.file-title,
.file-date {
  font-family: "DIN", Arial, sans-serif !important;
}

@font-face {
  font-family: "Inter_28pt";
  src: url("/static/fonts/Inter_28pt-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Inter_28pt-Medium";
  src: url("/static/fonts/Inter_28pt-Medium.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Franklin";
  src: url("/static/fonts/Franklin.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@keyframes blink-fade {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
  100% {
    opacity: 1;
  }
}

.recording-timer.blinking {
  animation: blink-fade 1.2s infinite;
}

.recording-indicator.active {
  animation: blink-fade 1.2s infinite;
}

/* =====================
   ADMIN MOBILE RESPONSIVE
   ===================== */
@media screen and (max-width: 600px) {
  body.admin-page .container {
    padding: 0 2vw;
    max-width: 100vw;
  }
  header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 0 10px 0 !important;
  }
  header img {
    height: 32px;
    /* margin-bottom: 8px;*/
  }
  .title,
  .right {
    font-size: 18px;
    margin: 0;
    text-align: left;
  }
  .navbar {
    flex-direction: column;
    gap: 8px !important;
    margin-bottom: 12px;
  }
  .navbar .button:first-child {
    display: none !important;
  }
  .navbar .button {
    width: 100%;
    font-size: 16px;
    padding: 12px 0;
  }
  .upload-form {
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
  }
  .upload-form .form-group {
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    margin-bottom: 12px;
    gap: 0 !important;
    align-items: stretch !important;
  }
  .upload-form label,
  .form-label {
    font-size: 15px;
    margin-bottom: 4px;
  }
  .upload-form input,
  .upload-form .form-input,
  .upload-form .input-titre,
  .upload-form .custom-date-input {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    font-size: 16px;
    padding: 10px;
    margin-bottom: 8px;
  }
  #descriptionInput,
  .ql-container,
  .ql-editor {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    font-size: 15px !important;
    font-family: DIN !important;
  }
  .form-group[style*="display: flex"] {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
  }
  #audioPreviewContainer {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    margin: 12px 0 0 0 !important;
    justify-content: flex-start !important;
  }
  .recording-timer {
    font-size: 18px !important;
    margin: 0 auto !important;
    display: block !important;
    text-align: center !important;
  }
  .upload-form button,
  .upload-form .button {
    width: 100%;
    min-width: 0;
    font-size: 16px;
    margin: 8px 0 0 0;
    padding: 12px 0;
  }
  .file-list-flex {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin-top: 10px !important;
    gap: 10px !important;
  }
  .file-row-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 10px 0 !important;
    gap: 6px !important;
    border-bottom: 1px solid #eee !important;
    background: #fff !important;
  }
  .file-col {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    padding: 0 !important;
    font-size: 15px !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }
  .file-col.audio .audio-player-small {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    margin: 0 !important;
  }
  .file-col.actions {
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin-top: 6px !important;
  }
  .file-col.actions > button {
    width: 44px !important;
    height: 44px !important;
    font-size: 20px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    margin: 0 6px 0 0 !important;
    padding: 0 !important;
  }
  .file-title {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    font-size: 16px !important;
    width: 100% !important;
    flex: 1 1 0 !important;
    margin-bottom: 2px !important;
  }
  .file-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 8px 0 !important;
    margin-bottom: 4px !important;
  }
  .file-audio {
    width: 100% !important;
    margin: 0 !important;
  }
  .audio-player-small {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  /* Lecteur audio de preview - pleine largeur mobile */
  #audioPreviewContainer {
    width: 100% !important;
    display: block !important;
  }
  #audioPreviewContainer audio {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Réduire les actions dans les cartes */
  .file-actions {
    gap: 6px !important;
    margin-top: 4px !important;
  }
}
/* =====================
   FIN ADMIN MOBILE RESPONSIVE
   ===================== */

.search-group {
  margin-bottom: 0;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding-right: 0 !important;
  display: flex;
  align-items: center;
  position: relative;
}

@media screen and (max-width: 600px) {
  .search-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-bottom: 16px !important;
    padding: 0 !important;
  }
  .search-group label {
    font-size: 15px !important;
    margin-bottom: 2px !important;
    min-width: 0 !important;
    width: 100% !important;
    text-align: left !important;
  }
  .search-group input[type="text"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    font-size: 16px !important;
    padding: 10px !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
  }
  .search-group button#clearSearchBtn {
    position: absolute;
    right: 12px;
    top: 36px;
    font-size: 22px;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    z-index: 2;
  }
  .file-list-flex {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin-top: 10px !important;
    gap: 10px !important;
  }
  .file-row-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 10px 0 !important;
    gap: 6px !important;
    border-bottom: 1px solid #eee !important;
    background: #fff !important;
  }
  .file-col {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    padding: 0 !important;
    font-size: 15px !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }
  .file-col.audio .audio-player-small {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    margin: 0 !important;
  }
  .file-col.actions {
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin-top: 6px !important;
  }
  .file-col.actions > button {
    width: 35px !important;
    height: 35px !important;
    font-size: 20px !important;
    min-width: 35px !important;
    min-height: 35px !important;
    max-width: 35px !important;
    max-height: 35px !important;
    padding: 0 !important;
  }
  .file-title {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    font-size: 16px !important;
    width: 100% !important;
    flex: 1 1 0 !important;
    margin-bottom: 2px !important;
  }
}

@media screen and (max-width: 600px) {
  #titleInput,
  .input-titre,
  input[type="text"].input-titre {
    border: none !important;
    box-shadow: none !important;
  }
}

@media screen and (max-width: 600px) {
  .upload-form > div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 0 !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
  }
  .custom-date-group,
  .form-group {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    margin-bottom: 8px !important;
  }
  .custom-date-group {
    margin-bottom: 8px !important;
  }
  .form-group[style*="width: 950px"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    margin-bottom: 0 !important;
  }
}

@media screen and (max-width: 600px) {
  label.custom-upload {
    display: none !important;
  }
}

@media screen and (max-width: 600px) {
  /* Indicateur d'enregistrement - caché par défaut, visible SEULEMENT avec .active */
  .recording-indicator {
    display: none !important;
  }
  .recording-indicator.active {
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
  }
}

@media screen and (max-width: 600px) {
  .icon-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    padding: 0 !important;
    font-size: 0 !important; /* masque texte */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .icon-btn i {
    font-size: 20px !important;
  }
  .file-actions .icon-btn {
    margin: 0 4px !important;
  }
}

/* ==== Forcer FontAwesome sur les icônes bouton ==== */
.icon-btn i {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

/* ==== Classe bio-text avec police Inter ==== */
.bio-text {
  font-family: 'Inter', sans-serif !important;
  font-weight: 400;
  line-height: 1.5;
}

/* =====================================================
   SECTION ALERTES SMS
   ===================================================== */
.sms-alert-section {
  display: flex;
  justify-content: flex-start;
  padding: 15px 0px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid var(--border-color);
}

/* Bouton SMS style Studio */
.sms-alert-button {
  background: #5283ec;
  color: #f8f9fa;
  border: none;
  font-size: .8rem;
  font-family: DIN, DIN Alternate, Arial Narrow, Arial, sans-serif;
  font-weight: 600;
  padding: 4px 18px;
  cursor: pointer;
  letter-spacing: 0;
  transition: background .2s;
  box-shadow: 0 1px 4px #0000000a;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 0;
}

.sms-alert-button:hover {
  background: #4070d0;
}

.sms-alert-button i {
  display: none;
}

/* Panneau latéral SMS */
.sms-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sms-panel.open {
  right: 0;
}

.sms-panel-header {
  background: #2E4372;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sms-panel-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: white;
  background: none;
  margin: 0;
  padding: 0;
}

.sms-panel-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.sms-panel-close:hover {
  opacity: 1;
}

.sms-panel-content {
  padding: 30px 25px;
  flex: 1;
}

.sms-panel-content p {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.5;
}

.sms-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sms-form label {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.sms-form input[type="tel"] {
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sms-form input[type="tel"]:focus {
  outline: none;
  border-color: #2E4372;
  box-shadow: 0 0 0 3px rgba(46, 67, 114, 0.1);
}

.sms-submit-btn {
  padding: 14px 24px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.sms-submit-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
}

.sms-message {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.sms-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Overlay sombre */
.sms-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.sms-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Responsive mobile */
@media (max-width: 600px) {
  .sms-alert-section {
    padding: 12px 15px;
  }
  
  .sms-alert-button {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 14px 20px;
  }
  
  .sms-panel {
    width: 100%;
    right: -100%;
  }
  
  .sms-panel-content {
    padding: 25px 20px;
  }
}

/* FORCE FONT DIN SUR QUILL EDITOR - TOUS ÉCRANS */
.ql-editor,
.ql-editor *,
.ql-container,
.ql-container * {
  font-family: "DIN", "DinBold", Arial, sans-serif !important;
}
