/* CT-9 F-04f-4 — Footers cartouche */
/* -------------------------------------------------------------------------- */
/* Footer cartouche — « electric border » (réf. footer_electric.html)        */
/* Contour : violet plus sombre / moins opaque (toutes surfaces .footer-cartouche-frame) */
/* -------------------------------------------------------------------------- */
.footer-cartouche-frame {
    --fc-violet-base: 20, 8, 40;
    --fc-violet-accent: #66527d;
    --fc-violet-glow: rgba(52, 38, 82, 0.42);
    --fc-electric-accent: var(--fc-violet-accent);
    --fc-electric-bg: rgba(10, 5, 20, 0.88);
    --fc-electric-radius: clamp(14px, 2vh, 20px);
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 2px;
    border-radius: calc(var(--fc-electric-radius) + 3px);
    background:
        linear-gradient(
            -30deg,
            rgba(var(--fc-violet-base), 0.2),
            transparent,
            rgba(var(--fc-violet-base), 0.16)
        ),
        linear-gradient(
            -30deg,
            rgba(58, 42, 88, 0.06),
            transparent,
            rgba(58, 42, 88, 0.06)
        ),
        linear-gradient(to bottom, var(--fc-electric-bg), var(--fc-electric-bg));
    overflow: visible;
}

/* Halo large derrière le footer — respiration légère (opacity + scale seulement, pas de blur animé = fluide) */
@keyframes fc-footer-ambient-breathe {
    0%, 100% {
        opacity: 0.16;
        transform: scale(1.03);
    }
    50% {
        opacity: 0.26;
        transform: scale(1.085);
    }
}

.footer-cartouche-frame__ambient {
    position: absolute;
    inset: -10px;
    border-radius: calc(var(--fc-electric-radius) + 12px);
    filter: blur(28px);
    transform-origin: center center;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        -30deg,
        rgba(72, 58, 102, 0.08),
        rgba(var(--fc-violet-base), 0.12),
        rgba(48, 38, 78, 0.07)
    );
    animation: fc-footer-ambient-breathe 5.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .footer-cartouche-frame__ambient {
        animation: none;
        opacity: 0.2;
        transform: scale(1.05);
    }
}

.footer-cartouche-frame__overlay {
    position: absolute;
    inset: 0;
    border-radius: calc(var(--fc-electric-radius) + 2px);
    pointer-events: none;
    mix-blend-mode: overlay;
    transform: scale(1.02);
    filter: blur(10px);
}

.footer-cartouche-frame__overlay--x {
    z-index: 2;
    opacity: 0.55;
    background: linear-gradient(
        to right,
        rgba(42, 32, 72, 0.12),
        transparent 22%,
        transparent 78%,
        rgba(42, 32, 72, 0.1)
    );
}

.footer-cartouche-frame__overlay--y {
    z-index: 2;
    opacity: 0.35;
    background: linear-gradient(
        to bottom,
        rgba(38, 28, 62, 0.12),
        transparent 40%,
        transparent 60%,
        rgba(38, 28, 62, 0.1)
    );
}

.footer-cartouche-frame__core {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
}

/* Double trait externe + carte : au-dessous des halos (cf. footer_electric.html) */
.footer-cartouche-frame__offset-border {
    position: relative;
    z-index: 1;
    isolation: isolate;
    border: 2px solid rgba(var(--fc-violet-base), 0.32);
    border-radius: var(--fc-electric-radius);
    padding-right: 2px;
    padding-bottom: 2px;
    box-sizing: border-box;
    width: 100%;
    min-height: 100%;
}

.footer-cartouche-frame__glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--fc-electric-radius);
    pointer-events: none;
    box-sizing: border-box;
}

.footer-cartouche-frame__glow--1 {
    border: 2px solid rgba(var(--fc-violet-base), 0.38);
    filter: blur(2px);
    z-index: 2;
}

.footer-cartouche-frame__glow--2 {
    border: 3px solid rgba(52, 38, 82, 0.2);
    filter: blur(6px);
    z-index: 3;
}

.footer-cartouche-frame__glow--3 {
    border: 4px solid var(--fc-violet-glow);
    filter: blur(14px);
    opacity: 0.32;
    z-index: 4;
}

/* Slice 246: footer category rotation (one step visible) */
.footer-cartouche--rotation .footer-rotation-viewport {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 4rem;
    box-sizing: border-box;
}

.footer-rotation-step[hidden] {
    display: none !important;
}

.footer-rotation-label {
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
    color: var(--fc-violet-accent);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.footer-rotation-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.footer-rotation-logos--ccq .cartouche-logo-ccq {
    height: 52px;
    width: auto;
    max-width: min(280px, 36vw);
    object-fit: contain;
}

.footer-rotation-logo-cell .cartouche-logo {
    height: 48px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

/* Partner Footer Styles — le cadre électrique remplace l’ancienne carte chrome */
.partner-footer {
    flex-shrink: 0;
    min-height: 120px;
    background: transparent;
    border-radius: 0;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem 1rem;
    position: relative;
    /* Slice 201: pin to bottom of partner flex column */
    margin-top: auto;
}

.partner-footer .footer-cartouche-frame {
    max-width: 100%;
}

/* CT-9 / F-04a — pitch portail liste : conteneur .pitch-footer (.pitch-shell en colonne flex) */
.pitch-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
}

/* --------------------------------------------------------------------------
   Slice 242: Portal compact footer (solutions / partner / pitch only)
   Inner cartouche parity with former solutions inline baseline; equal columns.
   Do not merge with projection: .wall-footer / .winners-footer stay unchanged.
   -------------------------------------------------------------------------- */
.solutions-footer .footer-cartouche,
.partner-footer .footer-cartouche,
.pitch-footer .footer-cartouche {
    height: auto;
    min-height: 0;
    padding: 0.6rem 1.5rem;
    gap: 1.5rem;
}

.solutions-footer .cartouche-logo,
.partner-footer .cartouche-logo,
.pitch-footer .cartouche-logo {
    height: 42px;
}

.solutions-footer .cartouche-logo-ccq,
.partner-footer .cartouche-logo-ccq,
.pitch-footer .cartouche-logo-ccq {
    height: 38px;
}

.solutions-footer .cartouche-cell-logo,
.partner-footer .cartouche-cell-logo,
.pitch-footer .cartouche-cell-logo {
    padding: 0.1rem 0.4rem 0.2rem;
}

.solutions-footer .cartouche-cell-label,
.partner-footer .cartouche-cell-label,
.pitch-footer .cartouche-cell-label {
    padding: 0.1rem 0.4rem 0.1rem;
    font-size: 0.55rem;
}

.solutions-footer .cartouche-table,
.partner-footer .cartouche-table,
.pitch-footer .cartouche-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
    border: none;
}

.solutions-footer .cartouche-table td,
.solutions-footer .cartouche-table th,
.partner-footer .cartouche-table td,
.partner-footer .cartouche-table th,
.pitch-footer .cartouche-table td,
.pitch-footer .cartouche-table th {
    border: none;
    width: 1%;
    box-sizing: border-box;
}

.solutions-footer .cartouche-cell-logo .cartouche-logo,
.partner-footer .cartouche-cell-logo .cartouche-logo,
.pitch-footer .cartouche-cell-logo .cartouche-logo {
    max-width: 100%;
    width: auto;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.solutions-footer .cartouche-cell-logo--demi,
.partner-footer .cartouche-cell-logo--demi,
.pitch-footer .cartouche-cell-logo--demi {
    overflow: visible;
}

.solutions-footer .cartouche-cell-logo--demi .cartouche-logo,
.partner-footer .cartouche-cell-logo--demi .cartouche-logo,
.pitch-footer .cartouche-cell-logo--demi .cartouche-logo {
    max-width: 118%;
    height: 48px;
}

/* Wall Footer Styles — proportionnel (1080p, 4K, etc.) */
.wall-footer {
    flex-shrink: 0;
    min-height: 18vh;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2vw;
    position: relative;
    /* Slice 201: pin to bottom of .wall-page flex column */
    margin-top: auto;
    overflow: visible;
}

/* Wall — cadre + carte intérieure (double trait + cuivre net) */
.wall-footer .footer-cartouche-frame {
    width: 90%;
    max-width: 90%;
    min-width: 0;
    min-height: 12vh;
    height: 12vh;
}

.wall-footer .footer-cartouche-frame__core {
    height: 100%;
}

/* Slice 241 / 241a: projection-only — tableau unique CCQ (col 1) + partenaires en colonnes égales */
.wall-footer .footer-cartouche,
.winners-footer .footer-cartouche {
    width: 100%;
    min-height: 100%;
    height: 100%;
    margin-top: -2px;
    margin-left: -2px;
    background: rgba(0, 0, 0, 0.88);
    border-radius: var(--fc-electric-radius);
    border: 2px solid var(--fc-electric-accent);
    display: flex;
    justify-content: center;
    align-items: center;
    /* Slice 241a: un seul enfant (.cartouche-success-container) — pas de gap entre CCQ et tableau */
    padding-top: 0.5vh;
    padding-right: clamp(1.25rem, 2.5vw, 2.75rem);
    padding-bottom: 0.5vh;
    padding-left: clamp(2rem, 3.25vw, 3.75rem);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: none;
}

.wall-footer .cartouche-success-container,
.winners-footer .cartouche-success-container {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    margin-left: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

/* Slice 241 / 241a: colonnes à largeur égale (CCQ + partenaires) — projection uniquement */
.wall-footer .cartouche-table,
.winners-footer .cartouche-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
    border: none;
}

.wall-footer .cartouche-table td,
.wall-footer .cartouche-table th,
.winners-footer .cartouche-table td,
.winners-footer .cartouche-table th {
    border: none;
    width: 1%;
    box-sizing: border-box;
}

.wall-footer .cartouche-cell-logo .cartouche-logo,
.winners-footer .cartouche-cell-logo .cartouche-logo {
    max-width: 100%;
    width: auto;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Demi-finale: plusieurs colonnes étroites — léger relèvement lisibilité (overflow cellule, pas refonte grille 241a) */
.wall-footer .cartouche-cell-logo--demi,
.winners-footer .cartouche-cell-logo--demi {
    overflow: visible;
    vertical-align: middle;
}

.wall-footer .cartouche-cell-logo--demi .cartouche-logo,
.winners-footer .cartouche-cell-logo--demi .cartouche-logo {
    max-width: 122%;
    height: 8.25vh;
    max-height: 116px;
}

/* Winners Footer — même traitement que Wall (projection / finale) */
.winners-footer {
    width: 100%;
    min-height: 18vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2vw;
    margin-top: auto;
    box-sizing: border-box;
    overflow: visible;
}

.winners-footer .footer-cartouche-frame {
    width: 90%;
    max-width: 90%;
    min-width: 0;
    min-height: 12vh;
    height: 12vh;
}

.winners-footer .footer-cartouche-frame__core {
    height: 100%;
}

.winners-footer .cartouche-logo {
    height: 7vh;
    max-height: 99px;
}

/* Logos dans la cartouche Wall — hauteur proportionnelle (~7% viewport @ 1080p ≈ 76px) */
.wall-footer .cartouche-logo {
    height: 7vh;
    max-height: 99px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.wall-footer .cartouche-logo:hover {
    transform: scale(1.05);
}

/* Wall — mobile / tablette : footer simplifié (logos seuls, sans cadre électrique) */
@media (max-width: 768px) {
    .wall-footer .footer-cartouche-frame {
        width: auto !important;
        max-width: none !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 0 !important;
        background: none !important;
        border-radius: 0 !important;
    }

    .wall-footer .footer-cartouche-frame__ambient,
    .wall-footer .footer-cartouche-frame__overlay,
    .wall-footer .footer-cartouche-frame__glow {
        display: none !important;
    }

    .wall-footer .footer-cartouche-frame__offset-border {
        border: none !important;
        padding: 0 !important;
    }

    .wall-footer .footer-cartouche-frame__core {
        height: auto !important;
        min-height: 0 !important;
    }

    .wall-footer .footer-cartouche {
        background: transparent !important;
        border: none !important;
        margin: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
}

/* Partner — mobile : même simplification que Wall (pas de halos / double trait) */
@media (max-width: 768px) {
    .partner-page .partner-footer .footer-cartouche-frame {
        padding: 0 !important;
        background: none !important;
        border-radius: 0 !important;
    }

    .partner-page .partner-footer .footer-cartouche-frame__ambient,
    .partner-page .partner-footer .footer-cartouche-frame__overlay,
    .partner-page .partner-footer .footer-cartouche-frame__glow {
        display: none !important;
    }

    .partner-page .partner-footer .footer-cartouche-frame__offset-border {
        border: none !important;
        padding: 0 !important;
    }

    .partner-page .partner-footer .footer-cartouche {
        margin: 0 !important;
        border: none !important;
    }
}

/* Cartouche intérieure — base portails (partner / solutions / pitch) ; projection affinée sous .wall-footer / .winners-footer (slice 241) */
.footer-cartouche {
    width: 100%;
    height: 90px;
    background: rgba(0, 0, 0, 0.88);
    border-radius: var(--fc-electric-radius, 16px);
    border: 2px solid var(--fc-electric-accent, #9b7ec8);
    margin-top: -2px;
    margin-left: -2px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    padding: 0 2.6rem;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    overflow: hidden;
}

/* Slice 241a: seul descendant direct = .cartouche-success-container (toujours) — centrage inchangé via justify-content du bloc .footer-cartouche */

.cartouche-logo-ccq {
    flex-shrink: 0;
}

/* Conteneur tableau — base portails (Slice 241a: toujours présent, remplit la cartouche horizontalement) */
.cartouche-success-container {
    flex: 0 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: relative;
    z-index: 2;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Tableau — base portails ; largeur fixe / colonnes égales uniquement en projection (slice 241) */
.cartouche-table {
    border-collapse: collapse;
    margin: 0;
    border: none;
}

.cartouche-table td,
.cartouche-table th {
    border: none;
    box-sizing: border-box;
}

.cartouche-row-labels {
    vertical-align: bottom;
}

.cartouche-cell-label {
    height: 1.75em;
    padding: 0.15rem 0.75rem 0.2rem;
    font-size: clamp(0.58rem, 1.4vh, 0.7rem);
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    border: none;
    vertical-align: bottom;
}

/* Slice 244: grouped semi-final partners — one label spanning consecutive demi-finale columns */
.cartouche-cell-label--demi-group {
    background: rgba(var(--fc-violet-base), 0.2);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 0.2rem 0.5rem 0.25rem;
    box-sizing: border-box;
}

.cartouche-cell-logo {
    padding: 0.2rem 0.75rem 0.5rem;
    text-align: center;
    vertical-align: middle;
    border: none;
}

/* Texte catégorie (fallback / autres contextes) */
.cartouche-text {
    font-size: 0.8rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}


/* Logos dans la cartouche */
.cartouche-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.cartouche-logo:hover {
    transform: scale(1.05);
}
