/* =========================================================
   LE FOURNIL D'AUGUSTINE — Boulangerie artisanale, Annecy
   Format   : one-page (ancres)
   Identité : chaleureuse, gourmande, artisanale
   Palette  : farine · croûte · beurre · terre cuite
   Typo     : DM Serif Display + DM Sans + Caveat (manuscrit)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=Caveat:wght@500;600;700&display=swap');

:root {
  --farine:   #F6EEDF;
  --farine-2: #EFE3CD;
  --creme:    #FCF8F0;
  --croute:   #4A3019;
  --croute-2: #6B4423;
  --pain:     #8A5A2B;
  --beurre:   #E2A93B;
  --terre:    #BC5A33;
  --terre-d:  #9E4827;
  --texte:    #4D3D2C;
  --gris:     #8C7C68;
  --gris-l:   #B3A48E;
  --ligne:    #E6D9C1;
  --ligne-2:  #D8C5A4;

  --maxw:  1180px;
  --pad-x: clamp(22px, 5vw, 60px);
  --t:     240ms cubic-bezier(.4, 0, .15, 1);
  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --hand:  'Caveat', cursive;

  --sh-sm: 0 2px 14px rgba(74,48,25,.06);
  --sh-md: 0 18px 44px rgba(74,48,25,.14);
  --r:     16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.75; font-weight: 400; color: var(--texte); background: var(--farine); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.1; color: var(--croute); }
p { margin: 0 0 1em; }
::selection { background: var(--terre); color: var(--creme); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.hand { font-family: var(--hand); color: var(--terre); }

/* ============ BOUTONS ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--sans); font-weight: 600; font-size: .98rem; padding: 14px 30px; border-radius: 100px; cursor: pointer; border: 1.5px solid transparent; transition: var(--t); }
.btn--terre { background: var(--terre); color: var(--creme); }
.btn--terre:hover { background: var(--terre-d); transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn--croute { background: var(--croute); color: var(--creme); }
.btn--croute:hover { background: var(--croute-2); transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--croute); border-color: var(--ligne-2); }
.btn--outline:hover { border-color: var(--terre); color: var(--terre); }
.btn--lg { padding: 16px 38px; font-size: 1.05rem; }

/* ============ HEADER : logo centré, nav répartie ============ */
.bakehead { position: sticky; top: 0; z-index: 60; background: rgba(252,248,240,.92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: var(--t); }
.bakehead.is-compact { border-bottom-color: var(--ligne); box-shadow: var(--sh-sm); }
.bakehead__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 96px; gap: 20px; transition: height var(--t); }
.bakehead.is-compact .bakehead__inner { height: 74px; }
.logo { display: block; color: var(--croute); }
.logo svg { height: 56px; width: auto; transition: var(--t); }
.bakehead.is-compact .logo svg { height: 42px; }
.bakehead__center { justify-self: center; }

.bakenav { display: flex; gap: 28px; align-items: center; }
.bakenav--left { justify-self: start; }
.bakenav--right { justify-self: end; }
.bakenav__link { font-family: var(--sans); font-weight: 500; font-size: .92rem; color: var(--texte); position: relative; padding: 4px 0; transition: var(--t); }
.bakenav__link::after { content: ''; position: absolute; left: 50%; bottom: -2px; width: 0; height: 2px; background: var(--terre); transform: translateX(-50%); transition: var(--t); border-radius: 2px; }
.bakenav__link:hover { color: var(--terre); } .bakenav__link:hover::after, .bakenav__link.is-active::after { width: 100%; }
.bakenav__link.is-active { color: var(--terre); }
.bakenav__cta { margin-left: 6px; }

.baketoggle { display: none; flex-direction: column; gap: 5px; width: 30px; height: 30px; background: none; border: none; cursor: pointer; padding: 5px; justify-self: end; }
.baketoggle span { display: block; height: 2px; width: 100%; background: var(--croute); border-radius: 2px; transition: var(--t); }
.baketoggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.baketoggle.is-open span:nth-child(2) { opacity: 0; }
.baketoggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .bakehead__inner { grid-template-columns: 1fr auto; height: 70px; }
  .bakehead.is-compact .bakehead__inner { height: 64px; }
  .bakenav--left { display: none; }
  .bakehead__center { justify-self: start; }
  .logo svg, .bakehead.is-compact .logo svg { height: 40px; }
  .bakenav--right { display: none; }
  .baketoggle { display: flex; }
  /* panneau déroulant */
  .bakenav-panel { position: fixed; top: 70px; left: 0; right: 0; background: var(--creme); border-bottom: 1px solid var(--ligne); padding: 16px var(--pad-x) 28px; display: flex; flex-direction: column; gap: 2px; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: var(--t); z-index: 59; box-shadow: var(--sh-md); }
  .bakenav-panel.is-open { transform: none; opacity: 1; visibility: visible; }
  .bakenav-panel a { font-family: var(--serif); font-size: 1.5rem; color: var(--croute); padding: 12px 0; border-bottom: 1px solid var(--ligne); }
  .bakenav-panel a.btn { border: none; color: var(--creme); margin-top: 14px; justify-content: center; }
}
@media (min-width: 861px) { .bakenav-panel { display: none; } }

/* ============ SECTIONS ============ */
.sec { padding: clamp(64px, 9vw, 120px) 0; }
.sec--cream { background: var(--creme); }
.sec--flour2 { background: var(--farine-2); }
.sec--croute { background: var(--croute); color: var(--farine); }
.sec--tight { padding: clamp(48px, 6vw, 80px) 0; }

.kicker { font-family: var(--hand); font-size: 1.6rem; color: var(--terre); display: block; margin-bottom: 6px; transform: rotate(-2deg); }
.sec--croute .kicker { color: var(--beurre); }
.sec__title { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.sec--croute .sec__title { color: var(--creme); }
.sec__head { max-width: 640px; margin-bottom: 54px; }
.sec__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.sec__lead { font-size: 1.1rem; color: var(--gris); margin-top: 14px; }
.sec--croute .sec__lead { color: var(--farine-2); }

/* ============ HERO ============ */
.hero { position: relative; min-height: 90vh; display: flex; align-items: center; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(95deg, rgba(74,48,25,.78) 0%, rgba(74,48,25,.42) 55%, rgba(74,48,25,.12) 100%); }
.hero__inner { position: relative; z-index: 1; color: var(--creme); padding: 80px 0; max-width: 660px; }
.hero__kicker { font-family: var(--hand); font-size: 2rem; color: var(--beurre); transform: rotate(-2deg); display: inline-block; }
.hero__title { font-family: var(--serif); font-size: clamp(2.8rem, 6.5vw, 5rem); line-height: 1.04; color: var(--creme); margin: 8px 0 0; }
.hero__title em { font-style: italic; color: var(--beurre); }
.hero__text { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 500px; margin-top: 22px; color: rgba(252,248,240,.92); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__open { margin-top: 30px; font-size: .92rem; color: var(--farine-2); display: flex; align-items: center; gap: 10px; }
.hero__open .dot { width: 9px; height: 9px; border-radius: 50%; background: #7BD389; box-shadow: 0 0 0 4px rgba(123,211,137,.25); }

/* ============ SPLIT (le fournil) ============ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 84px); align-items: center; }
.split--rev .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 220px 220px 18px 18px; box-shadow: var(--sh-md); }
.split__stamp { position: absolute; bottom: -18px; right: -10px; width: 116px; height: 116px; background: var(--beurre); color: var(--croute); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-family: var(--hand); font-weight: 700; transform: rotate(-8deg); box-shadow: var(--sh-md); line-height: 1.1; }
.split__stamp b { font-family: var(--serif); font-size: 1.8rem; }
.split__title { font-size: clamp(2rem, 3.8vw, 2.8rem); margin-bottom: 20px; }
.split__text p { color: var(--gris); }
.sign { font-family: var(--hand); font-size: 2rem; color: var(--terre); margin-top: 18px; transform: rotate(-2deg); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 48px; } .split--rev .split__media { order: 0; } .split__media img { aspect-ratio: 3/2; border-radius: 18px; } }

/* ============ PRODUITS ============ */
.cat { margin-bottom: clamp(48px, 7vw, 80px); }
.cat:last-child { margin-bottom: 0; }
.cat__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 16px; margin-bottom: 30px; border-bottom: 2px dashed var(--ligne-2); }
.cat__title { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.cat__note { font-family: var(--hand); font-size: 1.35rem; color: var(--terre); white-space: nowrap; }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product { background: var(--creme); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-sm); transition: var(--t); }
.sec--cream .product { background: var(--farine); }
.product:hover { transform: translateY(-6px); box-shadow: var(--sh-md); }
.product__media { aspect-ratio: 5/4; overflow: hidden; }
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.4,0,.15,1); }
.product:hover .product__media img { transform: scale(1.07); }
.product__body { padding: 20px 22px 24px; }
.product__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.product__name { font-size: 1.3rem; }
.product__price { font-family: var(--serif); font-size: 1.2rem; color: var(--terre); white-space: nowrap; }
.product__desc { font-size: .92rem; color: var(--gris); margin: 6px 0 0; }
@media (max-width: 820px) { .products { grid-template-columns: 1fr 1fr; gap: 18px; } }
@media (max-width: 520px) { .products { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; } .cat__head { flex-direction: column; gap: 4px; } }

/* ============ SAVOIR-FAIRE (étapes) ============ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.step { text-align: center; }
.step__n { font-family: var(--hand); font-size: 3rem; color: var(--beurre); line-height: 1; }
.step h3 { font-size: 1.4rem; margin: 8px 0 10px; color: var(--creme); }
.step p { color: var(--farine-2); font-size: .96rem; margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 34px; max-width: 420px; margin: 0 auto; } }

/* ============ AVIS ============ */
.avis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.avi { background: var(--creme); border: 1px solid var(--ligne); border-radius: var(--r); padding: 30px 28px; }
.avi__stars { color: var(--beurre); letter-spacing: 2px; margin-bottom: 12px; }
.avi__txt { font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--croute); line-height: 1.5; }
.avi__who { font-size: .88rem; color: var(--gris); margin-top: 14px; font-weight: 600; }
@media (max-width: 820px) { .avis { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }

/* ============ COMMANDE (form) ============ */
.order { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 5vw, 70px); align-items: center; }
.order__media img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--r); box-shadow: var(--sh-md); }
.form-card { background: var(--creme); border-radius: var(--r); padding: clamp(26px, 4vw, 42px); box-shadow: var(--sh-sm); border: 1px solid var(--ligne); }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--croute-2); margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--texte); padding: 13px 15px; border: 1.5px solid var(--ligne-2); border-radius: 10px; background: var(--farine); transition: var(--t); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--terre); background: #fff; box-shadow: 0 0 0 3px rgba(188,90,51,.14); }
.field textarea { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: .84rem; color: var(--gris-l); margin-top: 6px; }
.err { color: var(--terre-d); }
@media (max-width: 820px) { .order { grid-template-columns: 1fr; gap: 32px; } .order__media { display: none; } }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 60px); align-items: stretch; }
.hours li { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--ligne); font-size: 1rem; }
.hours li .is-closed { color: var(--gris-l); }
.hours li b { font-family: var(--sans); font-weight: 600; color: var(--croute); }
.contact-info { margin-top: 26px; font-style: normal; line-height: 1.9; color: var(--texte); }
.contact-info a { color: var(--terre); font-weight: 600; }
.map-frame { border-radius: var(--r); overflow: hidden; min-height: 320px; box-shadow: var(--sh-sm); border: 1px solid var(--ligne); }
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; filter: sepia(.2) saturate(1.05); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ============ FOOTER ============ */
.bakefoot { background: var(--croute); color: var(--farine-2); padding: clamp(48px, 6vw, 70px) 0 30px; text-align: center; }
.bakefoot__logo { color: var(--creme); display: inline-block; margin-bottom: 18px; }
.bakefoot__logo svg { height: 60px; }
.bakefoot__tag { font-family: var(--hand); font-size: 1.5rem; color: var(--beurre); margin-bottom: 22px; }
.bakefoot__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin-bottom: 26px; font-size: .95rem; }
.bakefoot__nav a:hover { color: var(--beurre); }
.bakefoot__sep { width: 60px; height: 1px; background: rgba(246,238,223,.25); margin: 0 auto 22px; }
.bakefoot__bottom { font-size: .82rem; color: var(--gris-l); line-height: 1.8; }
.bakefoot__bottom a:hover { color: var(--farine-2); }

/* ============ FLASH ============ */
.flash { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; align-items: center; gap: 11px; background: var(--croute); color: var(--creme); padding: 15px 26px; border-radius: 100px; box-shadow: var(--sh-md); font-weight: 600; font-size: .95rem; transition: opacity 500ms ease; max-width: 90vw; }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 750ms cubic-bezier(.4,0,.15,1), transform 750ms cubic-bezier(.4,0,.15,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
.text-center { text-align: center; }
