/* =====================================================================
   style.css — Charte graphique APEL Saint-Michel (pastel, arrondie)
   Les noms des variables reprennent ceux de la charte.
   ===================================================================== */

/* Polices : à déposer dans le dossier /fonts (voir LISEZ-MOI.md).
   Tant qu'elles sont absentes, le navigateur utilise une police arrondie du système. */
@font-face { font-family: "Fredoka"; font-weight: 600; font-style: normal; font-display: swap;
  src: local("Fredoka SemiBold"), local("Fredoka-SemiBold"), url("../fonts/fredoka-600.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-style: normal; font-display: swap;
  src: local("Nunito Regular"), local("Nunito-Regular"), url("../fonts/nunito-400.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-style: normal; font-display: swap;
  src: local("Nunito Bold"), local("Nunito-Bold"), url("../fonts/nunito-700.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-style: normal; font-display: swap;
  src: local("Nunito ExtraBold"), local("Nunito-ExtraBold"), url("../fonts/nunito-800.woff2") format("woff2"); }

:root {
  --cream-50: #fffcf6;
  --cream-100: #fbf6eb;
  --cream-200: #f3ebda;
  --line: #e5d9c3;
  --sage-100: #e6f0e3;
  --sage-300: #bcd8bc;
  --sage-800: #2f5b41;
  --burgundy-100: #f3e1e5;
  --burgundy-300: #d8a3b1;
  --burgundy-700: #7a2c45;
  --burgundy-900: #3d1824;
  --rose-100: #fce8ea;
  --rose-300: #f5c3cb;
  --butter-100: #fff5cc;
  --butter-300: #fbe08b;
  --butter-900: #5e4500;
  --ink: var(--burgundy-900);
  --ink-muted: #6d5560;
  --on-burgundy: var(--cream-50);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --radius-sm: 12px; --radius-md: 20px; --radius-lg: 28px; --radius-xl: 36px; --radius-pill: 999px;
  --shadow-soft: 0 4px 14px rgba(61, 24, 36, 0.08);
  --shadow-lift: 0 10px 28px rgba(61, 24, 36, 0.14);

  --font-display: "Fredoka", "Nunito", ui-rounded, "Varela Round", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 17px/27px var(--font-body);
  color: var(--ink);
  background: var(--cream-100);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--burgundy-700); text-underline-offset: 3px; }
a:hover { color: var(--burgundy-900); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3rem); line-height: 1.08; }
h2 { font-size: clamp(1.5rem, 3vw, 1.75rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

:focus-visible { outline: 3px solid var(--burgundy-700); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: -999px; top: 8px; background: var(--burgundy-900); color: var(--on-burgundy);
  padding: 10px 18px; border-radius: var(--radius-pill); z-index: 100; font-weight: 800;
}
.skip:focus { left: 8px; color: var(--on-burgundy); }

/* ---------- En-tête ---------- */
.site-header { background: var(--cream-50); border-bottom: 2px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { flex: none; width: auto; height: 52px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font: 600 1.3rem/1.1 var(--font-display); }
.brand-text small { color: var(--ink-muted); font-size: .85rem; font-weight: 700; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 10px 16px; border-radius: var(--radius-pill); text-decoration: none; color: var(--ink); font-weight: 800; }
.nav a:hover { background: var(--burgundy-100); }
.nav a[aria-current="page"] { background: var(--burgundy-700); color: var(--on-burgundy); }
.menu-btn {
  display: none; font: inherit; font-weight: 800; padding: 9px 18px; border-radius: var(--radius-pill);
  border: 2px solid var(--burgundy-700); background: var(--cream-50); color: var(--burgundy-700); cursor: pointer;
}

@media (max-width: 720px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; flex-direction: column; width: 100%; padding-bottom: 12px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 18px; background: var(--cream-100); }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  font: inherit; font-weight: 800; text-decoration: none; text-align: center; line-height: 1.2;
  padding: 12px 24px; border-radius: var(--radius-pill); border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--burgundy-700); color: var(--on-burgundy); }
.btn-primary:hover { background: var(--burgundy-900); color: var(--on-burgundy); }
.btn-secondary { background: var(--sage-300); color: var(--ink); }
.btn-secondary:hover { background: var(--sage-100); border-color: var(--sage-800); color: var(--ink); }
.btn-accent { background: var(--butter-300); color: var(--butter-900); }
.btn-accent:hover { background: var(--butter-100); border-color: var(--butter-900); color: var(--butter-900); }
.btn-ghost { background: transparent; border-color: var(--burgundy-700); color: var(--burgundy-700); }
.btn-ghost:hover { background: var(--burgundy-100); color: var(--burgundy-700); }
.btn-small { min-height: 36px; padding: 8px 16px; font-size: .9rem; }
.btn-large { min-height: 52px; padding: 16px 32px; font-size: 1.15rem; }

/* ---------- Sections ---------- */
section { padding: 36px 0; }
.hero { position: relative; overflow: hidden; background: var(--cream-100); padding: 168px 0 44px; }
.hero-shapes { position: absolute; top: 0; left: 0; right: 0; height: 128px; display: flex; gap: var(--space-3); pointer-events: none; }
.hero-shapes span { position: relative; display: block; border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.hero-shapes span::after { content: ""; position: absolute; border-radius: var(--radius-pill); }
.hero-shapes span:nth-child(1) { flex: 3; height: 112px; background: var(--burgundy-700); margin-left: calc(-1 * var(--space-5)); }
.hero-shapes span:nth-child(1)::after { left: 15%; top: 56px; width: 88px; height: 32px; background: var(--rose-300); }
.hero-shapes span:nth-child(2) { flex: 3.2; height: 96px; background: var(--sage-300); }
.hero-shapes span:nth-child(2)::after { left: 22%; top: 36px; width: 40px; height: 40px; background: var(--butter-300); }
.hero-shapes span:nth-child(3) { flex: 2; height: 128px; background: var(--rose-300); }
.hero-shapes span:nth-child(3)::after { left: 20%; top: 40px; width: 84px; height: 28px; background: var(--burgundy-700); }
.hero-shapes span:nth-child(4) { flex: 2.2; height: 104px; background: var(--butter-300); margin-right: calc(-1 * var(--space-5)); }
.hero-shapes span:nth-child(4)::after { left: 30%; top: 30px; width: 34px; height: 34px; background: var(--burgundy-300); }
.hero .eyebrow { font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--burgundy-700); margin-bottom: .6em; }
.hero .lead { font-size: 1.2rem; line-height: 1.6; max-width: 38rem; color: var(--ink-muted); }
.page-title { position: relative; overflow: hidden; background: var(--rose-100); padding: 40px 0 32px; border-radius: 0 0 var(--radius-xl) var(--radius-xl); --disc: var(--rose-300); --disc-2: var(--butter-300); }
.page-title .wrap { position: relative; z-index: 1; }
.page-title::before, .page-title::after { content: ""; position: absolute; border-radius: var(--radius-pill); }
.page-title::before { right: -36px; bottom: -48px; width: 168px; height: 168px; background: var(--disc); }
.page-title::after { right: 116px; bottom: 28px; width: 40px; height: 40px; background: var(--disc-2); }
body[data-page="boutique"] .page-title { --disc: var(--butter-300); --disc-2: var(--rose-300); }
body[data-page="equipe"] .page-title { --disc: var(--sage-300); --disc-2: var(--butter-300); }
body[data-page="mentions"] .page-title { --disc: var(--line); --disc-2: var(--sage-300); }
body[data-page="boutique"] .page-title { background: var(--butter-100); }
body[data-page="equipe"] .page-title { background: var(--sage-100); }
body[data-page="actions"] .page-title { --disc: var(--butter-300); --disc-2: var(--rose-300); background: var(--butter-100); }
body[data-page="mentions"] .page-title { background: var(--cream-200); }
.page-title p { color: var(--ink-muted); max-width: 42rem; margin-bottom: 0; }
.page-title h1 { font-size: clamp(2rem, 4.5vw, 2.25rem); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.alt { background: var(--cream-50); border-radius: var(--radius-xl); }
.tint-sage { background: var(--sage-100); }
.tint-butter { background: var(--butter-100); }
.tint-rose { background: var(--rose-100); }
.after-grid { margin: 24px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.empty { color: var(--ink-muted); font-style: italic; }
.narrow { max-width: var(--max); }
.wrap.narrow > * { max-width: 46rem; }

.annonce {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--butter-100); border: 2px solid var(--butter-300); border-radius: var(--radius-lg);
  padding: 16px 24px;
}
.annonce p { margin: 0; flex: 1 1 260px; font-weight: 800; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nav a[target="_blank"]::after { content: " ↗"; font-weight: 600; }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card, .person, .product {
  background: var(--cream-50); border: 2px solid var(--line); border-radius: var(--radius-xl);
  padding: 24px; box-shadow: var(--shadow-soft);
}
.card h3, .person h3, .product h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }

.action-for { display: inline-block; margin: 0 0 12px; padding: 2px 14px; border-radius: var(--radius-pill); background: var(--butter-100); border: 2px solid var(--butter-300); color: var(--butter-900); font-weight: 800; font-size: .85rem; }
.action:nth-child(3n+2) .action-for { background: var(--rose-100); border-color: var(--rose-300); color: var(--burgundy-900); }
.action:nth-child(3n+3) .action-for { background: var(--sage-100); border-color: var(--sage-300); color: var(--sage-800); }

.mission::before { content: ""; display: block; width: 44px; height: 16px; margin-bottom: 14px; border-radius: var(--radius-pill); background: var(--rose-300); }
.mission:nth-child(3n+2)::before { background: var(--butter-300); }
.mission:nth-child(3n+3)::before { background: var(--burgundy-300); }

/* ---------- Questions fréquentes ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--cream-50); border: 2px solid var(--line); border-radius: var(--radius-lg); }
.faq details[open] { box-shadow: var(--shadow-soft); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 20px;
  font-weight: 800; cursor: pointer; list-style: none; border-radius: var(--radius-lg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-pill);
  background: var(--burgundy-100); color: var(--burgundy-700); font: 600 1.3rem/1 var(--font-display);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 20px 18px; }

/* ---------- Événements ---------- */
.events { display: grid; gap: 16px; }
.event {
  display: flex; gap: 16px; background: var(--cream-50); border: 2px solid var(--line);
  border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-soft);
}
.event.is-past { opacity: .65; }
.event-date {
  flex: 0 0 76px; height: 76px; border-radius: var(--radius-md); color: var(--ink); background: var(--sage-300);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; text-align: center;
  font-family: var(--font-display);
}
.event[data-cat="fete"] .event-date { background: var(--rose-300); }
.event[data-cat="vente"] .event-date { background: var(--butter-300); }
.event[data-cat="ecole"] .event-date { background: var(--sage-300); }
.event-date .d { font-size: 1.75rem; font-weight: 600; }
.event-date .m { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.event-date-month .d { font-size: 1.4rem; text-transform: uppercase; letter-spacing: .02em; }
.event-body { flex: 1; min-width: 0; }
.event-body h3 { margin-bottom: 4px; }
.event-meta { color: var(--ink-muted); font-weight: 700; font-size: .95rem; line-height: 1.4; margin-bottom: .5em; }
.event-body p { margin-bottom: .6em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.tag {
  display: inline-flex; align-items: center; padding: 5px 12px; border: 2px solid transparent; border-radius: var(--radius-pill);
  font-size: .8rem; line-height: 16px; font-weight: 800; letter-spacing: .06em; background: var(--cream-200); color: var(--ink);
}
.tag-fete { background: var(--rose-300); color: var(--ink); }
.tag-vente { background: var(--butter-300); color: var(--butter-900); }
.tag-ecole { background: var(--sage-300); color: var(--ink); }
.tag-ok { background: var(--cream-50); color: var(--sage-800); border-color: var(--sage-800); }
.tag-wait { background: var(--cream-50); color: var(--burgundy-700); border-color: var(--burgundy-700); border-style: dashed; }
.tag-end { background: var(--cream-200); color: var(--ink-muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.month { margin: 36px 0 16px; padding: 4px 18px; display: inline-block; border-radius: var(--radius-pill); background: var(--burgundy-100); color: var(--burgundy-700); font-size: 1.2rem; }
.past { margin-top: 36px; }
.past summary { cursor: pointer; font-weight: 800; color: var(--ink-muted); margin-bottom: 16px; }
.past .event { margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.chip {
  font: inherit; font-weight: 800; min-height: 44px; padding: 8px 20px; border-radius: var(--radius-pill); cursor: pointer;
  border: 2px solid var(--burgundy-700); background: var(--cream-50); color: var(--burgundy-700);
}
.chip:hover { background: var(--burgundy-100); }
.chip[aria-pressed="true"] { background: var(--burgundy-700); color: var(--on-burgundy); }

@media (max-width: 520px) {
  .event { flex-direction: column; gap: 12px; }
  .event-date { flex-basis: auto; width: 76px; }
}

/* ---------- Équipe ---------- */
.people { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.person { text-align: center; }
.avatar {
  width: 96px; height: 96px; border-radius: var(--radius-pill); object-fit: cover; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; font: 600 2.5rem/1 var(--font-display); color: var(--ink);
}
.avatar-0 { background: var(--rose-300); }
.avatar-1 { background: var(--sage-300); }
.avatar-2 { background: var(--butter-300); }
.avatar-3 { background: var(--burgundy-300); }
.role { display: inline-block; padding: 3px 14px; border-radius: var(--radius-pill); background: var(--burgundy-100); color: var(--burgundy-700); font-size: .9rem; font-weight: 800; margin-bottom: .8em; }

/* ---------- Boutique ---------- */
.products { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.product { display: flex; flex-direction: column; }
.product:hover { box-shadow: var(--shadow-lift); }
.product-icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 12px; border-radius: var(--radius-pill);
  background: var(--butter-300); color: var(--ink); font: 600 1.75rem/1 var(--font-display);
}
.product:nth-child(3n+2) .product-icon { background: var(--rose-300); }
.product:nth-child(3n+3) .product-icon { background: var(--sage-300); }
.product .actions { margin-top: auto; padding-top: 10px; }
.price { font: 600 1.4rem/1.3 var(--font-display); color: var(--burgundy-700); margin-bottom: .4em; }
.details { margin: 0 0 1em; padding-left: 1.2em; color: var(--ink-muted); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 16px; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 56px; min-height: 40px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: var(--radius-pill);
  background: var(--butter-300); color: var(--ink); font: 600 1.2rem/1 var(--font-display); display: flex; align-items: center; justify-content: center;
}
.center { text-align: center; }
.center:not(:empty) { margin-bottom: 26px; }
.after-steps { margin-top: 1.4em; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--burgundy-100); color: var(--ink); margin-top: 48px; padding: 32px 0; font-size: .95rem; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--burgundy-700); font-weight: 700; }

.legal h2 { margin-top: 1.6em; font-size: 1.3rem; }

@media (max-width: 720px) {
  .page-title::before { width: 96px; height: 96px; right: -32px; bottom: -40px; }
  .page-title::after { display: none; }
  .hero { padding-top: 132px; }
  .hero-shapes { height: 96px; }
  .hero-shapes span:nth-child(1) { height: 84px; }
  .hero-shapes span:nth-child(2) { height: 72px; }
  .hero-shapes span:nth-child(3) { height: 96px; }
  .hero-shapes span:nth-child(4) { height: 80px; }
  .hero-shapes span::after { transform: scale(.75); transform-origin: left top; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

@media print {
  .site-header, .site-footer, .filters, .actions, .skip, .hero-shapes, .hero .cta-row { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .hero { padding-top: 24px; }
  .event, .card, .person, .product { box-shadow: none; break-inside: avoid; }
}
