/* Accueil « façon Apple » (html[data-bento], actif par défaut ; ?bento=0 pour comparer) : une idée par écran, peu de mouvement */

.lead-short, .compare { display: none; }

/* --- 1. Hero épuré : très grand titre, une ligne, deux boutons --- */
html[data-bento] .hero { padding: 6.5rem 0 5rem; }
html[data-bento] .hero-grid { grid-template-columns: 1fr; }
html[data-bento] .shift-card { display: none; }
html[data-bento] .hero h1 { font-size: clamp(2.4rem, 6.2vw, 5.5rem); line-height: 1.02; letter-spacing: -.028em; max-width: 22ch; }
html[data-bento] .hero .lead:not(.lead-short) { display: none; }
html[data-bento] .lead-short { display: block; font-size: clamp(1.15rem, 2vw, 1.45rem); max-width: 34rem; margin-top: 1.75rem; }
html[data-bento] .hero .actions { margin-top: 2.25rem; }

/* --- Section comparative « Ce qui change » (sortie du hero) --- */
html[data-bento] .compare { display: block; padding: 6rem 0; background: var(--paper); }
.compare-title { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -.015em; max-width: 18ch; margin-bottom: 3rem; }
.compare-grid { display: grid; gap: 1.25rem; }
.compare-col { padding: 2.25rem; border: 1px solid var(--rule); background: var(--surface); }
.compare-col h3 { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.5rem; }
.compare-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.compare-col li { font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.3; }
.compare-before h3 { color: var(--muted); }
.compare-before li { color: var(--muted); }
.compare-after { background: var(--navy); border-color: var(--navy); }
.compare-after h3 { color: var(--accent-soft); }
.compare-after li { color: #fff; }
@media (min-width: 900px) { .compare-grid { grid-template-columns: 1fr 1fr; } }

/* --- 3. Chiffres en très grand --- */
html[data-bento] .counters { border: 0; background: none; gap: 2rem; margin-top: 3.5rem; }
html[data-bento] .counters li { background: none; border: 0; padding: 0; flex-direction: column; align-items: flex-start; gap: .5rem; }
html[data-bento] .counters strong { font-size: clamp(3.6rem, 9vw, 6.5rem); line-height: .9; letter-spacing: -.03em; color: var(--primary); }
html[data-bento] .counters span { font-size: 1rem; max-width: 16rem; }

/* --- 2. Expertises en tuiles « bento » --- */
html[data-bento] .pillar-grid { display: grid; gap: 1rem; background: none; border: 0; grid-template-columns: 1fr; }
html[data-bento] .pillar { position: relative; overflow: hidden; min-height: 15rem; padding: 2rem; border: 1px solid var(--rule); background: var(--surface); display: flex; flex-direction: column; justify-content: flex-end; gap: .6rem; transition: transform .35s ease, box-shadow .35s ease; }
html[data-bento] .pillar:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(7, 29, 71, .45); }
html[data-bento] .pillar .pillar-list, html[data-bento] .pillar .outcome { display: none; }
html[data-bento] .pillar h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.15; }
html[data-bento] .pillar blockquote { border: 0; padding: 0; font-size: 1rem; color: var(--muted); font-style: italic; }
html[data-bento] .pillar .num { position: absolute; top: 1.5rem; left: 2rem; }
html[data-bento] .pillar .more-link { margin-top: .5rem; }
/* Toute la tuile est cliquable */
html[data-bento] .pillar .more-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }
/* Tuiles illustrées : photo du thème sous un voile marine, texte clair ; Finance en grand */
.tile-photo { display: none; }
html[data-bento] .pillar.has-photo { border: 0; background: var(--navy); }
html[data-bento] .pillar.has-photo .tile-photo { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform 1.2s ease; }
html[data-bento] .pillar.has-photo:hover .tile-photo { transform: scale(1.04); }
html[data-bento] .pillar.has-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(7, 29, 71, .94) 0%, rgba(7, 29, 71, .62) 50%, rgba(7, 29, 71, .3) 100%); }
html[data-bento] .pillar.has-photo > *:not(.tile-photo) { position: relative; z-index: 1; }
html[data-bento] .pillar.has-photo .num { position: absolute; }
html[data-bento] .pillar.has-photo h3 { color: #fff; }
html[data-bento] .pillar.has-photo blockquote { color: rgba(255, 255, 255, .85); }
html[data-bento] .pillar.has-photo .more-link, html[data-bento] .pillar.has-photo .num { color: var(--accent-soft); }
html[data-bento] #p-fpa::before { background: linear-gradient(0deg, rgba(7, 29, 71, .9) 0%, rgba(7, 29, 71, .45) 45%, rgba(7, 29, 71, 0) 75%); }
html[data-bento] #p-fpa { min-height: 26rem; }
html[data-bento] .pillar { padding-top: 4rem; }
html[data-bento] #p-fpa h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
html[data-bento] #p-fpa blockquote { font-size: 1.1rem; }
html[data-bento] #p-digital h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
@media (min-width: 760px) {
  html[data-bento] .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  html[data-bento] #p-fpa { grid-column: span 2; }
}
@media (min-width: 1080px) {
  html[data-bento] .pillar-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(15rem, auto); }
  /* Placement explicite : Finance en grand à gauche, Digital et IA en haut à droite */
  html[data-bento] #p-fpa { grid-column: 1 / span 2; grid-row: 1 / span 2; min-height: 0; }
  html[data-bento] #p-digital { grid-column: 3 / span 2; grid-row: 1; }
  html[data-bento] #p-immo { grid-column: 3; grid-row: 2; }
  html[data-bento] #p-client { grid-column: 4; grid-row: 2; }
  html[data-bento] #p-orga { grid-column: 1 / span 2; grid-row: 3; }
  html[data-bento] #p-renfort { grid-column: 3 / span 2; grid-row: 3; }
}

/* --- 5. Chapitre sombre pour l'IA --- */
html[data-bento] .tools { background: var(--navy); color: #fff; padding: 6.5rem 0; }
html[data-bento] .tools .eyebrow { color: var(--accent-soft); }
html[data-bento] .tools .section-title { color: #fff; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.05; letter-spacing: -.02em; max-width: 16ch; }
html[data-bento] .tools .section-lead { color: rgba(255, 255, 255, .75); max-width: 40rem; }
html[data-bento] .tool { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); color: #fff; }
html[data-bento] .tool h3 { color: #fff; }
html[data-bento] .tool p { color: rgba(255, 255, 255, .72); }
html[data-bento] .tool .tool-tag { color: var(--accent-soft); }
html[data-bento] .tool .outcome { border-color: rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .86) !important; }
html[data-bento] .tool .outcome span { color: var(--accent-soft); }

/* --- 4. Réalisations en galerie horizontale --- */
.gallery-nav { display: none; }
html[data-bento] .gallery-nav { display: flex; gap: .5rem; margin-top: 1.5rem; }
.gallery-nav button { width: 2.75rem; height: 2.75rem; border: 1px solid var(--rule); background: var(--surface); color: var(--primary); font-size: 1.1rem; cursor: pointer; }
.gallery-nav button:hover { border-color: var(--primary); }
.gallery-nav button[disabled] { opacity: .35; cursor: default; }
html[data-bento] .case-list { display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 1rem; margin-right: calc(-1 * max(1.25rem, (100vw - 72rem) / 2 + 2rem)); padding-right: 2rem; scrollbar-width: thin; }
html[data-bento] .case { flex: 0 0 min(84vw, 26rem); scroll-snap-align: start; display: flex; flex-direction: column; min-height: 22rem; padding: 2.25rem; background: var(--surface); border: 1px solid var(--rule); }
html[data-bento] .case .case-body { display: none; }
html[data-bento] .case-side { display: flex; flex-direction: column; height: 100%; gap: .75rem; }
html[data-bento] .case h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.2; }
html[data-bento] .case .more-link { margin-top: auto; }
html[data-bento] .case:first-child { background: var(--navy); border-color: var(--navy); }
html[data-bento] .case:first-child h3, html[data-bento] .case:first-child .case-lesson { color: #fff; }
html[data-bento] .case:first-child .case-tag, html[data-bento] .case:first-child .more-link { color: var(--accent-soft); }

/* --- Titres de section : apparition en léger décalé --- */
html[data-bento].js .section-head.reveal > * { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
html[data-bento].js .section-head.reveal.is-in > * { opacity: 1; transform: none; }
html[data-bento].js .section-head.reveal.is-in > *:nth-child(2) { transition-delay: .12s; }
html[data-bento].js .section-head.reveal.is-in > *:nth-child(3) { transition-delay: .24s; }
html[data-bento] .section-title { letter-spacing: -.015em; }

@media (prefers-reduced-motion: reduce) {
  html[data-bento] .pillar, html[data-bento] .pillar .tile-photo, html[data-bento].js .section-head.reveal > * { transition: none; transform: none; opacity: 1; }
  html[data-bento] .case-list { scroll-behavior: auto; }
}
/* La galerie déborde jusqu au bord de l écran sans créer de défilement horizontal de la page */
html[data-bento] .cases { overflow-x: clip; }
