:root {
  /* Ces variables sont écrasées par le PHP, mais on les garde ici en fallback */
  --apt-dyn-bg-1: #1a1a1a;
  --apt-dyn-bg-2: #49494975;
  --apt-dyn-bouton_1: #ff5100;
  --apt-dyn-accent_1: #00ffe0;
  --apt-dyn-stars: #ffdd00;
}

/* --- CONTENEUR PRINCIPAL --- */
.apt-carte-produit {
    display: flex;
    flex-direction: row;
    gap: 20px;
    border-radius: 16px;
    padding: 20px;
    font-family: Arial, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    
    /* DYNAMIQUE COLOR 1 */
    background-color: var(--apt-dyn-bg-1);
}

/* --- COLONNE GAUCHE : IMAGE (1/3) --- */
.apt-colonne.apt-image {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    position: relative;
    padding: 10px;
    padding-top: 10px; 
}

/* L'image : Cercle blanc */
.apt-image img {
    width: 250px; 
    height: 250px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 25px;
    box-shadow: 0 5px 20px #000000;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
    margin-top: 50px;
    flex-shrink: 0; 
}

.apt-image img:hover {
    transform: scale(1.05);
}

/* --- COLONNE DROITE : INFOS (2/3) --- */
.apt-colonne.apt-infos {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
}

/* --- BANNIÈRE SUPERPOSÉE --- */
.apt-banniere { 
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    margin-top: -12px; 
    background: var(--apt-dyn-bg-2);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Centrer le contenu si plusieurs lignes */
    gap: 6px;      
    transition: all 0.2s ease-in-out;
    font-family: monospace;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    
    /* MODIFICATIONS POUR LE RETOUR LIGNE */
    white-space: normal; /* Autorise le retour à la ligne */
    text-align: center;  /* Centre le texte s'il y a 2 lignes */
    width: max-content;  /* S'adapte au contenu... */
    max-width: 90%;      /* ...mais ne dépasse pas 90% de la colonne */
    line-height: 1.2;    /* Espacement correct entre les lignes */
}

.apt-banniere .material-symbols-rounded {
    font-size: 18px;
    line-height: 1;
    color: var(--apt-dyn-accent_1);
}
/* --- BLOC ÉVALUATION (POUCE) --- */
.apt-evaluation {
    display: flex;
    align-items: center;     /* Centre verticalement l'icône et le texte */
    justify-content: center;
    gap: 10px;               /* Espace entre l'icône et le texte */
    margin-top: 15px;
    
    color: #fff;
    
    padding: 8px 16px;       /* Un peu plus d'espace interne */
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    
    /* Pour s'assurer que ça ne dépasse pas de la colonne */
    max-width: 90%;
    width: max-content;
}

.apt-evaluation .material-symbols-rounded {
    font-size: 20px;
    color: var(--apt-dyn-accent_1);
}

/* Groupe qui contient le chiffre et le texte */
.apt-eval-text-group {
    display: flex;
    flex-direction: column; /* On met le chiffre au-dessus, le texte en dessous */
    align-items: flex-start;
    line-height: 1.1;
}

/* Le chiffre (ex: 2,5K) */
.apt-eval-valeur {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
}

/* Le texte "avis utilisateurs" */
.apt-eval-label {
    font-size: 10px;        /* Plus petit */
    font-weight: normal;    /* Plus léger */
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7); /* Blanc avec transparence (gris clair) */
    letter-spacing: 0.5px;
}
/* --- TITRE PRODUIT --- */
.apt-nom {
    font-size: 25px;
    margin: 0 0 20px;
    color: #fff;
    line-height: 1.2;
}

/* --- BLOC PRIX + BOUTON --- */
.apt-prix-bouton {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    
    /* DYNAMIQUE COLOR 2 */
    background: var(--apt-dyn-bg-2);
    
    padding: 12px 10px;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.apt-prix-bouton:hover {
    transform: translateX(6px);
}

.apt-bloc-prix-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-left: 10px;
    line-height: 1.1;
}

.apt-label-prix {
    font-size: 9px;
    text-transform: uppercase;
    color: #cccccc;
    font-weight: normal;
    margin-bottom: 2px;
}

.apt-prix {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
}

/* --- BOUTON --- */
.apt-btn {
    position: relative;
    
    /* DYNAMIQUE COLOR 3 (Orange) */
    background-color: var(--apt-dyn-bouton_1);
    
    color: white;
    padding: 10px 18px;
    font-size: 14px;
    text-decoration: none !important;
    outline: none;
    display: inline-block;
    white-space: nowrap;
    box-shadow: var(--ombre-légère, 0 2px 6px rgba(0, 0, 0, 0.1));
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, background-color 0.3s ease;
    z-index: 0;
    text-transform: uppercase;
}

.apt-btn span {
    position: relative;
    z-index: 1;
}

.apt-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 40%,
        rgba(255, 255, 255, 0.4) 60%,
        transparent 100%
    );
    transform: rotate(-45deg);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.apt-btn:hover,
.apt-btn:focus,
.apt-btn:active {
    background-color: #000;
    /* DYNAMIQUE COLOR 3 pour le texte au survol */
    color: var(--apt-dyn-bouton_1);
    
    transform: scale(1.05);
    /* Ombre utilisant la couleur d'accent */
    box-shadow: 0 0 15px var(--apt-dyn-bouton_1);
    cursor: pointer;
}

.apt-btn:hover::before {
    opacity: 1;
    transform: rotate(-45deg) translateY(120%);
}

/* --- BLOC NOTE + AVIS --- */
.apt-note-avis {
    display: grid;
    grid-template-columns: 90px auto;
    padding: 10px 0px;
    border-radius: 12px;
    align-items: center;
    gap: 20px;
    color: #fff;
    transition: all 0.2s ease-in-out;
}
.apt-note-avis:hover {
    transform: translateX(6px);
}

.apt-note-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.apt-note {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--apt-dyn-bg-2);
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    width: 100px;
    height: 90px;
    border-radius: 15px;
    padding: 4px;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.apt-note-chiffre {
    line-height: 1;
}

.apt-note-sur {
    font-size: 16px;
    color: #ffffff;
    font-weight: normal;
}

.apt-note-etoiles {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

.apt-note-etoiles .material-symbols-rounded {
    font-size: 14px;
    line-height: 1;
    color: var(--apt-dyn-stars);
}

.apt-note-etoiles .etoile-vide {
    color: #ccc;
}

.apt-avis {
    font-size: 15px;
    color: #ffffff;
}

/* --- LISTE DES CATÉGORIES --- */
.apt-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.apt-cat {
    /* DYNAMIQUE COLOR 2 */
    background: var(--apt-dyn-bg-2);
    
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.apt-cat:hover {
    color: #fff;
    /* DYNAMIQUE COLOR 3 (Orange) au survol */
    background: var(--apt-dyn-bouton_1);
}

.apt-cat-icon {
    font-size: 20px;
    line-height: 1; 
}

.apt-cat .material-symbols-rounded {
    font-size: 18px;
}
/* --- LISTE DES CARACTÉRISTIQUES --- */
.apt-caracteristiques-card {
    overflow: hidden;
}

.apt-caracteristiques {
    max-height: 7.5em;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: max-height 0.5s ease;
}

.apt-caracteristiques-card:hover .apt-caracteristiques {
    max-height: 1000px;
}

.apt-carac-item {
    display: flex;
    justify-content: space-between;
    
    /* DYNAMIQUE COLOR 2 */
    background: var(--apt-dyn-bg-2);
    
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 13px;
    color: #dddddd;
    transition: background 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.apt-carac-item:hover {
    /* DYNAMIQUE COLOR 3 (Orange) au survol */
    background-color: var(--apt-dyn-bouton_1);
}

.apt-carac-libelle {
    font-weight: bold;
    color: #ffffff;
}

.apt-carac-item:hover .apt-carac-libelle {
    color: #fff;
} 

.apt-carac-valeur {
    color: var(--apt-dyn-accent_1);
}

.apt-carac-item:hover .apt-carac-valeur {
    font-weight: bold;
    color: #fff;
} 

/* --- VERSION MOBILE (RESPONSIVE) --- */
@media (max-width: 1000px) {
    .apt-carte-produit {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }

    .apt-colonne.apt-image,
    .apt-colonne.apt-infos {
        flex: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .apt-image img {
        width: 160px;
        height: 160px;
        padding: 15px;
    }
    
    .apt-banniere {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        margin-top: -12px;
    }

    .apt-nom {
        font-size: 22px;
        margin-bottom: 15px;
        text-align: center;
    }

    .apt-prix-bouton {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .apt-bloc-prix-container {
        align-items: center;
        margin-left: 0;
    }

    .apt-prix {
        font-size: 18px;
        text-align: center;
    }

    .apt-btn {
        font-size: 13px;
        padding: 8px 14px;
        width: 100%;
        text-align: center;
    }

    .apt-note-avis {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .apt-categories {
        justify-content: center;
    }

    .apt-caracteristiques {
        margin-top: 10px;
    }
    
    .apt-carac-item {
        padding: 6px 10px;
    }
}