/* =============================================================
   WP Jury Vote – Styles Frontend
   Complète les styles de WP Concours Vote (wcv-style)
   ============================================================= */

/* ---- Bouton "Vote déjà soumis" ---- */
.wcvj-btn--submitted {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    border: 2px solid transparent;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0.9;
}

/* ---- Bouton "Connexion requise" ---- */
.wcvj-btn--nologin {
    background: #9ca3af;
    color: #ffffff;
    border-color: #9ca3af;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    border: 2px solid transparent;
    line-height: 1.4;
    white-space: nowrap;
}

/* ---- Notice de connexion ---- */
.wcvj-login-notice {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
    color: #92400e;
    font-weight: 500;
    font-size: 0.95em;
}
.wcvj-login-notice a {
    color: #d97706;
    font-weight: 700;
    text-decoration: underline;
}

/* =============================================================
   FORMULAIRE DE NOTATION (ÉTOILES 1-3)
   ============================================================= */

.wcvj-rating-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.wcvj-criterion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
    border-bottom: 1px solid #f3f4f6;
}

.wcvj-criterion:last-of-type {
    border-bottom: none;
}

.wcvj-criterion-label {
    font-size: 0.82em;
    font-weight: 600;
    color: #374151;
    flex: 1;
    line-height: 1.35;
}

/* ---- Système d'étoiles ---- */
.wcvj-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-direction: row-reverse; /* pour la technique CSS hover */
    position: relative;
}

/* Masquer les vrais radio buttons */
.wcvj-star-input {
    display: none;
}

/* Label étoile */
.wcvj-star-label {
    font-size: 1.6rem;
    color: #d1d5db;
    cursor: pointer;
    line-height: 1;
    transition: color 0.12s, transform 0.1s;
    user-select: none;
}

.wcvj-star-label:hover {
    transform: scale(1.15);
}

/* Étoiles sélectionnées via CSS : label après un input:checked + tous les labels précédents */
.wcvj-stars input:checked ~ label {
    color: #f59e0b;
}

/* Hover : colorier les étoiles jusqu'au survol */
.wcvj-stars label:hover,
.wcvj-stars label:hover ~ label {
    color: #fbbf24;
}

/* Hint texte */
.wcvj-star-hint {
    font-size: 0.78em;
    color: #9ca3af;
    margin-left: 8px;
    min-width: 40px;
    text-align: left;
    font-style: italic;
}

/* =============================================================
   BOUTON "NON" (ANNULER CONFIRMATION)
   ============================================================= */

.wcvj-btn--non {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    border: 2px solid transparent;
    line-height: 1.4;
    white-space: nowrap;
    transition: background 0.15s;
}

.wcvj-btn--non:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* =============================================================
   BOÎTE DE CONFIRMATION
   ============================================================= */

.wcvj-confirm-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    text-align: center;
}

.wcvj-confirm-question {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.wcvj-confirm-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* =============================================================
   MODAL JURY – AJUSTEMENTS POUR LE FORMULAIRE DE NOTES
   ============================================================= */

.wcvj-modal-info {
    overflow-y: auto;
}

/* Ajuster la hauteur max pour le formulaire (plus de contenu) */
.wcvj-modal-overlay .wcv-modal-box {
    max-height: 92vh;
}

#wcvj-modal-excerpt {
  overflow-y: auto;
  max-height: 220px;
}

#wcvj-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bouton valider en pleine largeur */
#wcvj-form-submit {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
    padding: 10px 0;
    font-size: 0.9em;
}

/* =============================================================
   ADMIN – TABLE DES SCORES
   ============================================================= */

.wcvj-scores-table th a {
    text-decoration: none;
    color: inherit;
}

.wcvj-scores-table th a:hover {
    color: #2563eb;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 640px) {
    .wcvj-criterion {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .wcvj-stars {
        flex-direction: row-reverse;
    }

    .wcvj-star-label {
        font-size: 1.4rem;
    }

    .wcvj-confirm-question {
        font-size: 0.95em;
    }
}
