/**
 * CartoSoins — Homepage styles
 *
 * Adjust the CSS variables below to match your brand. All other rules
 * derive from these tokens — change the accent and you change the site.
 */

:root {
    --cso-color-text:           #1a1a1a;
    --cso-color-text-secondary: #5a5a5a;
    --cso-color-text-muted:     #8a8a8a;
    --cso-color-border:         rgba(0, 0, 0, 0.08);
    --cso-color-border-strong:  rgba(0, 0, 0, 0.16);
    --cso-color-surface:        #ffffff;
    --cso-color-surface-alt:    #f5f3ee;
    --cso-color-accent:         #121234;
    --cso-color-accent-soft:    #e3e3ec;
    --cso-color-accent-dark:    #0a0a24;

    --cso-radius-sm: 6px;
    --cso-radius-md: 10px;
    --cso-radius-lg: 14px;

    --cso-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Containers — keep sections aligned, but let Divi rows wrap them too */
.cso-how,
.cso-stats-section,
.cso-procta,
.cso-map-preview:not(.cso-map-preview--in-hero) {
    box-sizing: border-box;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================================================
 * HERO — DARK navy with full background image
 * =================================================================== */
.cso-hero--dark {
   position: relative;
    min-height: 91vh;
    padding: 2%;
    display: flex;
    overflow: hidden;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
    color: #ffffff;
    justify-content: center;
    align-items: stretch;
}

.cso-hero__inner {
    position: relative;
    z-index: 1;
    min-height: 100%;
    width: 90vw;
    max-width: 900px;
    margin: 0 auto;
    display: flex;

}
.cso-hero__content {
    min-width: 0;
    text-align: center;
        display: flex;
    flex-direction: column;
    justify-content: space-around;

}
.cso-hero__logos {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}
.cso-hero__logos-container{    
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    padding: 1%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(14px);
}

.cso-hero__partner-logo {
    display: block;
    max-width: 150px;
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.25s var(--cso-ease), transform 0.25s var(--cso-ease);
}
.cso-hero__partner-logo--svg {
    line-height: 0;
}
.cso-hero__partner-logo--svg svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}
.cso-hero__partner-logo:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Logo */
.cso-hero__logo {
    display: block;
    width: auto;
    max-width: 420px;
    height: auto;
    margin: 0 auto 28px;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.3));
    animation: cso-fade-up 0.9s var(--cso-ease) 0.05s both;
}

/* Sequenced entrance */
.cso-hero--dark .cso-hero__eyebrow,
.cso-hero--dark .cso-hero__title,
.cso-hero--dark .cso-hero__quote,
.cso-hero--dark .cso-hero__subtitle,
.cso-hero--dark .cso-hero__panel {
    opacity: 0;
    animation: cso-fade-up 0.9s var(--cso-ease) forwards;
}
.cso-hero--dark .cso-hero__eyebrow         { animation-delay: 0.05s; }
.cso-hero--dark .cso-hero__title           { animation-delay: 0.18s; }
.cso-hero--dark .cso-hero__quote           { animation-delay: 0.18s; }
.cso-hero--dark .cso-hero__subtitle        { animation-delay: 0.32s; }
.cso-hero--dark .cso-hero__panel           { animation-delay: 0.5s; }

@keyframes cso-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hero text on dark bg */
.cso-hero--dark .cso-hero__eyebrow {
    display: inline-block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1.2px;
    margin: 0 0 18px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}
.cso-hero--dark .cso-hero__title {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    color: #ffffff;
}
.cso-hero--dark .cso-hero__quote {
    font-size: clamp(15px, 1.5vw, 18px);
    font-style: italic;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    line-height: 1.45;
}
.cso-hero--dark .cso-hero__subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
    margin: 0 0 28px;
}

/* ===================================================================
 * HERO PANEL — translucent white card holding everything
 * =================================================================== */
.cso-hero__panel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--cso-radius-lg);
    padding: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===================================================================
 * SEARCH BLOCK — categories bar then form, separated
 * =================================================================== */
.cso-hero__search-block {
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cso-hero__categories {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: var(--cso-radius-md);
}

/* Search form */
.cso-search {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: var(--cso-color-surface);
    border: 0;
    border-radius: var(--cso-radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    margin: 0;
    transition: box-shadow 0.3s var(--cso-ease), transform 0.3s var(--cso-ease);
}
.cso-search:focus-within {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
}

.cso-search__input {
    flex: 1;
    height: 48px;
    border: 0;
    background: transparent;
    padding: 0 14px;
    padding-left: 10px!important;
    border-radius: 7px;
    font-size: 15px;
    color: var(--cso-color-text);
    outline: none;
    min-width: 0;
}
.cso-search__input--profession { flex: 2; }
.cso-search__input--lieu       { flex: 1.5; }
.cso-search__input::placeholder { color: var(--cso-color-text-muted); }

.cso-search__divider {
    width: 1px;
    height: 24px;
    background: var(--cso-color-border);
    flex-shrink: 0;
}

.cso-search__submit {
    height: 48px;
    padding: 0 24px;
    background: var(--cso-color-accent);
    color: var(--cso-color-surface);
    border: 0;
    border-radius: var(--cso-radius-sm);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s var(--cso-ease), transform 0.2s var(--cso-ease), box-shadow 0.2s var(--cso-ease);
}
.cso-search__submit:hover {
    background: var(--cso-color-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.cso-search__submit:active { transform: translateY(0); }

/* ===================================================================
 * SUGGESTED CHIPS — on dark hero background
 * =================================================================== */
.cso-suggested {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 4px;
}
.cso-suggested__label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}
.cso-chip {
    font-size: 13px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.18s var(--cso-ease), border-color 0.18s var(--cso-ease), transform 0.18s var(--cso-ease);
}
.cso-chip:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--cso-color-accent);
    border-color: #ffffff;
    transform: translateY(-1px);
}

/* ===================================================================
 * SCROLL REVEAL — opt-in via [data-cso-reveal]
 * =================================================================== */
[data-cso-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--cso-ease), transform 0.9s var(--cso-ease);
    will-change: opacity, transform;
}
[data-cso-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}
[data-cso-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--cso-ease), transform 0.7s var(--cso-ease);
}
[data-cso-reveal-stagger].is-visible > * {
    opacity: 1;
    transform: translateY(0);
}
[data-cso-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0.05s; }
[data-cso-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 0.18s; }
[data-cso-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 0.31s; }
[data-cso-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 0.44s; }

/* ===================================================================
 * MAP PREVIEW — base styles (used standalone AND inside hero)
 * =================================================================== */
.cso-map-preview {
    display: block;
    position: relative;
    height: 420px;
    border: 1px solid var(--cso-color-border);
    border-radius: var(--cso-radius-lg);
    background: var(--cso-color-surface-alt);
    overflow: hidden;
    text-decoration: none;
    margin-top: 32px;
    margin-bottom: 32px;
    box-shadow: 0 20px 60px rgba(18, 18, 52, 0.08);
    transition: box-shadow 0.4s var(--cso-ease), transform 0.4s var(--cso-ease);
}
.cso-map-preview:not(.cso-map-preview--in-hero):hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(18, 18, 52, 0.18);
}

/* Variant: inside hero — smaller, on dark, stronger shadow */
.cso-map-preview--in-hero {
    height: 240px;
    margin: 0;
    max-width: 100%;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.cso-map-preview--in-hero:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.cso-map-preview__link {
    position: absolute;
    inset: 0;
    display: block;
    text-decoration: none;
}
.cso-map-preview__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: transform 0.5s var(--cso-ease);
}
.cso-map-preview:not(.cso-map-preview--in-hero):hover .cso-map-preview__canvas {
    transform: scale(1.03);
}
.cso-map-preview__canvas:focus { outline: none; }
.cso-map-preview__canvas .leaflet-control-attribution { display: none; }
.cso-map-preview__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}
.cso-map-preview__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--cso-ease);
}
.cso-map-preview:not(.cso-map-preview--in-hero):hover .cso-map-preview__image {
    transform: scale(1.04);
}
.cso-map-preview__pin {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cso-color-accent);
    border: 3px solid var(--cso-color-surface);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.cso-map-preview__pin--alt  { background: #378add; }
.cso-map-preview__pin--warn { background: #ef9f27; }

.cso-map-preview__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    background: var(--cso-color-surface);
    border: 1px solid var(--cso-color-border);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--cso-color-text-secondary);
    z-index: 401;
}
.cso-map-preview__cta {
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 9px 14px;
    background: var(--cso-color-surface);
    border: 1px solid var(--cso-color-border-strong);
    border-radius: var(--cso-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--cso-color-text);
    text-decoration: none;
    z-index: 401;
    transition: background 0.2s var(--cso-ease), border-color 0.2s var(--cso-ease), color 0.2s var(--cso-ease), transform 0.2s var(--cso-ease);
}
.cso-map-preview__cta:hover {
    background: var(--cso-color-accent);
    border-color: var(--cso-color-accent);
    color: var(--cso-color-surface);
    transform: translateY(-1px);
}

/* ===================================================================
 * STATS SECTION — bold filled cards
 * =================================================================== */
.cso-stats-section {
    padding: 0px;
    text-align: center;
}
.cso-stats-section__title {
    font-size: clamp(24px, .6vw, 46px);
    font-weight: 700;
    margin: 0 0 48px;
    color: var(--cso-color-accent);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.cso-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding: 0;
    margin: 0;
}
.cso-stat {
    padding: 44px 16px;
    background: linear-gradient(160deg, var(--cso-color-accent) 0%, var(--cso-color-accent-dark) 100%);
    border: 1px solid var(--cso-color-accent);
    border-radius: var(--cso-radius-lg);
    text-align: center;
    transition: transform 0.25s var(--cso-ease), box-shadow 0.25s var(--cso-ease);
    box-shadow: 0 10px 30px rgba(18, 18, 52, 0.18);
    position: relative;
    overflow: hidden;
}
.cso-stat::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 60%);
    pointer-events: none;
}
.cso-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(18, 18, 52, 0.32);
}
.cso-stat__value {
    font-size: clamp(40px, 5vw, 60px);
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    position: relative;
}
.cso-stat__label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin: 16px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    position: relative;
}

/* ===================================================================
 * HOW IT WORKS — colored numbered cards
 * =================================================================== */
/* .cso-how {
    padding: 72px 24px 96px;
} */
.cso-eyebrow {
    font-size: 13px;
    color: #ffffff;
    letter-spacing: 1.4px;
    margin: 0 0 12px;
    text-transform: uppercase;
    font-weight: 700;
}
.cso-section-title {
    font-size: clamp(34px, 4.6vw, 56px);
    font-weight: 700;
    margin: 0 0 48px;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.cso-how__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.cso-how__step {
    padding: 36px 28px;
    background: #ffffff;
    border: 1px solid var(--cso-color-border);
    border-radius: var(--cso-radius-lg);
    transition: transform 0.25s var(--cso-ease), box-shadow 0.25s var(--cso-ease), border-color 0.25s var(--cso-ease);
    box-shadow: 0 10px 30px rgba(18, 18, 52, 0.06);
    text-align: left;
    position: relative;
    overflow: hidden;
}
.cso-how__step:hover {
    transform: translateY(-4px);
    border-color: var(--cso-color-accent);
    box-shadow: 0 18px 44px rgba(18, 18, 52, 0.14);
}
.cso-how__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cso-color-accent-soft);
    border: 1px solid var(--cso-color-accent-soft);
    font-size: 14px;
    color: var(--cso-color-accent);
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.cso-how__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--cso-color-accent);
    letter-spacing: -0.01em;
}
.cso-how__desc {
    font-size: 14px;
    color: var(--cso-color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===================================================================
 * PRO CTA — navy w/ white button (matches mockup)
 * =================================================================== */
.cso-procta {
    padding: 36px 32px;
    background: linear-gradient(135deg, var(--cso-color-accent) 0%, var(--cso-color-accent-dark) 100%);
    border-radius: var(--cso-radius-lg);
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 72px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(18, 18, 52, 0.18);
}
.cso-procta::before {
    content: "";
    position: absolute;
    top: -60%;
    right: -20%;
    width: 60%;
    height: 220%;
    background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 60%);
    pointer-events: none;
}
.cso-procta__text {
    flex: 1;
    min-width: 240px;
    position: relative;
}
.cso-procta__eyebrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1.2px;
    margin: 0 0 6px;
    text-transform: uppercase;
    font-weight: 600;
}
.cso-procta__title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #ffffff;
    letter-spacing: -0.01em;
}
.cso-procta__desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.6;
}
.cso-procta__btn {
    position: relative;
    padding: 14px 26px;
    background: #ffffff;
    color: var(--cso-color-accent);
    border-radius: var(--cso-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s var(--cso-ease), transform 0.2s var(--cso-ease), box-shadow 0.2s var(--cso-ease);
}
.cso-procta__btn::after {
    content: "→";
    display: inline-block;
    transition: transform 0.25s var(--cso-ease);
}
.cso-procta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}
.cso-procta__btn:hover::after {
    transform: translateX(4px);
}

/* ===================================================================
 * RESPONSIVE
 * =================================================================== */
@media (max-width: 1024px) {
    .cso-hero--dark {
        background-position: 75% center;
    }
    .cso-hero__partner-logo { max-width: 140px; }
}

@media (max-width: 768px) {
    .cso-hero--dark {
        min-height: auto;
        padding: 48px 20px 64px;
        background-position: center;
    }
    .cso-hero__logo { max-width: 240px; }

    .cso-search {
        flex-direction: column;
        padding: 8px;
    }
    .cso-search__input  { width: 100%; height: 48px; }
    .cso-search__divider{ display: none; }
    .cso-search__submit { width: 100%; height: 48px; }

    .cso-how__grid { grid-template-columns: 1fr; }
    .cso-stats     { grid-template-columns: repeat(2, 1fr); }

    .cso-procta { flex-direction: column; align-items: flex-start; padding: 28px 24px; }

    .cso-map-preview { height: 260px; }
    .cso-map-preview--in-hero { height: 200px; }
}

/* ===================================================================
 * REDUCED MOTION
 * =================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    [data-cso-reveal],
    [data-cso-reveal-stagger] > * {
        opacity: 1 !important;
        transform: none !important;
    }
    .cso-hero--dark .cso-hero__eyebrow,
    .cso-hero--dark .cso-hero__title,
    .cso-hero--dark .cso-hero__quote,
    .cso-hero--dark .cso-hero__subtitle,
    .cso-hero--dark .cso-hero__panel,
    .cso-hero__logo {
        opacity: 1 !important;
    }
}
