/* ============================================================
   CF.FR — template.css
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ===== TOKENS ===== */
:root {
  --espresso:   #1a0a00;
  --roast:      #3d1a08;
  --caramel:    #8b4a1a;
  --latte:      #c8956b;
  --cream:      #f5e6c8;
  --foam:       #fdf6ec;
  --white:      #ffffff;
  --text:       #2a1205;
  --muted:      #7a5c44;
  --border:     rgba(61,26,8,0.12);
  --shadow-sm:  0 2px 12px rgba(61,26,8,0.08);
  --shadow-md:  0 8px 32px rgba(61,26,8,0.14);
  --shadow-lg:  0 20px 60px rgba(61,26,8,0.18);
  --radius:     14px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --transition:   0.25s cubic-bezier(0.4,0,0.2,1);
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--foam);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--caramel); border-radius: 3px; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 0.75rem 2rem;
  transition: background var(--transition), box-shadow var(--transition);
}
nav.scrolled {
  background: rgba(253,246,236,0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

/* Logo image */
.nav-logo {
  display: flex; align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  transition: filter var(--transition), opacity var(--transition);
}
nav.scrolled .nav-logo img {
  filter: none;
  opacity: 0.92;
}

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
  text-decoration: none; font-weight: 500; font-size: 0.95rem;
  color: rgba(255,255,255,0.92);
  transition: color var(--transition);
}
nav.scrolled .nav-links a { color: var(--roast); }
.nav-links a:hover { color: var(--latte) !important; }

.nav-right { display: flex; align-items: center; gap: 1rem; }
.lang-switcher { display: flex; gap: 0.35rem; }
.lang-btn {
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
  padding: 0.25rem 0.6rem; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.lang-btn.active {
  background: rgba(255,255,255,0.35);
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
nav.scrolled .lang-btn {
  background: var(--cream); border-color: var(--border); color: var(--muted);
}
nav.scrolled .lang-btn.active {
  background: var(--roast); color: var(--cream); border-color: var(--roast);
}
.mobile-toggle {
  display: none; background: none; border: none;
  font-size: 1.5rem; cursor: pointer;
  color: var(--white);
}
nav.scrolled .mobile-toggle { color: var(--roast); }

@media (max-width: 768px) {
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(253,246,236,0.98); backdrop-filter: blur(12px);
    padding: 1rem; box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--roast) !important; padding: 0.75rem 1rem; border-radius: 8px; }
  .mobile-toggle { display: block; }
  .nav-logo img { height: 40px; }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 2rem 4rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(160deg, rgba(26,10,0,0.72) 0%, rgba(61,26,8,0.55) 60%, rgba(139,74,26,0.4) 100%),
    url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=1600&q=80&fit=crop') center/cover no-repeat;
}
.hero-grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 720px;
  animation: heroIn 1s ease both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(245,230,200,0.18);
  border: 1px solid rgba(245,230,200,0.35);
  color: var(--cream);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.4rem 1.2rem; border-radius: 50px; margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900; line-height: 1.05;
  color: var(--cream);
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.hero h1 em { font-style: italic; color: var(--latte); }
.hero-sub {
  font-size: 1.15rem; color: rgba(245,230,200,0.85);
  margin-bottom: 2.5rem; font-weight: 300;
}
.btn-hero {
  display: inline-block;
  background: var(--cream);
  color: var(--roast);
  font-weight: 700; font-size: 1rem;
  padding: 0.9rem 2.4rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.btn-hero:hover {
  background: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  color: rgba(245,230,200,0.5); font-size: 1.4rem;
  animation: bounce 2s ease infinite;
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ===== SECTIONS ===== */
section { padding: 5rem 2rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 3.5rem; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900; color: var(--roast);
  margin-bottom: 0.6rem;
}
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-label {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--caramel); margin-bottom: 0.75rem;
}

/* ===== MENU ===== */
#menu { background: var(--foam); }

.menu-builder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .menu-builder { grid-template-columns: 1fr; } }

/* Configurator */
.configurator {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  position: sticky; top: 90px;
}
.config-block { margin-bottom: 1.75rem; }
.config-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--caramel);
  margin-bottom: 0.75rem; display: block;
}
.toggle-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toggle-btn {
  flex: 1; min-width: 80px;
  padding: 0.6rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--foam);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.toggle-btn:hover { border-color: var(--latte); color: var(--roast); }
.toggle-btn.active {
  border-color: var(--roast);
  background: var(--roast);
  color: var(--cream);
}

/* Size cards */
.size-cards { display: flex; gap: 0.75rem; }
.size-card {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--foam);
  padding: 0.9rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.size-card:hover { border-color: var(--latte); }
.size-card.active {
  border-color: var(--roast);
  background: linear-gradient(135deg, var(--roast), var(--caramel));
  color: var(--cream);
}
.size-icon { font-size: 1.5rem; margin-bottom: 0.25rem; }
.size-name { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.size-ml { font-size: 0.72rem; opacity: 0.7; }
.size-price { font-size: 0.82rem; font-weight: 600; margin-top: 0.25rem; }
.size-card.active .size-price { color: var(--cream); }

/* Options */
.option-list { display: flex; flex-direction: column; gap: 0.5rem; }
.option-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--foam);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.option-item:hover { border-color: var(--latte); }
.option-item.checked {
  border-color: var(--caramel);
  background: rgba(200,149,107,0.1);
}
.option-left { display: flex; align-items: center; gap: 0.6rem; }
.opt-check {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: transparent;
  transition: all var(--transition);
  flex-shrink: 0;
}
.option-item.checked .opt-check {
  background: var(--caramel); border-color: var(--caramel); color: white;
}
.option-name { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.option-price { font-size: 0.82rem; font-weight: 600; color: var(--caramel); }

/* Add to order button */
.btn-add {
  width: 100%;
  background: linear-gradient(135deg, var(--roast), var(--caramel));
  color: var(--cream);
  border: none;
  border-radius: var(--radius);
  padding: 1rem;
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 0.5rem;
}
.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61,26,8,0.25);
}
.btn-add:active { transform: translateY(0); }

/* Order summary */
.order-summary {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.order-summary h3 {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 900; color: var(--roast);
  border-bottom: 2px solid var(--cream);
  padding-bottom: 0.75rem;
}
.order-empty { color: var(--muted); font-size: 0.95rem; text-align: center; padding: 2rem 0; }
.order-item {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem;
  background: var(--foam);
  border-radius: 10px;
  font-size: 0.9rem;
  animation: slideItem 0.3s ease both;
}
@keyframes slideItem {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
.order-item-info { flex: 1; }
.order-item-name { font-weight: 700; color: var(--roast); }
.order-item-detail { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
.order-item-right { display: flex; align-items: center; gap: 0.5rem; }
.order-item-price { font-weight: 700; color: var(--caramel); white-space: nowrap; }
.order-item-del {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1rem;
  line-height: 1; padding: 0.15rem 0.3rem; border-radius: 4px;
  transition: color var(--transition);
}
.order-item-del:hover { color: #c0392b; }
.order-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.75rem;
  border-top: 2px solid var(--cream);
  font-weight: 700; font-size: 1rem; color: var(--roast);
}
.order-total-price {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 900; color: var(--caramel);
}
.btn-confirm {
  width: 100%;
  background: linear-gradient(135deg, var(--roast), var(--caramel));
  color: var(--cream);
  border: none; border-radius: var(--radius);
  padding: 1rem; font-family: var(--font-body);
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all var(--transition);
  display: none;
}
.btn-confirm:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(61,26,8,0.25); }
.btn-confirm.visible { display: block; }

/* ===== ABOUT ===== */
#propos { background: var(--cream); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.about-img-wrap {
  position: relative; border-radius: 20px; overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}
.about-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.about-img-wrap:hover img { transform: scale(1.04); }
.about-badge {
  position: absolute; bottom: 1.5rem; left: 1.5rem;
  background: var(--roast); color: var(--cream);
  padding: 0.6rem 1.2rem; border-radius: 50px;
  font-weight: 700; font-size: 0.85rem;
}
.about-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900; color: var(--roast);
  margin-bottom: 1.25rem;
}
.about-text p { color: var(--muted); font-size: 1.05rem; line-height: 1.75; margin-bottom: 2rem; }
.faq { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  border: 2px solid rgba(61,26,8,0.12);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%; background: none; border: none;
  text-align: left; padding: 1rem 1.25rem;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  color: var(--roast); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: background var(--transition);
}
.faq-q:hover { background: rgba(61,26,8,0.04); }
.faq-q .faq-icon { transition: transform var(--transition); font-style: normal; }
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.25rem; color: var(--muted); font-size: 0.95rem;
}
.faq-item.open .faq-a { max-height: 120px; padding: 0 1.25rem 1rem; }

/* ===== CONTACT ===== */
#contact { background: var(--foam); }
.contact-wrap {
  max-width: 600px; margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; margin-bottom: 0.4rem;
  font-weight: 600; font-size: 0.88rem; color: var(--roast);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 2px solid var(--border); border-radius: 10px;
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--text); background: var(--foam);
  transition: border-color var(--transition);
  appearance: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--caramel);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.error-message { color: #e53e3e; font-size: 0.82rem; margin-top: 0.3rem; display: none; }
.form-group.error input,
.form-group.error select,
.form-group.error textarea { border-color: #e53e3e; }
.form-group.error .error-message { display: block; }
.btn-contact {
  width: 100%;
  background: linear-gradient(135deg, var(--roast), var(--caramel));
  color: var(--cream); border: none; border-radius: var(--radius);
  padding: 1rem; font-family: var(--font-body);
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: all var(--transition);
}
.btn-contact:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(61,26,8,0.25); }
.form-alert {
  padding: 0.85rem 1rem; border-radius: 10px;
  font-weight: 600; font-size: 0.9rem;
  text-align: center; display: none; margin-bottom: 1rem;
}
.form-alert.success { background: #d4edda; color: #155724; }
.form-alert.error   { background: #f8d7da; color: #721c24; }

/* ===== FOOTER ===== */
footer {
  background: var(--espresso);
  color: rgba(245,230,200,0.7);
  padding: 3rem 2rem 2rem;
  text-align: center;
}
.footer-logo-img {
  height: 72px; width: auto;
  display: block; margin: 0 auto 1.5rem;
  opacity: 0.9;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.footer-links {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  justify-content: center; list-style: none;
  margin-bottom: 2rem;
}
.footer-links a {
  color: rgba(245,230,200,0.65); text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--cream); }
.footer-copy { font-size: 0.82rem; color: rgba(245,230,200,0.4); }
.footer-copy a { color: var(--latte); text-decoration: none; }

/* ===== COOKIE BANNER ===== */
#cookieConsent {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(26,10,0,0.97);
  backdrop-filter: blur(12px);
  z-index: 10000; padding: 1.75rem 2rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 -4px 30px rgba(0,0,0,0.3);
}
#cookieConsent.show { transform: translateY(0); }
.cookie-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 260px; color: var(--cream); }
.cookie-text h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.cookie-text p { font-size: 0.88rem; line-height: 1.6; color: rgba(245,230,200,0.75); }
.cookie-text a { color: var(--latte); }
.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.c-btn {
  padding: 0.65rem 1.4rem; border-radius: 8px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer; border: none;
  transition: all var(--transition); white-space: nowrap;
  font-family: var(--font-body);
}
.c-btn-accept { background: var(--caramel); color: white; }
.c-btn-accept:hover { background: var(--latte); }
.c-btn-refuse { background: transparent; color: rgba(245,230,200,0.7); border: 1.5px solid rgba(245,230,200,0.25); }
.c-btn-refuse:hover { background: rgba(245,230,200,0.08); }
.c-btn-custom { background: transparent; color: rgba(245,230,200,0.7); border: 1.5px solid rgba(200,149,107,0.4); }
.c-btn-custom:hover { background: rgba(200,149,107,0.1); }

/* Cookie modal */
#cookieModal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 10001;
  padding: 2rem; overflow-y: auto;
  align-items: center; justify-content: center;
}
#cookieModal.show { display: flex; }
.modal-box {
  background: var(--white); border-radius: 18px;
  max-width: 640px; width: 100%; padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem; padding-bottom: 1rem;
  border-bottom: 2px solid var(--cream);
}
.modal-head h2 { font-family: var(--font-display); font-size: 1.5rem; color: var(--roast); }
.modal-close {
  background: none; border: none; font-size: 1.8rem;
  cursor: pointer; color: var(--muted); line-height: 1;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background var(--transition);
}
.modal-close:hover { background: var(--cream); }
.cookie-cat {
  background: var(--foam); border: 2px solid var(--border);
  border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem;
}
.cat-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem;
}
.cat-head h3 { font-size: 1rem; color: var(--roast); font-weight: 600; }
.cat-desc { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.3rem; }
.cat-ex { font-size: 0.8rem; color: #a0aec0; font-style: italic; }
.req-badge {
  background: #48bb78; color: white;
  padding: 0.2rem 0.6rem; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; margin-left: 0.5rem;
}
.toggle-sw { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-sw input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #cbd5e0; border-radius: 26px;
  transition: 0.3s;
}
.toggle-slider:before {
  content: ''; position: absolute;
  height: 18px; width: 18px; left: 4px; bottom: 4px;
  background: white; border-radius: 50%; transition: 0.3s;
}
input:checked + .toggle-slider { background: var(--caramel); }
input:checked + .toggle-slider:before { transform: translateX(22px); }
input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }
.modal-foot {
  display: flex; gap: 0.75rem; justify-content: flex-end;
  flex-wrap: wrap; margin-top: 1.5rem;
}
.c-btn-save { background: var(--foam); color: var(--roast); border: 2px solid var(--border); }
.c-btn-save:hover { background: var(--cream); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .cookie-inner { flex-direction: column; gap: 1rem; }
  .cookie-actions { width: 100%; flex-direction: column; }
  .c-btn { width: 100%; text-align: center; }
  section { padding: 3.5rem 1rem; }
}