/**
 * Style de la page produit — Redesign Premium
 * @author Shawn Dutil
 */

/* ===========================
   LAYOUT PRINCIPAL
=========================== */
.container_contenu {
    display: flex;
    justify-content: center;
    padding: 48px 32px;
    background: var(--creme);
    min-height: calc(100vh - var(--navbar-h));
    width: 100%;
}

.sous_container_contenu_produit {
    display: flex;
    gap: 36px;
    width: 100%;
    max-width: 1280px;
    align-items: flex-start;
}

/* ===========================
   SIDEBAR CATÉGORIES
=========================== */
.container_categorie {
    flex-shrink: 0;
    width: 220px;
    position: sticky;
    top: calc(var(--navbar-h) + 24px);
}

.sideBar_categorie {
    background: var(--vert-profond);
    border-radius: 2px;
    padding: 28px 20px;
    border-top: 2px solid var(--or);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.sideBar_categorie h2 {
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--or);
    margin: 0 0 20px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

#categorie-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lien_categorie {
    font-family: 'Raleway', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.65);
    background: transparent;
    border: none;
    border-radius: 2px;
    padding: 10px 14px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    position: relative;
    transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.lien_categorie::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 0;
    background: var(--or);
    transition: height 0.25s ease;
    border-radius: 1px;
}

.lien_categorie:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    padding-left: 20px;
}

.lien_categorie:hover::before {
    height: 60%;
}

.lien_categorie.actif {
    color: var(--or-clair);
    background: rgba(201, 168, 76, 0.08);
    font-weight: 700;
    padding-left: 20px;
}

.lien_categorie.actif::before {
    height: 60%;
}

/* ===========================
   CONTENEUR PRODUITS
=========================== */
.container_produit {
    flex: 1;
    min-width: 0;
}

.container_produit > h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 400;
    font-style: italic;
    color: var(--vert-profond);
    margin: 0 0 32px 0;
    padding-bottom: 16px;
    position: relative;
    display: inline-block;
}

.container_produit > h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, var(--or), transparent);
}

/* ===========================
   GRILLE PRODUITS
=========================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ===========================
   CARTE PRODUIT
=========================== */
.product-card {
    background: #fff;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-bottom: 2px solid transparent;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    animation: fadeInCard 0.5s ease forwards;
}

.product-card:nth-child(1)  { animation-delay: 0.05s; }
.product-card:nth-child(2)  { animation-delay: 0.10s; }
.product-card:nth-child(3)  { animation-delay: 0.15s; }
.product-card:nth-child(4)  { animation-delay: 0.20s; }
.product-card:nth-child(5)  { animation-delay: 0.25s; }
.product-card:nth-child(6)  { animation-delay: 0.30s; }
.product-card:nth-child(7)  { animation-delay: 0.35s; }
.product-card:nth-child(8)  { animation-delay: 0.40s; }
.product-card:nth-child(9)  { animation-delay: 0.45s; }

@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-bottom-color: var(--or);
}

/* Image */
.image-button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover img {
    transform: scale(1.06);
}

/* Infos carte */
.product-card-form {
    padding: 16px 18px 0;
}

.product-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--vert-profond);
    line-height: 1.4;
    margin: 0;
}

/* Boutons carte */
.product-buttons {
    padding: 12px 18px 18px;
}

.btn-ajout-panier {
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--vert-profond);
    background: linear-gradient(135deg, var(--or) 0%, var(--or-clair) 100%);
    border: none;
    border-radius: 2px;
    padding: 12px 20px;
    cursor: pointer;
    width: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 3px 12px rgba(201, 168, 76, 0.3);
    position: relative;
    overflow: hidden;
    margin: 0;
}

.btn-ajout-panier::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--or-clair) 0%, var(--or) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    
}

.btn-ajout-panier span { position: relative; z-index: 1; }

.btn-ajout-panier:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.45);
    
}

.btn-ajout-panier:active { transform: translateY(0); }

/* ===========================
   AUCUN PRODUIT
=========================== */
.container_produit > p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: #888;
    padding: 40px 0;
}

/* ===========================
   PAGE DÉTAIL PRODUIT
=========================== */
.container_produit_detail {
    display: flex;
    justify-content: center;
    padding: 48px 32px;
    background: var(--creme);
}

.card_produit_detail {
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: #fff;
    padding: 48px;
    border-radius: 2px;
    border-top: 2px solid var(--or);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
    width: 55%;
    max-width: 860px;
}

.form_retour {
    display: flex;
    justify-content: flex-start;
}

.image_detail_carousel {
    max-width: 100%;
    max-height: 460px;
    object-fit: contain;
    display: block;
    border-radius: 2px;
}

.bouton_fleche {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(28, 46, 28, 0.75);
    color: var(--or);
    font-size: 1.4rem;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 2px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 1;
    line-height: 1;
}

.bouton_fleche:hover { background: var(--vert-profond); }
.bouton_fleche.avant { left: 12px; }
.bouton_fleche.apres { right: 12px; }

/* Infos détail */
.header_produit_detail {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.nom_produit {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    font-style: italic;
    color: var(--vert-profond);
    margin: 0 0 6px 0;
    padding-bottom: 12px;
    position: relative;
    display: inline-block;
}

.nom_produit::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, var(--or), transparent);
}

.dimensions_produit {
    display: flex;
    gap: 32px;
    margin-bottom: 8px;
}

.dimensions_produit p {
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #666;
    text-transform: uppercase;
    margin: 0;
}

.description_produit {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #444;
    line-height: 1.8;
    background: var(--creme);
    border-left: 3px solid rgba(201, 168, 76, 0.5);
    padding: 20px 24px;
    border-radius: 0 2px 2px 0;
    gap: 10px;
    display: flex;
    flex-direction: column;
}

/* Accordéon étapes */
.etapes-installation-container {
    background: var(--creme);
    border-radius: 2px;
    padding: 28px;
    border-top: 2px solid var(--or);
}

.etapes-installation-container h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--vert-profond);
    margin: 0 0 24px 0;
    padding-left: 16px;
    border-left: 3px solid var(--or);
    display: block;
}

.etape-accordeon {
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.accordion-toggle {
    width: 100%;
    text-align: left;
    background: var(--vert-profond);
    color: rgba(255, 255, 255, 0.85);
    padding: 14px 18px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.accordion-toggle:hover {
    background: var(--vert-moyen);
    color: var(--or-clair);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 18px;
    background: #fff;
    border-radius: 0 0 2px 2px;
}

.accordion-content p {
    margin: 16px 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.7;
}

.video-etape {
    width: 100%;
    max-width: 600px;
    border-radius: 2px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Messages */
.container_message {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.message-erreur {
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    background: #c0392b;
    color: #fff;
    padding: 14px 28px;
    border-radius: 2px;
}

.messagePanier {
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    color: var(--vert-moyen);
    font-weight: 600;
    text-align: center;
    padding: 8px 0;
}

.aucune-image {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-style: italic;
    color: #888;
    text-align: center;
    padding: 20px;
}

/* Bouton admin */
.btn-lien-nom-mesProduit {
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    background: var(--vert-fonce);
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 2px;
    padding: 8px 14px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin: 4px;
}

.btn-lien-nom-mesProduit:hover {
    color: var(--or-clair);
    border-color: rgba(201,168,76,0.5);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .sous_container_contenu_produit { flex-direction: column; }

    .container_categorie {
        width: 100%;
        position: static;
    }

    #categorie-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .lien_categorie {
        width: auto;
        flex: 1 0 auto;
    }
}

@media (max-width: 640px) {
    .container_contenu { padding: 24px 16px; }
    .product-grid { grid-template-columns: 1fr; }
    .card_produit_detail { padding: 24px; width: 100%; }
    .header_produit_detail { flex-direction: column; }
    .dimensions_produit { flex-direction: column; gap: 8px; }
    .description-etape { width: 100%; }
}

/* Focus accessibilité */
.lien_categorie:focus-visible,
.btn-ajout-panier:focus-visible,
.accordion-toggle:focus-visible {
    outline: 2px solid var(--or);
    outline-offset: 2px;
}