/* Styles pour la page Gammes de Champagne */

/* Hero et introduction */
.gammes-intro {
    padding: 4rem 0;
    background-color: var(--white);
    position: relative;
}

.gammes-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/vintage-vigne.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.1;
    z-index: 0;
}

.vintage-border {
    border: 1px solid var(--beige);
    padding: 2.5rem;
    position: relative;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.intro-text {
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

/* Navigation des gammes */
.gammes-nav {
    background-color: var(--cream);
    padding: 1rem 0;
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.gammes-nav-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    justify-content: flex-start;
    padding: 0 1rem 0.5rem 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: calc(100% - 2rem);
    margin: 0 auto;
}

/* Assurer que le premier élément est visible */
.gammes-nav-wrapper::before {
    content: '';
    flex: 0 0 0px;
}

.gammes-nav-wrapper::after {
    content: '';
    flex: 0 0 1rem;
}

.gammes-nav-wrapper::-webkit-scrollbar {
    height: 4px;
}

.gammes-nav-wrapper::-webkit-scrollbar-track {
    background: #e5e5e5;
    border-radius: 2px;
}

.gammes-nav-wrapper::-webkit-scrollbar-thumb {
    background: #b8b8b8;
    border-radius: 2px;
}

.gammes-nav-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.gammes-nav-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
    flex: 0 0 auto;
}

.gammes-nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--beige);
    transition: var(--transition);
}

.gammes-nav-item:hover::after,
.gammes-nav-item.active::after {
    width: 70%;
}

/* Conteneur des gammes */
.gammes-container {
    position: relative;
    min-height: 600px;
}

/* Sections des gammes */
.gamme-section {
    padding: 6rem 0;
    scroll-margin-top: calc(var(--header-height) + 60px);
    position: relative;
    display: none; /* Masquer toutes les sections par défaut */
}

.gamme-section.active {
    display: block; /* Afficher uniquement la section active */
}

.gamme-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/vintage-vigne.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.04;
    z-index: 0;
}

.gamme-section:nth-of-type(odd) {
    background-color: var(--white);
}

.gamme-section:nth-of-type(even) {
    background-color: var(--cream);
}

.gamme-content {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}

.gamme-content.reverse {
    flex-direction: row-reverse;
}

.gamme-content.reverse .gamme-image {
    margin-left: 30px;
    margin-right: 0;
}

.gamme-image {
    flex: 0 0 350px;
    width: 350px;
    height: 500px;
    position: relative;
    text-align: center;
    margin-left: 0;
    margin-right: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.bottle-img {
    height: 450px;
    width: auto;
    max-width: 200px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    background-color: transparent;
    mix-blend-mode: normal;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.bottle-img:hover,
.bottle-img.hover-active {
    transform: translateY(-10px);
    filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.15));
    mix-blend-mode: multiply;
    opacity: 0.9;
}

.vintage-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180%;
    height: 180%;
    background-image: url('/assets/images/backgrounds/vineyard-background.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.35;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.gamme-details {
    flex: 1;
    position: relative;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    max-width: 65%;
    margin-right: 0;
}

.gamme-content.reverse .gamme-details {
    margin-right: 0;
    margin-left: 0;
}

.gamme-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    color: var(--brown);
    position: relative;
    display: inline-block;
}

.gamme-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--beige);
}

.gamme-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--beige);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.gamme-terroir {
    font-style: italic;
    margin-bottom: 1.8rem;
    color: var(--brown);
    font-size: 1.05rem;
}

.gamme-tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 1.8rem 0;
    color: var(--brown);
    text-align: center;
    position: relative;
    padding: 0.5rem 0;
}

.gamme-tagline::before,
.gamme-tagline::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background-color: var(--beige);
}

.gamme-tagline::before {
    top: 0;
}

.gamme-tagline::after {
    bottom: 0;
}

.gamme-specs {
    margin: 2.5rem 0;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-left: 3px solid var(--beige);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
    position: relative;
}

.gamme-specs::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 20px;
    background-color: var(--white);
    padding: 0 10px;
    font-family: 'Playfair Display', serif;
    color: var(--brown);
    font-size: 1.2rem;
}

.gamme-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--brown);
    margin: 2rem 0 1rem;
    position: relative;
    display: inline-block;
}

.gamme-section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--beige);
}

.specs-item {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
}

.specs-item::before {
    content: '•';
    margin-right: 10px;
    color: var(--beige);
}

.specs-label {
    font-weight: 600;
    color: var(--brown);
    margin-right: 0.5rem;
    white-space: nowrap;
}

.gamme-vinification,
.gamme-degustation {
    margin-top: 2.5rem;
    position: relative;
}

.gamme-vinification h3,
.gamme-degustation h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin: 0 0 1.5rem;
    color: var(--brown);
    position: relative;
    display: inline-block;
}

.gamme-vinification h3::after,
.gamme-degustation h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--beige);
}

.gamme-vinification ul {
    padding-left: 0;
    list-style: none;
}

.gamme-vinification li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.gamme-vinification li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--beige);
    font-weight: bold;
}

.gamme-degustation {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    border-radius: 4px;
    margin-top: 3rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
    position: relative;
}

.gamme-degustation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/vintage-vigne.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.05;
    z-index: -1;
    border-radius: 4px;
}

.gamme-degustation p {
    font-style: italic;
    line-height: 1.8;
    color: var(--brown);
    margin-bottom: 1rem;
}

.gamme-degustation p:last-child {
    margin-bottom: 0;
}

/* Club Trésors badge et note */
.club-badge {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--gold);
    color: var(--white);
    font-weight: 500;
    border-radius: 4px;
}

.gamme-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-left: 3px solid var(--gold);
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.gamme-note p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.gamme-note strong {
    color: var(--brown);
}

/* Section millésime */
.gamme-millesime {
    margin-top: 2.5rem;
    position: relative;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.gamme-millesime h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin: 0 0 1.5rem;
    color: var(--brown);
    position: relative;
    display: inline-block;
}

.gamme-millesime h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--beige);
}

.gamme-millesime p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.gamme-millesime p:last-child {
    margin-bottom: 0;
}

/* Ratafia section */
.ratafia-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.ratafia-spec-item {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    background-color: rgba(202, 174, 147, 0.1);
    border-radius: 4px;
    text-align: center;
}

.ratafia-spec-label {
    font-weight: 500;
    color: var(--brown);
    display: block;
    margin-bottom: 0.5rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.visible,
.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Graphiques circulaires pour les cépages */
.cepage-charts {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 2rem 0;
    gap: 2rem;
}

.cepage-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.chart-circle {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: #f8f8f8;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.chart-circle:hover {
    transform: scale(1.05);
}

.chart-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--cepage-color) 0deg, #e8e8e8 0deg);
    opacity: 0;
    transform: rotate(-90deg);
}

.chart-circle-inner {
    position: absolute;
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: 50%;
    background-color: white;
    z-index: 1;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-percentage {
    position: relative;
    z-index: 2;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brown);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out 0.8s;
}

.chart-label {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brown);
    text-transform: uppercase;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease-out 1.2s;
}

/* Classes spécifiques pour les cépages avec couleurs distinctes */
.chart-pinot-meunier {
    --cepage-color: #8B4513 !important; /* Brun terre pour Pinot Meunier */
}

.chart-pinot-noir {
    --cepage-color: #800020 !important; /* Bordeaux foncé pour Pinot Noir */
}

.chart-chardonnay {
    --cepage-color: #FFD700 !important; /* Or pur pour Chardonnay */
}

/* Couleur par défaut */
.chart-circle {
    --cepage-color: var(--beige);
}

/* Animation de remplissage du cercle - version simplifiée et plus fluide */
@keyframes fillChart {
    0% {
        background: conic-gradient(var(--cepage-color, #cae292) 0deg, #e8e8e8 0deg);
    }
    100% {
        background: conic-gradient(var(--cepage-color, #cae292) calc(var(--percentage, 0) * 3.6deg), #e8e8e8 calc(var(--percentage, 0) * 3.6deg));
    }
}

/* États animés */
.chart-circle.animate::before {
    opacity: 1;
    animation: fillChart 2200ms cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

.chart-circle.animate .chart-percentage {
    opacity: 1;
    transform: scale(1);
    transition-delay: 1.5s;
}

.cepage-chart.animate .chart-label {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 2s;
}

/* Animation de pulsation pour attirer l'attention */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }
}

.chart-circle.animate {
    animation: pulse 2s ease-in-out 5s;
}

/* Responsive */
@media (max-width: 992px) {
    .gamme-content, 
    .gamme-content.reverse {
        flex-direction: column;
    }
    
    .gamme-image,
    .gamme-content.reverse .gamme-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .gamme-details {
        max-width: 100%;
    }
    
    .bottle-img {
        max-height: 500px;
    }
    
    .gamme-image {
        order: 1;
        margin: 0 auto 2rem;
    }
    
    .gamme-details {
        order: 2;
    }
    
    .gammes-nav-wrapper {
        justify-content: flex-start;
        padding: 0 1rem 0.5rem;
        scroll-snap-type: x mandatory;
    }
    
    .gammes-nav-item {
        scroll-snap-align: start;
    }
    
    .gammes-nav-item {
        min-width: 140px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .gammes-nav-wrapper {
        gap: 0.5rem;
        padding: 0 1rem 0.5rem;
    }
    
    .gammes-nav-item {
        min-width: 120px;
        font-size: 0.9rem;
    }
}


@media (max-width: 576px) {
    .gamme-title {
        font-size: 2rem;
    }
    
    .gamme-tagline {
        font-size: 1.2rem;
    }
    
    .vintage-border {
        padding: 1.5rem;
    }
    
    .gammes-nav-item {
        min-width: 110px;
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
}
