/* Compact homepage identity. Geometry stays fixed throughout SVG animation. */
.ape-home-hero { padding-block: var(--ape-space-5) var(--ape-space-4); }
.ape-home-frame.ape-page-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: var(--ape-space-8); padding: var(--ape-space-6) var(--ape-space-8); }
.ape-home-frame > * { min-width: 0; }
.ape-home-frame::before, .ape-home-frame::after { display: none; }
.ape-reveal-ready .ape-home-frame.ape-reveal { opacity: 1; transform: none; }
.ape-home-message { position: relative; z-index: 1; }
.ape-home-message .ape-eyebrow { margin-bottom: var(--ape-space-3); font-size: var(--ape-type-xs); }
.ape-home-message h1 { max-width: 480px; margin: 0; font-size: clamp(1.9rem, 3vw, 2.55rem); line-height: 1.06; letter-spacing: -.045em; text-wrap: balance; }
.ape-home-message h1 span { color: var(--ape-text-accent); }
.ape-home-actions { display: flex; margin-top: var(--ape-space-5); }
.ape-home-contact { display: inline-flex; align-items: center; justify-content: center; min-height: var(--ape-button-size); padding: var(--ape-space-3) var(--ape-space-5); color: var(--ape-ink); background: var(--ape-peach); border: 1px solid var(--ape-peach); border-radius: var(--ape-radius-pill); font-size: var(--ape-type-md); font-weight: 800; text-decoration: none; box-shadow: var(--ape-shadow-action); transition: background .2s, transform .2s; }
.ape-home-contact:hover { background: var(--ape-peach-hover); transform: translateY(-2px); }
.ape-home-companions { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ape-space-4); align-items: center; }
.ape-home-hero.has-event .ape-home-companions { grid-template-columns: minmax(0, 1fr) minmax(170px, .9fr); }
.ape-home-stage { position: relative; display: grid; place-items: center; height: 252px; isolation: isolate; --home-rise: 0px; --home-turn: 0deg; }
.ape-home-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: translateY(var(--home-rise)) rotate(var(--home-turn)); }
.ape-home-halo { position: absolute; z-index: -1; width: 214px; max-width: 100%; height: 225px; background: var(--ape-sky); border-radius: 54% 46% 42% 58% / 43% 61% 39% 57%; transform: rotate(-8deg) translateY(var(--home-halo-rise, 0px)); }
.ape-home-stage [id^="Main_"], .ape-home-stage #Arbre, .ape-home-stage #A, .ape-home-stage #P, .ape-home-stage #E { transform-box: fill-box; transform-origin: center; }
.ape-home-stage #Arbre { transform-origin: center bottom; }
.ape-home-shape { position: absolute; z-index: -1; pointer-events: none; }
.ape-home-shape-lilac { width: 230px; height: 230px; top: -150px; left: -70px; border-radius: 36%; background: var(--ape-lilac); rotate: -18deg; }
.ape-home-shape-peach { width: 140px; height: 140px; bottom: -90px; left: 32%; border-radius: 50%; background: var(--ape-peach-soft); }
.ape-home-shape-mint { width: 104px; height: 126px; top: 35%; right: -28px; border-radius: 58% 42% 51% 49% / 42% 48% 52% 58%; background: var(--ape-date-surface); animation: ape-home-shape-drift 12s ease-in-out infinite; }
@keyframes ape-home-shape-drift {
    0%, 100% { border-radius: 58% 42% 51% 49% / 42% 48% 52% 58%; rotate: 8deg; }
    50% { border-radius: 44% 56% 42% 58% / 55% 38% 62% 45%; rotate: -3deg; }
}
.ape-home-event { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: var(--ape-space-3); padding: var(--ape-space-4); color: var(--ape-ink); background: var(--ape-peach-soft); border: 1px solid var(--ape-peach); border-top-width: 4px; border-radius: var(--ape-radius-card); text-decoration: none; transition: border-color .2s; }
.ape-home-event:hover { border-color: var(--ape-text-accent); }
.ape-home-event-copy, .ape-home-event-details { position: relative; z-index: 1; }
.ape-home-event-copy { display: grid; gap: var(--ape-space-2); }
.ape-home-event-copy small { color: var(--ape-text-accent); font-size: var(--ape-type-xs); font-weight: 750; }
.ape-home-event-copy strong { font-size: var(--ape-type-xl); line-height: 1.3; overflow-wrap: anywhere; }
.ape-home-event-details { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ape-space-2) var(--ape-space-3); }
.ape-home-event-details > span { flex: 1 1 60px; font-size: var(--ape-type-xs); line-height: 1.4; color: var(--ape-text-reading); overflow-wrap: anywhere; }
.ape-home-event time { display: inline-flex; align-items: baseline; justify-content: center; gap: var(--ape-space-1); padding: 6px 10px; min-height: 32px; border: 1px solid var(--ape-peach); border-radius: var(--ape-radius-small); color: var(--ape-text-accent); background: var(--ape-surface); white-space: nowrap; }
.ape-home-event time strong { font-size: var(--ape-type-body); line-height: 1.05; }
.ape-home-event time span { font-size: var(--ape-type-xs); }
.ape-home-date-full { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ape-home-calendar-decor { position: absolute; right: 6px; top: 6px; width: 64px; height: 64px; rotate: 10deg; color: var(--ape-text-accent); opacity: .09; pointer-events: none; }
.ape-home-hero + #actualites { padding-top: var(--ape-space-6); }
.ape-home-hero + #actualites .ape-section-heading { margin-bottom: var(--ape-space-5); }
@media (max-width: 1050px) {
    .ape-home-frame.ape-page-header { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--ape-space-5); }
    .ape-home-hero.has-event .ape-home-companions { grid-template-columns: minmax(0, 1fr) 140px; gap: var(--ape-space-3); }
    .ape-home-stage { height: 214px; }
}
@media (max-width: 720px) {
    .ape-home-hero { padding-block: var(--ape-space-3); }
    .ape-home-frame.ape-page-header { grid-template-columns: minmax(0, 1fr) 120px; gap: var(--ape-space-3); padding: var(--ape-space-5); }
    .ape-home-message { display: contents; }
    .ape-home-message .ape-eyebrow { grid-column: 1 / -1; margin: 0; font-size: var(--ape-type-2xs); letter-spacing: .09em; }
    .ape-home-message h1 { grid-column: 1 / -1; font-size: clamp(1.55rem, 6.7vw, 2rem); line-height: 1.08; }
    .ape-home-actions { grid-column: 1; grid-row: 3; margin: 0; }
    .ape-home-contact { min-height: 44px; font-size: var(--ape-type-sm); padding: var(--ape-space-2) var(--ape-space-3); }
    .ape-home-companions { grid-column: 2; grid-row: 3; }
    .ape-home-stage { height: 156px; }
    .ape-home-halo { width: 130px; height: 140px; }
    /* Avec un rendez-vous : le titre, puis le bouton à gauche et le logo à droite, puis l'encart du rendez-vous sur toute la largeur
       (il n'est plus coincé à côté du logo : son titre et son adresse tiennent sur une ligne). */
    .ape-home-hero.has-event .ape-home-frame.ape-page-header { grid-template-columns: minmax(0, 1fr) clamp(104px, 30vw, 136px); }
    .ape-home-hero.has-event .ape-home-companions { display: contents; }
    .ape-home-hero.has-event .ape-home-stage { grid-column: 2; grid-row: 3; height: clamp(104px, 30vw, 132px); }
    .ape-home-hero.has-event .ape-home-halo { width: 86%; height: 92%; }
    .ape-home-hero.has-event .ape-home-event { grid-column: 1 / -1; grid-row: 4; }
    .ape-home-event { padding: var(--ape-space-3); gap: var(--ape-space-2); }
    .ape-home-event-copy small { font-size: var(--ape-type-2xs); }
    .ape-home-event-copy strong { font-size: var(--ape-type-md); }
    .ape-home-event time { min-height: 30px; padding: 4px 8px; }
    .ape-home-calendar-decor { width: 48px; height: 48px; }
    .ape-home-hero + #actualites { padding-top: var(--ape-space-5); }
    .ape-home-hero + #actualites .ape-eyebrow { margin-bottom: var(--ape-space-2); }
    .ape-home-hero + #actualites h2 { font-size: 1.7rem; }
}
/* Grand téléphone et petite tablette : assez de largeur pour loger le logo à droite du titre plutôt que dessous. */
@media (min-width: 520px) and (max-width: 720px) {
    .ape-home-hero.has-event .ape-home-frame.ape-page-header { grid-template-columns: minmax(0, 1fr) 156px; }
    .ape-home-hero.has-event .ape-home-message :is(.ape-eyebrow, h1) { grid-column: 1; }
    .ape-home-hero.has-event .ape-home-stage { grid-row: 1 / span 3; height: 156px; }
}
@media (prefers-reduced-motion: reduce) {
    .ape-home-stage > svg, .ape-home-halo { transform: none !important; }
    .ape-home-shape-mint { animation: none; }
}
