/*
Theme Name:   FIBR! — Mobilier éco-responsable
Theme URI:    https://transgraphie.fr/fibr-mobilier/
Description:  Thème enfant Twenty Twenty-Five pour FIBR! — mobilier & décoration éco-responsables à Poitiers. Palette vert / menthe / encre / or, typographies Bebas Neue & Poppins. Page d'accueil en compositions de blocs natifs : hero photo, chiffres-clés, valeurs, gamme avec galeries, fabrication, réalisations, partenaires, contact.
Author:       Max Larcher — FIBR!
Template:     twentytwentyfive
Version:      1.0.0
Requires at least: 6.7
Requires PHP: 7.4
Text Domain:  fibr-template
*/

/* ==========================================================================
   1. TOKENS — variables CSS (charte FIBR!, reprise de fibr-site.html)
   ========================================================================== */

:root {
  --vert: #6B983B;
  --menthe: #E1F1CF;
  --encre: #211A1D;
  --blanc: #FAF8F6;
  --or: #F2C230;
  --ombre: 0 18px 40px rgba(33, 26, 29, 0.14);
  --rayon: 20px;
  --transition-douce: 0.25s ease;
}

/* ==========================================================================
   2. BASE
   ========================================================================== */

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  letter-spacing: 0.02em;
}

::selection {
  background: var(--or);
  color: var(--encre);
}

:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Étiquette de section (NOS VALEURS, LA GAMME…) */
.fibr-eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vert);
  margin-bottom: 4px;
}

/* En-tête de section */
.fibr-section-head {
  max-width: 660px;
  margin-bottom: 48px;
}
.fibr-section-head--centre {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ==========================================================================
   3. BOUTONS — pilules vertes / contour clair
   ========================================================================== */

.wp-block-button .wp-block-button__link {
  padding: 13px 26px;
  transition: transform var(--transition-douce), box-shadow var(--transition-douce), background var(--transition-douce);
}
.wp-block-button .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(107, 152, 59, 0.4);
}

/* Variante contour clair, pour photo sombre (hero) */
.fibr-btn--ligne .wp-block-button__link {
  background: rgba(250, 248, 246, 0.15);
  color: var(--blanc);
  border: 1.5px solid rgba(250, 248, 246, 0.8);
  backdrop-filter: blur(4px);
}
.fibr-btn--ligne .wp-block-button__link:hover {
  background: rgba(250, 248, 246, 0.28);
  box-shadow: none;
}

/* ==========================================================================
   4. HEADER — collant, fond translucide flouté
   ========================================================================== */

header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
}

.fibr-header {
  background: rgba(250, 248, 246, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(33, 26, 29, 0.08);
}

.fibr-header .wp-block-site-title a {
  font-size: 2rem;
  color: var(--vert);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.fibr-header .wp-block-navigation a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.fibr-header .wp-block-navigation a:hover {
  color: var(--vert);
}

.fibr-header .wp-block-button .wp-block-button__link {
  padding: 10px 22px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ==========================================================================
   5. HERO — bloc Bannière plein écran, photo remplaçable au clic
   ========================================================================== */

.fibr-hero {
  min-height: 82vh;
}
.fibr-hero .wp-block-cover__inner-container {
  padding-top: 120px;
  padding-bottom: 40px;
}

.fibr-hero-tag {
  display: inline-block;
  background: var(--vert);
  color: var(--blanc);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 6px;
}

.fibr-hero h1 {
  max-width: 16ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}
.fibr-hero h1 em {
  font-style: normal;
  color: var(--or);
}
.fibr-hero p:not(.fibr-hero-tag) {
  max-width: 540px;
  font-size: 1.08rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   6. CHIFFRES-CLÉS — bandeau encre
   ========================================================================== */

.fibr-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 920px) {
  .fibr-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
}

.fibr-num {
  font-family: var(--wp--preset--font-family--titres);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  color: var(--or);
  line-height: 1;
  margin: 0;
}
.fibr-lab {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: rgba(250, 248, 246, 0.85);
  margin: 6px 0 0;
}

/* ==========================================================================
   7. VALEURS — cartes avec logo des trois structures
   ========================================================================== */

.fibr-carte {
  background: var(--blanc);
  border: 1px solid rgba(33, 26, 29, 0.1);
  border-radius: var(--rayon);
  padding: 34px 30px;
  height: 100%;
  transition: transform var(--transition-douce), box-shadow var(--transition-douce);
}
.fibr-carte:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombre);
}
.fibr-carte .wp-block-image {
  height: 66px;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
}
.fibr-carte .wp-block-image img {
  max-height: 66px;
  max-width: 190px;
  width: auto;
  object-fit: contain;
}
.fibr-carte h3 {
  font-size: 1.55rem;
  margin: 0 0 10px;
}
.fibr-carte p {
  font-size: 0.94rem;
  margin: 0;
}

/* ==========================================================================
   8. LA GAMME — produit = colonnes (galerie + texte)
   ========================================================================== */

.fibr-produit {
  padding: 66px 0;
  border-top: 1px solid rgba(33, 26, 29, 0.12);
}
.fibr-produit--premier {
  border-top: none;
  padding-top: 20px;
}

.fibr-num-prod {
  font-family: var(--wp--preset--font-family--titres);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--vert);
  margin: 0;
}
.fibr-produit h3 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  margin: 4px 0 8px;
}

/* Étiquettes matière (Bois réemployé · Mousse recyclée…) */
.fibr-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
}
.fibr-tags li {
  background: var(--blanc);
  border: 1px solid rgba(33, 26, 29, 0.14);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 999px;
}

/* Fiche technique */
.fibr-specs {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
}
.fibr-specs li strong {
  color: var(--vert);
  font-weight: 600;
  display: inline-block;
  min-width: 96px;
}

/* ==========================================================================
   9. GALERIE PRODUIT — bloc Galerie natif :
   la 1re image devient l'image vedette, les suivantes des vignettes.
   « Agrandir au clic » (lightbox) s'active image par image dans l'éditeur.
   Le sélecteur :not(#fibr) est requis pour dépasser la spécificité
   des styles du bloc Galerie de WordPress.
   ========================================================================== */

.wp-block-gallery.fibr-galerie {
  gap: 10px;
}
.wp-block-gallery.fibr-galerie figure.wp-block-image:not(#fibr) {
  margin: 0;
}
.wp-block-gallery.fibr-galerie figure.wp-block-image:first-child:not(#fibr) {
  flex: 0 0 100%;
  width: 100%;
}
.wp-block-gallery.fibr-galerie figure.wp-block-image:first-child:not(#fibr) img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.wp-block-gallery.fibr-galerie figure.wp-block-image:not(:first-child):not(#fibr) {
  flex: 0 0 76px;
  width: 76px;
}
.wp-block-gallery.fibr-galerie figure.wp-block-image:not(:first-child):not(#fibr) img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  opacity: 0.75;
  transition: opacity var(--transition-douce);
}
.wp-block-gallery.fibr-galerie figure.wp-block-image:not(:first-child):not(#fibr) img:hover {
  opacity: 1;
}

/* ==========================================================================
   10. FABRICATION — frise numérotée 01 → 04
   ========================================================================== */

.fibr-frise {
  counter-reset: fibr-etape;
}
.fibr-etape {
  background: var(--menthe);
  border-radius: 18px;
  padding: 30px 24px;
  height: 100%;
}
.fibr-etape::before {
  counter-increment: fibr-etape;
  content: "0" counter(fibr-etape);
  font-family: var(--wp--preset--font-family--titres);
  font-size: 1.3rem;
  color: var(--vert);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 10px;
}
.fibr-etape h4 {
  font-size: 1.35rem;
  margin: 0 0 6px;
}
.fibr-etape p {
  font-size: 0.9rem;
  margin: 0;
}

/* ==========================================================================
   11. RÉALISATIONS — bannières photo 4:5, libellé en bas
   ========================================================================== */

.wp-block-cover.fibr-livraison {
  aspect-ratio: 4 / 5;
  min-height: 0;
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre);
}
.fibr-livraison img {
  transition: transform 0.5s ease;
}
.fibr-livraison:hover img {
  transform: scale(1.05);
}
.fibr-livraison p {
  font-family: var(--wp--preset--font-family--titres);
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  margin: 0;
}

/* ==========================================================================
   12. PARTENAIRES — cartes sur fond encre, petit logo par partenaire
   ========================================================================== */

.fibr-part {
  background: rgba(250, 248, 246, 0.06);
  border: 1px solid rgba(250, 248, 246, 0.14);
  border-radius: 18px;
  padding: 30px 26px;
  height: 100%;
}

/* Petit logo partenaire — pastille blanche pour rester lisible sur fond sombre */
.fibr-part .wp-block-image {
  margin: 0 0 16px;
}
.fibr-part .wp-block-image img {
  height: 52px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  background: var(--blanc);
  border-radius: 10px;
  padding: 6px 12px;
}

.fibr-mat {
  display: inline-block;
  background: var(--vert);
  color: var(--blanc);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.fibr-part h4 {
  font-size: 1.5rem;
  margin: 0 0 8px;
}
.fibr-part p:not(.fibr-mat) {
  font-size: 0.9rem;
  color: rgba(250, 248, 246, 0.82);
  margin: 0;
}

/* Bandeau des soutiens en pilules */
.fibr-part-logos {
  margin-top: 44px;
}
.fibr-part-logos p {
  border: 1px solid rgba(250, 248, 246, 0.2);
  border-radius: 999px;
  padding: 8px 18px;
  color: rgba(250, 248, 246, 0.7);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ==========================================================================
   13. CONTACT
   ========================================================================== */

.fibr-coords p.fibr-lab-contact {
  font-family: var(--wp--preset--font-family--titres);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--vert);
  margin-top: 20px !important;
}
.fibr-coords p.fibr-lab-contact:first-child {
  margin-top: 0 !important;
}
.fibr-coords a {
  color: var(--encre);
  text-decoration: none;
  border-bottom: 1px solid rgba(33, 26, 29, 0.3);
}
.fibr-coords a:hover {
  color: var(--vert);
  border-color: var(--vert);
}

/* ==========================================================================
   14. FOOTER
   ========================================================================== */

.fibr-footer {
  font-size: 0.8rem;
}
.fibr-footer p {
  color: rgba(250, 248, 246, 0.6);
  margin: 0;
}
.fibr-footer .wp-block-image {
  margin: 0;
}
.fibr-footer .wp-block-image img {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background: var(--blanc);
  padding: 3px;
  object-fit: contain;
}

/* ==========================================================================
   15. ANIMATIONS — reveal au scroll
   Accessible sans JS : tout est visible par défaut, le JS ajoute .js-anime
   ========================================================================== */

.js-anime .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js-anime .reveal.est-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js-anime .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   16. RESPONSIVE
   ========================================================================== */

@media (max-width: 781px) {
  .fibr-produit { padding: 44px 0; }
  .fibr-hero .wp-block-cover__inner-container { padding-top: 80px; }
}
