/* =========================================
   1. GLOBALS & RESETS
   ========================================= */
* {
    transition: 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
    
}

body {
    height: 100%;
    margin: 0; 
    font-family: "Anaheim", sans-serif;
    font-weight: 300;
    font-style: normal;
    color: black;
    overflow-x: hidden;
}

/* =========================================
   2. MAIN LAYOUT CONTAINERS
   ========================================= */
#editing {
    display: flex;
    justify-content: space-around;
    margin-top: 180px;
    margin-bottom: 150px;
    height: fit-content;
    width: 100%;
}

.commande-achat {
    display: flex;
    flex-direction: column;
}

.commande-achat h2{
    font-size: 45px;
    -webkit-text-stroke-width: 0px;
}

.title{
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 20px;
}


#visualisation-bracelet {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;

}

.contentPerle{
    display: flex;
    height: 100px;
    width: 100%;

}

/* =========================================
   3. SECTIONS & TYPOGRAPHY
   ========================================= */
.choix-perles {
    display: flex;
    flex-wrap: wrap; 
    gap: 15px; 
    margin-top: 70px;
    flex-direction: column; 
}


.choix-materiaux, 
.choix-cadrans,.commande{
    margin-top: 50px; 
    
}

.donné{
    margin-top: 5px;
    width: 380px;
}

.donné p{
    font-size: 20px ;
}




.commande-btn{
    display: block;
    padding-top: 20px;
    gap: 15px;
    flex-direction: column-reverse;
    width: fit-content;
    overflow: visible;
    
}

.choix-perles h4, 
.choix-materiaux h4, 
.choix-cadrans h4, .commande h4 {
    width: 100%; 
    font-size: 20px; 
    margin-bottom: 15px;
    font-weight: 100; 
    font-family: "Anaheim", sans-serif;
    font-style: normal;
}

.commande-achat h3{
    font-style: italic;
    font-size: 22px;
}

/* =========================================
   4. BUTTONS
   ========================================= */
/* --- Perle Buttons --- */
.btn-perle {
    background: none; 
    border: none; 
    cursor: pointer;
    padding: 0;
    height: 90px;
    width: 70px;
}

.btn-perle img {
    width: 100px; 
    height: 100%; 
    transition: transform 0.2s ease-in-out;
}

.perle-item{
    width: 70px;
    height: 100px;
}

.btn-perle:hover img {
    transform: scale(1.1); 
}

/* --- Material & Cadran Buttons --- */
.btnHolder, .btn-cadran {
    background-color: #FFE8CC;
    color: #000000;
    border: 3px solid  #FFE8CC;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btnHolder:hover, .btn-cadran:hover {
    border-color: #FFBB00; 
    transform: scale(1.1), rotate(90deg); 
}

.btnHolder {
    background-color: #FFE8CC;
    color: #000000;
    border: 3px solid #FFE8CC;
    border-radius: 16px;
    padding: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    overflow: hidden;
}

.btnHolder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.btnHolder:hover {
    border-color: #FFBB00;
    transform: scale(1.1);
}

.btnHolder.selected {
    border-color: #FF9300;
}

.btnHolder, .btn-cadran {
    background-color: #FFE8CC;
    border: 3px solid #FFE8CC;
    border-radius: 16px;
    padding: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    overflow: hidden;
    position: relative; /* Pour le tooltip */
}

.btnHolder img, .btn-cadran img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.btnHolder:hover, .btn-cadran:hover {
    border-color: #FFBB00;
    transform: scale(1.1);
}

.btnHolder.selected, .btn-cadran.selected {
    border-color: #FF9300;
}

/* Tooltip */
.btnHolder::after, .btn-cadran::after {
    content: attr(data-name);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.btnHolder:hover::after, .btn-cadran:hover::after {
    opacity: 1;
}

.boite-choix-cadrans{
    display: flex;
    gap: 15px
}

.boite-choix-materiaux{
    display: flex;
    gap: 15px;    
}

/* --- Action Buttons (Add/Remove) --- */
#btn-Sup {
    background-color:  #FFE8CC;
    color: #000000;
    border: 3px solid  #FFE8CC;
    border-radius: 999px;
    padding: 10px 22px;
    padding-right: 220px;
    font-size: 20px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    margin-right: 10px;
    width: fit-content;
}

.commande-btn h4{
    color: 3;
    font-family:"Anaheim", sans-serif;
    font-style: normal;
    font-weight: 100;
    color: #000000;
    font-size: 20px;
    width: 10%;
    margin-top: 5px;
    margin-left: 15px;
    
}


#btn-Ajt{
    display: flex;
    background-color:  transparent;
    color: #000000;
    padding: 0px 14px;
    font-size: 20px;
    cursor: pointer;
    width: fit-content;
    border: none;
    
}

.plus{
    display: flex;
    background-color:  #000000;
    color: #ffffff;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    opacity: 0.60;
    padding: 0px 10px;


}

.ajt{
    display: flex;
    background-color:  transparent;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 0px 14px;
    font-size: 20px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    width: fit-content;
    padding-top: 5px;
    padding-bottom: 5px;
    margin-left: 25%;
}

#btn-Sup:hover {
    border-color: #FFBB00; 
    transform: scale(1.1); 
}

#btn-Ajt:hover{
    transform: scale(1); 
}

.ajt:hover{
    transform: scale(1.1) ;
}

.btn-Ajt.selected, .btn-Sup.selected {
    border-color: #FF9300;
}


#btn-valider {
    background-color: #FF3C02;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 780px;
    transition: transform 0.2s;
    margin-left: 500px;
    width: 190px;
    position: absolute;
}

#btn-valider:hover {
    transform: scale(1.1); 
}

/* =========================================
   5. LISTS & MENUS
   ========================================= */
#liste {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#liste li {
    background-color: #FFE8CC;
    border: 1px solid #FFE8CC;
    border-radius: 30px;
    padding: 10px 22px;
    color: rgb(0, 0, 0); 
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 80px;
    width: fit-content;
}

#liste li button {
    background-color: #FFE8CC;
    color: #000000;
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s, transform 0.2s;
}

#liste li button:hover {
    transform: scale(1.1); 
}


#ListeSupprimer {
    width: 100%;
    max-width: 540px;
    color: #000000;
    display: block; 
    margin-top: 12px;
    padding: 10px;
}


#liste li.active {
    border-color: #FF9300;
    box-shadow: 0px 0px 15px rgba(255, 147, 0, 0.5);
    transform: scale(1.1);
}


.back-popup{
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    position: fixed;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.popup{
    position: fixed;
    height: 60%;
    width: 65%;
    display: flex;
    align-items: center;
    z-index: 10;
    background-color: #a5612e;
    border-radius: 30px;
}

.popupContent {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.containerBtn{
    display: flex;
    justify-content: space-evenly;
    width: 100%;

}

.popupContent img{
    height: auto;
    width: 135px;
}

.nb-bracelets, .nb-perle{
    display: flex;
}

/* =========================================
   6. VISUAL COMPONENTS
   ========================================= */
.fil {
    position: relative;
    width: 60px;
    height: 310px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
}

.cadran {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 0;
}

.perleVisu {
    z-index: 1;
    position: relative;
    height: 60px;
    padding-top: 10px;
    transition: none;
}

.perleVisu img{
    width: auto;
    height: 50px;
}

#notice {
    color: #8F8F8F;
    
    margin-left: 25px;
    margin-bottom: 30px;
    width: 95%;

}

#notice p{
    font-size: 12px;
}

/* =========================================
   POPUP VARIATIONS PERLES
   ========================================= */

/* Modale principale */
.popup-modal {
    position: relative;
    background-color: #E3BA7C; /* Couleur sable de ta maquette */
    border-radius: 20px;
    padding: 40px;
    width: 650px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.2);
}

/* Bouton Fermer "X" en haut à droite */
.popup-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: #000;
    font-size: 35px;
    cursor: pointer;
    transition: transform 0.2s;
}

.popup-close:hover {
    transform: scale(1.1);
}

/* Layout Séparé (Aperçu à gauche / Grille à droite) */
.popup-content-split {
    display: flex;
    align-items: center;
    gap: 50px;
}

/* Colonne Gauche (Grande image) */
.popup-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-left img {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

/* Colonne Droite (Options) */
.popup-right {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre le contenu de la colonne droite */
}

/* Titre "Choisis ton modèle :" */
.popup-title {
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 25px;
    text-align: center;
    color: #000;
}

/* Grille des variations (3 colonnes) */
.variation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    justify-items: center;
}

/* Boutons des variations (Les petites perles) */
.variation-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.variation-btn img {
    width: 60px; /* Taille des déclinaisons */
    height: auto;
}

.variation-btn:hover {
    transform: scale(1.1);
}

/* Feedback visuel pour la perle sélectionnée */
.variation-btn.selected img {
    transform: scale(1.15);
    filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.4));
}

/* Bouton Ajouter rouge */
.btn-ajouter {
    background-color: #E22D1B; /* Rouge de ta maquette */
    color: #FFF;
    border: none;
    border-radius: 10px;
    padding: 12px 40px;
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    align-self: flex-end; /* Pousse le bouton à droite */
    transition: background-color 0.2s, transform 0.2s;
}

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

