/* Fromagerie Emma D — feuille de style de la page d'accueil */

:root {
  --creme: #F5F1EA;
  --blanc: #FFFFFF;
  --encre: #1C1B19;
  --brun: #8A6136;
  --brun-fonce: #6E4C29;
  --or: #D9B98C;
  --etoile: #D9A441;
  --texte-doux: #4A453E;
  --texte-gris: #6B655C;
  --texte-clair: #E9E2D6;
  --texte-sombre-clair: #CFC6B8;
  --peche: #F3E9DC;
  --filet: #DDD3C3;
  --filet-sombre: #3A3733;
  --sable: #E3DACB;
  --avatar: #EDE6DA;
  --erreur: #A3261B;
  --erreur-fond: #FBEDEA;

  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 27px;
}

main { flex: 1 0 auto; display: flex; flex-direction: column; }
img { max-width: 100%; }
h1, h2, p { margin: 0; }

a { color: var(--encre); }
a:hover { color: var(--brun); }

/* ---------- Utilitaires ---------- */

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; width: 100%; }
.serif { font-family: var(--serif); }
.caps { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.photo { display: block; width: 100%; object-fit: cover; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex: none; fill: currentColor; }
.section-title { font-family: var(--serif); font-size: 44px; line-height: 48px; font-weight: 600; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 18px; border-radius: 6px;
  font-family: inherit; font-weight: 600; font-size: 15px; letter-spacing: .04em; text-decoration: none;
  border: 0; cursor: pointer;
}
.btn:disabled { opacity: .7; cursor: wait; }
.btn-primary { background: var(--brun); color: var(--blanc); }
.btn-primary:hover { background: var(--brun-fonce); color: var(--blanc); }
.btn-outline { border: 1px solid var(--encre); color: var(--encre); }
.btn-outline:hover { background: var(--encre); color: var(--creme); }
.btn-light { background: var(--creme); color: var(--encre); border: 1px solid var(--creme); }
.btn-light:hover { background: var(--blanc); color: var(--encre); }

/* ---------- Bandeau supérieur ---------- */

.topbar { background: var(--encre); color: var(--creme); }
.topbar .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 10px; padding-bottom: 10px; font-size: 11px;
}
.topbar a { color: var(--creme); text-decoration: none; }
.topbar a .icon { margin-right: 6px; }

/* ---------- En-tête ---------- */

.site-header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; padding-top: 18px; padding-bottom: 18px; }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 32px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  color: var(--encre); border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--brun); }
.site-nav a[aria-current="page"] { color: var(--brun); border-bottom-color: var(--brun); }

.menu-toggle {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--encre); border-radius: 6px; background: transparent; color: var(--encre);
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
}
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.menu-ouvert .menu-toggle-bars { background: transparent; }
.menu-ouvert .menu-toggle-bars::before { top: 0; transform: rotate(45deg); }
.menu-ouvert .menu-toggle-bars::after { top: 0; transform: rotate(-45deg); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 110px; height: 110px; }
.brand span { font-family: var(--serif); font-size: 34px; line-height: 36px; font-weight: 600; }

/* ---------- Hero ---------- */

.hero { position: relative; background: var(--encre); color: var(--creme); overflow: hidden; min-height: 680px; display: flex; }
.hero > img { position: absolute; inset: 0; height: 100%; object-position: 60% 70%; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(28, 27, 25, 0.4); } /* voile léger sur la photo */
.hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 72px; }
.hero-content { max-width: 560px; }
.hero .caps { margin-bottom: 20px; color: var(--or); }
.hero h1 { font-family: var(--serif); font-size: 64px; line-height: 66px; font-weight: 600; }
.hero-lead { margin-top: 22px; max-width: 480px; font-size: 19px; line-height: 30px; color: var(--texte-clair); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- Distinctions ---------- */

.distinctions { background: var(--blanc); border-bottom: 1px solid var(--filet); }
.distinctions .wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 32px;
  padding-top: 28px; padding-bottom: 28px; text-align: center;
}
.distinction { font-size: 15px; line-height: 22px; color: var(--texte-gris); }
.distinction .icon { display: block; margin: 0 auto 12px; font-size: 36px; color: var(--brun); }
.distinction strong { font-family: var(--serif); font-size: 22px; line-height: 28px; font-weight: 600; color: var(--encre); }

/* ---------- Histoire ---------- */

.histoire { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 72px; padding-top: 112px; padding-bottom: 112px; }
.histoire-text { flex: 5 1 380px; min-width: 0; }
.histoire-text h2 { margin-bottom: 24px; }
.histoire-intro { font-family: var(--serif); font-size: 27px; line-height: 36px; font-weight: 500; }
.histoire-body { margin-top: 24px; font-size: 18px; line-height: 30px; color: var(--texte-doux); }
.histoire-photos { flex: 6 1 440px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.histoire-photos .photo { height: 220px; }
.histoire-photos .photo-large { grid-column: span 2; height: 360px; object-position: 45% 35%; }

/* ---------- Savoir-faire ---------- */

.savoir-faire { background: var(--encre); color: var(--creme); }
.savoir-faire .wrap { padding-top: 104px; padding-bottom: 104px; }
.savoir-faire h2 { margin-bottom: 20px; }
.savoir-faire-lead { max-width: 760px; font-size: 21px; line-height: 33px; color: var(--texte-clair); }
.savoir-faire-cols {
  display: flex; flex-wrap: wrap; gap: 32px 64px;
  margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--filet-sombre);
}
.savoir-faire-col { flex: 1 1 340px; min-width: 0; }
.savoir-faire-col .photo { height: 300px; margin-bottom: 24px; }
.savoir-faire-col p { color: var(--texte-sombre-clair); }
.savoir-faire-quote { margin-top: 64px; font-family: var(--serif); font-size: 38px; line-height: 46px; font-style: italic; font-weight: 500; color: var(--or); }

/* ---------- Avis ---------- */

.avis { padding-top: 104px; padding-bottom: 104px; }
.avis-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-bottom: 40px; }
.avis-score { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--texte-doux); }
.avis-score > .icon { font-size: 20px; }
.avis-score strong { color: var(--encre); }
.avis-head .btn { margin-left: auto; }
.stars { display: inline-flex; gap: 2px; color: var(--etoile); }
.avis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.avis-card {
  background: var(--blanc); border: 1px solid var(--filet); border-radius: 6px;
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
}
.avis-card .stars { gap: 3px; font-size: 16px; }
.avis-card blockquote { margin: 0; color: var(--texte-doux); font-style: italic; }
.avis-author { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--filet); font-size: 15px; line-height: 20px; }
.avis-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--avatar); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--brun); }
.avis-date { color: var(--texte-gris); }

/* ---------- Visite ---------- */

.visite { flex: 1 0 auto; position: relative; display: flex; flex-direction: column; justify-content: center; color: var(--creme); background: var(--encre); overflow: hidden; }
.visite > .photo { position: absolute; inset: 0; height: 100%; object-position: 50% 60%; }
.visite-overlay { position: absolute; inset: 0; background: rgba(28, 27, 25, 0.78); }
.visite .wrap { position: relative; padding-top: 80px; padding-bottom: 80px; }
.visite-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 48px; margin-bottom: 48px; }
.visite-head h2 { max-width: 620px; font-family: var(--serif); font-size: 60px; line-height: 62px; font-weight: 600; }
.visite-head p { max-width: 420px; font-family: var(--serif); font-size: 24px; line-height: 32px; font-style: italic; color: var(--texte-clair); }
.visite-cards { display: flex; flex-wrap: wrap; gap: 20px; color: var(--encre); }

.visite-infos { flex: 8 1 560px; min-width: 0; background: var(--creme); display: flex; flex-wrap: wrap; }
.visite-map { flex: 1 1 280px; min-height: 360px; background: var(--sable); position: relative; }
.visite-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.visite-contact { flex: 1 1 300px; min-width: 0; padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.visite-contact > div + div { border-top: 1px solid var(--filet); padding-top: 18px; }
.info-label { margin-bottom: 10px; font-size: 16px; line-height: 21px; color: var(--texte-gris); }
.info-label .icon { font-size: 16px; color: var(--brun); margin-right: 8px; }
.adresse { font-family: var(--serif); font-size: 34px; line-height: 38px; font-weight: 600; }
.telephone { font-family: var(--serif); font-size: 38px; line-height: 42px; font-weight: 600; text-decoration: none; color: var(--encre); }

.horaires { flex: 3 1 240px; min-width: 0; background: var(--brun); color: var(--blanc); padding: 28px; }
.horaires .info-label { margin-bottom: 22px; color: var(--peche); }
.horaires .info-label .icon { color: inherit; }
.horaires dl { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.horaires dl > div + div { border-top: 1px solid rgba(255, 255, 255, 0.28); padding-top: 12px; }
.horaires dt { font-family: var(--serif); font-size: 26px; line-height: 30px; font-weight: 600; }
.horaires dd { margin: 4px 0 0; font-size: 19px; line-height: 27px; color: var(--peche); }

/* ---------- Pages de contenu (mentions légales) ---------- */

.page-titre {
  color: var(--creme);
  background:
    linear-gradient(rgba(28, 27, 25, 0.7), rgba(28, 27, 25, 0.7)),
    url("../img/fromages-affines.jpg") 60% 70% / cover no-repeat,
    var(--encre);
}
.page-titre .wrap { padding-top: 72px; padding-bottom: 72px; }
.page-titre .caps { margin-bottom: 16px; color: var(--or); }
.page-titre h1 { font-family: var(--serif); font-size: 56px; line-height: 60px; font-weight: 600; }

.legal { max-width: 864px; padding-top: 72px; padding-bottom: 104px; display: flex; flex-direction: column; gap: 48px; }
.legal h2 { margin-bottom: 16px; font-family: var(--serif); font-size: 32px; line-height: 38px; font-weight: 600; }
.legal p { color: var(--texte-doux); }
.legal p + p { margin-top: 14px; }
.legal a { color: var(--brun); }
.legal a:hover { color: var(--brun-fonce); }

.page-titre-lead { margin-top: 18px; max-width: 620px; font-size: 19px; line-height: 30px; color: var(--texte-clair); }

/* ---------- Page contact ---------- */

.contact { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 48px; padding-top: 72px; padding-bottom: 96px; }
.contact-form { flex: 7 1 520px; min-width: 0; background: var(--blanc); border: 1px solid var(--filet); border-radius: 6px; padding: 40px; }
.contact-form h2 { margin-bottom: 24px; font-family: var(--serif); font-size: 32px; line-height: 38px; font-weight: 600; }
.contact-aside { flex: 4 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-card { background: var(--blanc); border: 1px solid var(--filet); border-radius: 6px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.contact-card > div + div { border-top: 1px solid var(--filet); padding-top: 18px; }
.contact-card .adresse { font-size: 30px; line-height: 34px; }
.contact-card .telephone { font-size: 32px; line-height: 36px; }
.contact-lien { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 4px; font-weight: 600; color: var(--brun); }
.contact-aside .horaires { border-radius: 6px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin-bottom: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > label { font-weight: 600; font-size: 15px; line-height: 20px; }
.facultatif { font-weight: 400; font-size: 13px; color: var(--texte-gris); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #B9AD99; border-radius: 6px;
  background: var(--creme); color: var(--encre); font: inherit; font-size: 16px;
}
.field textarea { resize: vertical; min-height: 160px; line-height: 24px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brun); outline-offset: 1px; border-color: var(--brun); background: var(--blanc); }
.field [aria-invalid="true"] { border-color: var(--erreur); background: var(--erreur-fond); }
.field-error { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--erreur); }
.field-error .icon { margin-top: 3px; }
.recaptcha-mention { margin-top: 16px; font-size: 13px; line-height: 19px; color: var(--texte-gris); }
.recaptcha-mention a { color: inherit; }
.grecaptcha-badge { visibility: hidden; } /* masqué : la mention sous le bouton le remplace, comme l'autorise Google */
.field-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; margin-bottom: 28px; border-radius: 6px; border: 1px solid; }
.alert .icon { margin-top: 5px; font-size: 18px; }
.alert-success { background: #EEF3E8; border-color: #9DB386; color: #2F4A1C; }
.alert-error { background: var(--erreur-fond); border-color: var(--erreur); color: var(--erreur); }

/* ---------- Page 404 ---------- */

.erreur { flex: 1 0 auto; position: relative; display: flex; align-items: center; min-height: 520px; background: var(--encre); color: var(--creme); overflow: hidden; }
.erreur > .photo { position: absolute; inset: 0; height: 100%; object-position: 50% 60%; }
.erreur .wrap { position: relative; padding-top: 96px; padding-bottom: 96px; }
.erreur .caps { margin-bottom: 20px; color: var(--or); }
.erreur h1 { max-width: 720px; font-family: var(--serif); font-size: 64px; line-height: 66px; font-weight: 600; }
.erreur-lead { margin-top: 22px; max-width: 520px; font-size: 19px; line-height: 30px; color: var(--texte-clair); }

/* ---------- Pied de page ---------- */

.site-footer { background: var(--encre); color: var(--creme); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 18px; padding-bottom: 18px; font-size: 14px; line-height: 20px; color: var(--texte-sombre-clair);
}
.site-footer a { color: var(--texte-sombre-clair); }
.lien-cookies {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--texte-sombre-clair); text-decoration: underline;
}

/* ---------- Bandeau cookies ---------- */

.bandeau-cookies {
  position: fixed; left: 16px; right: 16px; bottom: 80px; z-index: 100;
  display: flex; justify-content: flex-end; pointer-events: none;
}
.bandeau-cookies[hidden] { display: none; }
.bandeau-cookies-inner {
  pointer-events: auto;
  width: 100%; max-width: 720px; padding: 22px 24px;
  background: var(--blanc); color: var(--texte-doux);
  border: 1px solid var(--filet); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(28, 27, 25, .18);
  font-size: 15px; line-height: 23px;
}
.bandeau-cookies p { margin: 0; }
.bandeau-cookies-titre {
  margin-bottom: 6px !important;
  font-family: var(--serif); font-size: 24px; line-height: 28px; font-weight: 600; color: var(--encre);
}
.bandeau-cookies a { color: var(--brun); }
.bandeau-cookies-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.bandeau-cookies-actions .btn { min-width: 130px; }
.bandeau-cookies-actions .btn-outline { background: var(--blanc); }
.bandeau-cookies-actions .btn-outline:hover { background: var(--encre); color: var(--creme); }
@media (max-width: 480px) {
  .bandeau-cookies { left: 8px; right: 8px; bottom: 116px; }
  .bandeau-cookies-inner { padding: 18px; }
}

/* ---------- Menu sur tablette et mobile ---------- */

@media (max-width: 960px) {
  .js-menu .menu-toggle { display: inline-flex; }
  .js-menu .site-nav { display: none; flex-basis: 100%; }
  .js-menu.menu-ouvert .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--filet); }
  .site-nav li + li { border-top: 1px solid var(--filet); }
  .site-nav a { display: flex; min-height: 52px; border-bottom: 0; }
  .site-nav a[aria-current="page"] { border-bottom: 0; }
}

@media (max-width: 480px) {
  .site-header-inner { gap: 8px 12px; }
  .brand { gap: 10px; }
  .site-header .brand img { width: 56px; height: 56px; }
  .site-header .brand span { font-size: 22px; line-height: 26px; }
  .menu-toggle { padding: 0 12px; }
  .menu-toggle-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .js-menu .menu-toggle { min-width: 44px; justify-content: center; }
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .brand img { width: 72px; height: 72px; }
  .brand span { font-size: 26px; line-height: 30px; }
  .hero { min-height: 560px; }
  .hero .wrap { padding-top: 48px; padding-bottom: 48px; }
  .hero h1, .erreur h1 { font-size: 44px; line-height: 48px; }
  .erreur .wrap { padding-top: 64px; padding-bottom: 64px; }
  .page-titre .wrap { padding-top: 48px; padding-bottom: 48px; }
  .page-titre h1 { font-size: 40px; line-height: 44px; }
  .legal { padding-top: 48px; padding-bottom: 64px; gap: 40px; }
  .legal h2 { font-size: 26px; line-height: 32px; }
  .contact { padding-top: 40px; padding-bottom: 64px; }
  .contact-form { padding: 24px 20px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .section-title { font-size: 34px; line-height: 38px; }
  .histoire, .avis, .savoir-faire .wrap { padding-top: 64px; padding-bottom: 64px; }
  .histoire-photos .photo-large { height: 260px; }
  .histoire-photos .photo { height: 160px; }
  .histoire-intro { font-size: 23px; line-height: 31px; }
  .savoir-faire-quote { font-size: 30px; line-height: 38px; }
  .avis-head .btn { margin-left: 0; }
  .visite .wrap { padding-top: 64px; padding-bottom: 64px; }
  .visite-head h2 { font-size: 44px; line-height: 48px; }
  .visite-contact { padding: 28px; }
  .adresse { font-size: 28px; line-height: 32px; }
  .telephone { font-size: 32px; line-height: 36px; }
}
