/* ========================================
   BOULANGERIE - Site Vitrine
   Design chaleureux, animations fluides
   ======================================== */

:root {
  --gold: #C8963E;
  --gold-light: #E8C97A;
  --cream: #FFF8F0;
  --brown: #3E2723;
  --brown-light: #5D4037;
  --warm-white: #FFFDF9;
  --text: #2C1810;
  --text-light: #6D5D53;
  --glass-bg: rgba(255, 248, 240, 0.75);
  --glass-border: rgba(200, 150, 62, 0.2);
  --shadow: 0 8px 32px rgba(62, 39, 35, 0.12);
  --shadow-hover: 0 16px 48px rgba(62, 39, 35, 0.2);
  --radius: 16px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--warm-white);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  margin-bottom: 0.5em;
  color: var(--brown);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 16px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ---- Navbar (fond blanc transparent, position initiale) ---- */
.navbar {
  position: relative;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 150, 62, 0.15);
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo span { font-size: 1.8rem; }

.navbar-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.navbar-links a {
  text-decoration: none;
  color: var(--brown);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

.navbar-links a:hover { color: var(--gold); }
.navbar-links a:hover::after { width: 100%; }

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--brown);
  cursor: pointer;
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(62,39,35,0.7) 0%, rgba(200,150,62,0.3) 100%),
    url('https://images.unsplash.com/photo-1509440159596-0249088772ff?w=1920&q=80') center/cover no-repeat;
  transform: scale(1.1);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  0%   { transform: scale(1.1); }
  100% { transform: scale(1.0); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 2rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(200, 150, 62, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(200, 150, 62, 0.4);
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 4px 24px rgba(0,0,0,0.3);
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
}

.hero-btn {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  padding: 16px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(200,150,62,0.4);
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

.hero-btn:hover {
  background: var(--gold-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(200,150,62,0.5);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.hero-scroll a {
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  text-decoration: none;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(10px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Sections ---- */
section {
  padding: 100px 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s, transform 0.8s;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Actualités ---- */
#actualites {
  background: var(--cream);
}

.actualites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.actu-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: default;
}

.actu-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.actu-card-img {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.actu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.actu-card:hover .actu-card-img img {
  transform: scale(1.08);
}

.actu-card-date {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--gold);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.actu-card-body {
  padding: 1.5rem;
}

.actu-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--brown);
}

.actu-card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Avis Clients ---- */
#avis {
  background: var(--warm-white);
}

.avis-slider {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}

.avis-track {
  display: flex;
  transition: transform 0.5s ease;
}

.avis-card {
  min-width: 100%;
  padding: 3rem;
  text-align: center;
  flex-shrink: 0;
}

.avis-card-inner {
  background: #fff;
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
}

.avis-card-inner::before {
  content: '\201C';
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  color: var(--gold-light);
  opacity: 0.3;
  position: absolute;
  top: -10px;
  left: 20px;
  line-height: 1;
}

.avis-stars {
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  letter-spacing: 4px;
}

.avis-text {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.avis-author {
  font-weight: 700;
  color: var(--brown);
  font-size: 1rem;
}

.avis-date {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 4px;
}

.avis-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.avis-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avis-btn:hover {
  background: var(--gold);
  color: #fff;
}

.avis-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1.5rem;
}

.avis-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--glass-border);
  cursor: pointer;
  transition: var(--transition);
}

.avis-dot.active {
  background: var(--gold);
  transform: scale(1.2);
}

/* ---- Réalisations ---- */
#realisations {
  background: var(--cream);
}

.realisations-grid {
  columns: 3;
  column-gap: 1.5rem;
}

.real-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.real-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.real-card img {
  width: 100%;
  display: block;
  transition: transform 0.5s;
}

.real-card:hover img {
  transform: scale(1.05);
}

.real-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(62,39,35,0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s;
}

.real-card:hover .real-card-overlay {
  opacity: 1;
}

.real-card-overlay h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.real-card-overlay p {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
}

/* ---- Lightbox ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  background: none;
  border: none;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
}

.lightbox-caption h3 { font-size: 1.3rem; margin-bottom: 4px; }
.lightbox-caption p  { opacity: 0.7; font-size: 0.95rem; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Footer ---- */
.footer {
  background: var(--brown);
  color: rgba(255,255,255,0.85);
  padding: 80px 2rem 30px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer h4 {
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.footer p, .footer li {
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer ul { list-style: none; }

.footer ul li::before {
  content: '→ ';
  color: var(--gold);
}

.footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover { color: var(--gold); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .navbar-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
  }
  .navbar-toggle { display: block; }

  .actualites-grid {
    grid-template-columns: 1fr;
  }

  .realisations-grid {
    columns: 1;
  }

  .avis-card-inner {
    padding: 2rem 1.5rem;
  }

  section { padding: 60px 1rem; }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .realisations-grid { columns: 2; }
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
  font-style: italic;
}

/* ---- Admin link ---- */
.admin-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background: var(--brown);
  color: var(--gold);
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0.7;
}

.admin-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}
