/* ═══════════════════════════════════════════════════════════════
   HEVOLVE · BASE (reset, typo, layout, boutons, nav, footer)
   ═══════════════════════════════════════════════════════════════ */
@view-transition { navigation: auto; }

*,*::before,*::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; overflow-x: clip; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,p { margin: 0; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--violet-500); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--violet-500); color: #fff; padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip:focus { top: 12px; }

/* ── Layout ── */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-section); position: relative; }
.section--alt { background: var(--bg-2); }
[data-tone="inverse"] { background: var(--bg); color: var(--text); }

.sec-head { max-width: 46rem; margin-bottom: clamp(2.25rem, 4vw, 4rem); }
.sec-head h2 { font-size: var(--step-4); }
.sec-head p { margin-top: 1.1rem; color: var(--text-2); font-size: var(--step-1); max-width: 38rem; }
.sec-head--split { max-width: none; display: grid; gap: 1.5rem 4rem; align-items: end; }
@media (min-width: 900px) { .sec-head--split { grid-template-columns: 1.2fr .8fr; } .sec-head--split p { margin-top: 0; } }

/* ── Boutons ── */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: var(--h); padding: 0 1.5rem; border-radius: var(--r-pill);
  font-weight: 600; font-size: .95rem; line-height: 1; white-space: nowrap;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), background-color var(--dur-1), border-color var(--dur-1);
}
.btn--sm { --h: 40px; padding: 0 1.15rem; font-size: .875rem; }
.btn--lg { --h: 56px; padding: 0 2rem; font-size: 1rem; }
.btn--primary { background: var(--violet-500); color: #fff; box-shadow: 0 10px 30px -10px var(--glow), inset 0 1px 0 rgba(255,255,255,.22); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--glow), inset 0 1px 0 rgba(255,255,255,.28); background: #8346f0; }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); background: transparent; }
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn--arrow::after {
  content: ""; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform var(--dur-2) var(--ease);
}
.btn--arrow:hover::after { transform: translateX(4px); }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--accent); }
.link-arrow::after { content: ""; width: 14px; height: 14px; background: currentColor; transition: transform var(--dur-2) var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center/contain no-repeat; }
.link-arrow:hover::after { transform: translateX(4px); }

.tag { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border-radius: var(--r-pill); font-size: var(--step--1); font-weight: 500; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { padding: .22rem .65rem; border-radius: var(--r-pill); font-size: .78rem; color: var(--text-2); border: 1px solid var(--line); background: var(--surface); }

/* Carte générique avec halo qui suit le curseur */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; isolation: isolate; transition: border-color var(--dur-2), transform var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease); }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity var(--dur-2);
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), var(--glow-2), transparent 60%); }
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card:hover::before { opacity: 1; }

/* ── Navigation (reprise fidèle de l'original : « island » au scroll) ── */
.nav-outer { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; display: flex; justify-content: center; padding: 0; transition: padding .55s cubic-bezier(.4,0,.2,1); view-transition-name: site-nav; }
.nav-outer.scrolled { padding: 14px 24px; }
.nav-desktop { width: 100%; max-width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 18px 48px; background: transparent; border-bottom: 1px solid var(--nav-line); border-radius: 0;
  transition: max-width .55s cubic-bezier(.4,0,.2,1), padding .55s cubic-bezier(.4,0,.2,1), border-radius .55s cubic-bezier(.4,0,.2,1), background .55s, border-color .55s, box-shadow .55s; }
@media (min-width: 901px) {
  .nav-desktop.island { max-width: 900px; padding: 12px 12px 12px 28px; border-radius: 100px; border: 1px solid var(--nav-island-line); background: var(--nav-island); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--nav-island-shadow); }
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo-img { height: 26px; width: auto; display: block; }
.nav-desktop.island .nav-logo-img { height: 18px; }
.logo--for-light { display: none; }
:root[data-theme="light"] .logo--for-dark { display: none; }
:root[data-theme="light"] .logo--for-light { display: block; }
.nav-links { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav-links a.nav-link { font-size: 14px; font-weight: 400; color: var(--text-2); padding: 7px 14px; border-radius: 8px; transition: background .2s, color .2s; white-space: nowrap; }
.nav-links a.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.nav-link[aria-current="page"] { color: var(--text); font-weight: 500; }
.nav-desktop.island .nav-links a.nav-link { font-size: 13px; padding: 6px 11px; }
.nav-links li { position: relative; }
.dropdown { display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--nav-drop); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--nav-drop-line); border-radius: 12px; padding: 8px; min-width: 250px; z-index: 9999; box-shadow: 0 8px 32px rgba(0,0,0,.25); }
.nav-links li:hover .dropdown, .nav-links li:focus-within .dropdown { display: block; }
.dropdown a { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; row-gap: 1px; padding: 10px 14px; border-radius: 8px; font-size: 13px; color: var(--text-2); transition: background .15s, color .15s; }
.dropdown a:hover { background: var(--surface-2); color: var(--text); }
.dropdown .drop-icon { grid-row: 1/3; align-self: center; width: 22px; height: 22px; object-fit: contain; }
.dropdown .drop-name { grid-column: 2; align-self: end; font-weight: 500; }
.dropdown .drop-sub { grid-column: 2; align-self: start; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.drop-arrow { font-size: 10px; margin-left: 4px; opacity: .5; }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.theme-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text-2); font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all .2s; flex-shrink: 0; }
.theme-toggle:hover { border-color: var(--violet-500); color: var(--violet-500); }
.theme-toggle::before { content: "☀"; }
:root[data-theme="light"] .theme-toggle::before { content: "☾"; }
.nav-cta { font-family: var(--font-display); font-size: 13px; font-weight: 700; background: var(--violet-500); color: #fff; padding: 10px 20px; border-radius: 100px; white-space: nowrap; flex-shrink: 0; transition: opacity .2s, transform .2s; }
.nav-cta:hover { opacity: .88; transform: scale(1.02); }
.nav-desktop.island .nav-cta { padding: 8px 16px; font-size: 12px; }
.nav-mobile { display: none; }

@media (max-width: 900px) {
  .nav-outer { width: 100%; max-width: 100vw; overflow: hidden; padding: 0 !important; justify-content: flex-start; background: transparent; transition: background .4s, box-shadow .4s; }
  .nav-desktop { display: none; }
  .nav-mobile { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 20px; }
  .nav-mobile .nav-logo-img { height: 18px; }
  .nav-outer.mob-scrolled { background: var(--nav-mob-bg); box-shadow: 0 2px 20px rgba(0,0,0,.25); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
}
.nav-burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px; transition: border-color .2s; }
.nav-burger:hover { border-color: var(--text-3); }
.nav-burger span { display: block; height: 1.5px; width: 100%; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-drawer { display: none; position: fixed; inset: 0; z-index: 9990; background: var(--drawer-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); opacity: 0; transition: opacity .3s ease; pointer-events: none; overflow-y: auto; overscroll-behavior: contain; }
.nav-drawer::before { content: ""; position: absolute; width: 520px; height: 520px; right: -200px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(124,58,237,.35), transparent 66%); pointer-events: none; }
@media (max-width: 900px) { .nav-drawer { display: block; } }
.nav-drawer.open { opacity: 1; pointer-events: all; }
.dr-in { position: relative; min-height: 100%; display: flex; flex-direction: column; gap: 1rem; padding: 76px 20px calc(20px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin-inline: auto; }
.dr-label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0; }
.dr-svc { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.nav-drawer a.dr-card { display: grid; grid-template-columns: 1fr; gap: .15rem; align-content: start; padding: 1rem; border-radius: 18px; border: 1px solid var(--line-2); background: var(--surface); font-family: var(--font-body); font-size: 1rem; color: var(--text); }
.nav-drawer a.dr-card img { width: 28px; height: 28px; object-fit: contain; margin-bottom: .5rem; } .dr-card b { font-family: var(--font-display); font-size: 1.1rem; } .dr-card small { color: var(--text-3); font-size: .78rem; line-height: 1.3; }
.nav-drawer a.dr-card:hover, .nav-drawer a.dr-card:active { background: var(--accent-soft); border-color: var(--violet-500); color: var(--text); }
.nav-drawer a.dr-all { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-body); font-size: .95rem; font-weight: 600; color: var(--accent); padding: .2rem .25rem; }
.dr-links { display: grid; border-top: 1px solid var(--line); margin-top: .25rem; }
.nav-drawer .dr-links a { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; padding: .72rem .25rem; border-radius: 0; border-bottom: 1px solid var(--line); color: var(--text); }
.dr-links i { font-style: normal; font-family: var(--font-body); font-size: 1.1rem; color: var(--text-3); transition: transform .25s var(--ease), color .2s; } .dr-links a:hover i { transform: translateX(4px); color: var(--accent); }
.dr-foot { margin-top: auto; display: grid; gap: 1rem; padding-top: 1rem; }
.nav-drawer .dr-foot .btn { font-family: var(--font-display); background: var(--violet-500); color: #fff; padding: 0 1.5rem; font-size: 1rem; border-radius: 999px; }
.dr-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.nav-drawer .dr-meta a { font-family: var(--font-body); font-size: .9rem; font-weight: 400; padding: 0; color: var(--text-2); } .nav-drawer .dr-meta .theme-toggle { margin: 0; width: 40px; height: 40px; font-size: 16px; }
.nav-drawer .drawer-link { opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease), background .2s, color .2s, border-color .2s; transition-delay: 0s, 0s, 0s, 0s, 0s; }
.nav-drawer.open .drawer-link, .nav-drawer.open .dr-foot { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 45ms + 80ms), calc(var(--i, 0) * 45ms + 80ms), 0s, 0s, 0s; }
.nav-drawer .dr-foot { opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease); }

/* ── Pied de page ── */
.footer { padding-top: clamp(3.5rem, 6vw, 6rem); border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; max-width: 22rem; }
.footer-brand .logo { height: 28px; width: auto; }
.footer-brand p { margin: 1.1rem 0 1.4rem; color: var(--text-2); font-size: .95rem; }
.footer-title { font-family: var(--font-display); font-weight: 700; font-size: .95rem; margin-bottom: 1rem; }
.footer li + li { margin-top: .6rem; }
.footer li a { color: var(--text-2); font-size: .93rem; transition: color var(--dur-1); }
.footer li a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; margin-top: clamp(2.5rem, 5vw, 4.5rem); padding-block: 1.6rem 2rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--text-3); }
.footer-bottom a:hover { color: var(--text); }
.footer-legal { display: flex; gap: 1.5rem; margin-left: auto; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
@media (max-width: 640px) { .footer-legal { margin-left: 0; width: 100%; } }

/* ── Apparition au scroll ── */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
html[data-motion="reduce"] [data-reveal] { opacity: 1; transform: none; }

/* Photos : si un fichier existe dans assets/img/photos/, il remplace le dégradé (voir LISEZ-MOI) */
[data-has-photo] { background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important; }
[data-has-photo]::before, [data-has-photo]::after { display: none !important; }
.cs-body[data-has-photo] > * { display: none; }
