/* ==========================================================
   SC PLATFORM — BASE APPLICATION
   Ne contient aucune identité client.
   Les couleurs sont fournies par le thème actif.
   ========================================================== */


/* ==========================================================
   FALLBACKS DE PLATEFORME
   Utilisés uniquement si un thème ne définit pas une valeur.
   ========================================================== */

:root {
    --app-background: #F5F5F5;
    --app-surface: #FFFFFF;
	--app-surface-soft: #F2F3F3;

    --app-primary: #4F6268;
    --app-accent: #D0D0D0;

    --app-text: #242424;
    --app-text-soft: #6B6B6B;

    --app-action: var(--app-accent);
    --app-action-text: var(--app-text);

    --app-active: var(--app-accent);
    --app-active-text: var(--app-text);

    --app-border: rgba(0, 0, 0, 0.10);
    --app-focus-ring: rgba(0, 0, 0, 0.18);

    --app-shadow-soft:
        0 4px 18px rgba(0, 0, 0, 0.08);

    --app-shadow-card:
        0 8px 28px rgba(0, 0, 0, 0.10);

    --app-font-family:
        "Montserrat",
        Arial,
        sans-serif;

    --app-font-regular: 400;
    --app-font-medium: 500;
    --app-font-semibold: 600;
    --app-font-bold: 700;
    --app-font-extrabold: 800;

    --app-radius-sm: 14px;
    --app-radius-md: 20px;
    --app-radius-lg: 24px;
    --app-radius-pill: 999px;

    /* Structure commune */
    --app-space-1: 4px;
    --app-space-2: 8px;
    --app-space-3: 12px;
    --app-space-4: 16px;
    --app-space-5: 20px;
    --app-space-6: 24px;
    --app-space-7: 32px;
    --app-space-8: 40px;

    --app-content-max: 1180px;
}


/* ==========================================================
   RESET
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;

    background: var(--app-background);
    color: var(--app-text);

    font-family: var(--app-font-family);

    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;

    min-width: 320px;
    min-height: 100vh;

    background: var(--app-background);
    color: var(--app-text);

    font-family: var(--app-font-family);
    font-weight: var(--app-font-regular);
}

img {
    display: block;
    max-width: 100%;
}

button,
a,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: 0;
}

p,
h1,
h2,
h3 {
    margin-top: 0;
}


/* ==========================================================
   APP SHELL
   ========================================================== */

.sc-app {
    padding-bottom: 104px;
}

.sc-app-shell {
    width: 100%;
    min-height: 100vh;

    background: var(--app-background);
}


/* ==========================================================
   HEADER
   ========================================================== */

.sc-home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: var(--app-space-4);

    width: 100%;

    padding:
        calc(18px + env(safe-area-inset-top))
        18px
        18px;

    background: var(--app-background);
}


/* Branding */

.sc-home-header__brand {
    display: flex;
    align-items: center;

    min-width: 0;
}

.sc-home-header__brand-text {
    color: var(--app-primary);

    font-size: clamp(20px, 5vw, 28px);
    line-height: 1.05;

    font-weight: var(--app-font-bold);
}

.sc-home-header__logo {
    width: 180px;
    max-width: 52vw;
    height: auto;
}


/* Origine */

.sc-home-header__origin {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 10px 14px;

    border-radius: var(--app-radius-pill);

    background: var(--app-action);
    color: var(--app-action-text);

    font-size: 12px;
    font-weight: var(--app-font-bold);

    white-space: nowrap;
}

/* ==========================================================
   HEADER — INSTANCE HÉBERGEUR
   ========================================================== */

.sc-home-header--property {
    justify-content: center;
    text-align: center;
}

.sc-home-header--property .sc-home-header__brand {
    justify-content: center;
    width: 100%;
}

.sc-home-header--property .sc-home-header__brand-text {
    text-align: center;
}

.sc-home-header__origin[hidden] {
    display: none;
}

/* ==========================================================
   MAIN
   ========================================================== */

.sc-home {
    width: min(
        calc(100% - 28px),
        var(--app-content-max)
    );

    margin: 0 auto;

    padding: 18px 0 28px;
}

/* ==========================================================
   VISIBILITÉ HOME
   ========================================================== */

.sc-home[hidden] {
    display: none;
}

/* ==========================================================
   SECTIONS
   ========================================================== */

.sc-section {
    margin-top: 30px;
}

.sc-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: var(--app-space-4);

    margin-bottom: 14px;
}

.sc-section__eyebrow {
    margin-bottom: 6px;

    color: var(--app-primary);

    font-size: 11px;
    line-height: 1.2;

    font-weight: var(--app-font-bold);

    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.sc-section__title {
    margin-bottom: 0;

    color: var(--app-text);

    font-size: clamp(22px, 5.5vw, 32px);
    line-height: 1.08;

    font-weight: var(--app-font-bold);
}


/* ==========================================================
   SIGNATURE PLATEFORME
   ========================================================== */

.sc-powered-by {
    margin: 34px 0 8px;

    text-align: center;

    color: var(--app-text-soft);

    font-size: 10px;
    line-height: 1.4;

    font-weight: var(--app-font-medium);
}

.sc-powered-by[hidden] {
    display: none;
}

/* ==========================================================
   VUES INTERNES
   ========================================================== */

.sc-view {
    width: min(
        calc(100% - 28px),
        var(--app-content-max)
    );

    min-height: calc(100vh - 180px);

    margin: 0 auto;

    padding:
        28px
        0
        120px;
}

.sc-view[hidden] {
    display: none;
}


/* ==========================================================
   HEADER DE VUE
   ========================================================== */

.sc-view__header {
    max-width: 720px;

    margin:
        0
        auto
        30px;

    text-align: center;
}

.sc-view__eyebrow {
    margin:
        0
        0
        8px;

    color: var(--app-primary);

    font-size: 10px;
    line-height: 1.2;

    font-weight: var(--app-font-bold);

    letter-spacing: .15em;
    text-transform: uppercase;
}

.sc-view__title {
    margin:
        0
        0
        12px;

    color: var(--app-text);

    font-size: clamp(
        32px,
        8vw,
        52px
    );

    line-height: 1;

    font-weight: var(--app-font-bold);
}

.sc-view__intro {
    max-width: 560px;

    margin: 0 auto;

    color: var(--app-text-soft);

    font-size: 14px;
    line-height: 1.55;
}


/* ==========================================================
   CONTENU DE VUE
   ========================================================== */

.sc-view__content {
    min-height: 240px;

    padding: 24px;

    border-radius: var(--app-radius-lg);

    background: var(--app-surface);

    box-shadow: var(--app-shadow-card);
}


/* ==========================================================
   PLACEHOLDER DE DÉVELOPPEMENT
   ========================================================== */

.sc-view-placeholder {
    display: grid;

    place-items: center;

    min-height: 190px;

    padding: 24px;

    text-align: center;
}

.sc-view-placeholder__text {
    max-width: 440px;

    margin: 0;

    color: var(--app-text-soft);

    font-size: 13px;
    line-height: 1.55;
}


@media (min-width: 768px) {

    .sc-view {
        width: min(
            calc(100% - 48px),
            var(--app-content-max)
        );

        padding-top: 42px;
    }
}



/* ==========================================================
   SITES — STRUCTURE
   ========================================================== */

.sc-sites-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 18px;
}

.sc-sites-toolbar__count {
    margin: 0;

    color: var(--app-text);

    font-size: 14px;
    line-height: 1.3;

    font-weight: var(--app-font-bold);
}

.sc-sites-toolbar__filters {
    min-height: 38px;

    padding:
        8px
        14px;

    border:
        1px solid
        var(--app-border);

    border-radius: 999px;

    background:
        var(--app-surface);

    color:
        var(--app-text);

    font: inherit;

    font-size: 12px;

    cursor: pointer;
}


/* ==========================================================
   SITES — SEGMENTED SWIPE
   ========================================================== */

.sc-sites-segmented {
    position: relative;

    display: flex;

    align-items: stretch;
	
	justify-content: center;

    width: 100%;

    min-height: 48px;

    margin-bottom: 22px;

    padding: 4px;

    overflow: hidden;

    border:
        1px solid
        var(--app-border);

    border-radius:
        var(--app-radius-pill);

    background:
        var(--app-surface);

    box-shadow:
        var(--app-shadow-soft);

    /*
     * CRUCIAL :
     * le navigateur ne fait plus glisser
     * le contenu de la capsule.
     *
     * C'est notre indicateur qui suit
     * directement le doigt.
     */
    touch-action: none;

    user-select: none;
    -webkit-user-select: none;
}


/* ==========================================================
   INDICATEUR
   ========================================================== */

.sc-sites-segmented__indicator {
    position: absolute;

    z-index: 0;

    top: 4px;
    left: 0;

    height:
        calc(100% - 8px);

    border-radius:
        var(--app-radius-pill);

    /*
     * Accent de l'instance.
     * Manouel = terracotta.
     */
    background:
        var(
            --app-accent,
            var(--app-active)
        );

    box-shadow:
        0 3px 10px
        rgba(46, 58, 63, .10);

    pointer-events: none;

    will-change:
        transform,
        width;
}


/* ==========================================================
   SEGMENTS
   ========================================================== */

.sc-sites-segmented__button {
    position: relative;
    z-index: 1;

    /*
     * Largeur réellement déterminée
     * par le contenu + padding.
     */
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 0;
    min-height: 40px;
    height: 40px;

    padding: 7px 12px;

    border: 0;
    border-radius: var(--app-radius-pill);

    background: transparent;

    color: var(--app-text);

    font: inherit;
    font-size: 10px;
    line-height: 1;
    font-weight: var(--app-font-semibold);

    text-align: center;
    white-space: nowrap;

    cursor: pointer;

    transition: color .15s ease;
}

/* ==========================================================
   SEGMENT ACTIF
   ========================================================== */

.sc-sites-segmented__button.is-active {
    background: transparent;

    color:
        var(--app-active-text);
}


/* ==========================================================
   ACCESSIBILITÉ
   ========================================================== */

.sc-sites-segmented__button:focus-visible {
    outline:
        2px solid
        var(--app-focus-ring);

    outline-offset: -2px;
}

/* ==========================================================
   SITES — RÉSULTATS
   ========================================================== */

.sc-sites-empty {
    display: grid;

    place-items: center;

    min-height: 220px;

    padding: 28px;

    border-radius:
        var(--app-radius-lg);

    background:
        var(--app-surface-soft);

    text-align: center;
}

.sc-sites-empty__text {
    margin: 0;

    color:
        var(--app-text-soft);

    font-size: 13px;
    line-height: 1.5;
}

/* ==========================================================
   CARTE TOURISTIQUE
   ========================================================== */

.sc-tourism-card {
    overflow: hidden;

    border-radius:
        var(--app-radius-lg);

    background:
        var(--app-surface);

    box-shadow:
        var(--app-shadow-card);
}


/* ==========================================================
   MEDIA
   ========================================================== */

.sc-tourism-card__media {
    position: relative;

    aspect-ratio:
        16 / 10;

    overflow: hidden;

    background:
        color-mix(
            in srgb,
            var(--app-primary) 12%,
            var(--app-surface)
        );
}


.sc-tourism-card__image {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


.sc-tourism-card__image-fallback {
    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            145deg,
            color-mix(
                in srgb,
                var(--app-primary) 10%,
                var(--app-surface)
            ),
            color-mix(
                in srgb,
                var(--app-primary) 28%,
                var(--app-surface)
            )
        );
}



/* ==========================================================
   CONTENU
   ========================================================== */

.sc-tourism-card__body {
    padding:
        18px
        18px
        20px;
}


.sc-tourism-card__category {
    margin:
        0
        0
        6px;

    color:
        var(--app-primary);

    font-size: 10px;
    line-height: 1.2;

    font-weight:
        var(--app-font-bold);

    letter-spacing: .12em;

    text-transform: uppercase;
}


.sc-tourism-card__title {
    margin:
        0
        0
        8px;

    color:
        var(--app-text);

    font-size:
        20px;

    line-height:
        1.08;

    font-weight:
        var(--app-font-bold);
}


.sc-tourism-card__meta {
    margin:
        0
        0
        6px;

    color:
        var(--app-text-soft);

    font-size:
        12px;

    line-height:
        1.4;
}


.sc-tourism-card__info {
    margin:
        0
        0
        16px;

    color:
        var(--app-text-soft);

    font-size:
        12px;

    line-height:
        1.45;
}


/* ==========================================================
   CTA
   ========================================================== */

.sc-tourism-card__open {
    min-height: 40px;

    padding:
        9px
        14px;

    border: 0;

    border-radius:
        var(--app-radius-pill);

    background:
        var(--app-action);

    color:
        var(--app-action-text);

    font:
        inherit;

    font-size:
        11px;

    font-weight:
        var(--app-font-bold);

    cursor: pointer;
}


/* ==========================================================
   LISTE
   ========================================================== */

.sc-sites-results {
    display: grid;

    gap: 18px;
}


@media (min-width: 768px) {

    .sc-sites-results {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


@media (min-width: 1200px) {

    .sc-sites-results {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }
}

/* ==========================================================
   TABLETTE
   ========================================================== */

@media (min-width: 768px) {

    .sc-app {
        padding-bottom: 110px;
    }

    .sc-home-header {
        padding:
            calc(22px + env(safe-area-inset-top))
            32px
            22px;
    }

    .sc-home-header__logo {
        width: 220px;
    }

    .sc-home {
        width: min(
            calc(100% - 48px),
            var(--app-content-max)
        );

        padding-top: 24px;
    }

    .sc-section {
        margin-top: 38px;
    }
}


/* ==========================================================
   DESKTOP
   ========================================================== */

@media (min-width: 1200px) {

    .sc-app {
        padding-bottom: 46px;
    }

    .sc-home-header {
        padding-left: max(
            40px,
            calc((100vw - var(--app-content-max)) / 2)
        );

        padding-right: max(
            40px,
            calc((100vw - var(--app-content-max)) / 2)
        );
    }

    .sc-home-header__logo {
        width: 250px;
    }

    .sc-home {
        padding-top: 28px;
    }
}