/* Hero de la page d'accueil : fondatrice (40 %) | texte (60 %) */

.fms-hero-split {
    --split-accent: var(--fms-primary);
    --split-gold: #b08d57;
    --split-glow: rgba(255, 153, 51, .30);
    --split-bg: linear-gradient(160deg, #fffaf2 0%, #fbeedb 55%, #f5dfbf 100%);
    --split-ink: var(--fms-secondary);
    --split-text: #5b4633;
    --split-kicker: var(--fms-primary-ink);
    --split-motto: var(--fms-secondary);
    --split-plaque-bg: #ffffff;
    --split-plaque-ink: var(--fms-secondary);
    --split-quote-bg: rgba(255, 153, 51, .10);
    --split-watermark: rgba(102, 51, 0, .05);
    background:
        radial-gradient(circle at 26% 50%, var(--split-glow), transparent 38%),
        var(--split-bg);
    border-bottom: 1px solid #e6cfae;
    color: var(--split-text);
    isolation: isolate;
    overflow: hidden;
    position: relative;
}

/* Variante sombre : lumière de vitrail sur brun profond */
.fms-hero-split.is-dark {
    --split-gold: #d9b77e;
    --split-glow: rgba(255, 153, 51, .38);
    --split-bg: linear-gradient(150deg, #2a1300 0%, #432000 45%, color-mix(in srgb, var(--fms-secondary) 92%, #000) 100%);
    --split-ink: #ffffff;
    --split-text: rgba(255, 255, 255, .86);
    --split-kicker: #e8c48a;
    --split-motto: #ffd9ad;
    --split-plaque-bg: #fdf8f1;
    --split-plaque-ink: var(--fms-secondary);
    --split-quote-bg: rgba(255, 255, 255, .06);
    --split-watermark: rgba(255, 204, 153, .045);
    border-bottom: 0;
}

/* Filets dorés en haut et en bas du bandeau */
.fms-hero-split::before,
.fms-hero-split::after {
    background: linear-gradient(90deg, transparent, var(--split-gold) 25%, var(--split-accent) 50%, var(--split-gold) 75%, transparent);
    content: '';
    height: 1px;
    left: 0;
    opacity: .7;
    position: absolute;
    right: 0;
    z-index: 1;
}

.fms-hero-split::before { top: 0; }
.fms-hero-split::after { bottom: 0; }

/* Tau franciscain en filigrane, côté texte */
.fms-hero-split-watermark {
    color: var(--split-watermark);
    pointer-events: none;
    position: absolute;
    right: -4%;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(320px, 36vw, 560px);
    z-index: -1;
}

.fms-hero-split-watermark svg { display: block; height: auto; width: 100%; }

.fms-hero-split-inner {
    align-items: center;
    box-sizing: border-box;
    display: grid;
    gap: clamp(40px, 6vw, 96px);
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
    margin: 0 auto;
    max-width: 1280px;
    min-height: min(78vh, 720px);
    padding: clamp(44px, 5vw, 72px) 40px clamp(44px, 5vw, 72px);
    position: relative;
}

.fms-hero-split.no-photo .fms-hero-split-inner { grid-template-columns: minmax(0, 1fr); max-width: 900px; text-align: center; }
.fms-hero-split.no-photo .fms-hero-split-actions,
.fms-hero-split.no-photo .fms-hero-split-motto { justify-content: center; }
.fms-hero-split.no-photo .fms-hero-split-ornament { margin-inline: auto; }

/* --- Portrait ------------------------------------------------------------ */

/* Aussi grand que la colonne le permet, sans dépasser la hauteur visible :
   photo 4:5 + cartouche doivent tenir sous l’en-tête (~260 px). */
.fms-hero-split-portrait {
    justify-self: center;
    margin: 0;
    max-width: min(440px, calc((100vh - 340px) * .8));
    min-width: 280px;
    position: relative;
    width: 100%;
}

/* Auréole : rayons dorés qui s’estompent autour de l’arche */
.fms-hero-split-halo {
    aspect-ratio: 1;
    background: repeating-conic-gradient(from 0deg, var(--split-gold) 0deg 1.2deg, transparent 1.2deg 9deg);
    border-radius: 50%;
    left: 50%;
    -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .55) 38%, transparent 68%);
    mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .55) 38%, transparent 68%);
    opacity: .38;
    pointer-events: none;
    position: absolute;
    top: 34%;
    transform: translate(-50%, -50%);
    width: 175%;
    z-index: 0;
}

.fms-hero-split-frame {
    aspect-ratio: 4 / 5;
    position: relative;
    z-index: 1;
}

/* Double filet doré autour de la photo */
.fms-hero-split-frame::before {
    border: 1px solid var(--split-gold);
    content: '';
    inset: -14px;
    opacity: .9;
    position: absolute;
    z-index: 0;
}

.fms-hero-split-frame::after {
    border: 2px solid var(--split-accent);
    content: '';
    inset: -6px;
    opacity: .85;
    position: absolute;
    z-index: 0;
}

.fms-hero-split-frame img {
    box-shadow: 0 30px 60px rgba(38, 19, 0, .38), 0 0 90px var(--split-glow);
    display: block;
    height: 100%;
    object-fit: cover;
    position: relative;
    width: 100%;
    z-index: 1;
}

.fms-hero-split-portrait.is-arch .fms-hero-split-frame img,
.fms-hero-split-portrait.is-arch .fms-hero-split-frame::before,
.fms-hero-split-portrait.is-arch .fms-hero-split-frame::after { border-radius: 999px 999px 10px 10px; }
.fms-hero-split-portrait.is-rect .fms-hero-split-frame img,
.fms-hero-split-portrait.is-rect .fms-hero-split-frame::before,
.fms-hero-split-portrait.is-rect .fms-hero-split-frame::after { border-radius: 10px; }

/* Cartouche posé sur le bas du portrait */
.fms-hero-split-portrait figcaption {
    align-items: center;
    background: var(--split-plaque-bg);
    border: 1px solid var(--split-gold);
    border-radius: 6px;
    box-shadow: 0 14px 30px rgba(38, 19, 0, .28);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: -34px auto 0;
    max-width: 86%;
    padding: 14px 26px 13px;
    position: relative;
    text-align: center;
    width: max-content;
    z-index: 2;
}

.fms-hero-split-name {
    color: var(--split-plaque-ink);
    font-family: var(--fms-heading-font);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.fms-hero-split-caption {
    color: var(--fms-primary-ink);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

/* --- Contenu ------------------------------------------------------------- */

.fms-hero-split-content { min-width: 0; position: relative; }

.fms-hero-split-kicker {
    align-items: center;
    color: var(--split-kicker);
    display: inline-flex;
    font-size: .85rem;
    font-weight: 700;
    gap: 14px;
    letter-spacing: .2em;
    margin: 0 0 20px;
    text-transform: uppercase;
}

.fms-hero-split-kicker::before {
    background: var(--split-accent);
    content: '';
    height: 2px;
    width: 44px;
}

.fms-hero-split-title {
    color: var(--split-ink);
    font-family: var(--fms-heading-font);
    font-size: clamp(2.5rem, 4.8vw, 4.4rem);
    font-weight: 700;
    letter-spacing: -.005em;
    line-height: 1.04;
    margin: 0 0 26px;
    text-wrap: balance;
}

/* Ornement sous le titre : filet — Tau — filet */
.fms-hero-split-ornament {
    align-items: center;
    color: var(--split-gold);
    display: flex;
    gap: 14px;
    margin: 26px 0 24px;
    max-width: 260px;
}

.fms-hero-split-ornament::before,
.fms-hero-split-ornament::after {
    background: currentColor;
    content: '';
    flex: 1;
    height: 1px;
    opacity: .8;
}

.fms-hero-split-ornament::before { background: linear-gradient(90deg, transparent, currentColor); }
.fms-hero-split-ornament::after { background: linear-gradient(90deg, currentColor, transparent); }
.fms-hero-split-ornament svg { display: block; flex: none; height: 22px; width: 18px; }

/* Devise : Prière · Service · Charité */
.fms-hero-split-motto {
    align-items: center;
    color: var(--split-motto);
    display: flex;
    flex-wrap: wrap;
    font-family: var(--fms-heading-font);
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    font-style: italic;
    font-weight: 600;
    gap: 6px 22px;
    line-height: 1.3;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fms-hero-split-motto li {
    align-items: center;
    display: inline-flex;
    gap: 22px;
}

.fms-hero-split-motto li + li::before {
    background: var(--split-accent);
    content: '';
    height: 7px;
    transform: rotate(45deg);
    width: 7px;
}

.fms-hero-split-text {
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 60ch;
}

.fms-hero-split.no-photo .fms-hero-split-text { margin-inline: auto; }
.fms-hero-split-text p { margin: 0 0 14px; }

.fms-hero-split-quote {
    background: var(--split-quote-bg);
    border-left: 3px solid var(--split-accent);
    margin: 28px 0 0;
    max-width: 60ch;
    padding: 18px 24px;
    text-align: left;
}

.fms-hero-split-quote p {
    color: var(--split-ink);
    font-family: var(--fms-heading-font);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.5;
    margin: 0;
}

.fms-hero-split-quote cite {
    color: var(--split-kicker);
    display: block;
    font-size: .9rem;
    font-style: normal;
    font-weight: 600;
    margin-top: 10px;
}

.fms-hero-split-quote cite::before { content: '— '; }

.fms-hero-split-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 40px;
}

.fms-hero-split-btn {
    align-items: center;
    border: 2px solid transparent;
    border-radius: 8px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 52px;
    padding: 12px 30px;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.fms-hero-split-btn:hover { transform: translateY(-2px); }

.fms-hero-split-btn.is-primary { background: var(--fms-primary); box-shadow: 0 10px 24px rgba(179, 89, 0, .30); color: var(--fms-on-primary); }
.fms-hero-split-btn.is-primary:hover { background: var(--fms-secondary); color: #fff; }
.fms-hero-split-btn.is-secondary { border-color: var(--split-ink); color: var(--split-ink); }
.fms-hero-split-btn.is-secondary:hover { background: var(--split-ink); color: var(--fms-secondary); }

.fms-hero-split.is-dark .fms-hero-split-btn.is-primary { box-shadow: 0 10px 28px rgba(255, 153, 51, .25); }
.fms-hero-split.is-dark .fms-hero-split-btn.is-primary:hover { background: #fff; color: var(--fms-secondary); }
.fms-hero-split.is-dark .fms-hero-split-btn.is-secondary { border-color: rgba(255, 255, 255, .7); }
.fms-hero-split:not(.is-dark) .fms-hero-split-btn.is-secondary:hover { color: #fff; }

.fms-hero-split-btn:focus-visible {
    outline: 3px solid var(--split-gold);
    outline-offset: 3px;
}

/* Le bloc suivant (Qui sommes-nous) remonte vers le hero */
.fms-hero-split + .fms-institutional-section { padding-top: clamp(28px, 3.5vw, 48px); }

/* --- Apparition douce ---------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    .fms-hero-split-portrait,
    .fms-hero-split-content { animation: fms-split-in .8s cubic-bezier(.2, .7, .2, 1) both; }
    .fms-hero-split-content { animation-delay: .12s; }
    .fms-hero-split-halo { animation: fms-split-halo 1.6s ease-out .2s both; }
}

@media (prefers-reduced-motion: reduce) {
    .fms-hero-split-btn:hover { transform: none; }
}

@keyframes fms-split-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes fms-split-halo {
    from { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
    to { opacity: .38; transform: translate(-50%, -50%) scale(1); }
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1100px) {
    .fms-hero-split-inner { padding-inline: 28px; }
}

@media (max-width: 992px) {
    .fms-hero-split {
        background:
            radial-gradient(circle at 50% 24%, var(--split-glow), transparent 42%),
            var(--split-bg);
    }

    .fms-hero-split-watermark { bottom: -6%; right: 50%; top: auto; transform: translateX(50%); width: 380px; }

    .fms-hero-split-inner {
        gap: 40px;
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding: 56px 20px 48px;
    }

    .fms-hero-split-portrait { max-width: 320px; min-width: 0; }
    .fms-hero-split-content { text-align: center; }
    .fms-hero-split-kicker { justify-content: center; }
    .fms-hero-split-ornament { margin-inline: auto; }
    .fms-hero-split-motto,
    .fms-hero-split-actions { justify-content: center; }
    .fms-hero-split-text, .fms-hero-split-quote { margin-inline: auto; }
}

@media (max-width: 600px) {
    .fms-hero-split-inner { padding: 48px 16px 40px; }
    .fms-hero-split-portrait { max-width: 250px; }
    .fms-hero-split-frame::before { inset: -10px; }
    .fms-hero-split-portrait figcaption { max-width: 100%; padding: 12px 18px 11px; }
    .fms-hero-split-name { font-size: 1.2rem; }
    .fms-hero-split-kicker { font-size: .78rem; letter-spacing: .16em; }
    .fms-hero-split-kicker::before { width: 28px; }
    .fms-hero-split-motto { gap: 4px 16px; }
    .fms-hero-split-motto li { gap: 16px; }
    .fms-hero-split-actions { flex-direction: column; }
    .fms-hero-split-btn { width: 100%; }
}
