:root {
    --afcfma-primary: #05243d;
    --afcfma-secondary: #4b9aad;
    --afcfma-gold: #fbbf24;
    --afcfma-cream: #f8f5ef;
    --afcfma-ink: #0f172a;
}

html {
    overflow-x: clip;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    min-width: 320px;
    color: var(--afcfma-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    overflow-x: clip;
}

img,
video {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
.premium-title,
.hero-title {
    overflow-wrap: anywhere;
    text-wrap: balance;
}

p,
li,
a,
span {
    overflow-wrap: break-word;
}

.premium-title,
.hero-title {
    line-height: 1.08 !important;
    padding-block-start: 0.04em;
}

.site-noise {
    background:
        radial-gradient(circle at 8% 4%, rgba(251, 191, 36, 0.16), transparent 26%),
        radial-gradient(circle at 88% 8%, rgba(75, 154, 173, 0.14), transparent 28%),
        linear-gradient(135deg, #f8f5ef 0%, #eef3f7 44%, #ffffff 100%);
}

.site-noise::before {
    content: "";
    position: fixed;
    z-index: 0;
    inset: 0;
    background-image: radial-gradient(rgba(5, 36, 61, 0.13) 0.7px, transparent 0.7px);
    background-size: 18px 18px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 70%);
    opacity: 0.16;
    pointer-events: none;
}

.public-top-strip {
    background: var(--afcfma-primary);
    color: rgba(255, 255, 255, 0.9);
}

.public-site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(24px);
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.public-site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.14);
}

.public-logo-shell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.public-nav-link {
    position: relative;
    padding-block: 0.45rem;
    color: var(--afcfma-primary);
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.25rem;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.public-nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--afcfma-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.public-nav-link:hover,
.public-nav-link:focus-visible,
.public-nav-link.is-active {
    color: var(--afcfma-secondary);
}

.public-nav-link:hover::after,
.public-nav-link:focus-visible::after,
.public-nav-link.is-active::after {
    transform: scaleX(1);
}

.public-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--afcfma-primary);
    padding: 0.75rem 1.25rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(5, 36, 61, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.public-contact-button:hover,
.public-contact-button:focus-visible,
.public-contact-button.is-active {
    background: var(--afcfma-secondary);
    transform: translateY(-2px);
}

.public-mobile-menu {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.35s;
}

.public-mobile-menu.open {
    max-height: 720px;
    visibility: visible;
    opacity: 1;
}

.public-mobile-link {
    display: block;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1rem;
    color: var(--afcfma-primary);
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.public-mobile-link.is-active {
    background: var(--afcfma-primary);
    color: #fff;
}

.soft-card,
.magnetic-card,
.media-card,
.soft-card > *,
.magnetic-card > *,
.media-card > * {
    min-width: 0;
}

.public-card-media {
    min-height: 14rem;
}

.media-card .media-img {
    width: 100%;
    height: clamp(260px, 28vw, 340px);
    object-fit: cover;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.12);
    padding: 0.55rem 1rem;
    color: #b45309;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.section-kicker::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--afcfma-gold);
    box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.14);
}

.soft-card {
    border: 1px solid rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
}

.public-media-frame {
    position: relative;
    min-height: clamp(260px, 42vw, 460px);
    overflow: hidden;
    background: #e2e8f0;
}

.public-media-frame > img,
.public-media-frame > video {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
}

.public-overlay-copy {
    max-height: calc(100% - 2rem);
    overflow: hidden;
}

.public-rich-text {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Le contenu reste visible si JavaScript est désactivé. public.js anime ensuite
   les éléments avec la Web Animations API, en respectant reduced-motion. */
.fade-up,
.fade-left,
.fade-right,
[data-reveal] {
    opacity: 1 !important;
    transform: none !important;
}

:focus-visible {
    outline: 3px solid var(--afcfma-gold);
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .premium-title,
    .hero-title {
        line-height: 1.12 !important;
    }

    .public-overlay-copy {
        max-height: calc(100% - 1rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
