/* ===================================
   TMC PORTFOLIO - STYLES OPTIMISÉS
   =================================== */

/* ===================================
   STYLES GÉNÉRAUX ET BOUTONS
   =================================== */

/* Style personnalisé pour le bouton "En savoir plus" */
.tp-btn-border {
    background-color: #068953 !important;
    color: white !important;
    border-color: #068953 !important;
}

.tp-btn-border:hover {
    background-color: #0a57a4 !important;
    color: white !important;
    border-color: #0a57a4 !important;
}

/* Style pour le titre TMC en bleu */
.tp-offcanvas-2-right-info-title {
    color: #0a57a4 !important;
}

/* Style pour le bouton menu sur mobile - couleur verte pour visibilité */
.tp-header-2-bar {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid white !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    transition: all 0.3s ease !important;
}

.tp-header-2-bar:hover {
    background-color: #068953 !important;
    color: white !important;
    border: 2px solid #068953 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(6, 137, 83, 0.3) !important;
}

/* Style pour les lignes du bouton hamburger */
.tp-header-2-bar span:last-child i {
    background-color: white !important;
    height: 2px !important;
    width: 20px !important;
    display: block !important;
    margin: 4px 0 !important;
    transition: all 0.3s ease !important;
}

.tp-header-2-bar:hover span:last-child i {
    background-color: white !important;
}

/* ===================================
   ÉCRAN DE CHARGEMENT
   =================================== */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #068953, #0a57a4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: logo-pulse 2s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    margin: 20px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    margin-top: 15px;
    opacity: 0.9;
    animation: text-fade 2s ease-in-out infinite;
}

@keyframes text-fade {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.6; }
}

/* Animation mineur TMC */
.loading-content {
    position: relative;
}

.loading-logo.small {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    animation: none;
}

.loading-miner {
    position: relative;
    width: 200px;
    height: 140px;
    margin: 0 auto 10px;
}

/* Le mineur (cube avec logo) */
.loading-miner .miner {
    position: absolute;
    left: 10px;
    bottom: 24px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(2px);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    transform-origin: bottom center;
    animation: miner-bounce 1.6s ease-in-out infinite;
}

@keyframes miner-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* La pioche */
.loading-miner .pickaxe {
    position: absolute;
    left: 70px;
    bottom: 60px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    /* Cercle invisible servant de pivot */
    transform-origin: 10px 50px;
    animation: pickaxe-swing 1s ease-in-out infinite;
}

/* Pioche dessinée avec pseudo-éléments */
.loading-miner .pickaxe::before,
.loading-miner .pickaxe::after {
    content: "";
    position: absolute;
    display: block;
}

/* Manche */
.loading-miner .pickaxe::before {
    left: 8px;
    top: 12px;
    width: 6px;
    height: 46px;
    background: #c8a470;
    border-radius: 3px;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}

/* Lame */
.loading-miner .pickaxe::after {
    left: -2px;
    top: 4px;
    width: 34px;
    height: 10px;
    background: linear-gradient(90deg, #e6edf5, #cfd9e3);
    border-radius: 6px;
    transform: rotate(20deg);
    box-shadow: 0 1px 0 rgba(0,0,0,0.15);
}

@keyframes pickaxe-swing {
    0% { transform: rotate(-20deg); }
    45% { transform: rotate(18deg); }
    55% { transform: rotate(22deg); }
    100% { transform: rotate(-20deg); }
}

/* Roche */
.loading-miner .rock {
    position: absolute;
    right: 18px;
    bottom: 20px;
    width: 84px;
    height: 56px;
    background: linear-gradient(160deg, #eceff4, #b9c6d6);
    border-radius: 14px;
    box-shadow: inset 0 -6px 16px rgba(0,0,0,0.12), 0 8px 18px rgba(0,0,0,0.18);
    animation: rock-hit 1s ease-in-out infinite;
}

@keyframes rock-hit {
    0%, 40%, 100% { transform: translateX(0); }
    45% { transform: translateX(2px); }
    50% { transform: translateX(-3px); }
    55% { transform: translateX(1px); }
}

/* Éclats de roche */
.loading-miner .debris {
    position: absolute;
    right: 36px;
    bottom: 72px;
    width: 0;
    height: 0;
    pointer-events: none;
}

.loading-miner .debris span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #e3eaf2;
    border-radius: 2px;
    opacity: 0;
    transform: translate(0,0) scale(0.6);
    animation: debris-fly 1s ease-out infinite;
}

.loading-miner .debris span:nth-child(1) { animation-delay: 0.0s; }
.loading-miner .debris span:nth-child(2) { animation-delay: 0.05s; }
.loading-miner .debris span:nth-child(3) { animation-delay: 0.1s; }
.loading-miner .debris span:nth-child(4) { animation-delay: 0.15s; }

@keyframes debris-fly {
    0%, 35% { opacity: 0; transform: translate(0,0) scale(0.6); }
    40% { opacity: 1; }
    60% { transform: translate(-10px,-12px) scale(0.9); }
    80% { transform: translate(-22px,-18px) scale(0.75); opacity: 0.9; }
    100% { transform: translate(-30px,-24px) scale(0.6); opacity: 0; }
}

/* ===================================
   STYLES DES PRODUITS - GÉNÉRAUX
   =================================== */

.product-title {
    text-align: center;
    color: #068953;
    font-weight: bold;
    font-size: 24px;
    margin-top: 10px;
    margin-bottom: 30px;
}

.product-card {
    padding: 10px;
    height: 100%;
}

.product-box {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    height: 280px;
    padding-bottom: 25px;
}

.product-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    display: block;
    margin-top: 35px;
}

.price-tag {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 87, 164, 0.9);
    color: white;
    padding: 8px 18px;
    font-size: 16px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.price-tag.active {
    opacity: 1;
}

/* Hover effect général */
.hover-effect {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hover-effect:hover {
    transform: scale(1.08) translateY(-10px);
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ===================================
   CARROUSELS DES PRODUITS
   =================================== */

.products-carousel-container {
    margin-bottom: 40px;
}

.products-carousel {
    padding: 20px 0;
}

.products-carousel .swiper-slide {
    height: auto;
}

/* Navigation du carrousel des produits */
.products-nav-prev,
.products-nav-next {
    color: #068953;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.products-nav-prev:hover,
.products-nav-next:hover {
    background: #068953;
    color: white;
}

.products-pagination {
    bottom: -30px;
}

.products-pagination .swiper-pagination-bullet {
    background: #068953;
    opacity: 0.3;
}

.products-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: #068953;
}

/* ===================================
   STYLES SPÉCIFIQUES PAR PRODUIT
   =================================== */

/* PIERRES TAILLÉES - Images plus basses */
.pierres-taillees-carousel .product-box img {
    margin-top: -30px !important;
    object-position: center 50% !important;
}

.pierres-taillees-carousel .product-box {
    padding-bottom: 15px !important;
}

/* GALETS DÉCORATIFS - Même style que les pierres taillées */
.galets-decoratifs-carousel .product-box img {
    margin-top: -30px !important;
    object-position: center 50% !important;
}

.galets-decoratifs-carousel .product-box {
    padding-bottom: 15px !important;
}

/* GRAVIER MIXTE - Centré */
.gravier-center {
    display: flex !important;
    justify-content: center !important;
}

.gravier-center .swiper-wrapper {
    justify-content: center !important;
}

.gravier-center .swiper-slide {
    width: auto !important;
    max-width: 400px !important;
}

/* ===================================
   SLIDERS D'IMAGES DE FOND
   =================================== */

.gallery-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-container .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80vh;
    position: relative;
    overflow: hidden;
}

.slide-inner {
    position: relative;
    width: 90%;
    height: 100%;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .tp-header-2-bar {
        font-weight: 600 !important;
        font-size: 14px !important;
        min-width: 80px !important;
    }
    
    .tp-header-2-bar span:first-child {
        color: #068953 !important;
        font-weight: 600 !important;
    }
    
    .tp-header-2-bar:hover span:first-child {
        color: white !important;
    }
    
    /* Afficher les prix sur mobile */
    .price-tag {
        opacity: 1 !important;
    }
    
    .product-title {
        font-size: 18px;
    }
    
    .gallery-container .swiper-slide {
        height: 60vh;
    }
}

@media (max-width: 576px) {
    .product-box {
        height: 250px;
    }
    
    .product-box img {
        margin-top: 25px;
    }
    
    .price-tag {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .gallery-container .swiper-slide {
        height: 50vh;
    }
    
    .slide-inner {
        width: 95%;
    }
}

/* ===================================
   ANIMATIONS ET TRANSITIONS
   =================================== */

/* Animation d'entrée pour les produits */
.product-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation pour les prix au survol */
.price-tag {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   UTILITAIRES
   =================================== */

.mt-40 {
    margin-top: 40px;
}

.mb-20 {
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}
