/* ==========================================================================
   FFSMC Modules PrestaShop — thème enfant de Hummingbird
   La grappe de maquette et le nuancier : papier millimétré, traits d'encre
   épais, une couleur par famille de modules.
   ========================================================================== */
/* Polices hébergées sur la boutique (plus rapide, aucun appel à Google) */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2-variations"), url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ffm-ink: #15171C;
  --ffm-paper: #E9ECEF;
  --ffm-grid: #D7DCE1;
  --ffm-white: #FFFFFF;
  --ffm-accent: #F59A3C;
  --ffm-text-2: #3B4048;
  --ffm-live: #1F8A55;
  --ffm-live-ring: #BFE6CF;
  --ffm-live-ink: #17683F;

  --ffm-vendre: #E8731A;    --ffm-vendre-ink: #A64B06;    --ffm-vendre-tint: #FCEBDC;
  --ffm-fideliser: #1F8A55; --ffm-fideliser-ink: #17683F; --ffm-fideliser-tint: #DDF1E6;
  --ffm-montrer: #6B3FA0;   --ffm-montrer-ink: #5A3389;   --ffm-montrer-tint: #ECE3F6;
  --ffm-repondre: #1B87B8;  --ffm-repondre-ink: #11658B;  --ffm-repondre-tint: #DCEFF8;
  --ffm-ouvrir: #A3262E;    --ffm-ouvrir-ink: #A3262E;    --ffm-ouvrir-tint: #F6E0E1;
  --ffm-tenir: #1E2B4F;     --ffm-tenir-ink: #1E2B4F;     --ffm-tenir-tint: #E1E5EF;

  --bs-primary: #15171C;
  --bs-primary-rgb: 21, 23, 28;
  --bs-body-font-family: "IBM Plex Sans", system-ui, sans-serif;
  --bs-body-color: #15171C;
  --bs-link-color: #15171C;
  --bs-link-hover-color: #A64B06;
}

/* ---------- Fond et typographie ---------- */
body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--ffm-ink);
  background-color: var(--ffm-paper);
  background-image:
    linear-gradient(var(--ffm-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ffm-grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
h1, h2, h3, .h1, .h2, .h3, .page-title, .product__name {
  font-family: "Archivo", sans-serif;
  font-stretch: 112%;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ffm-ink);
}
a { color: var(--ffm-ink); }
a:hover { color: var(--ffm-vendre-ink); }

/* ---------- En-tête ---------- */
#header, .header {
  background: var(--ffm-white);
  border-bottom: 3px solid var(--ffm-ink);
}
#header .logo, .header .logo, .header-block__logo img, #_desktop_logo img {
  max-height: 120px;
  width: auto;
}

/* ---------- Boutons ---------- */
.btn-primary {
  --bs-btn-bg: var(--ffm-accent);
  --bs-btn-border-color: var(--ffm-ink);
  --bs-btn-color: var(--ffm-ink);
  --bs-btn-hover-bg: var(--ffm-ink);
  --bs-btn-hover-border-color: var(--ffm-ink);
  --bs-btn-hover-color: var(--ffm-white);
  --bs-btn-active-bg: var(--ffm-ink);
  border-width: 3px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--ffm-ink);
}
.btn-outline-primary {
  --bs-btn-color: var(--ffm-ink);
  --bs-btn-border-color: var(--ffm-ink);
  --bs-btn-hover-bg: var(--ffm-ink);
  --bs-btn-hover-color: var(--ffm-white);
  border-width: 2px;
  border-radius: 10px;
  font-weight: 600;
}

/* ---------- Éléments communs ---------- */
.ffm-h2 { font-size: clamp(30px, 3.4vw, 40px); margin: 0; }
.ffm-mono { font-family: "IBM Plex Mono", monospace; font-size: 14px; margin: 0; }
.ffm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ffm-btn {
  display: inline-block; text-decoration: none; background: var(--ffm-white); color: var(--ffm-ink);
  border: 3px solid var(--ffm-ink); border-radius: 12px; padding: 14px 22px; font-weight: 700; font-size: 16px;
}
.ffm-btn:hover { background: var(--ffm-ink); color: var(--ffm-white); }
.ffm-btn--accent { background: var(--ffm-accent); box-shadow: 4px 4px 0 var(--ffm-ink); }
.ffm-live {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: "IBM Plex Mono", monospace; font-size: 14px; font-weight: 600; color: var(--ffm-live-ink);
}
.ffm-live--small { font-size: 12px; gap: 8px; margin-top: 6px; }
.ffm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ffm-live); box-shadow: 0 0 0 4px var(--ffm-live-ring); flex: none; }
.ffm-live--small .ffm-dot { width: 8px; height: 8px; box-shadow: 0 0 0 3px var(--ffm-live-ring); }

/* ---------- Héros : la grappe ---------- */
.ffm-hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 48px 0 56px; }
.ffm-hero__text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ffm-eyebrow { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ffm-eyebrow__tag { background: var(--ffm-ink); color: var(--ffm-white); padding: 4px 8px; border-radius: 4px; }
.ffm-hero__title { margin: 0; font-size: clamp(40px, 5.6vw, 72px); line-height: 1; letter-spacing: -0.03em; }
.ffm-hl { background: var(--ffm-accent); padding: 0 10px; border-radius: 10px; box-shadow: 4px 4px 0 var(--ffm-ink); white-space: nowrap; }
.ffm-hero__lead { margin: 0; font-size: 19px; line-height: 1.55; max-width: 560px; }
.ffm-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 6px; }
.ffm-hero__visual { flex: 1 1 480px; min-width: 0; display: flex; justify-content: center; }
.ffm-sprue { position: relative; width: 100%; max-width: 600px; background: #F6F7F8; border: 4px solid var(--ffm-ink); border-radius: 28px; padding: 14px; }
.ffm-sprue__letter { position: absolute; top: -18px; left: 28px; background: var(--ffm-ink); color: var(--ffm-white); font-family: "Archivo", sans-serif; font-stretch: 125%; font-weight: 900; font-size: 18px; padding: 6px 14px; border-radius: 6px; }
.ffm-sprue__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 3px solid var(--ffm-ink); border-radius: 16px; overflow: hidden; }
.ffm-part { position: relative; border: 1.5px solid var(--ffm-ink); height: 190px; display: flex; align-items: center; justify-content: center; }
.ffm-part img { width: 150px; height: 150px; object-fit: contain; transition: transform .25s ease; }
.ffm-part:hover img { transform: translateY(-6px) rotate(-2deg); }
.ffm-part__gate { position: absolute; left: 50%; top: 0; width: 3px; height: 16px; background: var(--ffm-ink); transform: translateX(-50%); }
.ffm-part__n { position: absolute; right: 10px; bottom: 10px; width: 26px; height: 26px; border: 2px solid var(--ffm-ink); border-radius: 50%; background: var(--ffm-white); font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
@media (max-width: 575px) { .ffm-part { height: 120px; } .ffm-part img { width: 96px; height: 96px; } }

/* ---------- Nuancier des familles ---------- */
.ffm-fams { background: var(--ffm-white); border: 3px solid var(--ffm-ink); border-radius: 24px; padding: 40px 32px; margin-bottom: 56px; }
.ffm-fams__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.ffm-fam { text-decoration: none; color: var(--ffm-ink); border: 2px solid var(--ffm-ink); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s ease, box-shadow .2s ease; }
.ffm-fam:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--ffm-ink); color: var(--ffm-ink); }
.ffm-fam__pot { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ffm-ink); box-shadow: inset -6px -6px 0 rgba(0,0,0,.18); }
.ffm-fam__code { font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; }
.ffm-fam__name { font-family: "Archivo", sans-serif; font-stretch: 112%; font-weight: 800; font-size: 20px; }
.ffm-fam__tag { font-size: 14px; line-height: 1.4; }
.ffm-fam--vendre .ffm-fam__pot { background: var(--ffm-vendre); }       .ffm-fam--vendre .ffm-fam__code { color: var(--ffm-vendre-ink); }
.ffm-fam--fideliser .ffm-fam__pot { background: var(--ffm-fideliser); } .ffm-fam--fideliser .ffm-fam__code { color: var(--ffm-fideliser-ink); }
.ffm-fam--montrer .ffm-fam__pot { background: var(--ffm-montrer); }     .ffm-fam--montrer .ffm-fam__code { color: var(--ffm-montrer-ink); }
.ffm-fam--repondre .ffm-fam__pot { background: var(--ffm-repondre); }   .ffm-fam--repondre .ffm-fam__code { color: var(--ffm-repondre-ink); }
.ffm-fam--ouvrir .ffm-fam__pot { background: var(--ffm-ouvrir); }       .ffm-fam--ouvrir .ffm-fam__code { color: var(--ffm-ouvrir-ink); }
.ffm-fam--tenir .ffm-fam__pot { background: var(--ffm-tenir); }         .ffm-fam--tenir .ffm-fam__code { color: var(--ffm-tenir-ink); }

/* ---------- Vignettes modules ---------- */
.ffm-modules { margin-bottom: 56px; }
.ffm-modules .featured-products .section-title, .ffm-modules .featured-products > h2 { display: none; }
.product-miniature__inner {
  background: var(--ffm-white); border: 2px solid var(--ffm-ink); border-radius: 18px; overflow: hidden;
  height: 100%; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.product-miniature__inner:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--ffm-ink); }
.ffm-card-top { position: relative; border-bottom: 2px solid var(--ffm-ink); padding: 12px; }
.ffm-card-top .product-miniature__image-container, .ffm-card-top img { background: transparent !important; mix-blend-mode: multiply; }
.ffm-tint--vendre { background: var(--ffm-vendre-tint); }
.ffm-tint--fideliser { background: var(--ffm-fideliser-tint); }
.ffm-tint--montrer { background: var(--ffm-montrer-tint); }
.ffm-tint--repondre { background: var(--ffm-repondre-tint); }
.ffm-tint--ouvrir { background: var(--ffm-ouvrir-tint); }
.ffm-tint--tenir { background: var(--ffm-tenir-tint); }
.ffm-ref { position: absolute; left: 12px; top: 12px; z-index: 2; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; background: var(--ffm-white); border: 1.5px solid var(--ffm-ink); border-radius: 6px; padding: 3px 7px; }
.ffm-badge { position: absolute; right: 12px; top: 12px; z-index: 2; font-size: 12px; font-weight: 600; color: var(--ffm-white); border-radius: 999px; padding: 4px 10px; }
.ffm-badge--vendre { background: var(--ffm-vendre-ink); }
.ffm-badge--fideliser { background: var(--ffm-fideliser-ink); }
.ffm-badge--montrer { background: var(--ffm-montrer-ink); }
.ffm-badge--repondre { background: var(--ffm-repondre-ink); }
.ffm-badge--ouvrir { background: var(--ffm-ouvrir-ink); }
.ffm-badge--tenir { background: var(--ffm-tenir-ink); }
.product-miniature__bottom { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-miniature__title { font-family: "Archivo", sans-serif; font-stretch: 106%; font-weight: 800; font-size: 18px; line-height: 1.2; text-decoration: none; color: var(--ffm-ink); }
.product-miniature__price { font-family: "Archivo", sans-serif; font-weight: 900; font-size: 22px; color: var(--ffm-ink); }

/* ---------- Installation en 3 étapes ---------- */
.ffm-notice { background: var(--ffm-ink); color: var(--ffm-white); border-radius: 24px; padding: 48px 32px; margin-bottom: 56px; }
.ffm-notice .ffm-h2 { color: var(--ffm-white); margin-bottom: 28px; }
.ffm-notice__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.ffm-step { border: 2px solid var(--ffm-white); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.ffm-step h3 { color: var(--ffm-white); font-size: 20px; margin: 0; font-family: "IBM Plex Sans", sans-serif; font-weight: 700; letter-spacing: 0; }
.ffm-step p { margin: 0; line-height: 1.5; color: #D5D9DF; }
.ffm-step__n { width: 44px; height: 44px; border-radius: 50%; background: var(--ffm-accent); color: var(--ffm-ink); display: flex; align-items: center; justify-content: center; font-family: "Archivo", sans-serif; font-weight: 900; font-size: 20px; }

/* ---------- Pied de page ---------- */
#footer, .footer { background: var(--ffm-white); border-top: 3px solid var(--ffm-ink); }

/* ---------- Logo grand à l'arrivée, qui rétrécit au défilement ---------- */
@property --ffm-logo-h { syntax: '<length>'; inherits: true; initial-value: 210px; }
@keyframes ffm-logo-maigrir { from { --ffm-logo-h: min(210px, 30vw); } to { --ffm-logo-h: 72px; } }
:root { --ffm-logo-h: min(210px, 30vw); }
@supports (animation-timeline: scroll()) {
  :root {
    animation-name: ffm-logo-maigrir;
    animation-duration: auto;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: scroll(root);
    animation-range: 0 200px;
  }
}
.header-bottom__logo img.logo,
.header-bottom__logo .navbar-brand img {
  height: var(--ffm-logo-h) !important;
  max-height: none !important;
  width: auto !important;
  max-width: none !important;
}
.header-bottom__logo, .header-bottom__h1, .header-bottom__logo .navbar-brand { max-height: none !important; height: auto !important; }

/* ---------- Marges du contenu ---------- */
.page-content--home,
body:not(#index) #wrapper > .container,
body:not(#index) #center-column {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
}
.header .container, .header-bottom > .container, .header-top > .container {
  padding-left: clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
}

/* Le titre à droite du logo, à la même échelle que lui */
.header-bottom__logo { flex: 0 0 auto !important; width: auto !important; max-width: none !important; }
.header-bottom__h1 { display: flex; flex-wrap: nowrap; align-items: center; gap: calc(var(--ffm-logo-h) * 0.12); }
.header-bottom__logo .navbar-brand { width: max-content; max-width: none; flex: none; }
.header-bottom__h1::after {
  content: "FFSMC Modules pour PrestaShop";
  white-space: nowrap;
  flex: none;
  font-family: "Archivo", sans-serif;
  font-stretch: 112%;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ffm-ink);
  font-size: calc(var(--ffm-logo-h) * 0.17);
}
@media (max-width: 991px) { .header-bottom__h1::after { display: none; } }
