body {
    background-color: #FFFCF6;
}

/* FONTS */
@font-face {
    font-family: 'Barbra';
    src: url('../fonts/barbra-font/Barbra-Regular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter/Inter-VariableFont_opsz\,wght.ttf') format('truetype');
    font-display: swap;
} 

h1 {
    display: none;
}

/* Sticky footer - global */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
}

main {
    flex: 1; 
}

/* TITRE */
.titre {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}
.titre h2, 
.titre h3 {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

.titre h2 {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    color: #101211;
    margin-right: 10px;
}

.titre h3 {
    font-family: 'Barbra', sans-serif;
    font-size: 3rem;
    color: #49252F;
}

.avis-btn-container {
    display: flex;
    justify-content: center;  
    margin: 20px 0;          
}

.avis-btn {
    display: inline-flex;    
    background-color: #49252F;
    color: #FFFCF6;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.avis-btn:hover {
    background-color: #101211;
    transform: scale(1.05);
}

.avis-btn:active {
    transform: scale(0.98);
}

/* BLOC AVIS */
.avis-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 20px;
}

/* Bloc d'un avis */
.avis-card {
    background-color: #EBD3BB;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    margin-left: 30px;
    margin-right: 30px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.2s ease;
}

.avis-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.avis-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Auteur */
.avis-card .auteur {
    font-weight: bold;
    margin-bottom: 10px;
    color: #49252F; 
}

/* Commentaire */
.avis-card .commentaire {
    flex-grow: 1;
    margin-top: 10px;
    color: #101211;
    line-height: 1.5;
}

/* Note en étoiles */
.avis-card .note img {
    width: 20px;
    height: 20px;
}

/* CRÉER UN AVIS */
.flash-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
}

.flash-message.success {
    margin: 20px 20px 20px 20px;
    background-color: #6B7B63;
    color: #FFFCF6;
}

.flash-message.error {
    margin: 20px 20px 20px 20px;
    background-color: #49252F;
    color: #FFFCF6;
}

.avis-form-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px 40px;
}

.avis-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.avis-form .form-group label {
    font-weight: bold;
    color: #49252F;
    font-family: 'Inter', sans-serif;
    margin-top: 15px;
}

.avis-form .form-control {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.avis-form .form-control:focus {
    border-color: #49252F;
    box-shadow: 0 0 5px #101211;
}

/* Étoiles */
.star-rating {
    display: flex;
    gap: 5px;
    flex-direction: row;
    justify-content: flex-start;
    margin-bottom: 20px;
    justify-content: left;
}

.star-rating input {
    display: none; 
}

.star-rating label {
    cursor: pointer;
}

.star-rating img {
    width: 35px;
    transition: transform 0.2s;
}

.star-rating label:hover img,
.star-rating label:hover ~ label img {
    transform: scale(1.2);
}

/* Remplissage au clic (sélection) */
.star-rating input:checked ~ label img {
    content: url('../images/icones/plainstar_cherry.png');
}

/* Bouton submit */
.avis-submit-btn {
    display: block;
    margin: 30px auto 40px auto;
    background-color: #49252F;
    color: #FFFCF6;
    padding: 12px 25px;
    border-radius: 25px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    align-items: center;
}

.avis-submit-btn:hover {
    background-color: #101211;
    transform: scale(1.05);
}

/* MEDIA QUERY */
/* Tablette */
@media screen and (max-width: 1024px) {
    .avis-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px 20px;
    }

    .avis-form-container {
        padding: 20px 30px;
    }

    .titre h2,
    .titre h3 {
        font-size: 2.5rem;
    }

    .avis-btn {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .avis-list {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 15px;
    }

    .avis-card {
        padding: 15px;
    }

    .avis-card .commentaire {
        font-size: 0.9rem;
    }

    .titre h2,
    .titre h3 {
        font-size: 2.2rem;
    }

    .avis-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .avis-form-container {
        padding: 15px 20px;
    }

    .star-rating img {
        width: 30px;
    }
}

/* Petit mobile */
@media screen and (max-width: 480px) {
    .avis-list {
        padding: 10px 10px;
        gap: 10px;
    }

    .avis-card {
        padding: 12px;
    }

    .avis-card .auteur {
        font-size: 0.95rem;
    }

    .avis-card .commentaire {
        font-size: 0.85rem;
    } 

    .titre h2,
    .titre h3 {
        font-size: 1.8rem;
    }

    .avis-btn {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .avis-form-container {
        padding: 10px 15px;
        gap: 20px;
    }

    .avis-form .form-control {
        font-size: 0.9rem;
        padding: 8px;
    }

    .star-rating img {
        width: 25px;
    }

    .avis-submit-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}