/* ============================
   Boulangerie Le Mamita - CSS
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Averia+Serif+Libre:ital,wght@0,300;0,400;0,700;1,300;1,400&family=Lato:wght@300;400;600;700&display=swap');

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #ffffff;
  --color-secondary: #eeeeee;
  --color-accent: #8B1A1A;
  --color-accent-light: #a52020;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e0e0e0;
  --color-bg-warm: #faf9f7;
  --font-serif: 'Averia Serif Libre', Georgia, serif;
  --font-sans: 'Lato', system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
  --radius: 4px;
  --transition: 0.3s ease;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* ---- Layout ---- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--alt {
  background-color: var(--color-bg-warm);
}

.section--dark {
  background-color: var(--color-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  color: var(--color-text);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

/* ---- Divider ornement ---- */
.ornement {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin: 16px auto 0;
  width: fit-content;
}

.ornement::before,
.ornement::after {
  content: '';
  width: 40px;
  height: 1px;
  background-color: var(--color-accent);
  opacity: 0.5;
}

.ornement span {
  color: var(--color-accent);
  font-size: 1rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn--primary {
  background-color: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background-color: var(--color-accent-light);
  border-color: var(--color-accent-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--outline:hover {
  background-color: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
}

.btn--light {
  background-color: #fff;
  color: var(--color-accent);
  border-color: #fff;
}

.btn--light:hover {
  background-color: transparent;
  color: #fff;
  border-color: #fff;
}

/* ---- HEADER / NAVIGATION ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__logo img {
  height: 52px;
  width: auto;
}

.header__brand {
  display: flex;
  flex-direction: column;
}

.header__brand-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.1;
}

.header__brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text);
  padding: 4px 0;
  position: relative;
  transition: color var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition);
}

.nav__link:hover {
  color: var(--color-accent);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__cta {
  padding: 8px 20px;
  font-size: 0.8rem;
}

/* Mobile menu toggle */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-boulangerie.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.55);
  transform: scale(1.02);
  transition: transform 8s ease;
}

.hero:hover .hero__bg {
  transform: scale(1.06);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(139, 26, 26, 0.35) 0%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

.hero__shape {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background-color: var(--color-primary);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 0 24px;
  max-width: 800px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-block;
  background-color: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-family: var(--font-sans);
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero__title span {
  color: #f5c6c6;
}

.hero__text {
  font-size: 1.1rem;
  opacity: 0.92;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

.hero__scroll svg {
  width: 20px;
  height: 20px;
}

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

/* ---- HORAIRES ---- */
.horaires {
  background-color: var(--color-primary);
}

.horaires__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.horaires__visual {
  position: relative;
}

.horaires__img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.horaires__badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background-color: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.horaires__badge-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.horaires__badge-text {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

.horaires__content h2 {
  margin-bottom: 16px;
}

.horaires__content > p {
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.horaires__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 32px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.horaires__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition);
}

.horaires__item:last-child {
  border-bottom: none;
}

.horaires__item:hover {
  background-color: var(--color-secondary);
}

.horaires__item--highlight {
  background-color: #fdf0f0;
}

.horaires__day {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.horaires__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  flex-shrink: 0;
}

.horaires__dot--closed {
  background-color: #ef4444;
}

.horaires__time {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-accent);
  font-size: 0.95rem;
}

.horaires__note {
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-style: italic;
  margin-bottom: 24px;
}

/* ---- SPÉCIALITÉS ---- */
.specialites {
  background-color: var(--color-bg-warm);
  position: relative;
  overflow: hidden;
}

.specialites::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background-color: rgba(139,26,26,0.04);
}

.specialites::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: rgba(139,26,26,0.04);
}

.specialites__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.specialite-card {
  background-color: var(--color-primary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.specialite-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.specialite-card__img-wrap {
  height: 220px;
  overflow: hidden;
}

.specialite-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.specialite-card:hover .specialite-card__img {
  transform: scale(1.07);
}

.specialite-card__body {
  padding: 24px;
}

.specialite-card__icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.specialite-card__title {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--color-text);
}

.specialite-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.specialites__cta {
  text-align: center;
}

/* ---- GALERIE ---- */
.galerie {
  background-color: var(--color-primary);
}

.galerie__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
  margin-bottom: 48px;
}

.galerie__item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
}

.galerie__item--large {
  grid-row: span 2;
}

.galerie__img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.galerie__item--large .galerie__img {
  min-height: 460px;
}

.galerie__item:hover .galerie__img {
  transform: scale(1.08);
}

.galerie__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(139,26,26,0.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.galerie__item:hover .galerie__overlay {
  opacity: 1;
}

.galerie__label {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.galerie__cta {
  text-align: center;
}

/* ---- CONTACT ---- */
.contact {
  background-color: var(--color-bg-warm);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__info h2 {
  margin-bottom: 16px;
}

.contact__intro {
  color: var(--color-text-light);
  margin-bottom: 40px;
}

.contact__items {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 36px;
}

.contact__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact__item-icon {
  width: 44px;
  height: 44px;
  background-color: #fdf0f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
}

.contact__item-icon svg {
  width: 20px;
  height: 20px;
}

.contact__item-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.contact__item-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
}

.contact__item-value a:hover {
  color: var(--color-accent);
}

.contact__map {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 420px;
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ---- BANDEAU INFO ---- */
.bandeau {
  background-color: var(--color-accent);
  color: #fff;
  padding: 20px 0;
}

.bandeau__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.bandeau__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.bandeau__item svg {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

/* ---- FOOTER ---- */
.footer {
  background-color: #1a1a1a;
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer__brand img {
  height: 56px;
  margin-bottom: 16px;
  opacity: 0.9;
  filter: brightness(0) invert(1);
}

.footer__brand-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
  max-width: 280px;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition);
  color: rgba(255,255,255,0.8);
}

.footer__social-link:hover {
  background-color: var(--color-accent);
}

.footer__social-link svg {
  width: 16px;
  height: 16px;
}

.footer__col-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__link {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer__link::before {
  content: '›';
  color: var(--color-accent);
  font-size: 1rem;
}

.footer__link:hover {
  color: #fff;
}

.footer__contact-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
}

.footer__contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-accent);
}

.footer__bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.footer__legal {
  display: flex;
  gap: 20px;
}

.footer__legal a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  transition: color var(--transition);
}

.footer__legal a:hover {
  color: #fff;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.active {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.lightbox__close:hover {
  opacity: 1;
}

/* ---- SCROLL TO TOP ---- */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  transition: all var(--transition);
  z-index: 500;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  background-color: var(--color-accent-light);
  transform: translateY(-2px);
}

.scroll-top svg {
  width: 20px;
  height: 20px;
}

/* ---- ANIMATIONS ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .specialites__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  /* Nav mobile */
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    border-top: 1px solid var(--color-border);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__link {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav__link::after {
    display: none;
  }

  .nav__cta {
    margin: 12px 24px 0;
    width: calc(100% - 48px);
    justify-content: center;
  }

  .hamburger {
    display: flex;
  }

  /* Grid changes */
  .horaires__grid,
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .horaires__badge {
    bottom: -16px;
    right: -16px;
    width: 80px;
    height: 80px;
  }

  .horaires__badge-num {
    font-size: 1.2rem;
  }

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

  .galerie__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .galerie__item--large {
    grid-row: auto;
  }

  .galerie__item--large .galerie__img {
    min-height: 220px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .bandeau__inner {
    gap: 24px;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

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

  .horaires__img {
    height: 300px;
  }

  .contact__map {
    height: 300px;
  }
}
