/* Styles généraux */
:root {
    --color-primary: #8B0000; /* Rouge bordeaux */
    --color-secondary: #F9A825; /* Or/jaune doré */
    --color-light: #F5F5F5; /* Blanc cassé */
    --color-dark: #2D2D2D; /* Presque noir */
    --color-gray: #6D6D6D; /* Gris moyen */
    --color-accent: #45003C; /* Pourpre foncé */
    
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Raleway', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
    margin: 10px auto 0;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-secondary);
}

section {
    padding: 60px 0;
}

.btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--color-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--color-primary);
    padding: 10px 20px;
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Image fluid adjustments */
.img-fluid {
    display: block; /* Prevent extra space below image */
    width: 100%;    /* Take full width of container */
    height: 100%;   /* Take full height of container */
    object-fit: cover; /* Scale while maintaining aspect ratio, cropping if necessary */
}

/* Placeholder pour images */
.image-placeholder {
    background-color: #E0E0E0;
    height: 250px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.image-placeholder::after {
    content: "Image";
    color: var(--color-gray);
    font-weight: 600;
    font-size: 1.2rem;
}

.image-placeholder.large {
    height: 400px;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo h1 {
    color: var(--color-primary);
    margin-bottom: 0;
    font-size: 2rem;
}

.tagline {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--color-gray);
    margin-top: -5px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--color-dark);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

nav ul li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), #8B0000;
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 0;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Featured section */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.featured-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.featured-card .card-image { /* Added height */
    height: 200px;
    overflow: hidden; /* Ensure image stays within bounds */
}

.featured-card:hover {
    transform: translateY(-10px);
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    color: var(--color-primary);
}

.card-content p {
    color: var(--color-gray);
    margin-bottom: 20px;
}

/* Categories section */
.categories {
    background-color: #f8f8f8;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.category-image {
    height: 150px; /* Added height */
    margin-bottom: 15px;
    overflow: hidden; /* Ensure image stays within bounds */
}

.category h3 {
    margin-bottom: 10px;
    color: var(--color-primary);
}

.category a {
    display: inline-block;
    font-weight: 600;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 2px;
}

/* Guide section */
.guide .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.guide-list {
    list-style-position: inside;
    margin: 20px 0;
}

.guide-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.guide-list li::before {
    content: "•";
    color: var(--color-secondary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Newsletter section */
.newsletter {
    background-color: var(--color-accent);
    color: white;
    text-align: center;
    padding: 80px 0;
}

.newsletter h2::after {
    background-color: white;
}

.newsletter-form {
    max-width: 500px;
    margin: 30px auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    border: none;
    border-radius: 4px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.newsletter-form button {
    background-color: var(--color-secondary);
    color: var(--color-dark);
    border: none;
    cursor: pointer;
}

.newsletter-form button:hover {
    background-color: #E69100;
}

/* Footer */
footer {
    background-color: var(--color-dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #CCCCCC;
}

.footer-links ul li a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons a {
    color: #CCCCCC;
}

.social-icons a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #AAAAAA;
    font-size: 0.9rem;
}

/* Media Queries */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .guide .container {
        grid-template-columns: 1fr;
    }
    
    .guide-image {
        order: -1;
        margin-bottom: 30px;
    }
}

/* Styles spécifiques pour le conseiller de vin */
.advisor-section { /* Added this wrapper class */
    background-color: #f8f8f8; /* Match categories section background */
    padding: 60px 0;
}

.advisor-section .intro-text { /* Added styling for intro text */
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.advisor-section .intro-text h2 { /* Adjusted heading style */
    margin-bottom: 1rem;
}

.wine-advisor {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    /* margin-bottom: 40px; /* Removed, handled by section padding */
    max-width: 900px; /* Added max-width for better layout */
    margin: 0 auto; /* Center the advisor */
}

.question-container {
    text-align: center;
    margin-bottom: 30px;
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Adjusted minmax */
    gap: 20px;
    margin-top: 25px;
}

.option-card {
    background-color: #f8f8f8;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500; /* Added font-weight */
}

.option-card:hover {
    border-color: var(--color-secondary);
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Added subtle shadow */
}

.option-card.selected {
    border-color: var(--color-primary);
    background-color: rgba(139, 0, 0, 0.05);
    color: var(--color-primary); /* Highlight selected text */
    font-weight: 600; /* Make selected text bolder */
}

.progress-bar {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--color-primary);
    transition: width 0.5s ease;
}

.recommendations-container { /* Added margin-top */
    margin-top: 30px;
}

.recommendations-container h3 { /* Center recommendation title */
    text-align: center;
    margin-bottom: 25px;
    color: var(--color-primary);
}

.recommendation-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    border: 1px solid #eee; /* Added subtle border */
}

.recommendation-image {
    width: 80px;
    height: 120px;
    background-color: #e0e0e0; /* Placeholder color */
    border-radius: 5px;
    flex-shrink: 0; /* Prevent image shrinking */
}

.recommendation-details {
    flex: 1;
}

.recommendation-details h4 {
    color: var(--color-primary);
    margin-bottom: 5px;
}

.recommendation-details p {
    margin-bottom: 10px;
    color: var(--color-gray);
    font-size: 0.95rem; /* Slightly smaller text */
}

.wine-type {
    font-style: italic;
    margin-bottom: 10px;
    color: var(--color-accent);
    font-weight: 500; /* Added weight */
}

.wine-pairing {
    margin-top: 10px;
}

.wine-pairing strong { /* Style the label */
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.wine-pairing span {
    display: inline-block;
    background-color: #f0f0f0;
    color: var(--color-dark); /* Ensure text is readable */
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem; /* Slightly smaller tags */
    margin-right: 5px;
    margin-bottom: 5px;
}

.buttons-container {
    display: flex;
    justify-content: space-between;
    margin-top: 30px; /* Increased margin */
    padding-top: 20px; /* Added padding */
    border-top: 1px solid #eee; /* Added separator */
}

.hidden {
    display: none !important; /* Use important to ensure override */
}

/* Media query adjustments for advisor */
@media (max-width: 768px) {
    .options-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjust for smaller screens */
    }
    .recommendation-card {
        flex-direction: column;
        text-align: center;
    }

    .recommendation-image {
        margin: 0 auto 15px; /* Center image and add bottom margin */
    }
    .buttons-container {
        flex-direction: column;
        gap: 10px; /* Add gap between buttons */
    }
    .buttons-container button {
        width: 100%; /* Make buttons full width */
    }
}

@media (max-width: 480px) {
    .wine-advisor {
        padding: 20px; /* Reduce padding on small screens */
    }
    .options-container {
        grid-template-columns: 1fr 1fr; /* Two columns on very small screens */
        gap: 15px;
    }
    .option-card {
        padding: 15px;
    }
    .recommendation-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.7rem;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
    }
}



/* Ajoutez ces styles dans votre fichier CSS existant */

/* Style pour les informations d'origine du vin */
.wine-origin {
    margin: 8px 0;
    font-size: 0.95rem;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wine-country {
    font-weight: 500;
    display: inline-block;
    padding: 2px 10px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 4px;
}

.wine-region {
    font-style: italic;
    position: relative;
    padding-left: 12px;
}

.wine-region::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-secondary);
}

/* Style amélioré pour les images de vin */
.recommendation-image {
    width: 80px;
    height: 120px;
    border-radius: 5px;
    flex-shrink: 0;
    position: relative;
    background-image: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
}

/* Styles spécifiques pour chaque type de vin */
.recommendation-image.rouge {
    background-image: linear-gradient(to bottom, #8B0000, #5A0000);
}

.recommendation-image.blanc {
    background-image: linear-gradient(to bottom, #F9E5A7, #F1D666);
}

.recommendation-image.effervescent {
    background-image: linear-gradient(to bottom, #F8F4E3, #F1E7C5);
    position: relative;
}

.recommendation-image.effervescent::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: radial-gradient(circle at center, transparent 60%, rgba(255,255,255,0.8) 80%);
    opacity: 0.6;
}

.recommendation-image.rouge-effervescent {
    background-image: linear-gradient(to bottom, #AC1E44, #8B0000);
    position: relative;
}

.recommendation-image.rouge-effervescent::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: radial-gradient(circle at center, transparent 60%, rgba(255,255,255,0.4) 80%);
    opacity: 0.6;
}

.recommendation-image.blanc-liquoreux {
    background-image: linear-gradient(to bottom, #FFC107, #E6A800);
}

/* Amélioration mobile */
@media (max-width: 768px) {
    .wine-origin {
        justify-content: center;
    }
}
