/* style.css */

:root {
 --main-color: #704F4F; /* Brun terre */
 --secondary-color: #2C3E50; /* Bleu nuit */
 --accent-color: #F39C12; /* Orange vif */
 --bg-color: #F4F4F4; /* Gris clair */
 --text-color: #333;
 --font-title: 'Montserrat', sans-serif;
 --font-body: 'Roboto', sans-serif;
}

* {
 box-sizing: border-box;
 margin: 0;
 padding: 0;
}

html {
 scroll-behavior: smooth;
}

body {
 font-family: var(--font-body);
 background-color: var(--bg-color);
 color: var(--text-color);
 line-height: 1.6;
 overflow-x: hidden; /* Pour éviter la barre de défilement horizontale avec les bulles */
}

/* --- Bulles en arrière-plan --- */
.bubble {
 position: fixed;
 border-radius: 50%;
 background-color: rgba(var(--main-color-rgb, 112, 79, 79), 0.3); /* Utilisation de RGB pour l'opacité */
 animation: float 6s infinite ease-in-out, scale 8s infinite ease-in-out alternate;
 z-index: -1;
}

@keyframes float {
 0% { transform: translateY(0); }
 50% { transform: translateY(-20px); }
 100% { transform: translateY(0); }
}

@keyframes scale {
 0% { transform: scale(1); }
 100% { transform: scale(1.2); }
}

/* Taille et position aléatoires des bulles */
.bubble:nth-child(1) { width: 60px; height: 60px; bottom: 10%; left: 15%; animation-delay: 0s; }
.bubble:nth-child(2) { width: 40px; height: 40px; top: 20%; right: 10%; animation-delay: 2s; background-color: rgba(var(--accent-color-rgb, 243, 156, 18), 0.4); }
.bubble:nth-child(3) { width: 80px; height: 80px; top: 60%; left: 30%; animation-delay: 4s; }
.bubble:nth-child(4) { width: 50px; height: 50px; bottom: 5%; right: 35%; animation-delay: 1s; background-color: rgba(var(--secondary-color-rgb, 44, 62, 80), 0.2); }
.bubble:nth-child(5) { width: 70px; height: 70px; top: 10%; left: 60%; animation-delay: 3s; }
.bubble:nth-child(6) { width: 30px; height: 30px; bottom: 30%; right: 5%; animation-delay: 5s; background-color: rgba(var(--main-color-rgb, 112, 79, 79), 0.5); }

/* Conversion des couleurs en RGB pour l'opacité */
:root {
 --main-color-rgb: 112, 79, 79;
 --secondary-color-rgb: 44, 62, 80;
 --accent-color-rgb: 243, 156, 18;
}

/* --- Header --- */
header {
 background: #fff;
 box-shadow: 0 2px 10px rgba(0,0,0,0.1);
 position: sticky;
 top: 0;
 z-index: 1000;
 padding: 1.5rem 5%;
}

nav {
 display: flex;
 justify-content: space-between;
 align-items: center;
}

.logo {
 font-family: var(--font-title);
 font-weight: 700;
 font-size: 1.8rem;
 color: var(--secondary-color);
 text-decoration: none;
}

.nav-links {
 list-style: none;
 display: flex;
 gap: 2.5rem;
}

.nav-links a {
 text-decoration: none;
 color: var(--text-color);
 font-weight: 500;
 transition: color 0.3s ease-in-out;
}

.nav-links a:hover {
 color: var(--accent-color);
}

/* --- Sections --- */
section {
 padding: 80px 5%;
 max-width: 1200px;
 margin: 0 auto;
}

h1, h2, h3 {
 font-family: var(--font-title);
 color: var(--secondary-color);
 text-align: center;
}

h1 {
 font-size: 3.5rem;
 margin-bottom: 1rem;
}

h2 {
 font-size: 3rem;
 margin-bottom: 50px;
 position: relative;
 padding-bottom: 15px;
}

h2::after {
 content: '';
 position: absolute;
 left: 50%;
 bottom: 0;
 transform: translateX(-50%);
 width: 50px;
 height: 3px;
 background-color: var(--accent-color);
}

/* --- Hero --- */
.hero {
 display: flex;
 flex-direction: column;
 align-items: center;
 text-align: center;
 min-height: 75vh;
 justify-content: center;
}

.hero-logo {
 width: 180px;
 margin-bottom: 1.5rem;
 animation: pulse 2s infinite alternate;
}

@keyframes pulse {
 0% { transform: scale(1); }
 100% { transform: scale(1.05); }
}

.hero p {
 font-size: 1.3rem;
 max-width: 700px;
 margin-bottom: 3rem;
}

.hero-cta {
 background: var(--accent-color);
 color: white;
 border: none;
 padding: 1.2rem 3rem;
 font-size: 1.2rem;
 font-family: var(--font-title);
 font-weight: 700;
 border-radius: 50px;
 cursor: pointer;
 transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.hero-cta:hover {
 transform: translateY(-5px);
 box-shadow: 0 8px 20px rgba(0,0,0,0.2);
 background-color: #D48806;
}

/* --- Products --- */
.products-list {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
 gap: 40px;
 margin-top: 60px;
}

.product-card {
 background: #fff;
 border-radius: 12px;
 box-shadow: 0 4px 12px rgba(0,0,0,0.08);
 overflow: hidden;
 transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.product-card:hover {
 transform: translateY(-10px);
 box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.product-img {
 width: 100%;
 height: 220px;
 object-fit: cover;
 display: block;
}

.product-info {
 padding: 30px;
 display: flex;
 flex-direction: column;
 gap: 15px;
}

.product-info h3 {
 font-size: 1.8rem;
 color: var(--main-color);
 margin-bottom: 5px;
 text-align: left;
}

.product-info p {
 font-size: 1.1rem;
 color: var(--text-color);
 margin-bottom: 20px;
 text-align: left;
 flex-grow: 1;
}

.product-order-btn {
 background: var(--secondary-color);
 color: white;
 border: none;
 padding: 1rem 2rem;
 font-family: var(--font-title);
 font-weight: 700;
 border-radius: 8px;
 cursor: pointer;
 transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.product-order-btn:hover {
 background-color: var(--main-color);
 transform: scale(1.05);
}

/* --- Form --- */
#commander form {
 background: #fff;
 padding: 40px;
 border-radius: 12px;
 box-shadow: 0 4px 12px rgba(0,0,0,0.08);
 max-width: 700px;
 margin: 40px auto;
 display: grid;
 grid-template-columns: 1fr;
 gap: 1.5rem;
}

#commander h2 {
 grid-column: 1 / -1;
 margin-bottom: 30px;
}

#commander label {
 font-weight: 600;
 color: var(--secondary-color);
}

#commander input,
#commander textarea {
 padding: 15px;
 border: 1px solid #ddd;
 border-radius: 8px;
 font-size: 1rem;
}

#commander button {
 background: var(--accent-color);
 color: white;
 border: none;
 padding: 1.2rem 2.5rem;
 font-size: 1.1rem;
 font-family: var(--font-title);
 font-weight: 700;
 border-radius: 8px;
 cursor: pointer;
 transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

#commander button:hover {
 background-color: #D48806;
 transform: scale(1.03);
}

/* --- Footer --- */
footer {
 text-align: center;
 padding: 50px 20px;
 background-color: var(--secondary-color);
 color: #f4f4f4;
 font-size: 0.9rem;
}

footer a {
 color: var(--accent-color);
 text-decoration: none;
 transition: text-decoration 0.3s ease-in-out;
}

footer a:hover {
 text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
 nav {
 flex-direction: column;
 align-items: flex-start;
 gap: 1rem;
 }

 .nav-links {
 flex-direction: column;
 gap: 1rem;
 margin-top: 1rem;
 }

 h1 {
 font-size: 2.8rem;
 }

 h2 {
 font-size: 2.4rem;
 margin-bottom: 40px;
 }

 .hero {
 min-height: auto;
 padding: 60px 5%;
 }

 .hero-logo {
 width: 150px;
 }

 .hero p {
 font-size: 1.2rem;
 margin-bottom: 2.5rem;
 }

 .products-list {
 grid-template-columns: 1fr;
 }

 #commander form {
 padding: 30px;
 }
}

/* Ajouter les bulles au body */
body::before {
 content: '';
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 z-index: -2; /* Sous les bulles statiques */
 background: linear-gradient(to bottom, rgba(244,244,244,0.8), rgba(244,244,244,0.5)); /* Léger dégradé pour l'arrière-plan */
}

body::after {
 content: '';
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill-opacity="0.1"><circle cx="0" cy="0" r="50" fill="%23704F4F"/><circle cx="100" cy="100" r="50" fill="%23F39C12"/><circle cx="100" cy="0" r="50" fill="%232C3E50"/><circle cx="0" cy="100" r="50" fill="%23704F4F"/></svg>'); /* Motif de points subtil */
 opacity: 0.4;
 z-index: -3; /* Encore plus loin en arrière-plan */
 animation: subtle-bg 20s linear infinite;
}

@keyframes subtle-bg {
 0% { background-position: 0 0; }
 100% { background-position: 200px 200px; }
}

/* Création des bulles dynamiquement via CSS */
body::before {
 filter: blur(4px); /* Adoucir les bulles en arrière-plan */
}

body {
 --bubble-count: 6; /* Nombre de bulles */
}

@keyframes bubble-float {
 to {
 transform: translateY(-110vh);
 opacity: 0;
 }
}

@keyframes bubble-scale {
 0% {
 transform: scale(0.1);
 }
 50% {
 transform: scale(0.6);
 }
 100% {
 transform: scale(0.2);
 }
}

@keyframes bubble-rotate {
 to {
 transform: rotate(360deg);
 }
}

body::after {
 content: "";
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 pointer-events: none;
 z-index: -1;
}

@for $i from 1 through 6 {
 body::after:nth-child(#{$i}) {
 $random-x: random(100) * 1%;
 $random-y: random(100) * 1vh;
 $random-size: random(20) + 10 + px;
 $random-delay: random(10) * 1s;
 $random-duration: random(10) + 5 + s;
 $random-opacity: random(5) / 10 + 0.3;
 $random-color: nth((#704F4F, #F39C12, #2C3E50), random(3));

 position: absolute;
 background-color: rgba($random-color, $random-opacity);
 width: $random-size;
 height: $random-size;
 border-radius: 50%;
 left: $random-x;
 bottom: -$random-size;
 animation: bubble-float $random-duration $random-delay infinite,
 bubble-scale $random-duration $random-delay infinite alternate,
 bubble-rotate ($random-duration * 2) $random-delay infinite linear;
 }
}