/* =======================================================
   style.css — Layout e tipografia ispirati a Pablo Stanley
   Autore: Nicola Baudo
   ======================================================= */

/* =======================================================
   FONT & VARIABILI GLOBALI
   ======================================================= */
@font-face {
  font-family: 'Inter';
  src:
    url('/fonts/inter/inter-regular.woff2') format('woff2'),
    url('/fonts/inter/inter-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src:
    url('/fonts/inter/inter-semibold.woff2') format('woff2'),
    url('/fonts/inter/inter-semibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src:
    url('/fonts/inter/inter-bold.woff2') format('woff2'),
    url('/fonts/inter/inter-bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --layout-width: 65%;
  --font-main: 'Inter', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-text: #111;
  --color-link: #0066ff;
  --color-muted: #444;
  --bg: #fff;
/*  --light-background: #fafafa; */
}

/* =======================================================
   BASE
   ======================================================= */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-size: 17px;
}
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
/*  font-family: var(--font-main); */
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--color-text);
  background: var(--bg);
}

a { color: var(--color-link); text-decoration: none; transition: 0.2s ease-in-out; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  color: var(--color-text);
}

p {
  color: var(--color-muted);
  margin-top: 0.3em;
  margin-bottom: 1.5em;
  line-height: 1.65;
  max-width: 75ch;
}

#conseil p,
#formation p,
#edition p {
  margin-bottom: 0.6em;  /* riduce drasticamente lo spazio sotto i paragrafi solo nella home */
}

/* =======================================================
   HERO (HOME)
   ======================================================= */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60vh;
  max-width: var(--layout-width);
  margin: 2rem auto 4rem;
  padding: 0 1rem;
  text-align: left;
}

.hero h1 {
  font-size: 5em;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.6em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.hero p {
  font-size: 1.3em;
  max-width: 70%;
  color: var(--color-muted);
}

/* Animazione di ingresso dolce */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero h1, .hero p, .hero .cta-contact {
  animation: fadeSlideUp 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero p { animation-delay: 0.2s; }
.hero .cta-contact { animation-delay: 0.4s; }

/* =======================================================
   PULSANTE CONTACT (HOME)
   ======================================================= */
.home-contact {
  margin-top: 2.5rem;
  max-width: var(--layout-width);
  margin-left: calc((100% - var(--layout-width)) / 2);
  text-align: left;
}

.cta-contact {
  display: inline-block;
  background-color: var(--color-link);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7em 1.3em;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0, 102, 255, 0.25);
  transition: all 0.25s ease;
  width: fit-content;
  max-width: 280px;
  white-space: nowrap;
}
.cta-contact:hover {
  background-color: #0052cc;
  box-shadow: 0 5px 14px rgba(0, 82, 204, 0.35);
  transform: translateY(-2px);
}

/* =======================================================
   SEZIONI CONSEIL / FORMATION / EDITION (HOME)
   ======================================================= */

#conseil, #formation, #edition {
  display: flex;
  align-items: center; /* centratura verticale */
  justify-content: space-between;
  gap: 2.5rem;
  max-width: var(--layout-width);
  margin: 6rem auto;
  padding: 0 1rem;
}

/* Titoli sezione */
#conseil h2, #formation h2, #edition h2 {
  text-align: left;
  font-size: 1.8rem;
  margin-bottom: 0.6rem; /* spazio fra titolo sezione e testo sottostante */
}

/* Contenitore testuale */
#conseil .text,
#formation .text,
#edition .text {
  flex: 0 0 47%; /* proporzione di base: ~50%, ma leggermente minore */
  min-width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Contenitore immagine */
#conseil .image,
#formation .image,
#edition .image {
  flex: 0 0 53%; /* leggermente più ampia per compensare effetto ottico */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Immagine */
#conseil .image img,
#formation .image img,
#edition .image img {
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 4/3; /* compromesso tra 3/2 e 1/1 */
  border-radius: 6px;
  object-fit: cover;
}

/* disposizione a scacchiera */
#formation {
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center; /* eredita la centratura verticale */
  gap: 2.5rem;
}

#formation .text,
#formation .image {
  min-width: 0; /* evita overflow per testi lunghi */
}

/* proporzioni tablet (immagine leggermente più dominante) */
@media (max-width: 1100px) {
  #conseil .text, #formation .text, #edition .text {
    flex: 0 0 42%;
  }
  #conseil .image, #formation .image, #edition .image {
    flex: 0 0 58%;
  }
}

/* disposizione mobile: verticale */
@media (max-width: 850px) {
  #conseil, #formation, #edition {
    flex-direction: column;
    align-items: center;
  }

  #conseil .image,
  #formation .image,
  #edition .image {
    justify-content: center;
    margin-top: 1.5rem;
    flex: 0 0 auto;
  }

  #conseil .image img,
  #formation .image img,
  #edition .image img {
    max-width: 100%;
    height: auto;
  }
}


/* =======================================================
   BREAKPOINTS RESPONSIVI
   ======================================================= */

/* Desktop medi */
@media (max-width: 1200px) {
  :root { --layout-width: 75%; }
  .hero h1 { font-size: 4em; }
  .hero p { font-size: 1.2em; }
}

/* Tablet larghi */
@media (max-width: 850px) {
  :root { --layout-width: 85%; }
  .hero h1 { font-size: 3em; }

  #conseil, #formation, #edition {
    flex-direction: column;
    align-items: center;
  }

  #conseil .image,
  #formation .image,
  #edition .image {
    justify-content: center;
    margin-top: 1.5rem;
  }

  #conseil .image img,
  #formation .image img,
  #edition .image img {
    max-width: 100%;
    height: auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --layout-width: 95%; }

  .hero h1 {
    font-size: 2.6em;
    text-align: center;
  }
  .hero p {
    max-width: 100%;
    text-align: center;
  }
  .home-contact {
    text-align: center;
    margin-left: 0;
  }
}

/* Mobile piccolo */
@media (max-width: 480px) {
  .hero h1 { font-size: 2.2em; }
}


/* =======================================================
   ALTRE PAGINE
   ======================================================= */
.hero--small {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 40vh; /* leggermente più bassa della home */
  max-width: var(--layout-width);
  margin: 2rem auto 3rem;
  padding: 0 1rem;
  text-align: left;
  background: var(--light-background);
}

.hero--small h1 {
  font-size: 3rem;            /* rispetto ai 5em della home */
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.6em;
  text-rendering: optimizeLegibility;
}

.hero--small .subtitle {
  font-size: 1.3rem;
  color: var(--color-muted);
  max-width: 70%;
  line-height: 1.6;
  margin-bottom: 1.5em;
}

.page-content, .content {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* =======================================================
   DÉTAILS / FICHE TECHNIQUE – Versione Hugo pure CSS
   ======================================================= */
details.fiche-technique {
  /* layout */
  width: 100%;
  max-width: var(--layout-width);
  margin: 1.2rem 0;                  /* spazio sopra/sotto */
  padding: 1rem 1.25rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fdfdfd;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;

  /* colori locali */
  --fiche-link: #2f74db;             /* blu attenuato */
  --fiche-link-hover: #2364c0;

  /* transizione apertura */
  overflow: hidden;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

details.fiche-technique[open] {
  background: #fff;
  border-color: #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* titolo cliccabile */
details.fiche-technique summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--fiche-link);
  font-size: 1.05rem;
  position: relative;
  list-style: none;
  user-select: none;
  transition: color 0.25s ease;
  padding-right: 1.6rem;
}
details.fiche-technique summary:hover {
  color: var(--fiche-link-hover);
}
details.fiche-technique summary::-webkit-details-marker {
  display: none;
}

/* testo dinamico Voir plus / Cacher la fiche */
details.fiche-technique summary::after {
  content: " Ouvrir";
  color: var(--fiche-link);
  font-weight: 500;
  position: absolute;
  right: 0;
  top: 0;
  transition: all 0.3s ease;
}
details.fiche-technique[open] summary::after {
  content: " Fermer";
  color: var(--fiche-link-hover);
}

/* contenuto interno */
details.fiche-technique > *:not(summary) {
  margin-top: 0.8rem;
  color: var(--color-muted);
}
details.fiche-technique h3,
details.fiche-technique h4 {
  color: var(--color-text);
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-size: 1rem;
}
details.fiche-technique ul,
details.fiche-technique ol {
  margin-top: 0.4rem;
  margin-left: 1.4rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* === Spaziatura & transizione finale per fiche technique === */

/* Avvicina davvero la fiche technique al paragrafo precedente */
p + details.fiche-technique {
  margin-top: 0;             /* rimuove gap sopra */
}

/* trucco per evitare collasso margini */
p + details.fiche-technique::before {
  content: "";
  display: block;
  height: 0.2rem;            /* micro spaziatore */
}

/* riduce margin-bottom del <p> prima della fiche */
p:has(+ details.fiche-technique) {
  margin-bottom: 0.3em;      /* quasi attaccato */
}

/* correzione colore testo "Cacher la fiche" */
details.fiche-technique[open] summary::after {
  content: " Fermer";
  color: var(--fiche-link-hover);  /* blu attenuato */
}

/* effetto SLIDE‑DOWN puro CSS */
details.fiche-technique > div,
details.fiche-technique > section,
details.fiche-technique > ul,
details.fiche-technique > ol,
details.fiche-technique > p {
  overflow: hidden;
  transition: max-height 0.4s ease;
  max-height: 0;
}
details.fiche-technique[open] > div,
details.fiche-technique[open] > section,
details.fiche-technique[open] > ul,
details.fiche-technique[open] > ol,
details.fiche-technique[open] > p {
  max-height: 1500px; /* sufficiente anche per liste lunghe */
}

/* Mobile tweak: maggior respiro */
@media (max-width: 768px) {
  details.fiche-technique {
    padding: 0.9rem 1rem;
  }
  details.fiche-technique summary {
    font-size: 1rem;
  }
}

/* =======================================================
   BLOCCHI SOLO TESTO (ALTRE PAGINE)
   ======================================================= */

.text-block {
  max-width: var(--layout-width);
  margin: 4rem auto;
  padding: 0 1rem;
}

.text-block h2,
.text-block h3,
.text-block h4 {
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.text-block p {
  color: var(--color-muted);
  line-height: 1.7;
  margin-top: 0;
  margin-bottom: 1.2rem;
  max-width: 75ch; /* leggibilità ottimale per testi lunghi */
}

.text-block ul, 
.text-block ol {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--color-muted);
  line-height: 1.7;
}

.text-block a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.text-block a:hover {
  text-decoration: underline;
  color: var(--color-link);
}

@media (max-width: 768px) {
  .text-block {
    margin: 3rem auto;
    padding: 0 1.5rem;
  }
}

/* =======================================================
   LISTE SU PAGINE INTERNE (fuori dalla home)
   ======================================================= */
.text-block ul,
.text-block ol {
  margin-top: 1em;
  margin-bottom: 1.2em;
  padding-left: 1.4em;
  max-width: 75ch;
  color: var(--color-muted);
  line-height: 1.6;
  list-style-position: outside;
}

/* singoli elementi list */
.text-block li {
  margin-bottom: 0.1em;   /* distanza ridotta tra elementi */
}

/* tipi di elenco */
.text-block ul  { list-style-type: disc; }
.text-block ol  { list-style-type: decimal; }
.text-block ul ul,
.text-block ol ul { list-style-type: circle; }

/* pallino/marker: stesso colore del testo, non più blu */
.text-block li::marker {
  color: var(--color-muted);
}

/* =======================================================
   FOOTER
   ======================================================= */
footer {
  max-width: var(--layout-width);
  margin: 4rem auto 0;
  padding: 2rem 1rem;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
  color: #777;
  text-align: center;
}

footer a {
  color: var(--color-link);
}


/* =======================================================
   HEADER + MENU HAMBURGER (ALTRE PAGINE)
   ======================================================= */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid #eee;
  position: relative;
}

.site-header .brand a {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-header .brand a:hover {
  color: var(--color-link);
}

/* Menu principale orizzontale */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--color-link);
}

/* Hamburger mobile */
.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
}

/* Checkbox hidden */
.menu-toggle {
  display: none;
}

/* Modalità mobile */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    background: var(--bg);
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .hamburger {
    display: block;
  }

  /* Mostra menu quando il checkbox è attivo */
  .menu-toggle:checked + .hamburger + .main-nav {
    display: block;
  }
}

/* =======================================================
   TITOLI & SPAZIATURA SEZIONI (HOME)
   ======================================================= */

/* Titoli neutrali con hover blu */
.home-section h2 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-section h2 a:hover {
  color: var(--color-link);
}

/* Spazio ridotto tra titolo e testo 
.home-section h2 {
  margin-bottom: 0.6rem; 
} */

/* (facoltativo) un po’ meno spazio in generale fra blocchi 
.home-section .description {
  margin-top: 0.3rem;
} */

/* Riduzione spazio tra paragrafo e lista */
#conseil p + ul,
#formation p + ul,
#edition p + ul,
#conseil p + ol,
#formation p + ol,
#edition p + ol {
  margin-top: 0rem;
}

/* =============================================
   HERO DOT MENU (schema hamburger riusato)
   ============================================= */

/* Checkbox nascosto */
.hero-menu-toggle {
  display: none;
}

/* l’etichetta invisibile che cattura il clic sul punto */
.hero-menu-label {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 15rem; /* area di click ampia sopra la hero */
  cursor: pointer;
  background: transparent;
  z-index: 2;
}

/* punto visivo accanto al titolo */
.hero-dot {
  color: var(--color-link);
  font-size: 3.6rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 0.15em;
  transition: transform 0.25s ease, text-shadow 0.25s ease;
  position: relative;
  z-index: 3;
}
.hero-dot:hover {
  transform: scale(1.15);
  text-shadow: 0 0 10px var(--color-link);
}

/* blocca menu chiuso */
.hero-main-nav {
  display: none;
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 5;
  transition: opacity 0.35s ease, transform 0.25s ease;
}
.hero-main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-main-nav li + li { margin-top: 0.5rem; }
.hero-main-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}
.hero-main-nav a:hover { color: var(--color-link); }

/* VISUALIZZA MENU QUANDO CHECKBOX ATTIVO */
.hero-menu-toggle:checked + .hero-menu-label + .hero-main-nav {
  display: block;
  opacity: 1;
  animation: fadeInMenu 0.35s ease-out forwards;
}

@keyframes fadeInMenu {
  from {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* =============================================
   HERO DOT PULSANTE – animazione pulse blu
   ============================================= */

.hero-dot {
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  border-radius: 50%;
  background-color: var(--color-link);
  margin-left: 0.2em;
  position: relative;
  animation: heroDotPulse 3s ease-in-out infinite;
}

/* espansione leggera del punto */
@keyframes heroDotPulse {
  0%, 100% { transform: scale(1); }
  50%     { transform: scale(1.4); }
}

/* alone morbido e sincronizzato */
.hero-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;                /* glow proporzionato al nuovo punto */
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-color: var(--color-link);
  opacity: 0.45;
  animation: heroDotHalo 3s ease-out infinite;
}

@keyframes heroDotHalo {
  0% {
    opacity: 0.45;
    transform: translate(-50%, -50%) scale(1);
  }
  70%, 100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.8);
  }
}


