/* ============================================================================
   APIARIUM — site vitrine
   Methode reprise de la charte ALL CAPS : deux couleurs signature, deux sens,
   sur un fond sombre chaud, texte creme.
     MIEL   = identite et action (logo, boutons, ce qu'on veut faire cliquer)
     FEUILLE = accent narratif, toujours plus discret (filets, pictos, chiffres)
     FLEUR  = accent rare, l'equivalent du rouge sceau : une touche, pas plus.
   Le fond n'est pas le charbon d'ALL CAPS mais une nuit de foret, plus verte,
   pour que les deux marques ne se confondent jamais.
   ============================================================================ */

@import url("../assets/fonts/fonts.css");

:root{
  color-scheme: dark;

  /* Socle */
  --night:    #0e1410;
  --surface:  #141c16;
  --surface2: #1b241c;
  --line:     #26302a;

  /* Miel : identite et action */
  --honey:      #ebb13b;
  --honey-lo:   #f7ce6e;
  --honey-deep: #a87a1d;

  /* Feuille : accent narratif */
  --leaf:      #5fa96a;
  --leaf-deep: #3e7a4c;

  /* Fleur : accent rare */
  --bloom: #c98bd1;

  /* Texte */
  --cream:  #efe7d6;
  --cream2: #b6ac97;
  --cream3: #8c8676;

  --display: "Archivo","Segoe UI",system-ui,sans-serif;
  --stamp:   "Archivo Black","Archivo","Segoe UI",sans-serif;
  --body:    "Archivo","Segoe UI",system-ui,sans-serif;
  --mono:    "Spline Sans Mono",ui-monospace,"Cascadia Code",monospace;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 38rem;
}

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

html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .2vw, 1.08rem);
  line-height: 1.65;
  overflow-x: hidden;
}

img{ max-width: 100%; height: auto; display: block; }
a{ color: var(--honey); }

.wrap{ max-width: 74rem; margin: 0 auto; padding: 0 var(--gutter); }

/* L'abeille vit ici, au-dessus de tout mais sans rien intercepter. */
#bee-canvas{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}

/* Sur telephone il n'y a pas de curseur a fuir, donc l'interaction n'existe
   pas : l'animation ne ferait que consommer de la batterie. Le script le sait
   aussi et ne demarre pas, ceci est la ceinture de securite. */
@media (max-width: 48rem){
  #bee-canvas{ display: none; }
}

/* ---------------------------------------------------------
   Barre de retour
   Apiarium est une page de mickaelmancini.com, pas un site
   separe : le chemin du retour doit etre visible tout en haut.
   --------------------------------------------------------- */

.topbar{
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: rgba(14,20,16,.72);
  backdrop-filter: blur(8px);
}

.topbar .wrap{
  display: flex;
  align-items: center;
  gap: .9rem;
  padding-top: .8rem;
  padding-bottom: .8rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.topbar__back{
  color: var(--cream2);
  text-decoration: none;
  transition: color .2s ease;
}

.topbar__back:hover{ color: var(--honey); }

.topbar__here{ color: var(--cream3); }

.topbar__here::before{
  content: "/";
  margin-right: .9rem;
  color: var(--line);
}

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

.hero{
  position: relative;
  min-height: min(92vh, 54rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__media{ position: absolute; inset: 0; }

.hero__media img{
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.02) brightness(.82);
}

/* Le fond s'assombrit vers le bas pour que le texte tienne sans caisson. */
.hero__media::after{
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--night) 4%, rgba(14,20,16,.55) 42%, rgba(14,20,16,.15) 78%),
    radial-gradient(120% 70% at 50% 100%, rgba(62,122,76,.28), transparent 70%);
}

.hero .wrap{ position: relative; padding-bottom: clamp(3rem, 8vw, 6rem); padding-top: 6rem; }

.kicker{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--honey);
}

.kicker::before{
  content: "";
  width: .55rem; height: .62rem;
  background: var(--leaf);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.hero__title{
  margin: 0;
  font-family: var(--stamp);
  font-size: clamp(3rem, 1.5rem + 9vw, 8rem);
  line-height: .9;
  letter-spacing: -.03em;
  color: var(--cream);
  text-shadow: 0 .3rem 2.5rem rgba(0,0,0,.55);
}

/* Le filet feuille sous le titre : l'accent ne rentre jamais dans les lettres. */
.hero__rule{
  width: clamp(4rem, 12vw, 9rem);
  height: 3px;
  margin: 1.5rem 0 1.5rem;
  background: linear-gradient(to right, var(--leaf), rgba(95,169,106,0));
}

.hero__tagline{
  max-width: 36rem;
  margin: 0;
  font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem);
  line-height: 1.45;
  color: var(--cream);
}

.hero__sub{
  max-width: var(--measure);
  margin: 1rem 0 2rem;
  color: var(--cream2);
}

.btn{
  display: inline-block;
  padding: .85rem 1.6rem;
  border: 0;
  border-radius: 3px;
  background: var(--honey);
  color: #17120a;
  font-family: var(--display);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.btn:hover{ background: var(--honey-lo); transform: translateY(-1px); }

/* Conteneur flex plutot que deux inline-block avec une marge : quand les deux
   boutons passent a la ligne sur telephone, ils restent alignes. */
.hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.btn--ghost{
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn--ghost:hover{ background: var(--surface2); box-shadow: inset 0 0 0 1px var(--cream3); }

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */

.section{ padding: clamp(4rem, 9vw, 8rem) 0; border-bottom: 1px solid var(--line); }

.section-head{ margin-bottom: clamp(2rem, 4vw, 3.25rem); }

.section-head__num{
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--leaf);
}

.section-head__title{
  margin: .5rem 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.025em;
}

.section-head p{
  max-width: var(--measure);
  margin: 1.1rem 0 0;
  color: var(--cream2);
  font-size: clamp(1rem, .97rem + .3vw, 1.15rem);
}

.lead{ max-width: var(--measure); color: var(--cream2); }
.lead strong{ color: var(--cream); font-weight: 600; }

/* Bloc texte + image alternes */
.split{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.split--flip .split__media{ order: -1; }

.split__media img{
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.split__text h3{
  margin: 0 0 .9rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.split__text p{ color: var(--cream2); }
.split__text p:last-child{ margin-bottom: 0; }

/* ---------------------------------------------------------
   Piliers
   --------------------------------------------------------- */

.pillars{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pillar{
  position: relative;
  padding: 1.6rem 1.5rem 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color .25s ease, transform .25s ease;
}

.pillar:hover{ border-color: var(--leaf-deep); transform: translateY(-3px); }

.pillar__hex{
  width: 1.6rem; height: 1.8rem;
  margin-bottom: 1rem;
  background: var(--leaf);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.pillar h3{
  margin: 0 0 .55rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.pillar p{ margin: 0; color: var(--cream2); font-size: .96rem; }

/* ---------------------------------------------------------
   La science
   --------------------------------------------------------- */

.science{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.science div{ background: var(--surface); padding: 1.4rem 1.35rem; }

.science dt{
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: .45rem;
}

.science dd{ margin: 0; color: var(--cream2); font-size: .95rem; }

/* ---------------------------------------------------------
   Galerie
   --------------------------------------------------------- */

.shots{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: .85rem;
}

.shot{
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  transition: border-color .25s ease, transform .25s ease;
}

.shot img{ width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.shot:hover{ border-color: var(--honey-deep); transform: translateY(-3px); }
.shot:focus-visible{ outline: 2px solid var(--honey); outline-offset: 3px; }

.shot--wide{ grid-column: span 2; }

@media (max-width: 46rem){ .shot--wide{ grid-column: span 1; } }

/* ---------------------------------------------------------
   Citation du narrateur
   --------------------------------------------------------- */

.quote{
  max-width: 46rem;
  margin: 0;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--honey);
  border-radius: 4px;
}

.quote p{
  margin: 0;
  font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem);
  line-height: 1.55;
  color: var(--cream);
}

.quote footer{
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream3);
}

/* ---------------------------------------------------------
   Feuille de route
   --------------------------------------------------------- */

.road{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.road > li{
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.road h3{
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cream3);
}

.road ul{ margin: 0; padding: 0; list-style: none; }

.road li + li{ margin-top: .5rem; }

.road ul li{
  position: relative;
  padding-left: 1.4rem;
  color: var(--cream2);
  font-size: .95rem;
}

.road ul li::before{
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: .6rem; height: .68rem;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--cream3);
}

.road--done ul li::before{ background: var(--leaf); }
.road--todo ul li::before{ background: var(--honey-deep); }

/* ---------------------------------------------------------
   Pied
   --------------------------------------------------------- */

.colophon{ padding: clamp(3rem, 7vw, 5rem) 0 clamp(3.5rem, 8vw, 6rem); }

.colophon__title{
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  letter-spacing: -.02em;
}

.colophon p{ max-width: var(--measure); color: var(--cream2); }

.colophon__links{
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .08em;
}

.colophon__links a{ color: var(--cream2); text-decoration: none; }
.colophon__links a:hover{ color: var(--honey); }

/* ---------------------------------------------------------
   Visionneuse
   --------------------------------------------------------- */

.viewer{
  width: min(96vw, 92rem);
  max-width: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.viewer::backdrop{ background: rgba(6,10,7,.9); }
.viewer img{ width: 100%; max-height: 86vh; object-fit: contain; background: var(--night); }

.viewer-bar{
  display: flex; justify-content: flex-end;
  padding: .55rem .8rem;
  border-top: 1px solid var(--line);
}

.viewer-close{
  padding: .35rem .8rem;
  background: var(--surface2);
  color: var(--cream2);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.viewer-close:hover{ color: var(--cream); border-color: var(--cream3); }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
