/**
 * Style « sportif » du site public : grands titres,
 * sections coupées en biais, boutons et cartes numérotées.
 * Couleurs : violet #B544D6, violet foncé #2C1555, lilas #E2B6F3.
 * Le cyan n'est plus utilisé qu'adouci (#A6E9EF), en petite touche.
 */

:root {
    --sw-purple: #B544D6;
    --sw-dark: #2C1555;
    --sw-darker: #1a0c33;
    --sw-cyan-soft: #A6E9EF;
    --sw-lilac: #E2B6F3;
}

/* Titres : 3 niveaux, à utiliser partout
 *   titre de page (h1)    .sw-title.sw-title--xl
 *   titre de section (h2) .sw-title
 *   titre de bloc (h3)    .sw-subtitle
 */
.sw-title {
    font-family: 'Changa One', sans-serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 4.8vw, 4rem) !important;
    line-height: 0.92 !important;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin-top: 0 !important;
    margin-bottom: 1.75rem !important;
}

.sw-title--xl {
    font-size: clamp(2.6rem, 6vw, 5.5rem) !important;
}

/* Titre de bloc (cartes, colonnes) */
.sw-subtitle {
    font-family: 'Changa One', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem) !important;
    line-height: 1.15 !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

.sw-title .sw-accent {
    color: var(--sw-purple);
}

.sw-dark .sw-title .sw-accent,
.sw-on-photo .sw-accent {
    color: var(--sw-lilac);
}

.sw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sw-purple);
    margin: 0 0 1rem !important;
}

.sw-eyebrow::before {
    content: '';
    width: 2.5rem;
    height: 3px;
    border-radius: 3px;
    background: currentColor;
}

.sw-dark .sw-eyebrow,
.sw-on-photo .sw-eyebrow {
    color: var(--sw-lilac);
}

/* Sections */
.sw-dark {
    background-color: var(--sw-dark);
    color: #ffffff;
}

.sw-darker {
    background-color: var(--sw-darker);
    color: #ffffff;
}

.sw-slant {
    clip-path: polygon(0 3.5vw, 100% 0, 100% calc(100% - 3.5vw), 0 100%);
    padding-top: calc(4rem + 3.5vw) !important;
    padding-bottom: calc(4rem + 3.5vw) !important;
}

.sw-slant-bottom {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3.5vw), 0 100%);
}

/* Boutons */
.sw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: fit-content;
    padding: 0.9rem 1.75rem;
    border-radius: 999px;
    border: 2px solid transparent;
    background: var(--sw-purple);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
    box-shadow: 5px 5px 0 var(--sw-dark);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.sw-btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--sw-dark);
}

.sw-btn--dark {
    background: var(--sw-dark);
    box-shadow: 5px 5px 0 var(--sw-purple);
}

.sw-btn--dark:hover {
    box-shadow: 8px 8px 0 var(--sw-purple);
}

.sw-btn--ghost {
    background: transparent;
    border-color: currentColor;
    color: inherit !important;
    box-shadow: none;
}

.sw-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.sw-btn--muted {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: none;
    cursor: default;
}

.sw-btn--muted:hover {
    transform: none;
}

.sw-btn .sw-arrow {
    transition: transform 0.25s ease;
}

.sw-btn:hover .sw-arrow {
    transform: translateX(4px);
}

/* Cartes */
.sw-card {
    position: relative;
    box-sizing: border-box;
    border-radius: 1.75rem;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sw-card--glass {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 3px solid rgba(226, 182, 243, 0.6);
}

.sw-card--glass:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.1);
}

.sw-card--lift {
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.sw-card--lift:hover {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 var(--sw-purple);
}

.sw-num {
    display: block;
    font-family: 'Changa One', sans-serif;
    font-size: 4.5rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--sw-purple);
}

.sw-dark .sw-num {
    -webkit-text-stroke-color: rgba(226, 182, 243, 0.7);
}

/* Photo avec bloc de couleur décalé derrière */
.sw-photo {
    position: relative;
    isolation: isolate;
}

.sw-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 1.75rem;
    background: var(--sw-purple);
    transform: translate(18px, 18px) rotate(2deg);
}

.sw-photo--cyan::before {
    background: var(--sw-cyan-soft);
    transform: translate(-18px, 18px) rotate(-2deg);
}

.sw-photo img {
    border-radius: 1.75rem;
}

/* Listes avec flèches */
.sw-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sw-list li {
    display: flex;
    gap: 0.75rem;
    padding: 0.4rem 0;
}

.sw-list li::before {
    content: '→';
    font-weight: 700;
    color: var(--sw-lilac);
}

.sw-list--purple li::before {
    color: var(--sw-purple);
}

/* Lien souligné animé */
.sw-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.sw-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.sw-link:hover::after {
    width: 100%;
}

/* Étiquette */
.sw-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: #F1E4F8;
    color: var(--sw-purple);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Bandeau de page (pages intérieures) */
.sw-page-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 60vh;
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.sw-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(20deg, rgba(26, 12, 51, 0.92) 10%, rgba(44, 21, 85, 0.55) 50%, rgba(181, 68, 214, 0.25) 100%);
}

.sw-page-hero > * {
    position: relative;
}

/* Icônes noires (PNG) sur fond foncé */
.sw-icon-light {
    filter: invert(1);
}

/* Le thème parent colore les liens : forcer les couleurs voulues */
.sw-link--purple { color: var(--sw-purple) !important; }
.sw-link--white { color: #ffffff !important; }

/* Texte saisi dans l'admin (paragraphes, listes) : hérite de la couleur du bloc */
.sw-rich * { color: inherit !important; }

/* Extrait d'article replié (accueil) */
.sw-extrait.is-replie {
    max-height: var(--hauteur, 7.5rem);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3.5rem), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 3.5rem), transparent);
}

.sw-extrait > :first-child { margin-top: 0; }

/* Sur fond foncé ou photo, l'ombre des boutons reste discrète */
.sw-dark .sw-btn:not(.sw-btn--ghost):not(.sw-btn--muted),
.sw-on-photo .sw-btn:not(.sw-btn--ghost):not(.sw-btn--muted) {
    box-shadow: 5px 5px 0 rgba(10, 4, 25, 0.45);
}

.sw-dark .sw-btn:not(.sw-btn--ghost):not(.sw-btn--muted):hover,
.sw-on-photo .sw-btn:not(.sw-btn--ghost):not(.sw-btn--muted):hover {
    box-shadow: 8px 8px 0 rgba(10, 4, 25, 0.45);
}

/* Bloc blanc posé sur une photo : les boutons retrouvent leur ombre normale */
.sw-on-photo .sw-light .sw-btn:not(.sw-btn--ghost):not(.sw-btn--muted) {
    box-shadow: 5px 5px 0 var(--sw-dark);
}

.sw-on-photo .sw-light .sw-btn:not(.sw-btn--ghost):not(.sw-btn--muted):hover {
    box-shadow: 8px 8px 0 var(--sw-dark);
}
