/**
 * ============================================
 * PAGE COMMUNES & COLLECTIVITES - ISOLATED STYLES (v2 premium)
 * ============================================
 *
 * Styles specifiques a evenement-de-mma-sur-notre-commune.php
 * (dossier de partenariat municipal presente aux elus).
 * Entierement scopes sous .page-commune pour ne rien casser ailleurs.
 *
 * v2 : passe design premium (chiffres animes + degrade, logos presse,
 * watermarks Bebas sur volets/etapes, avatars octogone, reveals au scroll,
 * formulaire de contact type location-cage).
 *
 * Pour supprimer cette page :
 *   1. Supprimer evenement-de-mma-sur-notre-commune.php
 *   2. Supprimer ce fichier (css/pages/communes.css)
 *   3. Supprimer api/contact-commune.php et medias/img/communes/
 *
 * Rappel : apres modif de ce CSS, incrementer le ?v= du lien communes.css
 * ============================================
 */

.page-commune {
    --cm-red: #e50914;
    --cm-red-dark: #b00710;
    --cm-red-glow: rgba(229, 9, 20, 0.35);
    --cm-line: rgba(255, 255, 255, 0.08);
    --cm-surface: rgba(255, 255, 255, 0.03);
}

/* ===========================================
   REVEAL AU SCROLL (progressive enhancement :
   ne masque que si le JS a pose .cm-js sur body)
   =========================================== */
.cm-js .cm-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.cm-js .cm-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .cm-js .cm-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===========================================
   HERO OVERRIDES (scopes .page-commune)
   Video a droite, texte a gauche, plein ecran
   =========================================== */
.page-commune .hero {
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: unset !important;
    overflow: hidden;
}

.page-commune .hero__slide {
    height: 100% !important;
}

.page-commune .hero__overlay--bottom {
    display: none !important;
}

.page-commune .hero__video-container {
    position: absolute !important;
    top: 0;
    right: 0;
    left: auto !important;
    width: auto !important;
    height: 100% !important;
    aspect-ratio: 16 / 9;
}

.page-commune .hero__video,
.page-commune .hero__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-commune .hero__content {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    right: auto;
    max-width: 54%;
    padding-left: 5%;
    z-index: 10;
}

.page-commune .hero__title em {
    font-style: normal;
    color: var(--cm-red);
}

/* Renfort de lisibilite du texte hero (la video passe par des frames claires) */
.page-commune .hero .hero__overlay--left {
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.72) 38%, rgba(10, 10, 10, 0.25) 62%, transparent 80%);
}

.page-commune .hero__eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: var(--cm-red);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.1rem;
    box-shadow: 0 6px 22px var(--cm-red-glow);
}

.page-commune .hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0.5rem;
}

/* Entree en cascade des elements du hero (CSS pur) */
.cm-hero-in {
    opacity: 0;
    transform: translateY(22px);
    animation: cmHeroIn 0.7s ease forwards;
}

.cm-hero-in--1 { animation-delay: 0.05s; }
.cm-hero-in--2 { animation-delay: 0.15s; }
.cm-hero-in--3 { animation-delay: 0.28s; }
.cm-hero-in--4 { animation-delay: 0.4s; }
.cm-hero-in--5 { animation-delay: 0.52s; }

@keyframes cmHeroIn {
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cm-hero-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Hero mobile : video en haut, texte dessous */
@media (max-width: 768px) {
    .page-commune .hero {
        height: auto !important;
        max-height: none !important;
        display: block !important;
        overflow: visible !important;
    }

    .page-commune .hero__slides {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-commune .hero__slide {
        position: relative !important;
        height: auto !important;
        display: block !important;
    }

    .page-commune .hero__video-container {
        position: relative !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
        transform: none !important;
    }

    .page-commune .hero .hero__overlay,
    .page-commune .hero .hero__overlay--left,
    .page-commune .hero .hero__overlay--vignette {
        display: none !important;
    }

    .page-commune .hero__content {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 1.75rem 1.5rem !important;
        background: #0a0a0a;
    }

    .page-commune .hero__content::before {
        display: none !important;
        content: none !important;
    }

    .page-commune .hero__title {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        font-size: 2rem;
    }

    .page-commune .hero__actions {
        justify-content: flex-start;
    }
}

/* ===========================================
   BOUTONS
   =========================================== */
.cm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

.cm-btn svg {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.cm-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--cm-red) 0%, var(--cm-red-dark) 100%);
    box-shadow: 0 8px 25px var(--cm-red-glow);
}

.cm-btn--primary:hover {
    background: linear-gradient(135deg, #ff1a1a 0%, var(--cm-red) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--cm-red-glow);
}

.cm-btn--primary:hover svg {
    transform: translateX(4px);
}

.cm-btn--ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
}

.cm-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    transform: translateY(-2px);
}

.cm-btn--block {
    width: 100%;
    justify-content: center;
}

/* ===========================================
   RETOUR SUR LA DERNIERE EDITION (chiffres)
   =========================================== */
.cm-stats {
    position: relative;
    background:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(229, 9, 20, 0.09) 0%, transparent 70%),
        linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
    padding: 4.5rem 0 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.cm-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(229, 9, 20, 0.55) 50%, transparent 100%);
}

.cm-stats__head {
    text-align: center;
    margin-bottom: 2.75rem;
    padding: 0 2rem;
}

.cm-stats__kicker {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cm-red);
    margin-bottom: 0.75rem;
}

.cm-stats__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.2vw, 2.2rem);
    letter-spacing: 0.06em;
    color: #fff;
    line-height: 1.1;
}

.cm-stats__title span {
    color: var(--cm-red);
    margin: 0 0.35rem;
}

.cm-stats__container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.cm-stats__container--second {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    position: relative;
    grid-template-columns: repeat(2, 1fr);
    max-width: 820px;
}

.cm-stats__container--second::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
}

.cm-stats__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding: 0 1rem;
}

.cm-stats__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15%;
    bottom: 15%;
    right: -0.75rem;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.14) 50%, transparent 100%);
}

.cm-stats__value {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6.5vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: 0.02em;
    background: linear-gradient(180deg, #ffffff 45%, rgba(255, 255, 255, 0.55) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-variant-numeric: tabular-nums;
}

.cm-stats__value em {
    font-style: normal;
    background: linear-gradient(180deg, #ff2b35 30%, var(--cm-red-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cm-stats__label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    max-width: 250px;
}

/* --- Bandeau presse --- */
.cm-press {
    max-width: 1180px;
    margin: 3.25rem auto 0;
    padding: 2rem 2rem 0;
    border-top: 1px solid var(--cm-line);
    text-align: center;
}

.cm-press__label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1.5rem;
}

.cm-press__logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem 3rem;
}

.cm-press__logo {
    height: 46px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cm-press__logo--wide {
    max-width: 250px;
    height: 38px;
}

.cm-press__logo:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.cm-press__more {
    display: block;
    margin-top: 1.4rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 900px) {
    .cm-stats__container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .cm-stats__item {
        padding: 0 0.5rem;
    }

    .cm-stats__value {
        font-size: clamp(1.9rem, 8vw, 2.6rem);
    }

    .cm-stats__label {
        font-size: 0.68rem;
    }

    .cm-stats__container--second {
        margin-top: 1.75rem;
        padding-top: 1.75rem;
    }

    .cm-press__logos {
        gap: 1.25rem 2rem;
    }

    .cm-press__logo {
        height: 36px;
        max-width: 120px;
    }

    .cm-press__logo--wide {
        height: 30px;
        max-width: 180px;
    }
}

/* ===========================================
   SECTIONS GENERIQUES
   =========================================== */
.cm-section {
    position: relative;
    padding: 6.5rem 0;
}

.cm-section__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cm-head {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 3.75rem;
}

.cm-head__eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cm-red);
    background: rgba(229, 9, 20, 0.1);
    border: 1px solid rgba(229, 9, 20, 0.22);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.1rem;
}

.cm-head__title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.05;
    color: #fff;
    letter-spacing: 0.02em;
}

.cm-head__title em {
    font-style: normal;
    color: var(--cm-red);
}

.cm-head__intro {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.62);
    margin-top: 1rem;
}

/* ===========================================
   LE PROJET (texte + image + objectifs)
   =========================================== */
.cm-project {
    background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
}

.cm-project__layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
    align-items: center;
}

.cm-project__text p {
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.68);
}

.cm-project__text p + p {
    margin-top: 1.25rem;
}

.cm-project__text strong {
    color: #fff;
    font-weight: 600;
}

.cm-offer {
    margin-top: 1.75rem;
    padding: 1.5rem 1.75rem;
    background: rgba(229, 9, 20, 0.07);
    border: 1px solid rgba(229, 9, 20, 0.25);
    border-left: 3px solid var(--cm-red);
    border-radius: var(--radius-md);
}

.cm-offer p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.cm-offer p + p {
    margin-top: 0.9rem;
}

.cm-offer__label {
    color: var(--cm-red);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.cm-project__media {
    position: relative;
    min-width: 0;
}

.cm-project__media img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: block;
}

.cm-caption {
    display: block;
    margin-top: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

/* Ce que votre commune y gagne : 4 benefices */
.cm-gains {
    margin-top: 4.5rem;
}

.cm-gains__title {
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    letter-spacing: 0.03em;
    color: #fff;
    margin-bottom: 2rem;
}

.cm-gains__title em {
    font-style: normal;
    color: var(--cm-red);
}

.cm-gains__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.cm-gain {
    position: relative;
    padding: 1.9rem 1.5rem 1.75rem;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cm-gain::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(229, 9, 20, 0.7) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cm-gain:hover {
    transform: translateY(-4px);
    border-color: rgba(229, 9, 20, 0.3);
}

.cm-gain:hover::before {
    opacity: 1;
}

.cm-gain__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.16) 0%, rgba(229, 9, 20, 0.05) 100%);
    border: 1px solid rgba(229, 9, 20, 0.3);
    margin-bottom: 1.1rem;
}

.cm-gain__icon svg {
    width: 1.4rem;
    height: 1.4rem;
    color: var(--cm-red);
}

.cm-gain__name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #fff;
}

.cm-gain__text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.62);
    margin-top: 0.6rem;
}

@media (max-width: 1100px) {
    .cm-gains__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .cm-project__layout {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }
}

@media (max-width: 640px) {
    .cm-gains__grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .cm-gain {
        padding: 1.5rem 1.35rem;
    }
}

/* ===========================================
   BANDEAUX IMMERSIFS (image pleine largeur)
   =========================================== */
.cm-banner {
    position: relative;
    height: clamp(340px, 60vh, 620px);
    overflow: hidden;
}

.cm-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    z-index: 3;
    background: linear-gradient(90deg, transparent 0%, rgba(229, 9, 20, 0.5) 50%, transparent 100%);
}

.cm-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cm-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.6) 0%, rgba(10, 10, 10, 0) 28%, rgba(10, 10, 10, 0) 55%, rgba(10, 10, 10, 0.82) 100%);
    pointer-events: none;
}

.cm-banner__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.75rem;
    z-index: 2;
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.2vw, 2.2rem);
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
    padding: 0 1.5rem;
}

.cm-banner__kicker {
    display: block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #ff4b52;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.95);
}

.cm-banner__caption em {
    font-style: normal;
    color: var(--cm-red);
}

/* ===========================================
   LE CONCEPT : 2 VOLETS (watermark 01 / 02)
   =========================================== */
.cm-concept {
    background: linear-gradient(180deg, #0d0d0d 0%, #0a0a0a 100%);
}

.cm-volet {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
}

.cm-volet::before {
    content: attr(data-num);
    position: absolute;
    top: -4.5rem;
    right: -0.5rem;
    z-index: 0;
    font-family: var(--font-display);
    font-size: clamp(6rem, 11vw, 10rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
    user-select: none;
}

.cm-volet--reverse::before {
    right: auto;
    left: -0.5rem;
}

.cm-volet + .cm-volet {
    margin-top: 6rem;
    padding-top: 6rem;
    border-top: 1px solid var(--cm-line);
}

.cm-volet + .cm-volet::before {
    top: 1.5rem;
}

.cm-volet--reverse .cm-volet__media {
    order: 2;
}

.cm-volet__media,
.cm-volet__info {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.cm-volet__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.5);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.cm-volet__tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cm-red);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--cm-red);
}

.cm-volet__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.9rem);
    line-height: 1;
    color: #fff;
    letter-spacing: 0.02em;
}

.cm-volet__text {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.68);
    margin-top: 1rem;
}

.cm-volet__text strong {
    color: #fff;
    font-weight: 600;
}

/* Encadre chiffre fort (ex: 100 personnes mobilisees) */
.cm-callout {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-lg);
}

.cm-callout__value {
    font-family: var(--font-display);
    font-size: 2.9rem;
    line-height: 1;
    background: linear-gradient(180deg, #ff2b35 30%, var(--cm-red-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    flex-shrink: 0;
}

.cm-callout__text {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.68);
}

.cm-callout__text strong {
    color: #fff;
}

/* Galerie du volet show : 1 grande + 2 vignettes */
.cm-showgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.75rem;
}

.cm-showgrid > *:first-child {
    grid-column: 1 / -1;
}

.cm-showgrid figure {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.cm-showgrid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.cm-showgrid figure:hover img {
    transform: scale(1.04);
}

.cm-showgrid > *:first-child img {
    aspect-ratio: 16 / 10;
}

.cm-showgrid > *:not(:first-child) img {
    aspect-ratio: 4 / 3;
}

/* Les 5 publics des initiations */
.cm-publics {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.cm-publics li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1.15rem;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-md);
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.cm-publics li:hover {
    border-color: rgba(229, 9, 20, 0.35);
    background: rgba(229, 9, 20, 0.05);
    transform: translateX(4px);
}

.cm-publics__icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(229, 9, 20, 0.12);
    border: 1px solid rgba(229, 9, 20, 0.3);
}

.cm-publics__icon svg {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--cm-red);
}

.cm-publics strong {
    display: block;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.cm-publics span:last-child {
    font-family: var(--font-body);
    font-size: 0.86rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.58);
}

/* Duo d'images du volet initiations */
.cm-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cm-duo figure {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.cm-duo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 4;
    display: block;
    transition: transform 0.5s ease;
}

.cm-duo figure:hover img {
    transform: scale(1.04);
}

/* Encadre "encadres par les combattants DUEL" */
.cm-coachnote {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(229, 9, 20, 0.07);
    border: 1px solid rgba(229, 9, 20, 0.25);
    border-radius: var(--radius-lg);
}

.cm-coachnote svg {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--cm-red);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.cm-coachnote p {
    font-family: var(--font-body);
    font-size: 0.94rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
}

.cm-coachnote strong {
    color: #fff;
}

@media (max-width: 900px) {
    .cm-volet {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cm-volet::before {
        top: -3rem;
        font-size: 5rem;
    }

    .cm-volet--reverse .cm-volet__media {
        order: 0;
    }

    .cm-volet + .cm-volet {
        margin-top: 4rem;
        padding-top: 4rem;
    }

    .cm-volet + .cm-volet::before {
        top: 1rem;
    }
}

/* ===========================================
   LIGUE FAMILIALE (bienveillance + equipe)
   =========================================== */
.cm-family {
    background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
}

.cm-family__gallery {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 0.9rem;
    align-items: stretch;
    margin-bottom: 3rem;
}

.cm-family__gallery figure {
    position: relative;
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.cm-family__gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
    transition: transform 0.5s ease;
}

.cm-family__gallery figure:hover img {
    transform: scale(1.03);
}

.cm-family__gallery figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.25rem 1.25rem 1rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.cm-family__text {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.7);
}

.cm-family__text strong {
    color: #fff;
}

/* Equipe : avatars octogone (clin d'oeil a la cage) */
.cm-team {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 1000px;
    margin: 3rem auto 0;
}

.cm-member {
    padding: 1.9rem 1.5rem;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cm-member:hover {
    transform: translateY(-4px);
    border-color: rgba(229, 9, 20, 0.3);
}

.cm-member__avatar {
    position: relative;
    display: flex;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: linear-gradient(160deg, var(--cm-red) 0%, rgba(229, 9, 20, 0.25) 100%);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

.cm-member__avatar span {
    position: absolute;
    inset: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #151515;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: #fff;
    letter-spacing: 0.05em;
}

.cm-member__name {
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 700;
    color: #fff;
}

.cm-member__role {
    display: block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cm-red);
    margin: 0.3rem 0 0.6rem;
}

.cm-member__bio {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
    .cm-family__gallery {
        grid-template-columns: 1fr;
    }

    .cm-team {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }
}

/* ===========================================
   POURQUOI LE MMA (image + 3 arguments)
   =========================================== */
.cm-why {
    background: linear-gradient(180deg, #0d0d0d 0%, #0a0a0a 100%);
}

.cm-why__layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3rem;
    align-items: center;
}

.cm-why__media {
    min-width: 0;
}

.cm-why__media img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: block;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.cm-args {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.cm-arg {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem 1.6rem;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-xl);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.cm-arg:hover {
    border-color: rgba(229, 9, 20, 0.3);
    background: rgba(229, 9, 20, 0.04);
}

.cm-arg__icon {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.16) 0%, rgba(229, 9, 20, 0.05) 100%);
    border: 1px solid rgba(229, 9, 20, 0.25);
}

.cm-arg__icon svg {
    width: 1.35rem;
    height: 1.35rem;
    color: var(--cm-red);
}

.cm-arg__title {
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 600;
    color: #fff;
}

.cm-arg__text {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.62);
    margin-top: 0.35rem;
}

@media (max-width: 900px) {
    .cm-why__layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cm-why__media {
        max-width: 420px;
        margin: 0 auto;
    }
}

/* ===========================================
   LE PARTENARIAT (donnant-donnant)
   =========================================== */
.cm-deal__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.cm-dealcard {
    padding: 2rem 1.9rem;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-xl);
}

.cm-dealcard--duel {
    border-color: rgba(229, 9, 20, 0.3);
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.cm-dealcard__head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--cm-line);
}

.cm-dealcard__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(229, 9, 20, 0.12);
    border: 1px solid rgba(229, 9, 20, 0.3);
}

.cm-dealcard__icon svg {
    width: 1.35rem;
    height: 1.35rem;
    color: var(--cm-red);
}

.cm-dealcard__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.03em;
    color: #fff;
    line-height: 1.1;
}

.cm-dealcard ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.cm-dealcard li {
    display: flex;
    gap: 0.7rem;
    font-family: var(--font-body);
    font-size: 0.93rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.72);
}

.cm-dealcard li strong {
    color: #fff;
    font-weight: 600;
}

.cm-dealcard li svg {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--cm-red);
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.cm-dealcard__opt {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-sm);
    padding: 0.1rem 0.45rem;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.cm-deal__note {
    display: flex;
    gap: 1rem;
    max-width: 900px;
    margin: 2.25rem auto 0;
    padding: 1.25rem 1.5rem;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-lg);
}

.cm-deal__note svg {
    width: 1.4rem;
    height: 1.4rem;
    color: var(--cm-red);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.cm-deal__note p {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
}

.cm-deal__note strong {
    color: #fff;
}

@media (max-width: 900px) {
    .cm-deal__cols {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   REFERENCE DUEL 6
   =========================================== */
.cm-ref {
    background: linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
}

.cm-ref__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.cm-ref__media {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0.9rem;
    align-items: stretch;
    min-width: 0;
}

.cm-ref__photo {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.cm-ref__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.cm-ref__photo:hover img {
    transform: scale(1.03);
}

.cm-ref__photo--tall img {
    aspect-ratio: 3 / 4;
}

.cm-ref__photo:not(.cm-ref__photo--tall) img {
    aspect-ratio: 3 / 4;
}

.cm-ref__text {
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.68);
}

.cm-ref__text p + p {
    margin-top: 1.1rem;
}

.cm-ref__text strong {
    color: #fff;
}

.cm-ref__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.cm-ref__stat {
    padding: 1.1rem 0.75rem;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-md);
    text-align: center;
    transition: border-color 0.3s ease;
}

.cm-ref__stat:hover {
    border-color: rgba(229, 9, 20, 0.3);
}

.cm-ref__stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    background: linear-gradient(180deg, #ff2b35 30%, var(--cm-red-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cm-ref__stat-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.4rem;
}

/* Ligne causes solidaires, sous le carrousel partenaires */
.cm-trust {
    max-width: 900px;
    margin: 2.5rem auto 0;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
}

.cm-trust strong {
    color: rgba(255, 255, 255, 0.85);
}

/* Section partenaires (composant partage) : integration dans la page */
.page-commune .partners {
    padding-top: 3.5rem;
    padding-bottom: 4.5rem;
    background: linear-gradient(180deg, #0d0d0d 0%, #0a0a0a 100%);
}

@media (max-width: 900px) {
    .cm-ref__layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cm-ref__stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===========================================
   ETAPES + CONVENTION
   =========================================== */
.cm-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.cm-step {
    position: relative;
    padding: 2.25rem 1.75rem 2rem;
    background: var(--cm-surface);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cm-step::after {
    content: attr(data-num);
    position: absolute;
    bottom: -2.25rem;
    right: 0.25rem;
    font-family: var(--font-display);
    font-size: 7.5rem;
    line-height: 1;
    color: rgba(229, 9, 20, 0.07);
    pointer-events: none;
    user-select: none;
}

.cm-step:hover {
    transform: translateY(-4px);
    border-color: rgba(229, 9, 20, 0.3);
}

.cm-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cm-red) 0%, var(--cm-red-dark) 100%);
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: #fff;
    margin-bottom: 1.1rem;
    box-shadow: 0 6px 18px var(--cm-red-glow);
}

.cm-step__title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.cm-step__text {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.62);
    margin-top: 0.55rem;
    position: relative;
    z-index: 1;
}

.cm-annual {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 760px;
    margin: 2.25rem auto 0;
    padding: 1.25rem 1.5rem;
    background: rgba(229, 9, 20, 0.07);
    border: 1px solid rgba(229, 9, 20, 0.25);
    border-radius: var(--radius-lg);
}

.cm-annual svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--cm-red);
    flex-shrink: 0;
}

.cm-annual p {
    font-family: var(--font-body);
    font-size: 0.94rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
}

.cm-annual strong {
    color: #fff;
}

@media (max-width: 900px) {
    .cm-steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ===========================================
   CONTACT FINAL (intro + formulaire)
   =========================================== */
.cm-final {
    position: relative;
    padding: 7rem 0;
    overflow: hidden;
}

.cm-final__bg {
    position: absolute;
    inset: 0;
}

.cm-final__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cm-final__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.97) 0%, rgba(10, 10, 10, 0.86) 45%, rgba(10, 10, 10, 0.97) 100%);
}

.cm-final__inner {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

.cm-final__title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    line-height: 1.02;
    color: #fff;
    letter-spacing: 0.02em;
}

.cm-final__title em {
    font-style: normal;
    color: var(--cm-red);
}

.cm-final__text {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 1.1rem;
}

.cm-final__contact {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 1.9rem;
}

.cm-final__row {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0;
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

a.cm-final__row:hover {
    color: #fff;
}

.cm-final__row svg {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--cm-red);
    flex-shrink: 0;
}

.cm-final__legal {
    margin-top: 1.75rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.4);
}

/* Carte formulaire */
.cm-final__card {
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.85) 0%, rgba(10, 10, 10, 0.9) 100%);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.cm-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.cm-form[hidden],
.cm-form__success[hidden] {
    display: none;
}

.cm-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}

.cm-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cm-form__field label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.cm-form__field input,
.cm-form__field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cm-line);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.cm-form__field textarea {
    resize: vertical;
    min-height: 110px;
}

.cm-form__field input::placeholder,
.cm-form__field textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.cm-form__field input:focus,
.cm-form__field textarea:focus {
    outline: none;
    border-color: var(--cm-red);
    background: rgba(255, 255, 255, 0.06);
}

.cm-form .cm-btn {
    margin-top: 0.35rem;
}

.cm-form__success {
    text-align: center;
    padding: 1.5rem 0.5rem;
}

.cm-form__success-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.14);
    margin-bottom: 1rem;
}

.cm-form__success-ico svg {
    width: 1.6rem;
    height: 1.6rem;
    color: #22c55e;
}

.cm-form__success-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: #fff;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.cm-form__success-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 900px) {
    .cm-final__inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 560px) {
    .cm-form__row {
        grid-template-columns: 1fr;
    }
}
