/* Page de visualisation d'un Titre - Style Moderne & Aéré */

.view-titre-container {
    max-width: 950px; /* Un peu plus large pour respirer */
    margin: 30px auto;
    padding: 40px;
    background: linear-gradient(145deg, #38444d 0%, #2c363d 100%);
    color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    text-align: left;
    border: 1px solid #5a6a73;
}

.view-titre-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 768px) {
    .view-titre-main {
        flex-direction: row;
        align-items: stretch;
    }
}

/* --- Colonne Gauche --- */
.view-titre-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    width: 100%;
}

@media (min-width: 768px) {
    .view-titre-left {
        width: 300px;
        position: sticky;
        top: 20px;
    }
}

.view-titre-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.view-titre-image img:hover {
    transform: scale(1.02);
}

.view-titre-upload-date {
    font-size: 0.85rem;
    color: #8da2af;
    font-style: italic;
}

/* --- Colonne Droite --- */
.view-titre-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.view-titre-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.titre-main-name {
    margin: 0;
    font-size: 2.8rem;
    color: #ffffff;
    font-family: "Cooper Black", "Caprasimo", serif;
    line-height: 1.1;
    text-shadow: 2px 3px 6px rgba(0,0,0,0.4);
}

.titre-subtitle {
    font-size: 1.2rem;
    color: #cbd5dc;
}

.badge-interprete {
    color: #ff6b6b !important;
    text-decoration: none;
    font-weight: bold;
    font-family: "Cooper Black", "Caprasimo", serif;
    transition: color 0.2s;
}

.badge-interprete:hover {
    color: #ff8787 !important;
    text-decoration: underline;
}

/* --- Badges et Specs --- */
.view-titre-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spec-chip {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0 !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

a.spec-chip:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4CAF50;
    transform: translateY(-2px);
}

.spec-chip i {
    color: #4CAF50; /* Touche de vert pour les icônes */
}

.nav-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-tag {
    background-color: transparent;
    color: #8da2af !important;
    border: 1px solid #8da2af;
    padding: 4px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.nav-tag:hover {
    background-color: #8da2af;
    color: #2c363d !important;
}

/* --- Audio Player --- */
.view-titre-player {
    width: 100%;
    margin: 5px 0;
    background: #232c32;
    padding: 15px;
    border-radius: 40px;
    box-shadow: inset 0 3px 10px rgba(0,0,0,0.5);
}

audio {
    width: 100%;
    height: 45px;
    filter: invert(90%) hue-rotate(180deg) brightness(1.2);
    outline: none;
}

/* --- Description --- */
.view-titre-description {
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.15);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #4CAF50;
}

.quote-icon {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 5px;
}

.desc-text {
    line-height: 1.6;
    color: #d1d9e0;
    font-size: 1.05rem;
}

/* --- Actions --- */
.view-titre-primary-actions {
    margin-top: 10px;
}

.btn-action-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: inherit;
    width: 100%;
}

@media (min-width: 480px) {
    .btn-action-main {
        width: auto;
    }
}

.download-btn {
    background: #4CAF50;
    color: white !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.download-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

.share-btn {
    background: #4a90e2;
    color: white !important;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.share-btn:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
}

/* --- Actions Admin --- */
.view-titre-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.admin-label {
    color: #8da2af;
    margin-right: 5px;
}

.btn-admin {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: white !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.btn-admin:hover {
    opacity: 0.8;
}

.btn-edit { background: #6c7a89; }
.btn-delete { background: #dc3545; }
.admin-visibility .icon { 
    margin: 0 !important; 
    background: #6c7a89; 
    padding: 6px 10px; 
    border-radius: 6px; 
}

/* --- Section Partage --- */
.view-titre-sharing-section {
    margin-top: 40px;
}

.sharing-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sharing-phrase {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #4a90e2;
    font-weight: normal;
    text-align: center;
}

/* Formulaire d'invitation compact */
.invitation-form-compact form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 650px;
    margin: 0 auto 25px auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
}

@media (min-width: 768px) {
    .invitation-form-compact form {
        grid-template-columns: 1fr 1fr 120px;
        align-items: end;
    }
}

.invitation-form-compact .select2-container {
    width: 100% !important;
}

.compact-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #5a6a73;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    height: 38px; /* Aligné avec Select2 et le bouton */
}

.compact-input::placeholder { color: #8da2af; }

.btn-send-invite {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-send-invite:hover { background: #ff5252; }

/* QR Code result */
.sharing-direct {
    text-align: center;
}

.sharing-result-box {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    display: inline-block;
}

.sharing-result-box img {
    max-width: 150px;
    height: auto;
}

/* --- Modale d'invitation --- */
.modal-overlay {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #f8f9fa;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    color: #333;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: #38444d;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    background: #eee;
    border-top: 1px solid #ddd;
}

/* Ajustements Quill */
.ql-toolbar.ql-snow {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background: #eee;
}
.ql-container.ql-snow {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}
