/* ========================================
   STYLES POUR LE MODAL D'AVIS HÉBERGEMENT
   ======================================== */

/* Modal plein écran */
.modal-fullscreen-avis-heb {
    width: 100vw !important;
    max-height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    background-color: #fafafa !important;
    position: fixed !important;
}

.modal-content-avis-heb {
    padding: 0 !important;
    position: relative;
    min-height: calc(100vh - 80px);
}

.container-avis-heb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem 6rem 1rem;
}

/* Bouton fermer en haut à droite */
.modal-close-btn-avis-heb {
    position: sticky;
    top: 20px;
    float: right;
    margin: 20px 20px 0 0;
    z-index: 1002;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.modal-close-btn-avis-heb i {
    font-size: 2rem;
}

.modal-close-btn-avis-heb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Image d'aperçu */
.avis-image-preview-heb {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

/* Header d'avis */
.avis-header-heb {
    margin-bottom: 2rem;
}

/* Étoiles de notation */
.stars-container-heb {
    padding: 1.5rem 0;
}

.stars-rating-heb {
    display: inline-flex;
    gap: 0.5rem;
    cursor: pointer;
}

.star-icon-heb {
    font-size: 3rem;
    color: #ddd;
    transition: all 0.2s ease;
    cursor: pointer;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48;
}

.star-icon-heb:hover,
.star-icon-heb.active {
    color: #e74c3c;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
    transform: scale(1.1);
}

.rating-text-heb {
    font-size: 1.2rem;
    font-weight: 500;
    color: #424242 !important;
    min-height: 1.5rem;
}

/* Titres du modal */
.modal-title-avis-heb {
    color: #1976d2;
    font-weight: 500;
    margin-top: 1rem;
}

.modal-subtitle-avis-heb {
    color: #424242;
}

/* Labels personnalisés */
.form-label-custom-heb {
    font-size: 1.1rem;
    font-weight: 500;
    color: #424242 !important;
    display: block;
    margin-bottom: 1rem;
}

/* Cards dans le modal */
.card-avis-heb {
    background-color: #fff !important;
}

.card-avis-heb .card-content {
    color: #424242 !important;
}

.card-avis-heb .card-action {
    background-color: #f5f5f5 !important;
}

/* Compteur de caractères */
#charCountHeb {
    display: block;
    font-size: 0.9rem;
    color: #666 !important;
    margin-top: 0.5rem;
}

#charCountHeb.error {
    color: #f44336 !important;
}

#charCountHeb.success {
    color: #4caf50 !important;
}

/* Texte de la checkbox */
.checkbox-text-heb {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #424242 !important;
}

/* Styles pour les radio buttons et checkbox labels */
.modal-fullscreen-avis-heb label > span {
    color: #424242 !important;
}

/* Select et textarea */
.modal-fullscreen-avis-heb select.browser-default {
    display: block !important;
    width: 100% !important;
    height: 3rem !important;
    background-color: #fff !important;
    border: 1px solid #9e9e9e !important;
    color: #424242 !important;
    padding: 0 12px !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    line-height: 3rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    appearance: auto !important;
}

.modal-fullscreen-avis-heb select.browser-default:focus {
    outline: none !important;
    border-color: #26a69a !important;
    box-shadow: 0 0 0 1px #26a69a !important;
}

.modal-fullscreen-avis-heb .input-field {
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
}

.modal-fullscreen-avis-heb .input-field label {
    position: static !important;
    transform: none !important;
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

.modal-fullscreen-avis-heb textarea.materialize-textarea {
    border: 1px solid #9e9e9e !important;
    border-radius: 4px !important;
    color: #424242 !important;
    min-height: 120px !important;
    padding: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    resize: vertical !important;
}

.modal-fullscreen-avis-heb textarea.materialize-textarea:focus {
    outline: none !important;
    border-color: #26a69a !important;
    box-shadow: 0 0 0 1px #26a69a !important;
}

.modal-fullscreen-avis-heb textarea.materialize-textarea::placeholder {
    color: #9e9e9e !important;
    opacity: 0.8 !important;
}

/* Alignement des boutons */
.modal-fullscreen-avis-heb .btn i.material-symbols-outlined {
    vertical-align: middle !important;
    line-height: inherit !important;
    display: inline-block !important;
}

.modal-fullscreen-avis-heb .btn.icon-left i,
.modal-fullscreen-avis-heb .btn i.left {
    margin-right: 0.5rem !important;
}

.modal-fullscreen-avis-heb .card-action .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: normal !important;
}

/* Message global */
#messageAvisHeb {
    margin-top: 1.5rem;
    padding: 1rem;
}

#messageAvisHeb.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

#messageAvisHeb.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Responsive */
@media only screen and (max-width: 600px) {
    .modal-fullscreen-avis-heb {
        height: 100dvh !important;
        max-height: 100dvh !important;
    }

    .modal-content-avis-heb {
        min-height: auto;
        padding-bottom: 80px !important;
    }

    .container-avis-heb {
        padding: 1rem 0.5rem 8rem 0.5rem !important;
    }

    .modal-close-btn-avis-heb {
        top: 10px;
        right: 10px;
        margin: 10px 10px 0 0;
    }

    .star-icon-heb {
        font-size: 2.5rem;
    }

    .avis-image-preview-heb {
        max-width: 150px;
    }

    .modal-title-avis-heb {
        font-size: 1.5rem;
    }

    .card-avis-heb .card-action {
        position: sticky;
        bottom: 0;
        z-index: 100;
        padding: 1.5rem 1rem !important;
        background-color: #f5f5f5 !important;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
        margin-top: 2rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .card-avis-heb .card-action .btn {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* Support du thème sombre */
@media (prefers-color-scheme: dark) {
    .modal-fullscreen-avis-heb {
        background-color: #303030 !important;
    }
    .card-avis-heb {
        background-color: #424242 !important;
    }
    .card-avis-heb .card-content {
        color: rgba(255, 255, 255, 0.87) !important;
    }
    .card-avis-heb .card-action {
        background-color: #383838 !important;
    }
    .modal-title-avis-heb {
        color: #64b5f6;
    }
    .modal-subtitle-avis-heb {
        color: rgba(255, 255, 255, 0.87);
    }
    .form-label-custom-heb {
        color: rgba(255, 255, 255, 0.87) !important;
    }
    .rating-text-heb {
        color: rgba(255, 255, 255, 0.87) !important;
    }
    .checkbox-text-heb {
        color: rgba(255, 255, 255, 0.87) !important;
    }
    .modal-fullscreen-avis-heb label > span {
        color: rgba(255, 255, 255, 0.87) !important;
    }
    .modal-fullscreen-avis-heb select.browser-default {
        background-color: #424242 !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: #616161 !important;
    }
    .modal-fullscreen-avis-heb textarea.materialize-textarea {
        background-color: #424242 !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: #616161 !important;
    }
    #charCountHeb {
        color: #bdbdbd !important;
    }
    #messageAvisHeb.success {
        background-color: #1b5e20;
        color: #c8e6c9;
    }
    #messageAvisHeb.error {
        background-color: #b71c1c;
        color: #ffcdd2;
    }
}

[data-theme="dark"] .modal-fullscreen-avis-heb,
.dark-theme .modal-fullscreen-avis-heb,
body.dark .modal-fullscreen-avis-heb {
    background-color: #303030 !important;
}
[data-theme="dark"] .card-avis-heb,
.dark-theme .card-avis-heb,
body.dark .card-avis-heb {
    background-color: #424242 !important;
}
[data-theme="dark"] .card-avis-heb .card-content,
.dark-theme .card-avis-heb .card-content,
body.dark .card-avis-heb .card-content {
    color: rgba(255, 255, 255, 0.87) !important;
}
[data-theme="dark"] .card-avis-heb .card-action,
.dark-theme .card-avis-heb .card-action,
body.dark .card-avis-heb .card-action {
    background-color: #383838 !important;
}

/* ========================================
   STYLES POUR L'AFFICHAGE DES AVIS HÉBERGEMENT
   (bloc hero, section liste, état vide)
   ======================================== */

/* === BLOC D'AFFICHAGE DES AVIS SUR LA FICHE (hero) === */
.bloc-avis-fiche-heb {
    display: inline-flex;
    align-items: center;
    justify-content: left;
    gap: 10px;
    padding: 5px 0;
    flex-wrap: wrap;
}

.avis-etoiles-heb {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 22px;
}

.avis-note-heb {
    font-size: 18px;
    color: #333;
}

.avis-nombre-heb {
    font-size: 14px;
    color: #666;
}

/* Hexagones avec pointe vers le haut */
.hexagone-complet-heb,
.hexagone-demi-heb,
.hexagone-vide-heb {
    display: inline-block;
    width: 20px;
    height: 23px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: transform 0.2s ease;
}

.hexagone-complet-heb:hover,
.hexagone-demi-heb:hover,
.hexagone-vide-heb:hover {
    transform: scale(1.1);
}

.hexagone-complet-heb {
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    box-shadow: 0 2px 4px rgba(66, 165, 245, 0.3);
}

.hexagone-demi-heb {
    background: linear-gradient(90deg, #64B5F6 50%, #CCC 50%);
    box-shadow: 0 2px 4px rgba(66, 165, 245, 0.2);
}

.hexagone-vide-heb {
    background: #CCC;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lien-vers-avis-heb {
    color: #2196F3;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lien-vers-avis-heb:hover {
    color: #1976D2;
    text-decoration: underline;
}

/* === SECTION COMPLÈTE DES AVIS === */
.section-avis-heb {
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* État vide (aucun avis) */
.avis-vide-heb {
    text-align: center;
    padding: 60px 20px;
}

.avis-vide-icon-heb {
    font-size: 80px;
    color: #2196F3;
    margin-bottom: 20px;
}

.avis-vide-icon-heb i {
    font-size: 80px;
}

.avis-vide-titre-heb {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.avis-vide-desc-heb {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* En-tête des avis */
.avis-section-header-heb {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.avis-titre-heb {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

.avis-stats-header-heb {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.avis-etoiles-large-heb {
    font-size: 32px;
    line-height: 1;
    display: flex;
    gap: 4px;
}

.avis-etoiles-large-heb .hexagone-complet-heb,
.avis-etoiles-large-heb .hexagone-demi-heb,
.avis-etoiles-large-heb .hexagone-vide-heb {
    width: 26px;
    height: 30px;
}

.avis-score-large-heb {
    font-size: 36px;
    font-weight: bold;
    color: #2196F3;
}

.avis-total-heb {
    font-size: 16px;
    color: #666;
}

/* Liste des avis */
.avis-liste-heb {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Item d'avis individuel */
.avis-item-heb {
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
    transition: all 0.3s ease;
}

.avis-item-heb:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.avis-item-header-heb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.avis-item-note-heb {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avis-item-etoiles-heb {
    font-size: 20px;
    color: #FFD700;
}

.avis-item-note-num-heb {
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

.avis-item-meta-heb {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.avis-item-date-heb {
    display: flex;
    align-items: center;
    gap: 5px;
}

.avis-item-body-heb {
    margin: 15px 0;
}

.avis-item-texte-heb {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.avis-item-footer-heb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

.avis-item-conseille-heb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.icone-conseille-heb {
    font-size: 18px;
}

.avis-item-date-pub-heb {
    font-size: 13px;
    color: #999;
}

/* Footer avec bouton ajouter avis */
.avis-footer-heb {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* === THÈME SOMBRE - Section avis hébergement === */
@media (prefers-color-scheme: dark) {
    .section-avis-heb {
        background: #2c2c2c;
    }

    .avis-vide-titre-heb,
    .avis-titre-heb {
        color: #fff;
    }

    .avis-vide-desc-heb,
    .avis-total-heb {
        color: #aaa;
    }

    .avis-section-header-heb {
        border-bottom-color: #444;
    }

    .avis-item-heb {
        background: #383838;
    }

    .avis-item-heb:hover {
        background: #424242;
    }

    .avis-item-note-num-heb,
    .avis-item-texte-heb {
        color: #fff;
    }

    .avis-item-meta-heb,
    .avis-item-conseille-heb {
        color: #aaa;
    }

    .avis-item-footer-heb {
        border-top-color: #555;
    }

    .avis-footer-heb {
        border-top-color: #444;
    }

    .lien-vers-avis-heb {
        color: #64B5F6;
    }

    .lien-vers-avis-heb:hover {
        color: #90CAF9;
    }

    .hexagone-complet-heb {
        background: linear-gradient(135deg, #90CAF9 0%, #64B5F6 100%);
        box-shadow: 0 2px 6px rgba(144, 202, 249, 0.4);
    }

    .hexagone-demi-heb {
        background: linear-gradient(90deg, #90CAF9 50%, #555 50%);
        box-shadow: 0 2px 4px rgba(144, 202, 249, 0.3);
    }

    .hexagone-vide-heb {
        background: #555;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }

    .avis-note-heb {
        color: #fff;
    }

    .avis-nombre-heb {
        color: #bbb;
    }
}

/* === RESPONSIVE - Bloc hero === */
@media only screen and (max-width: 600px) {
    .bloc-avis-fiche-heb {
        gap: 6px;
    }

    .avis-etoiles-heb {
        font-size: 18px;
        gap: 2px;
    }

    .hexagone-complet-heb,
    .hexagone-demi-heb,
    .hexagone-vide-heb {
        width: 16px;
        height: 18px;
    }

    .avis-note-heb {
        font-size: 16px;
    }

    .avis-nombre-heb {
        font-size: 12px;
    }
}

/* === RESPONSIVE - Section avis === */
@media only screen and (max-width: 768px) {
    .section-avis-heb {
        padding: 20px;
        margin: 20px 0;
    }

    .avis-titre-heb {
        font-size: 22px;
    }

    .avis-etoiles-large-heb {
        font-size: 24px;
    }

    .avis-etoiles-large-heb .hexagone-complet-heb,
    .avis-etoiles-large-heb .hexagone-demi-heb,
    .avis-etoiles-large-heb .hexagone-vide-heb {
        width: 20px;
        height: 23px;
    }

    .avis-score-large-heb {
        font-size: 28px;
    }

    .avis-item-heb {
        padding: 15px;
    }

    .avis-item-header-heb {
        flex-direction: column;
        align-items: flex-start;
    }

    .avis-item-footer-heb {
        flex-direction: column;
        align-items: flex-start;
    }

    .avis-vide-heb {
        padding: 40px 15px;
    }

    .avis-vide-icon-heb i {
        font-size: 60px;
    }

    .avis-vide-titre-heb {
        font-size: 20px;
    }

    .avis-vide-heb .btn-large {
        font-size: 14px;
        padding: 12px 16px;
        height: auto;
        line-height: 1.4;
        white-space: normal;
        max-width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .avis-vide-heb .btn-large i {
        font-size: 20px;
        margin-right: 8px;
    }

    .avis-footer-heb .btn {
        font-size: 14px;
        padding: 10px 16px;
        height: auto;
        line-height: 1.4;
        white-space: normal;
        max-width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .avis-footer-heb .btn i {
        font-size: 18px;
        margin-right: 6px;
    }
}

/* Dark theme selectors for section */
[data-theme="dark"] .section-avis-heb,
.dark-theme .section-avis-heb,
body.dark .section-avis-heb {
    background: #2c2c2c;
}

[data-theme="dark"] .avis-vide-titre-heb,
.dark-theme .avis-vide-titre-heb,
body.dark .avis-vide-titre-heb,
[data-theme="dark"] .avis-titre-heb,
.dark-theme .avis-titre-heb,
body.dark .avis-titre-heb {
    color: #fff;
}

[data-theme="dark"] .avis-item-heb,
.dark-theme .avis-item-heb,
body.dark .avis-item-heb {
    background: #383838;
}

[data-theme="dark"] .avis-item-note-num-heb,
.dark-theme .avis-item-note-num-heb,
body.dark .avis-item-note-num-heb,
[data-theme="dark"] .avis-item-texte-heb,
.dark-theme .avis-item-texte-heb,
body.dark .avis-item-texte-heb {
    color: #fff;
}
