/* ======================================= */
/* CONFIGURATION DE BASE          */
/* ======================================= */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    list-style: none;
    font-family: Arial, serif;
    scroll-behavior: smooth;
    outline: none;
}

:root {
    /* Couleurs de base */
    --rose1: #B20349;
    --rose2: #FB025E;
    --gris: #303843;
    --color: rgba(42, 184, 42, 0.833);
    --noir: #000000;
    --light-white: #F7F6f7;
    --shad-white: #F3EEEB;
    --white: #ffffff;
    
    --bg1: #ffffff;
    --bg2: #dfdfdf;
    --bg3: #303843;
    
    --text-clr1: #303843;
    --text-clr2: #B20349;
    
    /* Ombres et dégradés */
    --btn-clr1: linear-gradient(90deg, var(--rose1), var(--rose2), var(--rose2));
    --btn-clr2: linear-gradient(90deg, var(--rose1), var(--rose2), var(--rose1));
    
    --shadow1: rgba(0,0,0,0.1);
    --shadow2: rgba(0,0,0,0.25);
    
    /* Polices d'écriture */
    --poppins: 'poppins';
    --rubik: 'rubik';
}

/* CORRECTION : Règle du scrollbar dédupliquée */
::-webkit-scrollbar {
    width: 1px;
}

/* CORRECTION : Bloc ::selection corrigé (variable valide, pas de sélecteur imbriqué) */
::selection {
    background: var(--rose2); /* Utilisation d'une variable existante */
    color: var(--light-white);
}

/* ======================================= */
/* STYLES PRINCIPAUX              */
/* ======================================= */

/* Container principal */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg1);
    padding-bottom: 30px;
}

.container {
    width: 80%;
    min-height: 100vh;
}

.container .first_part {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 80vh;
}

.container .first_part .view {
    width: 66%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container .first_part .infos {
    width: 30%;
    min-height: 20vh;
}

.container .first_part .infos h2.nom {
    color: var(--rose1);
    letter-spacing: 1px;
    width: 100%;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.container .first_part .infos h5.desc {
    color: var(--gris);
    width: 90%;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

h3.departement {
    color: green;
    margin-bottom: 10px;
}

.container .first_part .infos h1.prix {
    color: var(--rose2);
    width: 100%;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

h1.error {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
    color: var(--bg2);
    font-size: 4rem;
}

ul.act {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

ul.act li.like {
    color: var(--rose2);
    cursor: pointer;
    font-size: 2rem;
    transition: .2s ease;
}

ul.act li.like:hover {
    transform: scale(1.05);
}

ul.act li.signal {
    color: red;
    position: relative;
    font-size: 2rem;
}

ul.act li.signal ul.menu_signal {
    display: none;
    position: absolute;
    font-size: 0.8rem;
    background: var(--bg1);
    backdrop-filter: blur(30px);
    width: auto;
    border-radius: 10px;
    overflow: auto;
    z-index: 10; /* Ajout d'un z-index pour s'assurer qu'il est au-dessus */
}

ul.act li.signal ul.menu_signal li {
    color: var(--noir);
    padding: 2px 10px;
    transition: .2s ease-in;
    white-space: nowrap;
}

ul.act li.signal ul.menu_signal li:hover {
    color: var(--light-white);
    background: var(--rose1);
    cursor: pointer;
}

ul.act li.signal:hover ul.menu_signal {
    display: block;
}

a.vendor {
    margin-top: 8px;
    width: 80%;
    border-radius: 30px;
    background: var(--bg2);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px;
    transition: .2s ease-in;
    border: 1px solid var(--gris);
    box-shadow: 1px 3px 5px rgba(0,0,0,0.14);
    position: relative;
}

a.vendor i{
    position: absolute;
    top: -20px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--noir);
    color: gold;
    display: flex;
    align-items: center;
    justify-content: center;
}
a.vendor:hover {
    transform: translateY(-3px);
}

a.vendor img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

a.vendor p.market {
    color: var(--gris);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.contact {
    width: 100%;
    min-height: 10vh;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.contact a {
    width: 60%;
    position: relative;
    color: var(--light-white);
    background: var(--rose1);
    padding: 10px 25px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
    font-weight: 600;
    letter-spacing: 1px;
}

.contact a:hover {
    letter-spacing: 2px;
    cursor: pointer;
}

.contact a:active {
    transform: scale(0.98);
}

.contact a img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    position: absolute;
    object-fit: cover;
    top: -10px;
    right: -10px;
    border: 1px solid var(--rose2);
}

/* Sliders */
.splide__track,
.splide__list {
    height: 60vh;
}

/* Section "similaire" */
.sim-box {
    width: 100%;
    min-height: 20vh;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
}

/* Styles des cartes produits (cart) */
.cart {
    background: transparent;
    padding: 10px;
    border-radius: 20px;
    width: 250px;
    min-height: 400px;
    animation: cart .5s linear forwards; /* Ajout de 'forwards' pour maintenir l'état final */
    opacity: 0; /* Opacité initiale pour l'animation */
}

@keyframes cart {
    from {
        transform: translateX(10px);
        opacity: 0;
    }
    to {
        transform: translateX(0px);
        opacity: 1;
    }
}

/* Délais d'animation */
.cart:nth-child(1) { animation-delay: .2s; }
.cart:nth-child(2) { animation-delay: .4s; }
.cart:nth-child(3) { animation-delay: .6s; }
.cart:nth-child(4) { animation-delay: .8s; }
.cart:nth-child(5) { animation-delay: 1s; }
.cart:nth-child(6) { animation-delay: 1.2s; }

.cart h5.name {
    color: var(--gris);
    letter-spacing: 1px;
    font-size: .9rem;
}

.cart .prix { color: var(--rose2); }
.cart .location { color: green; }
.cart img.star { width: 100px; }

.cart .vv {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart .vv ul.options {
    position: absolute;
    right: 5px;
    top: 5px; /* Ajout de 'top' pour un meilleur positionnement */
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 5; /* Ajout d'un z-index */
}

.cart .vv ul.options li {
    color: var(--light-white);
    background: var(--gris); 
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    transform: translateX(10px);
    opacity: 0;
    transition: .3s ease-in-out;
}

.cart .vv ul.options li:hover {
    cursor: pointer;
    background: var(--noir);
}

.cart .vv:hover ul.options li {
    transform: translateX(0px);
    opacity: 1;
}

.cart .vv:hover ul.options li i:hover {
    transform: scale(1.2);
}

.cart a.chanel {
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 20px;
    background: var(--bg2);
    margin-top: 10px;
    width: 60%;
    color: var(--noir);
    font-size: .7rem;
    border: 1px dashed transparent;
    transition: .15s ease;
    position: relative;
}

.cart a.chanel i {
    color: gold;
    background: var(--noir);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid gold;
    position: absolute;
    top: -7px;
    right: -3px;
    font-size: .8rem;
}

.cart a.chanel:hover {
    border: 1px dashed var(--bg3);
}

.cart a.chanel:hover i {
    animation: crown 1s linear;
}

@keyframes crown {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(0deg); top: -8px; }
    60% { transform: rotate(-15deg); top: -8px; }
    80% { transform: rotate(0deg); top: -8px; }
    100% { top: -7px; }
}

.cart a.chanel img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 5px;
}

.cart .vv img.cover:hover {
    transform: scale(1.01);
}

.cart .ri-heart-3-fill {
    color: var(--rose2);
    display: inline-block;
    transition: .1s ease-in-out;
    animation: liked 1s linear;
}

@keyframes liked {
    20%, 40%, 60%, 80% { transform: scale(1.2) rotate(-20deg); }
    30%, 50%, 70%, 90% { transform: scale(1.2) rotate(20deg); }
}

.cart img.cover {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    transition: .2s ease;
    box-shadow: 1px 1px 2px 3px rgba(0,0,0,0.08);
}


/* ======================================================================= */
/* STYLES RESPONSIVES (Media Queries)                             */
/* ======================================================================= */

/* Pour les écrans larges type tablettes (max-width: 1100px) */
@media screen AND (max-width: 1100px) {
    .container {
        width: 95%;
    }
    .cart {
        width: 200px;
    }
    .cart img.cover {
        height: 200px;
    }
    /* Rendre les options visibles par défaut sur les appareils tactiles */
    .cart .vv ul.options li {
        transform: translateX(0px);
        opacity: 1;
    }
}

/* Pour les tablettes (max-width: 900px) */
@media screen AND (max-width: 900px) {
    .sim-box {
        grid-template-columns: repeat(3, 1fr);
    }
    .container .first_part .infos h2.nom { font-size: 1.3rem; }
    .container .first_part .infos h5.desc { font-size: 0.8rem; margin-bottom: 10px; }
    .container .first_part .infos h1.prix { font-size: 1.7rem; }
    ul.act { gap: 10px; }
    ul.act li.like, ul.act li.signal { font-size: 1.8rem; }
    a.vendor { gap: 10px; }
    a.vendor img { width: 30px; height: 30px; }
    a.vendor p.market { font-size: 0.7rem; }
    .contact a { width: 70%; letter-spacing: 0px; }
    .contact a:hover { letter-spacing: 1px; transform: scale(1.05); }
    .contact a img { width: 25px; height: 25px; }
    .container .first_part { margin-top: 30px; }
    .container .first_part .view { margin-bottom: 30px; }
    h1.error { font-size: 3rem; text-align: center; }
    .cart { width: 100%; /* S'adapte à la grille */ }
}

/* Pour les mobiles (max-width: 650px) */
/* CORRECTION : Fusion des deux blocs @media (max-width: 650px) */
@media screen AND (max-width: 650px) {
    .container .first_part {
        flex-direction: column-reverse; /* Passe en colonne pour les petits écrans */
    }
    .container .first_part .view {
        width: 100%;
        min-height: auto; /* Hauteur automatique */
        height: 30vh;
    }
    .splide__track, .splide__list {
        height: 30vh; /* Ajustement de la hauteur du slider */
    }
    .container .first_part .infos {
        width: 100%; /* Prend toute la largeur */
    }
    a.vendor {
        width: 100%;
    }
    .sim-box {
        grid-template-columns: repeat(2, 1fr); /* Grille à 2 colonnes */
    }
    .cart a.chanel {
        width: 80%;
    }
    
    /* Styles pour les éléments de carte qui étaient dans le second bloc */
    .text-items h4, .text-items h5 {
        font-size: 0.7rem;
    }
    .text-items h3 {
        font-size: 0.8rem;
    }
    a.ent {
        width: 95%;
        padding: 4px 6px;
        font-size: 0.6rem;
    }
    i.like {
        font-size: 15px;
        right: 4px;
    }
    h1.error {
        font-size: 1.5rem; /* Taille de police plus petite pour l'erreur */
    }
}