/* ================================================================
   guideschant — Styles frontend
   ================================================================ */

/* ---- Loader AJAX ---- */
.gc-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.gc-loader::after {
    content: '';
    width: 48px;
    height: 48px;
    border: 5px solid #e0e0e0;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: gc-spin 0.8s linear infinite;
}

@keyframes gc-spin {
    to { transform: rotate(360deg); }
}

/* ---- Conteneur principal ---- */
.gc-guide-chant {
    width: 100%;
    font-family: inherit;
}

/* ---- Mise en page deux colonnes ---- */
.gc-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* Firefox : flex-basis en % nécessite width explicite quand le conteneur
   n'a pas de taille définie — sans width, Firefox peut ignorer flex-basis. */
.gc-col-nav {
    flex: 0 0 26%;
    width: 26%;
    min-width: 200px;
    box-sizing: border-box;
}

.gc-col-content {
    flex: 1;
    min-width: 0;
}

/* ================================================================
   SECTION BLOCK — carte avec en-tête coloré
   ================================================================ */
.gc-section-block {
    margin-bottom: 12px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    background: #fff;
}

.gc-section-header-front {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.82em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gc-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    font-size: 0.78em;
    font-weight: 800;
    flex-shrink: 0;
}

.gc-section-label {
    line-height: 1.2;
}

/* ---- Groupes de voix dans une section ---- */
.gc-voice-group {
    padding: 5px 8px 4px;
    border-bottom: 1px solid #f0f0f0;
}

.gc-voice-group:last-child {
    border-bottom: none;
}

.gc-label {
    display: block;
    font-size: 0.72em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.gc-label-ms { color: #27ae60; }
.gc-label-yt { color: #e74c3c; }

/* ---- Solo ---- */
.gc-solo-note {
    padding: 5px 10px;
    font-size: 0.82em;
    color: #888;
    margin: 0;
}

/* ================================================================
   CHIPS / VIGNETTES de voix
   ================================================================ */
.gc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.gc-chip {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: filter 0.15s, transform 0.1s;
    line-height: 1.6;
}

.gc-chip:hover {
    filter: brightness(0.88);
    transform: translateY(-1px);
    text-decoration: none !important;
}

/* Tutti — mis en avant */
.gc-chip-tutti {
    font-weight: 700;
    border-width: 2px;
}

/* ---- Couleurs par type de voix ---- */
.gc-v-tutti    { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.gc-v-soprano  { background: #fce4ec; color: #880e4f; border-color: #f48fb1; }
.gc-v-alto     { background: #fff3e0; color: #bf360c; border-color: #ffcc80; }
.gc-v-tenor    { background: #e3f2fd; color: #0d47a1; border-color: #90caf9; }
.gc-v-basse    { background: #fbe9e7; color: #b71c1c; border-color: #ef9a9a; }
.gc-v-accomp   { background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; }
.gc-v-other    { background: #f5f5f5; color: #424242; border-color: #bdbdbd; }

/* Tutti avec sa couleur propre, fond plein */
.gc-v-tutti.gc-chip-tutti    { background: #1a1a1a; color: #fff; }
.gc-v-soprano.gc-chip-tutti  { background: #e91e63; color: #fff; border-color: #e91e63; }
.gc-v-alto.gc-chip-tutti     { background: #ff6f00; color: #fff; border-color: #ff6f00; }
.gc-v-tenor.gc-chip-tutti    { background: #1565c0; color: #fff; border-color: #1565c0; }
.gc-v-basse.gc-chip-tutti    { background: #c62828; color: #fff; border-color: #c62828; }
.gc-v-accomp.gc-chip-tutti   { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.gc-v-other.gc-chip-tutti    { background: #616161; color: #fff; border-color: #616161; }

/* ================================================================
   Colonne de contenu (droite)
   ================================================================ */
#gc-content {
    min-height: 200px;
}

.gc-placeholder {
    color: #aaa;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 2px 0 10px;
}

.gc-default-image-wrap {
    padding: 50px;
    text-align: center;
}

.gc-default-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

/* ================================================================
   Crédits et erreurs
   ================================================================ */
.gc-credits {
    margin-top: 16px;
    font-size: 0.82em;
    color: #999;
    text-align: center;
}

.gc-error {
    color: #c0392b;
    font-style: italic;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 640px) {
    .gc-layout {
        flex-direction: column;
    }
    .gc-col-nav {
        flex: none;
        width: 100%;
    }
}
