/* ==========================================================================
   TART'IN — Boulangerie artisanale · Saint-Denis, La Réunion
   Design system — identité contemporaine (terracotta / crème beurre / espresso)
   ========================================================================== */

:root {
  /* Couleurs */
  --terra:        #C4602A;   /* terracotta brûlé — signature */
  --terra-deep:   #A54A1C;
  --terra-soft:   #E38B5C;
  --cream:        #F7EDDD;   /* crème beurre — fond principal */
  --cream-warm:   #F1E2CC;
  --sand:         #EAD7BC;
  --espresso:     #2B1D14;   /* brun très foncé — texte fort / sections dark */
  --espresso-90:  #3A2A1E;
  --sage:         #7C8B6F;   /* accent végétal discret */
  --ink:          #34261C;
  --ink-muted:    #8A7860;
  --ink-faint:    #B3A084;
  --hair:         #E2CEB0;
  --on-dark:      #F7EDDD;
  --on-dark-mut:  #CBB99B;
  --white:        #FFFFFF;

  /* Rayons — plus doux, plus contemporain */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 9999px;

  /* Espacement */
  --sp-md: 20px;
  --sp-lg: 32px;
  --sp-xl: 52px;
  --sp-section: clamp(80px, 11vw, 150px);

  --shadow-soft: 0 18px 50px -18px rgba(43, 29, 20, 0.28);
  --shadow-card: 0 12px 34px -14px rgba(43, 29, 20, 0.22);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.83, 0, 0.17, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1320px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px; font-weight: 400; line-height: 1.6;
  color: var(--ink); background: var(--cream);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
address { font-style: normal; }
::selection { background: var(--terra); color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Typographie ---------- */
h1, h2, h3, .display {
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  font-weight: 700; color: var(--ink); line-height: 0.94;
  letter-spacing: -0.01em; text-transform: uppercase;
}
.hero-display { font-size: clamp(52px, 12vw, 168px); font-weight: 800; letter-spacing: -0.02em; }
.display-xl { font-size: clamp(44px, 8vw, 104px); font-weight: 800; }
.display-lg { font-size: clamp(36px, 5.5vw, 72px); }
.display-md { font-size: clamp(28px, 3.6vw, 46px); }
.display-sm { font-size: clamp(22px, 2.6vw, 30px); }

/* Accent serif italique (contrepoint chaleureux au grotesque) */
.serif-accent {
  font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-style: italic;
  text-transform: none; letter-spacing: normal; color: var(--terra);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--terra);
}
.eyebrow::before { content: ''; width: 26px; height: 1.5px; background: var(--terra); display: inline-block; }
.eyebrow.center::after { content: ''; width: 26px; height: 1.5px; background: var(--terra); display: inline-block; }

.lead { font-size: clamp(17px, 2vw, 22px); line-height: 1.5; }
.lead-airy { font-size: clamp(16px, 1.7vw, 19px); font-weight: 300; line-height: 1.7; color: var(--ink-muted); }
.caption { font-size: 13px; line-height: 1.5; color: var(--ink-muted); }

/* ---------- Layout ---------- */
.container { width: min(var(--container), 100%); margin-inline: auto; padding-inline: clamp(20px, 5vw, 64px); }
.section { padding-block: var(--sp-section); }
.tile-cream { background: var(--cream); }
.tile-warm  { background: var(--cream-warm); }
.tile-sand  { background: var(--sand); }
.tile-dark  { background: var(--espresso); color: var(--on-dark); }
.tile-dark h1, .tile-dark h2, .tile-dark h3 { color: var(--on-dark); }
.tile-dark .lead-airy, .tile-dark p { color: var(--on-dark-mut); }
.tile-terra { background: var(--terra); color: var(--cream); }
.tile-terra h1, .tile-terra h2, .tile-terra h3 { color: var(--cream); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }

/* ---------- Reveal & animations ---------- */
.reveal { opacity: 0; transform: translateY(38px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); will-change: opacity, transform; }
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; } .d5 { transition-delay: .5s; }

/* Titre révélé par masque (clip-path) — effet éditorial premium */
.mask-reveal { clip-path: inset(0 100% 0 0); transition: clip-path 1.3s var(--ease-io); will-change: clip-path; }
.mask-reveal.visible { clip-path: inset(0 0 0 0); }

/* Image reveal avec voile qui se lève */
.img-reveal { position: relative; overflow: hidden; }
.img-reveal::after {
  content: ''; position: absolute; inset: 0; background: var(--terra);
  transform: scaleX(1); transform-origin: right; transition: transform 1.2s var(--ease-io); will-change: transform;
}
.img-reveal.visible::after { transform: scaleX(0); }
.img-reveal img { transform: scale(1.14); transition: transform 1.7s var(--ease); will-change: transform; }
.img-reveal.visible img { transform: scale(1); }

/* Nettoyage will-change une fois l'animation jouée (perf) */
.reveal.visible, .mask-reveal.visible, .img-reveal.visible img { will-change: auto; }

/* Parallaxe douce (piloté JS via translate3d) */
[data-parallax] { will-change: transform; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: .3px;
  border-radius: var(--r-pill); padding: 15px 32px;
  position: relative; overflow: hidden; transition: transform .3s var(--ease), color .3s;
  z-index: 0;
}
.btn svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn-primary { background: var(--terra); color: var(--cream); }
.btn-primary::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--terra-deep); transform: translateY(100%); transition: transform .35s var(--ease);
}
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline { border: 1.5px solid currentColor; color: var(--ink); }
.btn-outline::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .35s var(--ease);
}
.btn-outline:hover { color: var(--cream); }
.btn-outline:hover::before { transform: scaleY(1); }
.tile-dark .btn-outline { color: var(--cream); }
.tile-dark .btn-outline::before { background: var(--cream); }
.tile-dark .btn-outline:hover { color: var(--espresso); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--terra); font-weight: 600; font-size: 15px;
}
.text-link::after {
  content: '→'; transition: transform .3s var(--ease);
}
.text-link:hover::after { transform: translateX(5px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; transition: background .4s var(--ease), padding .4s, box-shadow .4s, backdrop-filter .4s;
}
.nav.scrolled {
  background: rgba(247, 237, 221, 0.86); backdrop-filter: blur(14px) saturate(1.3);
  padding: 11px 0; box-shadow: 0 1px 0 var(--hair);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 12px; z-index: 2; }
.nav-brand img { height: 48px; width: auto; transition: height .4s var(--ease); }
.nav.scrolled .nav-brand img { height: 42px; }
/* Bascule de variante logo selon le fond de la nav :
   - hero transparent (at-top) OU pages internes non-scrollées à fond clair : voir règles ci-dessous
   - par défaut (nav opaque crème) : logo clair (texte espresso)
   - sur hero sombre (at-top) : logo dark (texte crème) */
.nav-brand .logo-on-dark { display: none; }
.nav-brand .logo-on-light { display: block; }
.nav.at-top:not(.scrolled) .nav-brand .logo-on-dark { display: block; }
.nav.at-top:not(.scrolled) .nav-brand .logo-on-light { display: none; }
.nav.at-top:not(.scrolled) .nav-link { color: var(--cream); }
.nav.at-top:not(.scrolled) .nav-link::after { background: var(--cream); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--ink); position: relative; letter-spacing: .2px;
  transition: color .25s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 1.5px;
  background: var(--terra); transition: width .3s var(--ease);
}
.nav-link:hover { color: var(--terra); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--terra); }
.nav-link.active::after { width: 100%; background: var(--terra); }
.nav-cta { background: var(--terra); color: var(--cream) !important; padding: 10px 22px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; transition: background .3s, transform .2s; }
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--terra-deep); transform: translateY(-1px); }
.nav.at-top:not(.scrolled) .nav-cta { color: var(--cream) !important; }

.burger { display: none; flex-direction: column; gap: 6px; padding: 10px; z-index: 2; }
.burger span { width: 26px; height: 2px; background: var(--espresso); border-radius: 2px; transition: transform .35s var(--ease), opacity .3s, background .3s; }
.nav.at-top:not(.scrolled) .burger span { background: var(--cream); }
.burger.open span { background: var(--cream); }
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 99; background: var(--espresso);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  clip-path: circle(0% at calc(100% - 44px) 40px); transition: clip-path .6s var(--ease-io);
  pointer-events: none;
}
.drawer.open { clip-path: circle(150% at calc(100% - 44px) 40px); pointer-events: auto; }
.drawer a {
  font-family: 'Big Shoulders Display', sans-serif; font-weight: 700; font-size: clamp(34px, 9vw, 58px);
  text-transform: uppercase; color: var(--on-dark-mut); letter-spacing: 1px;
  padding: 8px 0; transition: color .3s, transform .3s; opacity: 0; transform: translateY(20px);
}
.drawer.open a { opacity: 1; transform: none; }
.drawer.open a:nth-child(1) { transition: opacity .4s .15s, transform .4s .15s, color .3s; }
.drawer.open a:nth-child(2) { transition: opacity .4s .22s, transform .4s .22s, color .3s; }
.drawer.open a:nth-child(3) { transition: opacity .4s .29s, transform .4s .29s, color .3s; }
.drawer.open a:nth-child(4) { transition: opacity .4s .36s, transform .4s .36s, color .3s; }
.drawer.open a:nth-child(5) { transition: opacity .4s .43s, transform .4s .43s, color .3s; }
.drawer a:hover, .drawer a.active { color: var(--terra-soft); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .burger { display: flex; }
}
main { min-height: 60vh; }

/* ---------- Tampon rotatif (signature Tart'in) ---------- */
.stamp-rotate { position: relative; width: 118px; height: 118px; }
.stamp-rotate svg { width: 100%; height: 100%; animation: stampSpin 22s linear infinite; }
.stamp-rotate .stamp-center {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
@keyframes stampSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .stamp-rotate svg { animation: none; } }

/* ---------- Page hero (intérieures) ---------- */
.page-hero { padding: 150px 0 70px; position: relative; overflow: hidden; }
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero p { max-width: 620px; margin-top: 20px; color: var(--ink-muted); }

/* ---------- Cartes produit ---------- */
.gourmet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.gourmet-card {
  background: var(--white); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card); transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.gourmet-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-soft); }
.gourmet-card .photo { aspect-ratio: 4/5; overflow: hidden; position: relative; background: var(--sand); }
.gourmet-card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gourmet-card:hover .photo img { transform: scale(1.07); }
.gourmet-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.gourmet-card .name { font-family: 'Big Shoulders Display', sans-serif; font-weight: 700; font-size: 22px; text-transform: uppercase; line-height: 1; letter-spacing: .2px; }
.gourmet-card .desc { font-size: 13.5px; color: var(--ink-muted); line-height: 1.55; flex: 1; }
.gourmet-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.price-pill { font-family: 'Big Shoulders Display', sans-serif; font-weight: 700; font-size: 22px; color: var(--terra); }
.badge {
  display: inline-block; background: var(--sage); color: var(--cream);
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  border-radius: var(--r-pill); padding: 4px 11px; vertical-align: middle; margin-left: 6px;
}
.photo-mono {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Big Shoulders Display', sans-serif; font-size: 68px; font-weight: 800;
  color: var(--terra-soft); background: linear-gradient(135deg, var(--sand), var(--cream-warm));
  width: 100%; height: 100%; text-transform: uppercase;
}
@media (max-width: 1180px) { .gourmet-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .gourmet-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 440px)  { .gourmet-grid { grid-template-columns: 1fr; } }

/* ---------- Panneau horaires ---------- */
.hours-panel { background: var(--white); border-radius: var(--r-lg); padding: var(--sp-lg); box-shadow: var(--shadow-card); }
.hours-panel ul li { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.hours-panel ul li:last-child { border-bottom: none; }
.hours-panel li.today { color: var(--terra); font-weight: 600; }
.hours-panel li.today .day::before { content: '●'; font-size: 9px; margin-right: 8px; vertical-align: middle; }
.hours-panel li.closed span:last-child { color: var(--ink-faint); }

/* ---------- Footer ---------- */
.footer { background: var(--espresso); color: var(--on-dark-mut); padding: 72px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 44px; margin-bottom: 52px; }
.footer-brand img { height: 66px; width: auto; margin-bottom: 18px; }
.footer-brand .display-sm { color: var(--cream); margin-bottom: 12px; }
.footer h4 { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--cream); margin-bottom: 18px; }
.footer-links a { display: block; font-size: 15px; line-height: 2.3; color: var(--on-dark-mut); transition: color .25s, padding-left .25s; }
.footer-links a:hover { color: var(--terra-soft); padding-left: 5px; }
.footer-legal { border-top: 1px solid var(--espresso-90); padding-top: 28px; font-size: 11px; color: var(--ink-faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Bandeau CTA ---------- */
.cta-band { position: relative; overflow: hidden; padding-block: var(--sp-section); text-align: center; }
.cta-band .container { position: relative; z-index: 2; }

/* ---------- Utilitaires ---------- */
.mt-lg { margin-top: var(--sp-lg); }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.actions.center { justify-content: center; }
.round-media { border-radius: var(--r-lg); overflow: hidden; }
