/* ======================================================= */
/* === FICHIER CSS COMPLET - MUSICOMPO (V65) ============= */
/* ======================================================= */

@import url('https://fonts.googleapis.com/css2?family=Allura&family=Cinzel:wght@400;600;700&family=Lato:wght@300;400;700&family=Open+Sans:wght@400;600&family=Montserrat:wght@300;400;600;800&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --primary: #6a11cb;
    --secondary: #2575fc;
    --delete-color: #ff3333;
    --restore-color: #2ecc71;
    --text: #ffffff;
    --bg-glass: rgba(20, 20, 40, 0.95);
    --card-bg: #23232d;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-image: url('../images/galaxy_bg.jpg'); 
    background-size: cover; background-attachment: fixed; background-color: #0a0a14;
    color: var(--text); margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-shadow: none;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif; font-weight: 600; letter-spacing: 1px; margin-top: 0;
    background: linear-gradient(135deg, #ffffff 30%, #a0a0ff 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); margin-bottom: 20px;
}

/* MENU */
nav {
    width: 100%; padding: 10px 40px; box-sizing: border-box; display: flex;
    justify-content: space-between; align-items: center;
    background: radial-gradient(circle at center, #222222 0%, #000000 100%);
    border-bottom: 1px solid #444; box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    position: fixed; top: 0; left: 0; z-index: 1000; height: 90px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { height: 50px; width: auto; object-fit: contain; transition: transform 0.3s ease; }
.logo:hover img { transform: scale(1.05); }

.header-center-title {
    font-family: 'Cinzel', serif !important; font-weight: 600; color: #dddddd !important;
    letter-spacing: 3px !important; text-transform: uppercase; text-shadow: 0 2px 5px #000;
    position: absolute; left: 50%; transform: translateX(-50%);
}

.menu-links { display: flex; gap: 30px; align-items: center; }
.menu-links a, nav a:not(.logo) {
    font-family: 'Cinzel', serif; font-size: 0.85em; font-weight: 600;
    color: #888888 !important; text-transform: uppercase; text-decoration: none !important;
    letter-spacing: 2px; transition: all 0.4s ease; border: none !important;
}
.menu-links a:hover, nav a:not(.logo):hover { color: #ffffff !important; letter-spacing: 4px; text-shadow: 0 0 8px rgba(255, 255, 255, 0.6); }

.user-menu-container { position: relative; cursor: pointer; display: flex; align-items: center; gap: 10px; height: 50px; }
.avatar-circle { 
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid #666 !important;
    background: #111 !important; color: #fff !important; font-family: 'Cinzel', serif;
    box-shadow: 0 0 10px #000 !important; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2em;
}
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; background: #1a1a2e; min-width: 180px; border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); flex-direction: column; z-index: 2000; }
.user-menu-container:hover .dropdown-menu { display: flex; }
.dropdown-menu a { padding: 12px 20px; color: #ccc; font-size: 0.9em; border-bottom: 1px solid rgba(255,255,255,0.05); text-decoration: none; font-family: 'Montserrat', sans-serif; letter-spacing: 0;}
.dropdown-menu a:hover { background: var(--primary); color: white !important; letter-spacing: 0; text-shadow: none; }

/* LAYOUT */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; padding-top: 140px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.glass-panel { background: var(--bg-glass); border-radius: 15px; padding: 25px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); backdrop-filter: blur(5px); }

/* INPUTS */
input[type="text"], input[type="email"], input[type="password"], input[type="date"], textarea, select { 
    width: 100%; padding: 12px; margin-bottom: 5px; border-radius: 8px; 
    background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.2); 
    color: white; font-family: inherit; box-sizing: border-box; 
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--secondary); }
label { display: block; margin-bottom: 5px; margin-top: 15px; font-size: 0.9em; color: #aaa; }

/* STUDIO */
.recorder-container { background: #151520; padding: 20px; border-radius: 10px; border: 1px solid #333; text-align: center; margin-top: 10px; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); position: relative; }
.countdown-wrapper { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; background: rgba(0,0,0,0.3); padding: 8px 20px; border-radius: 30px; width: fit-content; margin-left: auto; margin-right: auto; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.countdown-input::-webkit-outer-spin-button, .countdown-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.countdown-input { -moz-appearance: textfield; background: transparent !important; border: none !important; border-bottom: 1px solid #555 !important; color: #00c6ff !important; width: 40px !important; text-align: center !important; font-weight: bold; font-family: monospace; font-size: 1.1em; border-radius: 0 !important; padding: 5px !important; }
.rec-controls { display: flex; justify-content: center; gap: 25px; align-items: flex-end; margin-bottom: 15px; }
.rec-wrapper { text-align: center; display: flex; flex-direction: column; align-items: center; }
.deck-label { display: block; font-size: 0.75em; color: #6a6a75; margin-top: 8px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; transition: all 0.3s ease; }
.label-replace-glow { color: #ff3333 !important; text-shadow: 0 0 10px rgba(255, 0, 0, 0.8); animation: pulseRedText 1.5s infinite alternate; }
@keyframes pulseRedText { from { text-shadow: 0 0 5px rgba(255, 0, 0, 0.5); } to { text-shadow: 0 0 15px rgba(255, 0, 0, 1); } }
.rec-btn { width: 65px; height: 65px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #444, #111); border: 3px solid #222; box-shadow: 5px 5px 10px rgba(0,0,0,0.7), -2px -2px 5px rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #555; font-size: 1.5em; transition: all 0.3s; position: relative; }
.rec-btn:active { transform: scale(0.95); }
.rec-btn.active-test { background: radial-gradient(circle at 30% 30%, #004455, #002233) !important; box-shadow: 0 0 15px #00c6ff !important; border-color: #00c6ff !important; color: #00c6ff !important; }
.rec-btn.active-stop { background: radial-gradient(circle at 30% 30%, #777, #444) !important; box-shadow: 0 0 10px rgba(120,120,120,0.5) !important; border-color: #666 !important; }
.rec-btn.blinking { animation: blinkRed 1s infinite; border-color: #ff9999; }
@keyframes blinkRed { 0% { box-shadow: 0 0 10px red; } 50% { box-shadow: 0 0 25px red; } 100% { box-shadow: 0 0 10px red; } }
.countdown-overlay { font-size: 0.8em; color: white; font-weight: 800; font-family: 'Montserrat', sans-serif; z-index: 10; }
#visualizer { width: 100%; height: 70px; background: #000; border-radius: 8px; border: 2px solid #333; margin-bottom: 10px; box-shadow: 0 0 10px rgba(106, 17, 203, 0.2); }
.level-status { font-family: monospace; font-size: 0.95em; margin-bottom: 15px; padding: 8px; border-radius: 5px; background: rgba(0,0,0,0.4); font-weight: bold; color: #888; border: 1px solid rgba(255,255,255,0.05); }
.gain-control { margin: 15px 0; display: flex; align-items: center; justify-content: center; gap: 15px; color: #a0a0ff; font-weight: bold; font-size: 0.9em; }
.gain-input-number { background: transparent !important; border: none !important; color: #ccc !important; font-family: monospace; font-size: 1.1em; width: 50px; text-align: center; -moz-appearance: textfield; }

/* PROJETS & CARDS */
.project-card { 
    background-color: var(--card-bg); border-radius: 10px; padding: 20px; 
    margin-bottom: 20px; border: 1px solid #333; position: relative; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.3); transition: all 0.3s ease;
}

/* STYLE SECTEUR SUPPRIMÉ */
.sector-deleted {
    border-left: 6px solid var(--delete-color) !important;
    background: linear-gradient(145deg, #2a1010, #1a0505) !important; 
    opacity: 0.95; position: relative;
}
.sector-deleted::after {
    content: "SUPPRIMÉ"; position: absolute; top: 10px; right: 40px;
    color: var(--delete-color); font-weight: bold; font-size: 0.8em;
    border: 1px solid var(--delete-color); padding: 2px 5px; border-radius: 4px;
}

/* LECTEUR AUDIO CORRIGÉ V65 (Retour au style sombre inversé) */
audio.audio-old { 
    width: 100%; height: 40px; border-radius: 5px; opacity: 0.9;
    filter: invert(0.9) !important; 
    outline: none;
}

.player-maquette-box { background: linear-gradient(145deg, #2a2a30, #353540); border: 1px solid #444; box-shadow: 0 5px 15px rgba(0,0,0,0.3); padding: 15px 20px; border-radius: 12px; margin-bottom: 15px; position: relative; display: flex; flex-direction: column; gap: 5px; }
.player-reference-box { background: #151515; border: 1px solid #333; padding: 15px; border-radius: 10px; margin-top: 10px; border-left: 3px solid #444; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }
.titre-wrapper { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; margin-bottom: 5px; }
.titre-style-perso { font-family: 'Allura', cursive; font-size: 35px; font-weight: 400; color: rgb(205, 172, 172); text-shadow: 2px 2px 6px rgb(172, 139, 139); line-height: 1.1; word-break: break-word; }
.infos-style-perso { font-family: 'Open Sans', sans-serif; font-size: 13px; font-weight: 600; color: rgb(99, 104, 131); text-shadow: none; }
.icon-lyrics-only { font-size: 1.5em; cursor: pointer; opacity: 0.8; transition: transform 0.2s, opacity 0.2s; text-shadow: 0 0 10px rgba(255,255,255,0.3); margin-left: 15px; text-decoration: none; }
.icon-lyrics-only:hover { transform: scale(1.2); opacity: 1; }
.player-row-old { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; margin-top: 5px; }
.btn-download-old { width: 40px; height: 40px; background: linear-gradient(to bottom, #3a3a40, #222); border: 1px solid #111; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #ccc; box-shadow: 0 2px 5px rgba(0,0,0,0.5); cursor: pointer; text-decoration: none; font-size: 1.2em; }
.meta-row-old { display: flex; justify-content: space-between; width: 100%; margin-top: 5px; }

/* Historique */
.project-group { margin-bottom: 15px; border-radius: 10px; background: rgba(0,0,0,0.2); overflow: hidden; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s; }
.group-header { padding: 12px 15px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.05); transition: background 0.2s; }
.group-header:hover { background: rgba(255,255,255,0.1); }
.group-header strong { font-family: 'Lato', sans-serif !important; font-weight: 400 !important; font-size: 1.1em !important; color: #e6e6ff !important; text-shadow: none !important; }
.group-content { display: none; padding: 15px; border-top: 1px solid rgba(255,255,255,0.05); }
.open .group-content { display: block; }
.arrow { display: inline-block; margin-right: 10px; font-size: 0.8em; transition: transform 0.3s; color: var(--secondary); }
.open .arrow { transform: rotate(90deg); }
.badge-lock { color: #ff3333; font-size: 1.2em; text-shadow: 0 0 5px rgba(255,0,0,0.5); margin-right: 5px; cursor: pointer; }
.viz-wrapper { width: 50px; height: 20px; display: flex; align-items: center; justify-content: flex-end; margin-left: 10px; }
.mini-viz { width: 100%; height: 100%; visibility: hidden; border-radius: 2px; }
.group-header.playing .mini-viz { visibility: visible; }
.group-deleted { border-left: 4px solid var(--delete-color) !important; background: rgba(50, 10, 10, 0.4) !important; }

/* BOUTONS GENERAUX */
.deck-btn { background: linear-gradient(180deg, #3a3a40 0%, #25252a 100%); border: 1px solid #111; border-top: 1px solid rgba(255,255,255,0.15); border-bottom: 2px solid #000; color: #ddd; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-size: 0.8em; font-weight: 700; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; font-family: 'Montserrat', sans-serif; }
.deck-btn-small { padding: 5px 10px; font-size: 0.7em; height: 30px; }
.deck-btn-primary { background: linear-gradient(180deg, #34495e 0%, #2c3e50 100%); color: #00c6ff; width: 100%; height: 50px; font-size: 1em; border:none; }
.btn-reply { background: #23232d !important; border: 1px solid #444 !important; color: #ddd !important; margin-top: 15px; width: auto; display: inline-flex; align-items: center; padding: 8px 15px; box-shadow: none; cursor: pointer; font-size: 0.8em; font-weight: bold; border-radius: 4px; text-transform: uppercase; }
.btn-reply:hover { background: #333 !important; }
.hidden-content { display: none; margin-left: 30px; margin-top: 10px; padding: 15px; background: rgba(0,0,0,0.5); border-radius: 8px; font-size: 0.9em; line-height: 1.5; color: #ddd; border-left: 3px solid var(--secondary); }
.toggle-arrow { transition: transform 0.3s; display: inline-block; cursor: pointer; color: var(--secondary); margin-right: 10px; font-size: 1.2em; }
.toggle-arrow.rotated { transform: rotate(90deg); color: var(--primary); }
.custom-file-wrapper { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.05); padding: 8px; border-radius: 8px; }

/* MODALES */
#helpModal, #lyricsModal, #replyModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 3000; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-content, .lyrics-box { background: #1a1a2e; padding: 30px; border-radius: 15px; max-width: 600px; width: 90%; position: relative; border: 1px solid var(--primary); color:white; max-height:80vh; overflow-y:auto; box-shadow: 0 0 30px rgba(106, 17, 203, 0.3); }
.close-btn-modal { position: absolute; top: 10px; right: 15px; cursor: pointer; color: #ff4b4b; font-size: 2em; line-height: 0.5; }
.modal-toolbar { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 15px; }
.tool-btn { background: #333; border: 1px solid #555; color: #ccc; padding: 8px 12px; border-radius: 5px; cursor: pointer; font-size: 0.9em; display: flex; align-items: center; gap: 5px; }
.tool-btn:hover { background: #00c6ff; color: #000; border-color: #00c6ff; }
.back-admin-btn { position: fixed; top: 20px; right: 20px; background: #ff4b4b; color: white; padding: 10px 20px; border-radius: 30px; font-weight: bold; text-decoration: none; z-index: 9999; border: 2px solid white; animation: pulse 2s infinite; box-shadow: 0 0 15px rgba(255, 75, 75, 0.5); }
.error-message-inline { color: #ff4b4b; background: rgba(255, 75, 75, 0.15); border: 1px solid #ff4b4b; padding: 12px; margin-top: 15px; border-radius: 10px; text-align: center; font-weight: bold; font-size: 0.9em; animation: fadeIn 0.5s ease-in-out; box-shadow: 0 4px 10px rgba(255, 75, 75, 0.2); }
.custom-confirm-box { position: absolute; bottom: 95px; left: 50%; transform: translateX(-50%); background: rgba(30, 30, 40, 0.98); border: 1px solid #ff3333; padding: 15px; border-radius: 12px; z-index: 2000; text-align: center; width: 280px; box-shadow: 0 5px 20px rgba(0,0,0,0.8); display: none; animation: fadeIn 0.2s ease-out; }
.confirm-text { color: #ddd; font-size: 0.9em; margin-bottom: 10px; line-height: 1.4; font-weight: 600; }
.confirm-checkbox { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.8em; color: #888; margin-bottom: 15px; cursor: pointer; }
.confirm-buttons { display: flex; gap: 10px; justify-content: center; }
.btn-confirm-yes { background: #00c6ff; color: #000; border: none; padding: 6px 15px; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 0.85em; }
.btn-confirm-no { background: #444; color: #fff; border: 1px solid #666; padding: 6px 15px; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 0.85em; }

/* MENUS ADMIN */
.admin-actions-menu { position: relative; display: inline-block; margin-left: 10px; vertical-align: middle; z-index: 500; }
.dots-btn { background: transparent; border: none; color: #888; font-size: 1.2em; cursor: pointer; padding: 0 5px; font-weight: bold; transition: color 0.2s; }
.dots-btn:hover { color: white; }
.admin-dropdown { display: none; position: absolute; right: 0; top: 100%; background: #222; border: 1px solid #444; border-radius: 5px; min-width: 140px; box-shadow: 0 5px 15px rgba(0,0,0,0.8); overflow: hidden; z-index: 2000; }
.admin-dropdown.show { display: block; animation: fadeIn 0.2s; }
.admin-dropdown button { display: block; width: 100%; text-align: left; padding: 10px 15px; background: transparent; border: none; color: #ccc; cursor: pointer; font-size: 0.85em; font-family: 'Montserrat', sans-serif; border-bottom: 1px solid #333; transition: background 0.2s; }
.admin-dropdown button:hover { background: var(--primary); color: white; }
.admin-dropdown button:last-child { border-bottom: none; }
.item-trashed { opacity: 0.5; filter: grayscale(0.8); border: 1px dashed #555; background: rgba(0,0,0,0.3); }

/* BOUTONS SECTEUR */
.btn-delete-sector { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #ff3333; color: #ff3333; font-weight: bold; font-size: 14px; cursor: pointer; background: rgba(50, 0, 0, 0.5); line-height: 1; transition: all 0.3s; position: absolute; top: 10px; right: 10px; z-index: 200; }
.group-header .btn-delete-sector { position: relative; top: auto; right: auto; margin-left: 15px; }
.btn-delete-sector:hover { background: #ff3333; color: white; transform: scale(1.1); box-shadow: 0 0 10px #ff3333; }
.btn-restore-sector { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--restore-color); color: var(--restore-color); font-weight: bold; font-size: 14px; cursor: pointer; background: rgba(0, 50, 0, 0.5); line-height: 1; transition: all 0.3s; position: absolute; top: 10px; right: 10px; z-index: 200; }
.group-header .btn-restore-sector { position: relative; top: auto; right: auto; margin-left: 15px; }
.btn-restore-sector:hover { background: var(--restore-color); color: black; transform: scale(1.1); box-shadow: 0 0 10px var(--restore-color); }

/* SIDEBAR ADMIN */
.client-item { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.client-info { flex: 1; min-width: 0; margin-right: 10px; }
.client-name { font-weight: bold; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-email { font-size: 0.8em; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-view { flex-shrink: 0; background: #00c6ff; color: #000; padding: 6px 12px; border-radius: 4px; text-decoration: none; font-size: 0.8em; font-weight: bold; }
.admin-send-box { background: rgba(20, 20, 30, 0.9); border: 1px solid var(--primary); border-radius: 10px; padding: 20px; height: fit-content; box-shadow: 0 0 20px rgba(106, 17, 203, 0.2); }
.admin-send-box h3 { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; margin-bottom: 15px; font-size: 1.1em; color: #fff; text-shadow: none; }
.row-deleted { background: rgba(255, 0, 0, 0.1) !important; }
.row-deleted td { color: #888; }
.row-deleted strong { text-decoration: line-through; color: #ff6666; }

@media (max-width: 768px) {
    .container { grid-template-columns: 1fr; padding-top: 160px; }
    .header-center-title { display: none; }
    nav { flex-direction: column; padding: 15px; height: auto; }
    .menu-links { margin-top: 15px; flex-wrap: wrap; justify-content: center; }
}