/* /css/style-connect.css */
/*
Feuille de Style pour Ibiza 1 Connect - Basée sur style-standard.css
Version: 1.4 (Ajout style lien AI.biza)
Direction Artistique: Thème Connect (Orange/Blanc/Gris)
*/

/* ------------------------------------------------------------------
   1. Variables et Styles de Base (Root)
-------------------------------------------------------------------*/

:root {
    /* Palette de couleurs - MODIFIÉE POUR CONNECT */
    --color-brand: #F65002; /* Orange pour Connect (remplace le jaune) */
    --color-primary: #0d6efd; /* Bleu Bootstrap standard */
    --color-secondary: #6c757d; /* Gris pour les actions secondaires */
    --color-success: #198754;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #0dcaf0;
    --color-dark: #212529;
    --color-light: #f8f9fa; /* Fond principal de la page */
    --color-white: #ffffff;
    --color-text: #212529; /* Couleur de texte par défaut */
    --color-text-muted: #6c757d; /* Texte secondaire, légendes */
    --color-border: #dee2e6; /* Bordures légères */

    /* Couleurs des marques */
    --color-social-instagram: #E4405F;
    --color-social-facebook: #1877F2;
    --color-social-x: #000000;
    /* --- AJOUT COULEURS SPOTIFY/DEEZER --- */
    --color-social-spotify: #1DB954; /* Vert Spotify */
    --color-social-deezer: #A900FF; /* Violet Deezer */
    
    /* NOUVEAU : Couleur AI.biza */
    --color-aibiza-yellow: #EFFF02;

    /* Typographie */
    --font-family-base: 'Poppins', sans-serif;

    /* Rayon des bordures (pour un look arrondi) */
    --border-radius-base: 0.75rem; /* Rayon assez prononcé pour un style doux */
    --border-radius-sm: 0.5rem;   /* Rayon plus petit pour les petits éléments */

    /* Ombres portées (subtiles) */
    --box-shadow-base: 0 4px 15px rgba(0, 0, 0, 0.07);
}


/* ------------------------------------------------------------------
   2. Styles Généraux du Corps de la Page
-------------------------------------------------------------------*/

body {
    font-family: var(--font-family-base);
    background-color: var(--color-light);
    color: var(--color-text);
}

main.p-4 {
    background-color: var(--color-light);
    padding-top: 2rem !important;
}


/* ------------------------------------------------------------------
   3. Typographie
-------------------------------------------------------------------*/

h1, h2, h3, h4, h5, h6 {
    font-weight: 500; /* Graisse réduite pour un look plus léger */
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--color-dark);
    text-decoration: underline;
}


/* ------------------------------------------------------------------
   4. Cartes (Cards)
-------------------------------------------------------------------*/

.card {
    border: none;
    border-radius: var(--border-radius-base);
    box-shadow: var(--box-shadow-base);
    background-color: var(--color-white);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1.25rem; /* Padding vertical par défaut */
    border-top-left-radius: var(--border-radius-base);
    border-top-right-radius: var(--border-radius-base);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h5, .card-header h6 {
    font-weight: 500;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Styles pour les en-têtes colorés */
.card-header-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-bottom: none;
}
/* ... autres card-header Bootstrap (secondary, dark etc si nécessaire) ... */

/* MODIFIÉ POUR CONNECT : Header "brand" utilise la couleur orange */
.card-header-brand {
    background-color: var(--color-brand);
    color: var(--color-white); /* Texte blanc pour meilleur contraste sur orange */
    border-bottom: none;
}
/* NOUVEAU (Instruction n°1) : Classe utilitaire pour la modale */
.bg-brand {
    background-color: var(--color-brand) !important;
}
.border-brand {
    border-color: var(--color-brand) !important;
}
/* --- FIN AJOUT --- */


/* --- AJOUT STYLES HEADERS SPOTIFY/DEEZER --- */
/* Ces classes sont à utiliser sur un div HORS .card-header standard */
.card-header-spotify {
    background-color: var(--color-social-spotify);
    color: var(--color-white);
    padding: 0.75rem 1.25rem;
    border-top-left-radius: var(--border-radius-base); /* Arrondi */
    border-top-right-radius: var(--border-radius-base);/* Arrondi */
    /* Pas de border-bottom car appliqué sur un div séparé */
}
.card-header-deezer {
    background-color: var(--color-social-deezer);
    color: var(--color-white);
    padding: 0.75rem 1.25rem;
    border-top-left-radius: var(--border-radius-base); /* Arrondi */
    border-top-right-radius: var(--border-radius-base);/* Arrondi */
}
/* Assurer la couleur des icônes dans ces nouveaux headers */
.card-header-spotify i,
.card-header-deezer i {
    color: var(--color-white);
}
/* --- FIN AJOUT SPOTIFY/DEEZER --- */


.card-header-instagram { /* Gardé pour compatibilité AIBiza si besoin */
    background-color: var(--color-social-instagram);
    color: var(--color-white);
    border-bottom: none;
    padding: 0.4rem 1.25rem;
}
.card-header-facebook { /* Gardé pour compatibilité AIBiza si besoin */
    background-color: var(--color-social-facebook);
    color: var(--color-white);
    border-bottom: none;
    padding: 0.4rem 1.25rem;
}
.card-header-x { /* Gardé pour compatibilité AIBiza si besoin */
    background-color: var(--color-social-x);
    color: var(--color-white);
    border-bottom: none;
    padding: 0.4rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}


/* ------------------------------------------------------------------
   5. Boutons
-------------------------------------------------------------------*/

.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 400; /* Graisse réduite à "normal" */
    padding: 0.5rem 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Application de nos couleurs personnalisées aux classes de boutons Bootstrap */
.btn-primary { --bs-btn-bg: var(--color-primary); --bs-btn-border-color: var(--color-primary); --bs-btn-hover-bg: #0b5ed7; --bs-btn-hover-border-color: #0a58ca; } /* Ajusté pour bleu Bootstrap */
.btn-secondary { --bs-btn-bg: var(--color-secondary); --bs-btn-border-color: var(--color-secondary); --bs-btn-hover-bg: #5c636a; --bs-btn-hover-border-color: #565e64;}
.btn-success { --bs-btn-bg: var(--color-success); --bs-btn-border-color: var(--color-success); --bs-btn-hover-bg: #157347; --bs-btn-hover-border-color: #146c43;}
.btn-danger { --bs-btn-bg: var(--color-danger); --bs-btn-border-color: var(--color-danger); --bs-btn-hover-bg: #bb2d3b; --bs-btn-hover-border-color: #b02a37;}
.btn-warning { --bs-btn-bg: var(--color-warning); --bs-btn-border-color: var(--color-warning); --bs-btn-hover-bg: #ffca2c; --bs-btn-hover-border-color: #ffc720; color: var(--color-dark);}
.btn-info { --bs-btn-bg: var(--color-info); --bs-btn-border-color: var(--color-info); --bs-btn-hover-bg: #31d2f2; --bs-btn-hover-border-color: #25cff2;}
.btn-dark { --bs-btn-bg: var(--color-dark); --bs-btn-border-color: var(--color-dark); --bs-btn-hover-bg: #2c3034; --bs-btn-hover-border-color: #282c2f;}


.btn-outline-primary {
    --bs-btn-color: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-bg: var(--color-primary);
    --bs-btn-hover-border-color: var(--color-primary);
    --bs-btn-hover-color: var(--color-white); /* Ajout pour contraste survol */
}

.btn-outline-light {
    --bs-btn-color: var(--color-white);
    --bs-btn-border-color: var(--color-white);
    --bs-btn-hover-bg: var(--color-white);
    --bs-btn-hover-border-color: var(--color-white);
    --bs-btn-hover-color: var(--color-dark);
}


/* Styles spécifiques pour les boutons de marque/sociaux */
.btn-social-instagram {
    background-color: var(--color-social-instagram);
    color: var(--color-white);
    border-color: var(--color-social-instagram);
}
.btn-social-instagram:hover {
    background-color: #c13584;
    color: var(--color-white);
    border-color: #c13584;
}

.btn-social-facebook {
    background-color: var(--color-social-facebook);
    color: var(--color-white);
    border-color: var(--color-social-facebook);
}
.btn-social-facebook:hover {
    background-color: #166fe5;
    color: var(--color-white);
    border-color: #166fe5;
}

.btn-social-x {
    background-color: var(--color-social-x);
    color: var(--color-white);
    border-color: var(--color-social-x);
}
.btn-social-x:hover {
    background-color: #333;
    color: var(--color-white);
    border-color: #333;
}

/* Style pour le bouton de dictée pour la compatibilité JS */
.btn-dictate {
    --bs-btn-bg: var(--color-success);
    --bs-btn-border-color: var(--color-success);
    --bs-btn-hover-bg: #157347;
    --bs-btn-hover-border-color: #146c43;
    color: var(--color-white) !important;
}

.btn-dictate:hover {
    color: var(--color-white) !important;
}

/* Le JS ajoute .btn-danger pendant l'enregistrement */
.btn-dictate.btn-danger {
    --bs-btn-bg: var(--color-danger);
    --bs-btn-border-color: var(--color-danger);
    --bs-btn-hover-bg: #bb2d3b;
    --bs-btn-hover-border-color: #b02a37;
}

/* Style pour les boutons "copier" à côté des titres */
.copy-btn-inline {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    opacity: 0.6;
    transition: opacity 0.2s ease, color 0.2s ease;
    padding: 0.25rem 0.5rem;
    margin-right: 0.5rem;
}

.copy-btn-inline:hover {
    opacity: 1;
    color: var(--color-primary);
    transform: none; /* Annule l'effet de soulèvement global */
    box-shadow: none; /* Annule l'ombre globale */
}


/* ------------------------------------------------------------------
   6. Formulaires
-------------------------------------------------------------------*/

.form-control,
.form-select {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
    padding: 0.6rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Ajusté pour bleu Bootstrap */
}


/* ------------------------------------------------------------------
   7. Tableaux
-------------------------------------------------------------------*/

.table {
    border-color: var(--color-border);
}

.table thead th {
    border-bottom-width: 2px;
    font-weight: 500; /* Graisse réduite */
    color: var(--color-text);
    padding: 0.75rem 1rem; /* Padding vertical réduit */
}

.table td, .table th {
    vertical-align: middle;
    padding: 1rem;
}

.table > :not(caption) > * > * {
    border-bottom-width: 1px;
    box-shadow: none;
}

/* Style pour les en-têtes de tableau colorés */
.table .thead-primary th {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* NOUVEAU : Styles pour la Librairie Artiste (Tri) */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative; /* Pour positionner l'icône */
    padding-right: 25px !important; /* Espace pour l'icône */
}
.sort-icon {
    position: absolute;
    right: 8px; /* Aligné à droite */
    top: 50%;
    transform: translateY(-50%);
    color: #ccc; /* Icône inactive */
    font-size: 0.8em; /* Icône plus petite */
    transition: color 0.2s ease;
}
.sortable-header.sorted .sort-icon {
    color: var(--color-dark); /* Icône active */
}
.clickable-row {
    cursor: pointer;
}
/* Recréer l'effet de survol de la liste Bootstrap */
.clickable-row:hover {
    background-color: var(--bs-table-hover-bg);
    color: var(--bs-table-hover-color);
}
.clickable-row:hover .song-title,
.clickable-row:hover .song-artist-sub {
    color: var(--bs-table-hover-color);
}
/* FIN NOUVEAU - Librairie Artiste */


/* ------------------------------------------------------------------
   8. Icônes
-------------------------------------------------------------------*/

i.fa-solid,
i.fa-regular,
i.fab {
    color: var(--color-dark); /* Icônes sombres par défaut */
}

/* Icônes dans les boutons prennent la couleur du bouton */
.btn i {
    color: inherit;
}

/* Règle pour les icônes dans les headers colorés */
.card-header-primary i,
.card-header-secondary i,
.card-header-dark i,
.card-header-instagram i,
.card-header-facebook i,
.card-header-x i,
.card-header-brand i,
.card-header-spotify i, /* Ajout */
.card-header-deezer i,  /* Ajout */
.top-header i {         /* Ajout */
    color: var(--color-white); /* Icônes blanches sur fonds colorés */
}


/* ------------------------------------------------------------------
   9. Styles Header & Sidebar
-------------------------------------------------------------------*/

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    padding: 0; /* Le padding est géré par un div interne */
}

.sidebar-logo {
    max-width: 180px;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.sidebar .nav-link {
    color: #ffffff !important;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    font-weight: 600;
}

.sidebar .main-menu-link {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar .nav-item .nav {
    margin-left: 1rem;
}

.sidebar .nav-item .nav .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    font-weight: 400;
    text-transform: none;
}

/* ---- MODIFICATION POUR CONNECT ---- */
.top-header {
    background-color: var(--color-brand); /* Utilisation de la variable brand (orange) */
    border-bottom: 1px solid #dee2e6;
    min-height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 0 1.5rem;
}

/* Styles pour le logo texte dans le header */
.top-header h5 {
    font-weight: 700;
    color: var(--color-white); /* Texte blanc sur fond orange */
    display: flex; /* Pour aligner les spans */
    align-items: baseline; /* Alignement sur la ligne de base */
}

/* Style pour "CONNECT" (comme AI.) */
.logo-text-ai {
    font-size: 1.5em; /* Ajusté pour Connect */
    vertical-align: baseline;
    font-weight: 700;
    color: var(--color-white); /* Blanc */
    margin-left: 0.25rem; /* Petit espace après ibiza1 */
}

/* Style pour "ibiza1" (comme biza1) */
.logo-text-biza {
    font-size: 1.5em; /* Ajusté pour Connect */
    vertical-align: baseline;
    font-weight: 400; /* Plus léger */
    color: var(--color-white); /* Blanc */
}

/* Style pour la tagline */
.logo-text-tagline {
    font-size: 1.05em;
    font-weight: 400;
    font-style: italic;
    vertical-align: baseline;
    margin-left: 0.5rem;
    color: var(--color-white); /* Blanc */
}

/* Assurer la couleur des icônes et texte utilisateur */
.top-header #user-display,
.top-header a {
    color: var(--color-white);
}
/* ---- FIN MODIFICATION CONNECT ---- */


/* ------------------------------------------------------------------
   10. Composants Spécifiques Réutilisables (repris de standard)
-------------------------------------------------------------------*/

/* Styles pour result-item, char-count, brand-logo, metric-card, alert-item, score-circle, etc. */
/* ... (copiés depuis style-standard.css et non modifiés pour l'instant) ... */
.result-item {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    background-color: var(--color-light);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.result-item:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.result-item .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.result-item .copy-btn:hover {
    opacity: 1;
}

.result-item .result-title {
    font-size: 1em;
    font-weight: 500;
    color: var(--color-dark);
}

.result-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.char-count {
    font-size: 0.8em;
    color: var(--color-text-muted);
}

.brand-logo-col {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border-left: 1px solid var(--color-border);
}

.brand-logo-img {
    max-height: 200px;
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    display: none;
}

.metric-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

/* -- STYLES POUR LES ALERTES (POPUP) -- */
.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--color-border);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
}

.alert-item .alert-info {
    flex-grow: 1;
}

/* Classe spécifique pour le cercle des alertes */
.score-circle-alert {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* ------------------------------------------- */

/* Classe générale pour les cercles (utilisée par Tendances et Alertes) */
.score-circle {
    position: relative;
    width: 74px; /* Taille par défaut pour les tendances */
    height: 74px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.score-circle svg, .score-circle-alert svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.score-circle-bg {
    stroke: #e9ecef;
    fill: none;
    stroke-width: 6;
}

.score-circle-fg {
    fill: none;
    transition: stroke-dasharray .5s;
    stroke-width: 6;
    stroke-linecap: round;
}

.score-circle-fg.score-low { stroke: var(--color-info); }
.score-circle-fg.score-medium { stroke: var(--color-warning); }
.score-circle-fg.score-good { stroke: var(--color-success); }
.score-circle-fg.score-excellent { stroke: var(--color-danger); }

.score-number {
    font-weight: 700;
    font-size: 1.2em;
    z-index: 1;
}

/* -- AMÉLIORATION : STYLES POUR LA SECTION "SOURCES" -- */
.alert-sources {
  background-color: #f8f9fa;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  border: 1px solid #dee2e6;
}

.alert-sources summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--color-text);
}

.alert-sources ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}
/* ---------------------------------------------------- */

.trend-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-base);
    background-color: var(--color-white);
    box-shadow: var(--box-shadow-base);
}

.trend-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.trend-card-header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
}

.trend-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.trend-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.trend-card-body {
    padding: 1.25rem;
}

.trend-angle {
    color: var(--color-text-muted);
    font-style: italic;
}

.scrollable-result {
    max-height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: var(--color-light);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
}

.quota-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quota-alert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.quota-alert-modal {
    background-color: var(--color-white);
    border-radius: var(--border-radius-base);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
}

.quota-alert-overlay.show .quota-alert-modal {
    transform: scale(1);
}

.quota-alert-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.quota-alert-icon {
    width: 50px;
    height: 50px;
    background-color: var(--color-danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.quota-alert-icon i {
    color: var(--color-white);
    font-size: 1.5rem;
}

.quota-alert-title {
    font-size: 1.25rem;
    color: var(--color-primary);
}

.quota-alert-message {
    font-size: 0.95rem;
    line-height: 1.6;
}

.quota-alert-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.quota-alert-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.quota-alert-btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.quota-alert-btn-secondary:hover {
    background-color: #5a6268;
    color: var(--color-white);
}

.quota-alert-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.quota-alert-close:hover {
    background-color: var(--color-light);
    color: var(--color-dark);
}

.bm-logo-thumb {
    height: 28px;
    max-height: 28px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
}

.info-card-header {
    background-color: #f0f2f5 !important;
    border-bottom: 1px solid var(--color-border) !important;
    font-weight: 500 !important;
}

.info-card-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-card-body p strong {
    color: var(--color-primary);
}

.info-card-body code {
    background-color: #e9ecef;
    color: #c7254e;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.875em;
}

.accordion-body .card {
    border: 1px solid var(--color-border);
    box-shadow: none;
}

.prompt-content-display {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: 0.9rem;
    background-color: var(--color-light) !important;
    border-radius: var(--border-radius-sm) !important;
}

#help-nav {
    top: 80px; /* Hauteur du top-header */
    height: calc(100vh - 80px);
    overflow-y: auto;
}

#help-nav .nav-link {
    color: var(--color-text-muted);
    border-left: 3px solid transparent;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    border-radius: 0;
}

#help-nav .nav-link:hover {
    color: var(--color-dark);
    background-color: #e9ecef;
}

#help-nav .nav-link.active {
    color: var(--color-primary);
    font-weight: 500;
    border-left-color: var(--color-primary);
    background-color: #f0ebf9;
}

.help-section .list-group-item h6 {
    color: var(--color-primary);
    font-weight: 500;
}

.log-entry {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    white-space: pre-wrap;
    word-break: break-all;
    background-color: #e7f3fe; /* Default INFO color */
}

.log-card {
    border: 1px solid var(--color-border);
    border-left-width: 4px;
    border-left-color: var(--color-primary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-light);
}

.log-card-alert {
    border-left-color: var(--color-danger);
}

.reasoning, .scoring-details {
    font-size: 0.9em;
    padding: 0.5rem;
    background-color: #e9ecef;
    border-radius: var(--border-radius-sm);
    margin-top: 0.5rem;
}

.suggestion-accordion-item {
    border: 1px solid var(--color-border);
    margin-bottom: 0.5rem;
    background-color: var(--color-white);
    border-radius: var(--border-radius-sm);
}

.suggestion-accordion-item .accordion-button {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    background-color: transparent;
    color: inherit;
    box-shadow: none;
    border: none;
}

.suggestion-accordion-item .accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
}

/* ------------------------------------------------------------------
   11. NOUVEAUX STYLES POUR L'AFFICHEUR DE SLIDES (AVEC RETOUR À LA LIGNE)
-------------------------------------------------------------------*/

/* Conteneur principal qui utilise maintenant CSS Grid */
.slides-scroller {
    display: grid; /* On passe à CSS Grid */
    /* Crée autant de colonnes que possible de 280px minimum, et distribue l'espace restant */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;     /* Espace entre chaque groupe de slide */
}

/* Chaque bloc vertical (aperçu + zone de texte) */
.slide-group {
    width: 100%; /* Le groupe prend toute la largeur de la cellule de la grille */
}

/* NOUVEAU STYLE : Conteneur global de la carte Instagram */
.instagram-card {
    background-color: #fff;
    border: 1px solid #dbdbdb; /* Bordure légère */
    border-radius: 8px; /* Coins arrondis */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important pour les coins arrondis des enfants */
}

/* En-tête de la carte Instagram (profil, username, menu) */
.instagram-card .card-header {
    display: flex;
    align-items: center;
    padding: 12px 16px; /* Padding interne */
    border-bottom: 1px solid #efefef; /* Séparateur */
    width: 100%;
    box-sizing: border-box;
    background-color: #fff; /* Fond blanc */
    font-size: 0.9em;
}
.instagram-card .profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover; /* Assure que l'image remplit le cercle */
    border: 1px solid #efefef; /* Petite bordure pour le profil */
}
.instagram-card .username {
    font-weight: 600;
    flex-grow: 1; /* Prend l'espace restant */
    color: var(--color-dark);
}

/* Zone de l'image/vidéo (avec le contenu du slide par-dessus) */
.instagram-card .card-image-area {
    position: relative;
    width: 100%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); /* Dégradé Instagram */
    height: auto !important; /* Important pour les ratios */
    padding-bottom: 0 !important; /* Annule tout padding qui pourrait interférer */
}

/* Application des formats (ratios) pour l'image/vidéo */
.instagram-card.carousel-card .card-image-area {
    aspect-ratio: 1080 / 1350; /* Format 4:5 pour les carousels */
}
.instagram-card.reel-card .card-image-area {
    aspect-ratio: 1080 / 1920; /* Format 9:16 pour les reels */
}

/* Contenu textuel à l'intérieur de l'aperçu du slide */
.instagram-card .slide-content {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    box-sizing: border-box;
    overflow-y: auto; /* Permet le défilement si le texte est trop long */
}
.instagram-card .slide-preview-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    word-wrap: break-word;
}
.instagram-card .slide-preview-body {
    font-size: 0.95em;
    line-height: 1.4;
    word-wrap: break-word;
}

/* NOUVEAU STYLE : Section des actions (like, comment, share, save) */
.instagram-card .card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 1.2em; /* Taille des icônes */
    color: #262626; /* Couleur foncée des icônes */
}
.instagram-card .card-actions i {
    cursor: pointer; /* Indique que les icônes sont interactives */
    transition: transform 0.1s ease-out;
}
.instagram-card .card-actions i:hover {
    transform: scale(1.1);
}

/* NOUVEAU STYLE : Compteur de likes */
.instagram-card .card-likes {
    padding: 0 16px 8px;
    font-weight: 600;
    font-size: 0.9em;
    color: #262626;
}

/* NOUVEAU STYLE : Légende du post */
.instagram-card .card-caption {
    padding: 0 16px 10px; /* Padding ajusté */
    margin-top: auto; /* Pousse la légende vers le bas si la carte est plus grande */
    font-size: 0.9em;
    line-height: 1.4;
    color: #262626;
    word-wrap: break-word;
}
.instagram-card .card-caption .username {
    font-weight: 600;
    margin-right: 5px;
}

/* Style pour la zone de texte sous l'aperçu */
.slide-text-editor .form-label {
    font-size: 0.85rem;
    font-weight: 500;
}
.slide-text-editor .form-control[readonly] {
    background-color: #f8f9fa;
    resize: none;
}

.text-uppercase {
    text-transform: uppercase;
}

/* ------------------------------------------------------------------
12. STYLES POUR LE STUDIO VOCAL - TRANSCRIPTION
-------------------------------------------------------------------*/

.intervention-block {
  background-color: #f8f9fa;
  border-radius: var(--border-radius-sm);
  padding: 15px;
  margin-bottom: 20px;
  transition: all 0.2s ease;
  border-left: 4px solid #ccc;
}

.intervention-block:hover {
  background-color: #e9ecef;
}

.speaker-header {
  margin-bottom: 8px;
  font-size: 14px;
}

.speaker-name {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.transcription-text {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: var(--color-white);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
  min-height: 50px;
  word-wrap: break-word;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.transcription-text:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.25);
}

.transcription-text:empty:before {
  content: 'Cliquez pour éditer le texte...';
  color: #999;
  font-style: italic;
}

/* Amélioration de l'affichage des pastilles d'intervenants */
.speaker-tag {
  cursor: pointer;
  user-select: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.speaker-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  border-color: rgba(255,255,255,0.3);
}

.speaker-tag:active {
  transform: translateY(0);
}

/* Zone de gestion des intervenants améliorée */
#speaker-management {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-base);
  padding: 1.5rem;
}

#speaker-management h6 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

#speaker-list {
  min-height: 60px;
  padding: 0.75rem;
  background-color: var(--color-white);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

/* Segments de transcription sélectionnables */
.transcription-text::selection {
  background-color: rgba(111, 66, 193, 0.3);
  color: var(--color-dark);
}

.transcription-text::-moz-selection {
  background-color: rgba(111, 66, 193, 0.3);
  color: var(--color-dark);
}

/* Styles pour l'analyse de transcription */
.analysis-content {
  padding: 0;
}

.analysis-section {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background-color: var(--color-white);
  padding: 1rem;
}

.analysis-title {
  color: var(--color-dark);
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.analysis-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
}

.analysis-list {
  margin: 0;
  padding-left: 1.2rem;
}

.analysis-list li {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.suggested-angle {
  background-color: #fffbf0;
  border-left: 4px solid var(--color-warning);
  padding: 0.75rem;
  border-radius: var(--border-radius-sm);
  font-style: italic;
}

#analysis-results .alert {
  margin-bottom: 0;
  font-size: 0.9rem;
}

#analyze-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Styles pour l'export Voice Studio */
#send-to-writer-btn:not(:disabled) {
  background: linear-gradient(45deg, #198754, #20c997);
  border: none;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
}

#send-to-writer-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.alert-success {
  border-left: 4px solid #198754;
}

/* AJOUTS POUR LE STUDIO VOCAL */
.speaker-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-weight: bold;
}

.timestamp {
    font-size: 0.8em;
    color: #6c757d; /* gris neutre */
    margin-right: 10px;
    font-weight: normal;
    font-family: monospace;
}

.intervention-block {
    padding: 10px;
    border-left: 3px solid #ccc;
    margin-bottom: 1rem;
    background-color: #fff;
    transition: background-color 0.2s;
}

.intervention-block:hover {
    background-color: #f8f9fa;
}

.transcription-text {
    line-height: 1.6;
}

/*
=================================
  Styles pour le Content Studio (Wordpress Writer v2)
=================================
*/

/* Panneau d'assistant "sticky" */
.assistant-panel-sticky {
  position: sticky;
  top: 1rem; /* Espace par rapport au haut de la fenêtre */
  height: calc(100vh - 2rem); /* Hauteur max (100% - padding haut/bas) */
  overflow-y: auto; /* Ajoute un scroll si le contenu dépasse */
}

/* Amélioration de la liste de projets (inspiré du voice-studio) */
.project-list-item {
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}
.project-list-item:hover {
  background-color: #f8f9fa;
}

/* Clic sur le bouton de suppression dans la liste */
.project-list-item .delete-project-btn-list {
  opacity: 0.5;
  transition: opacity 0.2s ease-in-out;
}
.project-list-item:hover .delete-project-btn-list {
  opacity: 1;
}

/* Rendre le nom du projet éditable plus visible */
#current-project-name.form-control {
    background-color: transparent;
    transition: background-color 0.2s ease;
}
#current-project-name.form-control:hover,
#current-project-name.form-control:focus {
    background-color: #f8f9fa;
}

/* Ajouts pour le Studio Vocal */
.version-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9em;
}

.version-toggle-container .form-check-input {
    width: 3.5em;
    height: 1.75em;
}

.version-toggle-container .form-check-label {
    font-weight: 500;
    color: #6c757d;
    transition: color 0.2s ease-in-out;
}

.version-toggle-container .form-check-input:not(:checked) + .label-brute,
.version-toggle-container .form-check-input:checked + .label-brute + .label-clean {
    color: #0d6efd;
    font-weight: 700;
}


/* ------------------------------------------------------------------
   13. NOUVEAUX STYLES POUR LA PAGE DE GESTION DES ARTISTES
-------------------------------------------------------------------*/

/* Style pour les "tags" (labels, genres) dans le tableau */
.tag {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.85em;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--border-radius-sm);
    background-color: #e9ecef;
    color: var(--color-text-muted);
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

/* -- Styles pour la modale personnalisée -- */
/* NOTE: Ces styles sont repris de style-standard.css et non spécifiques à Connect */
/* La modale Bootstrap standard utilisée maintenant ne nécessite pas ces styles spécifiques */


.form-check {
    border: 2px solid transparent;
    padding: 1rem;
    border-radius: .375rem; /* Correspond au style de Bootstrap */
    transition: all 0.2s ease-in-out;
}

.form-check.selected {
    border-color: var(--bs-primary); /* Utilise la couleur primaire de votre thème */
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* Amélioration de la section de gestion des intervenants dans le Studio Vocal */
.speaker-management-section {
    padding-bottom: 1rem; /* Espace sous la section */
    margin-bottom: 1rem; /* Marge pour la séparer de l'éditeur */
    border-bottom: 1px solid #dee2e6; /* Ligne de séparation subtile */
}

/* ------------------------------------------------------------------
   13. NOUVEAUX STYLES POUR LA PAGE DE CONNEXION (Adapté pour Connect)
-------------------------------------------------------------------*/

.body-login {
    background-color: var(--color-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-card {
    background-color: var(--color-brand); /* Couleur orange pour Connect */
    color: var(--color-white); /* Texte blanc sur orange */
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.login-card .card-header {
    background-color: transparent;
    color: var(--color-white); /* Texte blanc */
    text-align: center;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* Bordure blanche transparente */
}

.login-card .form-label {
    color: var(--color-white); /* Texte blanc */
    font-weight: 500;
}

.login-card .btn-primary {
    --bs-btn-bg: var(--color-dark); /* Bouton sombre */
    --bs-btn-border-color: var(--color-dark);
    --bs-btn-hover-bg: #3c4043;
    --bs-btn-hover-border-color: #36393c;
    --bs-btn-color: var(--color-white);
    font-weight: 500;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}
.login-card .form-control {
    background-color: rgba(255,255,255,0.9); /* Fond légèrement transparent pour les champs */
    color: var(--color-dark);
}

.prompt-info-icon {
    cursor: help;
}


/* ------------------------------------------------------------------
   14. NOUVEAUX STYLES POUR LES NOTIFICATIONS "TOAST"
-------------------------------------------------------------------*/
/* Style inchangé par rapport à standard */
#toastPlacement { /* Assurer que le container existe dans le HTML */
    position: fixed;
    bottom: 1rem;
    right: 1.5rem;
    z-index: 1090;
    min-width: 300px; /* Largeur minimale pour la lisibilité */
}


/* ------------------------------------------------------------------
   15. Styles Spécifiques Studio Vocal / Content Studio (repris standard)
-------------------------------------------------------------------*/
/* Styles inchangés par rapport à standard */


/* ------------------------------------------------------------------
    16. Styles pour les placeholders de secrets éditables
-------------------------------------------------------------------*/
/* Ajoutés pour la fonctionnalité demandée */
.secret-placeholder {
    font-family: monospace;
    color: var(--color-text-muted);
    cursor: pointer;
}
.secret-placeholder:focus,
.secret-placeholder:hover {
    color: var(--color-dark); /* Changement de couleur au survol/focus */
}
small.text-muted {
    font-size: 0.8em;
}

/* ------------------------------------------------------------------
    17. NOUVEAU : Styles pour la Librairie Artiste (Tri & Auto-complétion)
-------------------------------------------------------------------*/
.song-title {
    font-weight: 500;
    color: var(--color-dark);
}
.song-artist-sub { /* Nouvelle classe pour le sous-titre artiste */
    font-size: 0.9em;
    color: var(--color-text-muted);
}
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px !important; /* Espace pour l'icône */
}
.sort-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc; /* Icône inactive */
    font-size: 0.9em;
    transition: color 0.2s ease;
}
/* Affiche l'icône active en couleur foncée */
.sortable-header.sorted .sort-icon {
    color: var(--color-dark);
}
/* Cache l'icône de tri par défaut (sera remplacée par fa-sort-up/down) */
.sortable-header .fa-sort {
    display: inline-block;
}
.sortable-header.sorted .fa-sort {
    display: none;
}
/* Cache les icônes up/down par défaut */
.sort-icon.fa-sort-up,
.sort-icon.fa-sort-down {
    display: none;
}
/* Affiche la bonne icône quand le tri est actif */
.sortable-header.sorted.asc .fa-sort-up,
.sortable-header.sorted.desc .fa-sort-down {
    display: inline-block;
}
/* Style pour la ligne de tableau cliquable */
.clickable-row {
    cursor: pointer;
}
.clickable-row:hover {
    background-color: #f8f9fa; /* Correspond à .list-group-item-action:hover */
    color: var(--color-text);
}
.clickable-row:hover .song-title,
.clickable-row:hover .song-artist-sub {
    color: var(--color-text);
}

/* NOUVEAU (Correction Bug z-index) : Styles pour l'auto-complétion (perdus lors du refactor) */
#artist-suggestions-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--border-radius-base) var(--border-radius-base);
    z-index: 1050; /* <-- LA CORRECTION CLÉ */
    display: none; 
    /* Positionné par .position-absolute dans le HTML */
}
.suggestion-item {
    cursor: pointer;
}
.suggestion-item:hover {
    background-color: #f8f9fa;
}
.suggestion-item.active {
    background-color: var(--bs-primary);
    color: var(--color-white);
}

/* NOUVEAU : Style pour la miniature (thumbnail) dans le tableau de la librairie */
.library-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    background-color: #e9ecef;
}

/* ------------------------------------------------------------------
    18. NOUVEAU : Style pour le lien de retour AI.biza
-------------------------------------------------------------------*/

.sidebar .nav-link.nav-link-aibiza-return {
    background-color: var(--color-aibiza-yellow);
    color: var(--color-dark) !important; /* Texte foncé pour contraste */
    font-weight: 600;
}
.sidebar .nav-link.nav-link-aibiza-return i {
    color: var(--color-dark) !important; /* Icône foncée */
}
.sidebar .nav-link.nav-link-aibiza-return:hover {
    background-color: var(--color-aibiza-yellow);
    color: var(--color-dark) !important;
    filter: brightness(95%); /* Assombrir légèrement au survol */
}

#gselector-tracks-list .track-number {
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 20px; /* Assure l'alignement */
    text-align: right;
    font-size: 0.9em;
}

#gselector-tracks-list .track-info {
    /* Ajustement pour inclure le numéro */
    display: flex;
    align-items: center;
    flex-grow: 1; /* Permet au titre de prendre la place */
}

/* ------------------------------------------------------------------
    19. NOUVEAU : Styles pour les données manquantes (Mission Actuelle)
-------------------------------------------------------------------*/
.badge-missing {
    display: inline-block;
    padding: 0.25em 0.5em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 50rem; /* Entièrement arrondi */
    background-color: var(--color-danger); /* Rouge (variable) */
    user-select: none; /* Non sélectionnable */
}