/* ==========================================================================
   FDREVIEWS - Front-office CSS
   Design fidèle à la maquette validée
   Préfixe : .fdr-*
   ========================================================================== */

/* ============== ÉTOILES (générique) ============== */
.fdr-star {
    color: #d1d5db;
    font-size: 16px;
    line-height: 1;
}
.fdr-star.is-on { color: #f59e0b; }
.fdr-star.is-half {
    background: linear-gradient(90deg, #f59e0b 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ============== RATING COMPACT (haut de fiche) ============== */
.fdr-rating-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0px 0 10px 0;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #1D3557;
}
.fdr-rating-compact .fdr-stars-compact {
    display: inline-flex;
    gap: 1px;
}
.fdr-rating-compact .fdr-rating-value {
    font-weight: 600;
}
.fdr-rating-compact .fdr-count-link {
    color: #1D6FA4;
    text-decoration: underline;
}
.fdr-rating-compact .fdr-count-link:hover {
    color: #1D3557;
    text-decoration: none;
}

/* État "0 avis" : étoiles grises + invitation */
.fdr-rating-compact--empty .fdr-stars-compact .fdr-star {
    color: #d1d5db;
}
.fdr-be-first {
    color: #1D6FA4;
    font-weight: 400;
    text-decoration: underline;
    transition: color 0.15s ease;
}
.fdr-be-first:hover,
.fdr-be-first:focus {
    color: #1D3557;
    text-decoration: none;
}

/* ============== BLOC PRINCIPAL ============== */
.fdr-block {
    margin: 32px 0;
    font-family: Arial, sans-serif;
    color: #1D3557;
}

/* En-tête : titre bleu marine + sous-titre gris (pas de barre soulignée) */
.fdr-header {
    margin-bottom: 20px;
}
.fdr-title {
    font-size: 24px;
    font-weight: 700;
    color: #1D3557;
    margin: 0 0 6px 0;
    line-height: 1.2;
    border: 0;
    padding: 0;
}
.fdr-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

/* ============== ÉTAT VIDE (cadre pointillé) ============== */
.fdr-empty-state {
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    padding: 60px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.fdr-empty-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 4px;
}
.fdr-empty-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fdr-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #1D3557;
    margin: 0;
    line-height: 1.3;
}

.fdr-empty-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto 8px auto;
}

/* Bouton CTA outline (uppercase, bordure bleu marine) */
.fdr-cta-outline {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    color: #1D3557;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid #1D3557;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.fdr-cta-outline:hover,
.fdr-cta-outline:focus {
    background: #1D3557;
    color: #fff;
    text-decoration: none;
}

.fdr-already-reviewed {
    background: #f0f4f8;
    border-radius: 6px;
    padding: 12px 18px;
    font-size: 14px;
    color: #1D3557;
}
.fdr-already-reviewed p { margin: 0; }

/* ============== RÉSUMÉ (avec avis) ============== */
.fdr-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 22px;
    background: #f7f9fc;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    margin-bottom: 20px;
}
.fdr-summary-rating {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.fdr-big-rating {
    font-size: 38px;
    font-weight: 700;
    color: #1D3557;
    line-height: 1;
}
.fdr-big-out {
    font-size: 18px;
    color: #64748b;
}
.fdr-summary-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fdr-stars-big .fdr-star {
    font-size: 20px;
}
.fdr-summary-count {
    font-size: 13px;
    color: #64748b;
}

/* ============== LISTE DES AVIS ============== */
.fdr-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.fdr-review {
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
}

.fdr-review-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
}

.fdr-stars { display: inline-flex; gap: 1px; }

.fdr-author {
    font-weight: 600;
    color: #1D3557;
}

.fdr-verified {
    background: #d1fae5;
    color: #065f46;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.fdr-date {
    color: #64748b;
    font-size: 12px;
    margin-left: auto;
}

.fdr-comment {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    white-space: pre-wrap;
}

/* ============== FORMULAIRE ============== */
.fdr-form-wrap {
    margin-top: 24px;
    animation: fdr-fadein 0.4s ease;
}
.fdr-form-wrap[hidden] { display: none; }

@keyframes fdr-fadein {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fdr-form-message {
    background: #f0f4f8;
    border-left: 4px solid #1D6FA4;
    padding: 14px 18px;
    border-radius: 4px;
    margin-top: 20px;
}
.fdr-form-message p { margin: 0; font-size: 14px; line-height: 1.5; }
.fdr-login-link {
    color: #1D6FA4;
    font-weight: 600;
    text-decoration: underline;
}
.fdr-login-link:hover { text-decoration: none; }

.fdr-form-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 14px 0;
    color: #1D3557;
}

.fdr-form {
    background: #f7f9fc;
    padding: 20px 24px;
    border-radius: 10px;
    border: 1px solid #e5e9f0;
}

.fdr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.fdr-field label {
    font-size: 13px;
    font-weight: 600;
    color: #1D3557;
    margin: 0;
}
.fdr-required { color: #c00; }

/* Étoiles cliquables (input rating) */
.fdr-rating-input {
    display: inline-flex;
    gap: 2px;
}
.fdr-rating-btn {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #d1d5db;
    font-size: 28px;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.1s ease;
}
.fdr-rating-btn:hover,
.fdr-rating-btn.is-hover,
.fdr-rating-btn.is-selected {
    color: #f59e0b;
}

.fdr-form textarea {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
    width: 100%;
}
.fdr-form textarea:focus {
    outline: none;
    border-color: #1D6FA4;
    box-shadow: 0 0 0 2px rgba(29, 111, 164, 0.1);
}

.fdr-help {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}
.fdr-counter { float: right; font-variant-numeric: tabular-nums; }

.fdr-form-actions { margin-top: 4px; }

.fdr-submit-btn {
    background: #1D3557;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 24px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.fdr-submit-btn:hover:not(:disabled) { background: #1D6FA4; }
.fdr-submit-btn:disabled { opacity: 0.6; cursor: wait; }

.fdr-form-message-result {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}
.fdr-form-message-result.is-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}
.fdr-form-message-result.is-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 600px) {
    .fdr-title { font-size: 20px; }
    .fdr-subtitle { font-size: 13px; }
    .fdr-empty-state { padding: 40px 20px; }
    .fdr-empty-icon { width: 56px; height: 56px; }
    .fdr-empty-title { font-size: 16px; }
    .fdr-empty-text { font-size: 13px; }
    .fdr-cta-outline { padding: 10px 22px; font-size: 12px; }
    .fdr-summary { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 16px; }
    .fdr-big-rating { font-size: 32px; }
    .fdr-review { padding: 14px; }
    .fdr-review-header { gap: 8px; }
    .fdr-date { margin-left: 0; width: 100%; }
    .fdr-form { padding: 14px 16px; }
    .fdr-rating-btn { font-size: 24px; }
    .fdr-submit-btn { width: 100%; }
}
