/* --- Variables de couleur et polices --- */
:root {
    --primary-color: #ffc300; /* Jaune miel */
    --secondary-color: #976026; /* Brun foncé / Noir */
    --accent-color: #FFA726; /* Orange doux */
    --nav-color: #ffc300; /* Orange doux */
    --bg-color: #FFF8E1; /* Fond crème */
    --text-color: #4F4F4F;

    --font-title: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* --- Styles généraux et Reset --- */
/* IMPORTANT : box-sizing global pour éviter les erreurs de calcul de largeur */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overscroll-behavior: none;
    touch-action: pan-y; 
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-title);
    color: var(--secondary-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* --- En-tête (accueil.html) --- */
.main-header {
    background-color: rgb(0, 0, 0);
    backdrop-filter: blur(10px);
    padding: 0px 0;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px; 
}

.logo {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: flex; 
    align-items: center; 
    gap: 10px; 
    flex-shrink: 0; 
}
.logo img {
    height: 100px; 
    width: auto;
    padding-top: 20px;
    padding-bottom: 20px;
    transition: height 0.3s ease;
}
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--secondary-color);
    font-weight: 700;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.main-nav a.active,
.main-nav a:hover, 
.main-nav i:hover {
    color: var(--nav-color);
    border-bottom-color: var(--nav-color);
}

.cart-link {
    display: flex;
    align-items: center;
    position: relative;
    color: var(--secondary-color);
    transition: color 0.3s ease;
    padding-right: 15px;
    border-bottom: 2px solid transparent;
}

.cart-link:hover {
    color: var(--nav-color);
    border-bottom-color: var(--nav-color);
}

.cart-link i {
    font-size: 1.2rem;
}

.cart-count {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    position: absolute;
    top: -8px;
    right: 0px;
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

/* --- Section Hero --- */
.hero-section {
    height: 60vh;
    min-height: 300px; 
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    padding: 0 20px;
    overflow: hidden;
}

.hero-section video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: 100vh;
    height: auto;
    z-index: -1;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 750px;
}

.hero-content h1, .hero-content h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* --- Sections de contenu --- */
.presentation-section, .featured-product-section .container {
    padding-top: 60px;
    padding-bottom: 60px;
}

.presentation-section {
    display: flex;
    align-items: center;
    gap: 50px;
}

.presentation-text, .presentation-image {
    flex: 1;
    min-width: 0; 
}

.presentation-text h3 {
    font-size: 2.5rem;
}

.btn-secondary {
    display: inline-block;
    margin-top: 20px;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s, color 0.3s;
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    cursor: pointer;
    color: white;
}

.featured-product-section {
    background-color: #fff;
    width: 100%; 
}

.featured-product-section h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.product-details {
    display: flex;
    align-items: center;
    gap: 50px;
}

.product-image, .product-text {
    flex: 1;
    min-width: 0;
}

/* --- Pied de page --- */
.main-footer {
    background-color: var(--secondary-color);
    color: var(--bg-color);
    padding: 30px 0;
    text-align: center;
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-footer a {
    color: var(--primary-color);
    margin-left: 15px;
}

.main-footer a:hover {
    color: white;
}

.content-page {
    padding-top: 40px;
    padding-bottom: 40px;
}
.info-section {
    margin-bottom: 60px;
}
.info-section h3 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}
.section-intro {
    text-align: center;
    max-width: 800px;
    margin: -20px auto 40px auto;
    font-size: 1.1rem;
}
.two-columns {
    display: flex;
    gap: 50px;
    align-items: center;
}
.column-text, .column-image {
    flex: 1;
    min-width: 0;
}
.column-text ul {
    list-style: none;
    padding-left: 0;
}
.column-text li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}
.column-text li::before {
    content: '🐝';
    position: absolute;
    left: 0;
    top: 0;
}
.alternate-bg {
    background-color: #fff;
    padding: 60px 20px;
    margin: 60px 0;
    width: 100%;
}
.info-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap; 
}
.card {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    flex: 1;
    flex-basis: 300px; 
    max-width: 400px;
}
.card h4 {
    font-size: 1.5rem;
    margin-top: 0;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}
.recommendations {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.reco-block {
    flex: 1;
    flex-basis: 300px;
    padding: 30px;
    border-radius: 8px;
}
.reco-block.good {
    background-color: #e8f5e9;
    border-left: 5px solid #4caf50;
}
.reco-block.bad {
    background-color: #ffcdd2;
    border-left: 5px solid #f44336;
}
.reco-block h4 {
    margin-top: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}
.reco-block .icon {
    font-size: 1.5rem;
    margin-right: 10px;
}
.reco-block ul {
    padding-left: 20px;
}

.two-columns.reverse {
    flex-direction: row-reverse;
}
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.recipe-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.recipe-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.recipe-content {
    padding: 25px;
}

.recipe-content h4 {
    margin-top: 0;
    font-size: 1.4rem;
}

/* --- Styles pour la page Boutique --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr)); 
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    padding: 30px 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-card a > img {
    max-width: 280px;
    margin: 0 auto 0px auto;
    transition: opacity 0.3s ease;
}

.product-card a:hover > img {
    opacity: 0.85;
}

.product-card img {
    max-height: 250px;
    width: 100%;
    aspect-ratio: 1/1; 
    object-fit: cover;
    margin-bottom: 15px;
}

.product-card h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 10px 0;
}

.product-desc {
    font-size: 0.9rem;
    color: #777;
    min-height: 40px;
    flex-grow: 1;
}

.product-card .btn-primary {
    margin-top: 20px;
}

/* --- Styles pour la page Galerie --- */
.gallery-section {
    margin-bottom: 60px;
}

/* --- Styles pour la page Contact --- */
.contact-section {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap; 
}

.contact-form {
    flex: 2;
    flex-basis: 400px;
    height: auto;
}

.contact-info {
    flex: 1;
    flex-basis: 300px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    height: auto;
}
.contact-info iframe {
    height: 300px;
    width: 100%;
}

.contact-info h4 {
    margin-top: 0;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}
.burger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 600;
}

.burger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px auto;
    transition: all 0.3s ease;
}

/* --- Styles spécifiques pour index.html --- */
body#splash-page {
    height: 90vh;
    margin: 0;
    background-color: #000;
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#splash-page .header {
    width: 100%;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}
#splash-page .logo {
    width: 15%;
    max-width: 15%;
    height: auto;
}
#splash-page .ecriture {
    width: 30%;
    max-width: 30%;
    height: auto;
}

#splash-page .main-content {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    width: 100%;
    overflow: hidden;
}

#splash-page .scene {
    width: 400px;
    height: 264px;
    perspective: 1333px;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}
#splash-page .carousel {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(-346px) rotateY(0deg);
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
    cursor: grab;
}
#splash-page .carousel.dragging {
    cursor: grabbing;
    transition: none;
}

#splash-page .carousel-panel {
    position: absolute;
    width: 400px;
    height: 264px;
    background-color: rgba(255, 195, 0, 0.1);
    border: 2px solid rgb(255, 195 , 0);
    border-radius: 10px;
    overflow: hidden;
    -webkit-box-reflect: below 30px linear-gradient(transparent, transparent, #0005);
}
#splash-page .carousel-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 0.85;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
#splash-page .carousel-panel:hover img {
    opacity: 1;
}

#splash-page #image-title {
    position: absolute;
    bottom: calc(100% + 2rem);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    color: rgb(255, 195 , 0);
    font-size: 3rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    white-space: nowrap;
}
#splash-page #image-title.visible {
    opacity: 1;
}

#splash-page #background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
#splash-page .bg-hexagon {
    position: absolute;
    width: 100px;
    height: auto;
    transition: transform 0.5s ease-out, opacity 3s ease-in-out;
    animation: pulse 4s infinite alternate ease-in-out;
}
@keyframes pulse {
    0% { opacity: 0.1; }
    50% { opacity: 0.35; }
    100% { opacity: 0.1; }
}


/* --- Styles Détail Produit --- */
.product-detail-layout {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    align-items: flex-start;
}

.product-detail-image {
    flex: 1;
    max-width: 500px;
    min-width: 0;
}

.product-detail-image img {
    width: 100%;
    border-radius: 8px;
}

.product-detail-info {
    flex: 1;
    min-width: 0;
}

.product-detail-info h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.product-detail-info .product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.product-detail-info .product-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.quantity-selector {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.quantity-selector label {
    font-weight: 700;
    margin-right: 10px;
    font-size: 1.1rem;
}

.quantity-selector input[type="number"] {
    width: 70px;
    padding: 10px;
    font-size: 1.1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    -moz-appearance: textfield;
}

.quantity-selector input[type="number"]::-webkit-outer-spin-button,
.quantity-selector input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#add-to-cart-detail {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.cart-message-success {
    display: none;
    margin-top: 20px;
    color: #4caf50;
    font-weight: bold;
    font-size: 1.1rem;
}

.cart-product-info img {
    width: 20%;
    height: 20%;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 16px;
    aspect-ratio: 1/1;
}

/* --- Styles Galerie Produit --- */
.main-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: #fff;
}

#main-product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 1);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
    opacity: 0.7;
    user-select: none;
}

.gallery-arrow:hover {
    background-color: rgba(255, 195, 0, 0.7);
    opacity: 1;
}

#arrow-left {
    left: 0;
    border-radius: 0 5px 5px 0;
}

#arrow-right {
    right: 0;
    border-radius: 5px 0 0 5px;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); 
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

.thumbnail-item {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    background-color: #fff;
}

.thumbnail-item:hover {
    opacity: 1;
}

.thumbnail-item.active {
    opacity: 1;
    border-color: var(--primary-color);
}


/* --- Styles Panier (cart.html) --- */
.cart-section {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

#cart-items {
    flex: 6;
    min-width: 0;
    overflow-x: auto;
}

.cart-summary {
    flex: 1;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 120px;
    flex-basis: 300px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.cart-table th {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary-color);
}

.cart-product-info {
    display: flex;
    align-items: center;
}

.cart-product-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 16px;
    aspect-ratio: 1/1;
    flex-shrink: 0;
}

.cart-product-info p {
    margin: 0;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.4;
}

.quantity-controls {
    display: flex;
    align-items: center;
}

.quantity-controls button {
    background-color: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    color: var(--secondary-color);
    transition: background-color 0.3s;
}

.quantity-controls button:hover {
    background-color: #e0e0e0;
}

.quantity-controls span {
    padding: 0 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
}

.remove-item:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

.empty-cart-message {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.cart-summary-total,
.shipping-info,
.total-final {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.shipping-info p:last-child {
    color: #777;
    font-size: 1rem;
    text-align: right;
}

.total-final {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--secondary-color);
    border-top: 2px solid #f0f0f0;
    padding-top: 15px;
    margin-top: 15px;
}

.checkout-button {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    font-size: 1.1rem;
}


/* --- MEDIA QUERIES --- */

/* Tablettes (jusqu'à 1024px) */
@media (max-width: 1024px) {
    .container { padding: 0 15px; }
    .main-nav ul { gap: 15px; }
    .hero-content h2 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .presentation-text h3, .featured-product-section h3, .info-section h3 { font-size: 2.2rem; }
    
    .presentation-section, .product-details, .two-columns {
        flex-direction: column;
        gap: 30px;
    }
    .two-columns.reverse { flex-direction: column-reverse; }

    .cart-section { flex-direction: column; gap: 30px; }
    .cart-summary { position: static; width: 100%; box-sizing: border-box; }

    #splash-page .header { flex-direction: column; gap: 1rem; padding-top: 1rem; }
    #splash-page .main-content { padding-top: 10vh; }
    #splash-page .scene { transform: scale(0.9); }
    #splash-page #image-title { font-size: 2.5rem; bottom: calc(100% + 1rem); }
}

/* Mobiles (jusqu'à 768px) */
@media (max-width: 768px) {
    .main-header .container { min-height: 60px; }
    .logo img { height: 60px; padding-top: 10px; padding-bottom: 10px; }
    .main-footer .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        /* Permet aux liens de s'enrouler s'ils ne tiennent pas sur une seule ligne */
        flex-wrap: wrap; 
        /* Centre le groupe de liens */
        justify-content: center; 
    }

    .social-links { 
        margin-top: 5px; /* Espace un peu les icônes sociales */
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        box-shadow: 0 4px 5px rgba(0,0,0,0.1);
        padding: 20px 0;
        animation: slideDown .4s ease-out;
    }
    .main-nav.active { display: block; }
    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        margin: 0;
        padding: 0;
    }
    .main-nav a { font-size: 1.2rem; }
    @keyframes slideDown {
        0% { transform: translateY(-100%); opacity: 0; }
        100% { transform: translateY(0); opacity: 1; }
    }
    
    .main-nav.active ul { display: flex; }

    /* MODIFICATION ICI : Uniformisation de la taille du Hero sur mobile */
    .hero-section {
        height: 50vh; /* Hauteur fixe pour uniformiser (50% de la hauteur écran) */
        min-height: 300px; /* Minimum de sécurité */
        padding: 0 20px; /* Padding vertical supprimé, flexbox centre le contenu */
        background-size: cover !important;
        background-position: center center;
    }
    
    .hero-content h1, .hero-content h2 { /* Ajout de h1 pour réduire les gros titres sur mobile */
        font-size: 2rem; 
    }
    
    .hero-content p { font-size: 1rem; }

    .presentation-text h3, .featured-product-section h3 { font-size: 2rem; }
    .two-columns, .info-cards, .recommendations { flex-direction: column; }
    .info-section h3 { font-size: 2rem; }
    .two-columns.reverse { flex-direction: column-reverse; }
    .contact-section { flex-direction: column; }
    .burger-menu { display: block; }
    .burger-menu.active .bar:nth-child(2) { opacity: 0; }
    .burger-menu.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .burger-menu.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .product-grid { grid-template-columns: 1fr; }
    .product-card img { max-height: 280px; }
    .product-detail-layout { flex-direction: column; }
    .product-detail-info h1 { font-size: 2rem; }
    .product-detail-info .product-price { font-size: 1.8rem; }
    .gallery-arrow { padding: 8px 12px; font-size: 1.5rem; }

    #cart-items {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        border-radius: 8px;
        border: 1px solid #f0f0f0;
    }
    .cart-table {
        min-width: 650px;
        box-shadow: none;
        border: none;
    }
    
    #splash-page .header { gap: 0.5rem; }
    #splash-page .logo { max-width: 140px; width: 40%; }
    #splash-page .ecriture { max-width: 250px; width: 60%; }
    #splash-page .bg-hexagon { width: 50px !important; }
    #splash-page .main-content { padding-top: 0; align-items: center; }
    #splash-page .scene { transform: scale(0.75); }
    #splash-page #image-title { font-size: 2rem; }
}


/* Paysage (basse hauteur) */
@media (max-height: 480px) and (orientation: landscape) {
    .main-header .container { min-height: 50px; }
    .logo img { height: 50px; padding-top: 5px; padding-bottom: 5px; }
    .main-nav {
        /* On retire la règle qui masquait le menu. */
        /* On va limiter sa hauteur pour qu'il ne dépasse pas l'écran */
        max-height: 90vh; /* Limite à 90% de la hauteur disponible */
        overflow-y: auto; /* Autorise le défilement interne */
        -webkit-overflow-scrolling: touch;
        /* Assurez-vous qu'il reste en haut de l'écran */
        top: 50px; /* Position sous le header de 50px (hauteur ajustée) */
    }
    .main-nav.active { 
        /* On s'assure qu'il s'affiche quand il est actif */
        display: block !important; 
    }
    .hero-section { height: auto; min-height: 0; padding: 40px 20px; }
    .hero-content h2 { font-size: 1.8rem; }
    .hero-content p { font-size: 0.9rem; margin-bottom: 20px; }
    
    body#splash-page { overflow: auto; }
    #splash-page .header { flex-direction: row; padding: 0.5rem 1rem; }
    #splash-page .logo { max-width: 80px; }
    #splash-page .ecriture { max-width: 180px; }
    #splash-page .main-content { padding-top: 2vh; align-items: center; min-height: 300px; }
    #splash-page .scene { transform: scale(0.7); }
    #splash-page #image-title {
        font-size: 1.8rem;
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-bottom: 1rem;
    }
}

/* --- Styles Checkout --- */
.checkout-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.checkout-form-container {
    flex: 2;
    min-width: 0;
}

.checkout-summary-container {
    flex: 1;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 120px;
    flex-basis: 350px;
}

.checkout-summary-container h4 {
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

#checkout-form h3 {
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
#checkout-form h3:first-of-type { margin-top: 0; }

.order-number-display {
    font-weight: bold; 
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.form-row { display: flex; gap: 20px; }
.form-group.half-width { flex: 1; }

.payment-placeholder {
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #777;
    margin-bottom: 30px;
}
.payment-placeholder p { margin-bottom: 15px; }
.fake-cc-form input[disabled] { background-color: #eee; cursor: not-allowed; }

#order-summary {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}
.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.summary-item:last-child { border-bottom: none; }
.summary-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}
.summary-item-info { flex-grow: 1; }
.summary-item-name { margin: 0; font-weight: 700; }
.summary-item-qty { margin: 0; font-size: 0.9rem; color: #777; }
.summary-item-price { font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }

@media (max-width: 900px) {
    .checkout-layout { flex-direction: column-reverse; }
    .checkout-summary-container { position: static; width: 100%; box-sizing: border-box; margin-bottom: 30px; }
}

@media (max-width: 600px) {
    .form-row { flex-direction: column; gap: 0; }
}

/* --- Cookie Banner --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(40, 40, 40, 0.95);
    color: white;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

#cookie-banner p { margin: 0; flex-grow: 1; }
#cookie-banner a { color: var(--primary-color); text-decoration: underline; }
#cookie-banner .btn-primary {
    flex-shrink: 0;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
}
#cookie-banner .btn-secondary {
    flex-shrink: 0;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

#cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 1050;
    display: flex;
    justify-content: center;
    align-items: center;
}

#cookie-modal {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

#cookie-modal h4 { margin-top: 0; font-size: 1.5rem; }
.cookie-category {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 15px;
}
.cookie-category label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
}
.cookie-category small { display: block; margin-top: 5px; color: #777; }
.cookie-category input[type="checkbox"] { transform: scale(1.2); }
.cookie-category input:disabled { cursor: not-allowed; }
#cookie-save-prefs { margin-top: 20px; width: 100%; }

@media (max-width: 768px) {
    #cookie-banner .cookie-buttons { width: 100%; flex-direction: column; }
    #cookie-banner { flex-direction: column; text-align: center; }
    .main-footer .container { flex-direction: column; gap: 20px; }
    .footer-links { order: -1; flex-wrap: wrap; }
    .social-links { margin-top: 0; }
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* Conservez le gap de 20px ici */
}

.footer-copyright { flex-shrink: 0; }
.footer-copyright p { margin: 0; font-size: 0.9rem; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-grow: 1; }
.footer-links a { color: var(--primary-color); font-size: 0.9rem; font-weight: 600; }
.footer-links a:hover { color: white; }
.social-links { display: flex; gap: 15px; flex-shrink: 0; }
.social-links a {
    color: var(--primary-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.social-links a:hover { color: white; }
.social-links i { font-size: 1.2rem; }

/* --- Modale Réservation --- */
/* --- Modale Réservation --- */
#reservation-modal-overlay {
    position: fixed; 
    top: 0;
    left: 0;
    right: 0; 
    bottom: 0; 
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    /* justify-content: center; <-- SUPPRIMÉ POUR ÉVITER LE DÉBORDEMENT */
    /* align-items: flex-start; <-- SUPPRIMÉ */
    
    /* L'overlay gère le scroll global */
    overflow-y: auto; 
    padding: 10px; 
    box-sizing: border-box;
    
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    
    /* NOUVEAU : Centrage en utilisant les marges automatiques du contenu */
    /* Cela nécessite de retirer justify-content: center de l'overlay */
    display: block; /* On remplace flex par block pour que margin: auto fonctionne */
}

#reservation-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#reservation-modal {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    
    width: 100%;
    max-width: 500px;
    
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    transform: none;
    transition: transform 0.3s ease;

    /* GARANTIT LE CENTRAGE HORIZONTAL ET LE DÉCALAGE VERTICAL */
    margin: 40px auto; 
}

#reservation-modal-overlay.active #reservation-modal {
    /* Pas de translation nécessaire avec la méthode margin-top */
    transform: none; 
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s;
}

.modal-close-btn:hover { color: var(--accent-color); }

/* Titres dans la modale */
#reservation-modal h1, 
#reservation-modal h3 { 
    margin-top: 0; 
    color: var(--secondary-color); 
    margin-bottom: 20px; 
    font-size: 1.5rem; 
    line-height: 1.3;
    word-wrap: break-word; 
}

#reservation-modal p { margin-bottom: 25px; color: #555; }

.btn-reservation {
    background-color: var(--primary-color);
    color:  var(--secondary-color);
    padding: 15px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-reservation:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* --- Media Query Spécifique Modale Réservation --- */
@media (max-width: 768px) {
    #reservation-modal {
        /* Correction Mobile : largeur ajustée à 90% pour éviter le débordement */
        width: 90%; 
        max-width: 70%; /* Limite la largeur sur les grands téléphones */
        max-height: none; 
        overflow-y: visible;
        padding: 20px; 
        margin: 20px; 
    }
    .modal-close-btn {
        font-size: 1.5rem;
        top: 10px;
        right: 15px;
    }
}

/* ======================================================= */
/* --- STYLES POUR LA MODALE DE CONFIRMATION (SUCCÈS) --- */
/* ======================================================= */
#custom-success-modal-overlay {
    position: fixed; /* Correction ici aussi : fixed pour couvrir l'écran */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    z-index: 9999; 
    display: block; 
    
    /*justify-content:center;*/
    align-items: flex-start;
    
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;

    opacity: 0; 
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#custom-success-modal-overlay.active {
    opacity: 1; 
    pointer-events: auto;
}

#custom-success-modal {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    
    width: 90%;
    max-width: 450px;
    
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    
    /* Suppression des transforms pour éviter les flous/bugs */
    transform: none; 
    
    /* Positionnement via marge (auto gère le centrage horizontal sans casser le scroll) */
    margin: 40px auto;
}

#custom-success-modal-overlay.active #custom-success-modal {
    transform: none;
}

#custom-success-icon {
    font-size: 4rem; 
    margin-bottom: 20px;
    display: inline-block;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#custom-success-title {
    font-family: var(--font-title); 
    font-size: 2rem;
    color: var(--secondary-color); 
    margin-top: 0; 
    margin-bottom: 15px;
    word-wrap: break-word; 
}

#custom-success-message {
    font-size: 1.1rem; 
    color: #555; 
    margin-bottom: 30px;
    line-height: 1.6;
}

#custom-success-close {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none; 
    padding: 12px 35px;
    border-radius: 50px; 
    font-weight: 700; 
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#custom-success-close:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}

/* --- Media Query Spécifique Modale Succès --- */
@media (max-width: 768px) {
    #custom-success-modal {
        /* Correction Mobile : 
           - Nettoyage du scroll interne inutile
           - Largeur passée à 90% pour éviter l'effet "énorme" et le débordement
        */
        width: 90%; 
        max-width: 70%;
        max-height: none; 
        overflow-y: visible;
        padding: 20px;
        margin: 20px;
    }
    #custom-success-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    #custom-success-title {
        font-size: 1.5rem;
    }
    #custom-success-message {
        font-size: 1rem;
    }
}