/* =============================================
   SÉLECTEUR DE CANTIQUES - STYLES CSS
   ============================================= */

.cantique-selector-widget {
    max-width: 500px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f1ff 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(67, 56, 202, 0.15);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ===== EN-TÊTE ===== */
.cantique-header {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
    padding: 24px;
    color: white;
    text-align: center;
}

.cantique-header-content {
    margin: 0;
}

.cantique-title-header {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
}

.cantique-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    font-weight: 500;
}

/* ===== CONTENEUR PRINCIPAL ===== */
.cantique-container {
    padding: 32px 24px;
}

/* ===== SECTION SÉLECTEUR ===== */
.cantique-selector {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.1);
    margin-bottom: 24px;
}

/* ===== AFFICHAGE ===== */
.cantique-display-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 2px solid #f0f4ff;
}

/* Roue numérique */
.cantique-wheel {
    position: relative;
    width: 140px;
    height: 140px;
    border: 4px solid #c7d2fe;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f1ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 8px rgba(67, 56, 202, 0.1);
}

.cantique-wheel::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 2px dashed #c7d2fe;
    border-radius: 50%;
    opacity: 0.5;
}

.cantique-wheel-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cantique-number-input-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cantique-number-input {
    width: 90px;
    height: 90px;
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    border: none;
    background: transparent;
    color: #4338ca;
    font-family: 'Courier New', monospace;
    padding: 0;
    margin: 0;
    outline: none;
    line-height: 1;
}

.cantique-number-input:focus {
    color: #6366f1;
}

/* Entrée du numéro - Masquer les flèches */
.cantique-number-input::-webkit-outer-spin-button,
.cantique-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cantique-number-input[type=number] {
    -moz-appearance: textfield;
}

/* Titre du cantique */
.cantique-title-display {
    width: 100%;
    text-align: center;
}

.cantique-title-text {
    font-size: 18px;
    font-weight: 600;
    color: #1e1b4b;
    margin: 0;
    line-height: 1.4;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.cantique-title-text.loading {
    color: #a5a5a5;
    font-style: italic;
}

.cantique-title-text.error {
    color: #dc2626;
}

/* ===== BOUTONS ===== */
.cantique-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.cantique-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.2);
}

.cantique-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(67, 56, 202, 0.3);
}

.cantique-btn:active:not(:disabled) {
    transform: translateY(0);
}

.cantique-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
    color: #9ca3af;
}

.btn-icon {
    font-size: 18px;
}

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

/* ===== BARRE DE PROGRESSION ===== */
.cantique-progress-section {
    margin-bottom: 0;
}

.cantique-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.progress-label {
    color: #6b7280;
    font-weight: 600;
}

.progress-percent {
    color: #4338ca;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.cantique-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cantique-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4338ca 0%, #6366f1 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0.17%;
}

/* ===== RECHERCHE ===== */
.cantique-search-section {
    margin-bottom: 24px;
}

.cantique-search-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #4338ca;
    background: white;
    border: 2px solid #c7d2fe;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cantique-search-toggle:hover {
    border-color: #4338ca;
    background: #f9fafb;
}

.search-icon {
    font-size: 18px;
}

.cantique-search-box {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.cantique-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #c7d2fe;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.cantique-search-input:focus {
    outline: none;
    border-color: #4338ca;
    background: #f9fafb;
}

.cantique-search-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.2);
}

.cantique-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
}

.cantique-search-btn:active {
    transform: translateY(0);
}

/* ===== CONTENU DU CANTIQUE ===== */
.cantique-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.1);
    margin-bottom: 24px;
}

.cantique-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f4ff;
}

.cantique-numero {
    font-size: 12px;
    color: #6366f1;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.cantique-info-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.cantique-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.cantique-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-status {
    background: #dcfce7;
    color: #166534;
}

.badge-status.draft {
    background: #fef3c7;
    color: #92400e;
}

.badge-enabled {
    background: #dbeafe;
    color: #0c4a6e;
}

.badge-disabled {
    background: #f3f4f6;
    color: #6b7280;
}

.cantique-preview {
    margin: 20px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    border-left: 4px solid #4338ca;
}

.cantique-preview-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cantique-preview-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin: 0;
    max-height: 120px;
    overflow-y: auto;
}

.cantique-preview-text p {
    margin: 0 0 8px 0;
}

.cantique-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.setting-item {
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
}

.setting-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.setting-value {
    font-size: 14px;
    font-weight: 600;
    color: #4338ca;
}

.cantique-link {
    display: inline-block;
    padding: 10px 16px;
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.2);
}

.cantique-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
    text-decoration: none;
}

/* ===== LOADING ===== */
.cantique-loading {
    text-align: center;
    padding: 40px 24px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #4338ca;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.cantique-loading p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* ===== ERREUR ===== */
.cantique-error {
    background: #fee2e2;
    border: 2px solid #fca5a5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

#cantique-error-text {
    color: #991b1b;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

/* ===== FOOTER ===== */
.cantique-footer {
    padding: 20px 24px;
    text-align: center;
    border-top: 1px solid rgba(67, 56, 202, 0.1);
    background: rgba(67, 56, 202, 0.02);
}

.cantique-footer p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .cantique-selector-widget {
        border-radius: 12px;
    }

    .cantique-container {
        padding: 20px 16px;
    }

    .cantique-selector {
        padding: 20px 16px;
    }

    .cantique-wheel {
        width: 120px;
        height: 120px;
    }

    .cantique-number-input {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .cantique-title-text {
        font-size: 16px;
        min-height: 48px;
    }

    .cantique-buttons {
        gap: 8px;
    }

    .cantique-btn {
        padding: 12px 12px;
        font-size: 13px;
    }

    .btn-icon {
        font-size: 16px;
    }

    .btn-text {
        display: none;
    }

    .cantique-settings {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cantique-selector-widget {
        max-width: 100%;
        border-radius: 8px;
    }

    .cantique-header {
        padding: 16px;
    }

    .cantique-title-header {
        font-size: 20px;
    }

    .cantique-container {
        padding: 16px 12px;
    }

    .cantique-selector {
        padding: 16px;
    }

    .cantique-wheel {
        width: 100px;
        height: 100px;
    }

    .cantique-number-input {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }

    .cantique-title-text {
        font-size: 14px;
        min-height: 40px;
    }
}