@font-face {
    /* texte logo */
    font-family: 'Micro5';
    src: url("../fonts/Micro_5/Micro5-Regular.ttf") format('truetype');
}

@font-face {
    /* titre */
    font-family: Daydream;
    src: url("../fonts/daydream_3/Daydream.otf") format('truetype');
}

@font-face {
    /* police intermédiaire */
    font-family: 'Minecraftia';
    src: url("../fonts/minecraftia/Minecraftia-Regular.ttf") format('truetype');
}

@font-face {
    /* petit texte */
    font-family: 'Afacad';
    src: url("../fonts/Afacad/Afacad-VariableFont_wght.ttf") format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Inclure la bordure et le padding dans la taille totale des éléments */
}

/* STRUCTURE ------------------------------------------------------------------------------------------------------*/

header,
footer {
    font-family: Afacad;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Centre verticalement */
    color: white;
    background-color: white;
    padding: 8px;
    height: 70px;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
}

footer {
    padding-left: 20px;
    padding-right: 20px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* La page fait toujours au moins la hauteur de l’écran */
}


main {
    /* Le main va s’étirer pour occuper tout l’espace libre */
    flex: 1;
    display: flex;
    flex-direction: column;
}


.logo {
    /*pour que le logo et le titre soient alignés*/
    display: flex;
    align-items: center;
    gap: 10px;
}

img {
    margin-left: 8px;
}

img:not(.logo):not(.world-map):not(.rotate-vinyle) {

    width: 100px;
    height: 100px;
    border-radius: 100px;
    object-fit: cover;
}

img.photoProfilPublication {
    width: 50px;
    height: 50px;
    border-radius: 50px;
    object-fit: cover;
}

img#photoProfil {
    width: 200px;
    height: 200px;
    border-radius: 200px;
    object-fit: cover;
}



.posts a:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.posts a:first-child div {
    display: flex;
    flex-direction: column;
}

.posts .date {
    width: 100%;
    text-align: end;
}

.gauche {
    /*logo + titre*/
    display: flex;
    align-items: center;
    gap: 10px;
    /* Espace entre le logo et le titre */
}

/* TYPOGRAPHIE -----------------------------------------------------------------------------------------------------*/

.logo h1 {
    /*titre beatfriends*/
    font-family: Micro5;
    font-size: 30px;
    color: #063970;
    padding-bottom: 10px;
}

h1 {
    /*titre des pages*/
    font-family: Daydream;
    font-size: 25px;
    color: white;
    text-align: center;
    padding-top: 10px;
}

.home h3 {
    /*noms des utilisateurs dans le feed*/
    font-family: Minecraftia;
    font-size: 20px;
    color: white;
    margin-bottom: 5px;
    padding-top: 10px;
    line-height: 1;

}

h4 {
    font-family: Minecraftia;
    color: white;
    font-size: 15px;
    padding-top: 10px;
    padding-left: 20px;
}

.home h1 {
    padding-bottom: 10px;
    padding-top: 12px;
}

.home {
    padding-top: 12px;
    padding-bottom: 12px;
}

.profil h3 {
    font-family: Minecraftia;
    font-size: 18px;
    color: #ffffff80;
    margin-bottom: 5px;
    padding-top: 20px;
    line-height: 1;
}

main .profil h1 {
    text-align: left;
}

main .profil h3 {
    padding-bottom: 10px;
}

.home .feed h1 {
    /*titre page home*/
    text-align: left;
}

a {
    /*liens vers autres pages*/
    text-decoration: none;
    color: #456698;
}

.copyrights a,
.privacy a,
.terms a {
    /*liens footer*/
    text-decoration: none;
    color: #f8a62b
}

.feed p,
footer p,
.resultatsRecherche p,
.notifs p,
.notifs span,
.profil p,
.postRecherche a {
    font-family: Afacad;
    color: white;
}



.commentaires,
.notifs div,
.resultatsRecherche .postRecherche {
    border: solid white;
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 5px;
    background-color: #456698;
}

.posts {
    padding: 10px;
    margin-bottom: 10px;
    border: dashed white
}

label {
    display: flex;
    flex-direction: column;
    font-family: Minecraftia;
    color: #456698;
    padding-bottom: 20px;
    /*pour supprimer l'espace en dessous du texte*/
    padding-top: 8px;
    line-height: 1;
}

label.radioLabel {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    text-align: center
}

.createAccount h1,
.contact-form h1,
.connexion h1,
.creaPub h1 {
    /*titre page création de compte et contact*/
    font-size: 25px;
    color: #063970;
    font-family: Daydream;
    margin-bottom: 10px;
}

.createAccount span {
    /*petit texte sous formulaires*/
    font-size: x-small;
    padding-top: 10px;
}

.createAccount #reglesMDP ul li {
    list-style-type: none;
}

.createAccount #reglesMDP {
    font-family: Afacad;
    color: #456698;
    font-weight: bold;
}

.createAccount #reglesMDP p {
    font-size: larger
}

/*BOUTONS-------------------------------------------------------------------------------------------------------*/
.bouton {
    font-family: Minecraftia;
    font-size: 14px;
    background-color: #456698;
    color: white;
    padding: 0px 6px;
    box-shadow: 2px 2px 5px #00000040;
    /*ombre*/
    text-align: center;
    align-self: center;
    padding-top: 10px;
    line-height: 1;
    border: none;

}

.boutonResultat,
.btSeeMore {
    font-family: Afacad;
    font-size: 14px;
    background-color: #456698;
    color: white;
    padding: 0px 6px;
    margin-left: 5px;
    box-shadow: 2px 2px 5px #00000040;
    /*ombre*/
    align-self: center;
    line-height: 1;
    border: solid white 2px;
}

.posts .btSeeMore {
    font-size: 18px;
    padding: 10px;
    margin-top: 20px;
}


header .bouton {
    /*boutons du header*/
    font-family: Daydream;
    padding: 6px 12px;
    margin-right: 8px;
    /*marge à droite de chaque bouton*/
}

.bouton:hover {
    background-color: #456698;
    color: #ffffff80;
    text-decoration: none;
}

.boutonResultat:hover,
.btSeeMore:hover {
    background-color: #456698;
    color: #ffffff80;
    text-decoration: none;
    border: solid;
}

.profil .bouton {
    padding-top: 0px;
}

.bouton.deconnexion {
    display: block;
    margin: 20px;
    margin-left: auto;
    padding: 8px;
    width: max-content;
}

.boutonCote {
    font-family: Minecraftia;
    background-color: #456698;
    color: #ffffff80;
    display: inline-block;
    text-align: center;
    box-shadow: 2px 2px 5px #00000040;
    padding: 0px 10px;
    border-radius: 12px;
    padding-top: 10px;
    line-height: 1;
}

.boutonCote:hover {
    background-color: #456698;
    color: white;
}

.btAffichageCommentaires {
    /*bouton see all comments*/
    font-family: Afacad;
    background-color: #063970;
    color: white;
    border: none;
    font-size: 16px;
    padding-bottom: 6px;
}

/* PAGES ET BLOCS ---------------------------------------------------------------------------------------------------*/

main .index,
main .choisirConnexion,
main .editProfil {
    /*page index*/
    background-color: #063970;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    flex: 1;
    /*prend toute la place disponible*/
}

main .home {
    background-color: #063970;
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    grid-template-rows: auto 1fr;
    gap: 20px;
    flex: 1;
    padding: 20px;
}

.menuBoutons {
    grid-column: 1;
    grid-row: 1 / 3;
    /* Prend toute la hauteur */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-left: 10px;
    position: sticky;
    top: 70px;
    height: fit-content;
}

.recherche {
    grid-column: 2;
    /* reste dans sa colonne */
    grid-row: 1;
    width: 100%;
    /* occupe toute la largeur de la colonne */
}

/* Si c’est un input à l’intérieur */
.recherche input[type="text"] {
    width: 100%;
    /* occupe toute la largeur de son parent */
    box-sizing: border-box;
    /* pour inclure le padding et border */
}

.search-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.icone-annuler {
    position: relative;
    display: flex;
    align-items: center;
}

.icone-annuler input[type="text"] {
    padding-right: 40px;
    /* espace pour l'icône */
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.icone-annuler i.fa-xmark {
    position: absolute;
    right: 10px;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    display: none;
    /* hidden by default, shown by JS */
}

.menu-boutons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.menu-boutons .bouton {
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}


.resultatsRecherche {
    grid-column: 2;
    grid-row: 1;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    margin-top: 60px;
    display: none;
    /* Espace sous la barre de recherche */
}

.resultatsRecherche:hover {
    border: solid white;
}

.feed {
    margin-top: 50px;
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 75%;
}


.sidebar {
    position: sticky;
    top: 70px;
    height: fit-content;
    grid-row: 1 / 3;
    grid-column: 3;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.listeNotifs {
    max-height: 400px;
    /* ajuste selon ton layout */
    overflow-y: auto;
    /* scroll vertical */
    overflow-x: hidden;
    /* évite le scroll horizontal */
}

/* debut page profil */

main .profil {
    background-color: #063970;
    flex: 1;
}

.infosUtilisateur {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
}

.utilisateur {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 15px;
}

.utilisateur img {
    padding: 20px;
}

.stat {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    align-items: center;
}

/* fin page profil */

main .notifs,
main .suggestions {
    border: solid white;
    padding-left: 10px;
    padding-right: 10px;
}

.suggestions h1 {
    font-size: 18px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.home .notifications h1 {
    font-size: 18px;
}

main .createAccount,
main .contact-form,
main .connexion,
main .creaPub {
    /*page 1 création de compte*/
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;

    /*image de fond*/
    background-image: url("../img/musiqueGrisFlou.svg");
    background-size: cover;
    background-position: center;
    width: 100%;
    min-height: 300px;
}

main .index,
main .choisirConnexion {
    background-image: url("../img/musiqueBlancFlou.svg");
    background-size: cover;
    /* adapte l'image au conteneur */
    background-position: center;
    /* centre l'image */
    width: 100%;
    /* nécessaire pour que le fond occupe tout le conteneur */
    min-height: 300px;
    /* donne de la hauteur pour que le fond soit visible */
}

.profil .musiqueEpinglee {
    background-image: url("../img/musiqueBlancFlou.svg");
    background-repeat: repeat-x;
    /* répétition horizontale */
    background-size: auto 120px;
    /* hauteur contrôlée, largeur auto */
    background-position: center;
    width: 100%;
    min-height: 120px;
    margin-top: 50px;
    margin-bottom: 100px;
}


.centre {
    /*image et atouts page index*/
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    margin: 15px;
    gap: 320px;
    margin-top: 60px;
    margin-bottom: 100px;
}

.privacy,
.copyrights,
.terms {
    background-color: #063970;
    color: white;
    font-family: Afacad;
}

.atouts {
    /*liste atouts page index*/
    font-family: Afacad;
    font-size: 17px;
    background-color: #456698;
    color: white;
    padding: 6px 20px;
    padding-right: 40px;
    box-shadow: 2px 2px 5px #00000040;
    /*ombre*/
}


/* FORMULAIRES -------------------------------------------------------------------------------------------------------*/

form {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding-left: 80px;
    padding-right: 80px;

}

button {
    padding-right: 8px;
    align-self: center;
}

.like,
.btCommenter,
.btEnvoyer {
    background: none;
    border: none;
    color: white;
}

legend {
    font-family: Minecraftia;
    font-size: 15px;
    color: white;
    margin-bottom: 10px;
}

input:not([type="radio"]),
textarea {
    height: 35px;
    font-family: Afacad;
    font-size: 14px;
    padding: 6px 10px;
    padding-right: 5px;
    border-radius: 8px;
    border: 1px solid #456698;
}

input[type="radio"] {
    align-self: auto;
}

/*
.inputCommentaires{
    margin-right: 10px;
    width: 100%;
    box-sizing: border-box;
}
*/

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

/* Tablettes (largeur max 1024px) */
@media screen and (max-width: 1024px) {

    /* Réduction de la grille principale */
    main .home {
        grid-template-columns: 1fr 2fr;
        grid-template-rows: auto auto auto;
        gap: 15px;
        padding: 10px;
    }

    .recherche {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .feed {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .menuBoutons {
        grid-column: 1;
        grid-row: 3;
        position: static;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
    }

    .notifications {
        grid-column: 2;
        grid-row: 3;
    }

    .suggestions {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    /* Page index - réduction de l'écart */
    .centre {
        gap: 100px;
        margin-top: 40px;
        margin-bottom: 60px;
    }

    /* Formulaires - réduction du padding */
    form {
        padding-left: 40px;
        padding-right: 40px;
    }

    /* Profil - adaptation de la grille */
    .infosUtilisateur {
        grid-template-columns: 1fr 2fr;
        gap: 15px;
    }
}

/* Tablettes portrait et grands mobiles (largeur max 768px) */
@media screen and (max-width: 768px) {

    /* Header et footer - adaptation */
    header,
    footer {
        height: auto;
        min-height: 60px;
        padding: 10px;
        flex-wrap: wrap;
        gap: 10px;
    }

    header .bouton {
        padding: 4px 8px;
        margin-right: 4px;
        font-size: 12px;
    }

    .logo h1 {
        font-size: 24px;
    }

    /* Grille home - une seule colonne */
    main .home {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 10px;
    }

    .recherche,
    .feed,
    .notifications,
    .suggestions,
    .menuBoutons {
        grid-column: 1;
        grid-row: auto;
    }

    .menuBoutons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 0;
    }

    /* Page index - passage en colonne */
    .centre {
        flex-direction: column;
        gap: 30px;
        margin: 20px 10px;
    }

    .atouts {
        font-size: 15px;
        padding: 10px 15px;
    }

    /* Formulaires - moins de padding */
    form {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Profil - une colonne */
    .infosUtilisateur {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .utilisateur {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .stat {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    /* Typographie - ajustements */
    h1 {
        font-size: 22px;
    }

    .home h3 {
        font-size: 18px;
    }

    .profil h3 {
        font-size: 16px;
    }
}

/* Mobiles (largeur max 480px) */
@media screen and (max-width: 480px) {

    /* Header très compact */
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
    }

    .gauche {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    header .bouton {
        font-size: 11px;
        padding: 3px 6px;
    }

    .logo h1 {
        font-size: 20px;
    }

    img {
        max-width: 40px;
        margin-left: 4px;
    }

    /* Footer compact */
    footer {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        font-size: 12px;
    }

    /* Formulaires - padding minimal */
    form {
        padding-left: 15px;
        padding-right: 15px;
    }

    input,
    textarea {
        font-size: 16px;
        /* Évite le zoom automatique sur iOS */
    }

    /* Boutons plus tactiles */
    .bouton,
    .boutonCote {
        min-height: 44px;
        padding: 12px 10px;
    }

    /* Stats en 3 colonnes compactes */
    .stat {
        font-size: 14px;
    }

    /* Typographie mobile */
    h1 {
        font-size: 20px;
    }

    .home h3 {
        font-size: 16px;
    }

    .createAccount h1,
    .contact-form h1,
    .connexion h1,
    .creaPub h1 {
        font-size: 22px;
    }

    /* Grille home - espacement réduit */
    main .home {
        gap: 10px;
        padding: 8px;
    }

    /* Posts et commentaires */
    .posts {
        padding: 8px;
        margin-bottom: 8px;
    }

    .commentaires,
    .notifs div {
        padding: 8px;
        margin-bottom: 6px;
    }
}

/* Très petits écrans (largeur max 360px) */
@media screen and (max-width: 360px) {
    .logo h1 {
        font-size: 18px;
    }

    h1 {
        font-size: 18px;
    }

    form {
        padding-left: 10px;
        padding-right: 10px;
    }

    .atouts {
        font-size: 14px;
        padding: 8px 12px;
    }
}

.search-results {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
}

.search-results div {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
}

.search-results div:hover {
    background: #f0f0f0;
}

.search-results img {
    margin-right: 10px;
}

.search-results .text {
    display: flex;
    flex-direction: column;
}


.search-fieldset {
    position: relative;
}

.posts img:not(.photoProfilPublication) {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
    border-radius: 8px;
}

.posts div:not(.partieCommentaires) {
    margin: 10px;
    display: flex;

}

.posts div:first-child:not(.info) {
    background-color: #456698;
    padding: 10px;
}

.posts div div {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.posts div div.contenaire {
    flex-direction: row;
    background-color: #456698;
    padding: 10px;
}




/*Page Discover --------------*/

.discover h1,
.discover p {
    color: #063970;
    text-align: center;
}

.genres-container {
    text-align: center;
    margin: 20px auto;
    background-color: #456698;
    color: white;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    box-shadow: 2px 2px 5px #00000040;
}

.genres-container h3 {
    font-family: 'Minecraftia';
}

.genre-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.genre-link {
    font-family: 'Minecraftia';
    font-size: 12px;
    color: #ffffff;
    background-color: #063970;
    padding: 8px 14px;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.2s;
}

.genre-link:hover {
    background-color: #355a8a;
}

.map-container {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: flex-start;
}

.world-map {
    width: 70%;
    height: auto;
    object-fit: contain;
}

.info-panel {
    width: 20%;
    background: #456698;
    color: white;
    padding: 15px;
    border-radius: 8px;
    height: auto;
}


/*vinyle*/
.rotate-vinyle {
    animation: spin 4s linear infinite;
    width: 300px;
    height: 300px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


.contenaire {
    display: flex;
    /* aligne les enfants horizontalement */
    align-items: center;
    /* centre verticalement le bouton et le compteur */
    gap: 5px;
    /* espace entre le bouton et le nombre */
}

.likeCommentaire {
    display: flex;
}

.lienPublicationDeezer {
    margin-left: 50px;
}

.listTrack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    height: auto;
    color: white;
}

.listTrack div {
    background-color: #456698;
    padding: 10px;
    border-radius: 8px;
    box-sizing: border-box;
    text-align: center;
}

.listTrack div:hover {
    background-color: #456698;
}

.resultat-lien-publication {
    align-items: center;
    border-radius: 40px;
    box-shadow: 3px 3px 5px #042344, -3px -3px 5px #042344;
}

span {
    color: white;
    text-align: center;
}


.posts h3 {
    text-align: center;
}

.resultat-lien-publication .text {
    justify-content: center;
    height: 100px;
}

button.like,
button.btCommenter {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    /* enlève le padding par défaut */
    display: flex;
    align-items: center;
    /* centre l’icône dans le bouton */
}

.resultat-lien-publication img {
    width: 50%;
    height: 50%;
    border-radius: 150px;
    object-fit: cover;
}

legend {
    color: black;
}

fieldset {
    border: solid black 2px;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 20px;
}

.editProfil form fieldset {
    color: #456698;
    border: solid #456698 2px;
}

.editProfil form legend {
    color: #456698;
}

.editProfil form label:first-child {
    flex-direction: row;
    text-align: center;
    align-items: center;
}

.PublicationProfil {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.PublicationProfil article {
    width: 80%;
}

.posts .text {
    height: 300px;
    margin-left: 100px;
}

.posts .text h3 {
    font-size: 30px;
}

div.partieCommentaires {
    margin-top: 20px;
    border-top: solid 2px white;
    padding-top: 10px;
    background-color: #456698;
}

div.partieCommentaires p:first-child {
    margin: 15px;
}

span.erreur{
    color: red;
    margin: 10px;
}



div.info{
  background-color: #063970;
  align-items: end;
  margin-bottom: 20px;
}

div.info.track{
    align-items: center;
}