/**
 * Vista Pulse — Pill nav (header) + footer.
 * Reproduit fidèlement le rendu Tailwind du Symfony /partials/_header.html.twig.
 */

/* =========================================================================
   HEADER — Pill nav flottante
   ========================================================================= */

.vp-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--vp-primary);
    color: #FFFFFF;
    text-decoration: none;
}
.vp-skip-link:focus {
    left: 1rem;
    top: 1rem;
}

.vp-header {
    position: fixed;
    top: 0.75rem;
    left: 0.5rem;
    right: 0.5rem;
    z-index: 50;
    transition: all 0.3s ease;
}

.vp-header__container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;

    /* Liquid Glass : gradient diagonal pour faux reflet de lumière */
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.35) 0%,
            rgba(255, 255, 255, 0.15) 45%,
            rgba(255, 255, 255, 0.25) 100%
        );

    /* Blur + saturate + brightness = effet "lentille polie" qui intensifie le contenu derrière */
    -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(110%);
            backdrop-filter: blur(24px) saturate(190%) brightness(110%);

    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--vp-radius-pill);

    /* Multi-shadow : inset highlight top (lumière virtuelle) + ombres outer pour depth */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 4px 12px -4px rgba(15, 23, 42, 0.08),
        0 16px 48px -16px rgba(15, 23, 42, 0.18);

    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

/* Au scroll : on intensifie SUBTILEMENT (plus de blur, lumière virtuelle plus vive) */
.vp-header.is-scrolled .vp-header__container {
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0.25) 45%,
            rgba(255, 255, 255, 0.35) 100%
        );
    -webkit-backdrop-filter: blur(32px) saturate(200%) brightness(112%);
            backdrop-filter: blur(32px) saturate(200%) brightness(112%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12),
        0 6px 16px -4px rgba(15, 23, 42, 0.1),
        0 20px 56px -16px rgba(15, 23, 42, 0.22);
}

/* Fallback pour navigateurs sans backdrop-filter (rare, vieux Firefox / certaines versions) */
@supports not ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
    .vp-header__container {
        background: rgba(255, 255, 255, 0.85);
    }
}

.vp-header__brand {
    display: flex;
    align-items: center;
    padding-right: 0.5rem;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.vp-header__logo {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem;
    border-radius: var(--vp-radius-pill);
    transition: background-color 0.2s ease;
}
.vp-header__logo:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.vp-header__logo img,
.vp-header__logo svg {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
}

.vp-header__logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--vp-primary) 0%, var(--vp-secondary) 100%);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: -0.02em;
}

.vp-header__nav {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.vp-header__nav::-webkit-scrollbar {
    display: none;
}

.vp-nav-item-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 3.6rem;
}

.vp-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    color: #1F2937;
    text-decoration: none;
    transition: color 0.2s ease;
}
.vp-nav-item:hover {
    color: var(--vp-primary);
}
.vp-nav-item.is-active {
    color: var(--vp-primary);
}
.vp-nav-item svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s ease;
}
.vp-nav-item:hover svg {
    transform: scale(1.1);
}

.vp-nav-item__label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

.vp-header__cta {
    display: flex;
    align-items: center;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.vp-header__cta-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.375rem;
    border-radius: var(--vp-radius-pill);
    background-color: #000000;
    color: #FFFFFF;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.vp-header__cta-link:hover {
    transform: scale(1.05);
}
.vp-header__cta-link svg {
    width: 1rem;
    height: 1rem;
}
.vp-header__cta-link span {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

/* Desktop overrides ─────────────────────────────────────────────────────── */
@media (min-width: 768px) {
    .vp-header {
        top: 1.5rem;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: auto;
    }

    .vp-header__container {
        gap: 2rem;
        padding: 0.75rem 2rem;
        /* Sur desktop, le glass peut être plus subtil (plus transparent) */
        background:
            linear-gradient(
                135deg,
                rgba(255, 255, 255, 0.28) 0%,
                rgba(255, 255, 255, 0.10) 45%,
                rgba(255, 255, 255, 0.20) 100%
            );
        border-color: rgba(255, 255, 255, 0.45);
    }

    .vp-header.is-scrolled .vp-header__container {
        background:
            linear-gradient(
                135deg,
                rgba(255, 255, 255, 0.4) 0%,
                rgba(255, 255, 255, 0.18) 45%,
                rgba(255, 255, 255, 0.28) 100%
            );
        border-color: rgba(255, 255, 255, 0.55);
    }

    .vp-header__brand {
        padding-right: 1rem;
    }
    .vp-header__logo {
        padding: 0.5rem;
    }
    .vp-header__logo img,
    .vp-header__logo svg,
    .vp-header__logo-fallback {
        width: 2rem;
        height: 2rem;
    }

    .vp-header__nav {
        flex: none;
        gap: 2rem;
        overflow: visible;
    }

    .vp-nav-item-wrap {
        min-width: 0;
    }
    .vp-nav-item {
        min-width: 0;
        flex-direction: row;
        width: auto;
    }
    .vp-nav-item svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    .vp-nav-item__label {
        position: absolute;
        bottom: -1.25rem;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.02em;
        white-space: nowrap;
        transition: opacity 0.2s ease;
        pointer-events: none;
    }
    .vp-nav-item-wrap:hover .vp-nav-item__label,
    .vp-nav-item:focus .vp-nav-item__label,
    .vp-nav-item.is-active .vp-nav-item__label {
        opacity: 1;
    }

    /* Sur les items à dropdown, le panneau remplace le label flottant
       — sauf si actif (on garde le label visible). */
    .vp-nav-item-wrap.has-children:hover .vp-nav-item__label,
    .vp-nav-item-wrap.has-children:focus-within .vp-nav-item__label {
        opacity: 0;
    }
    .vp-nav-item-wrap.has-children .vp-nav-item.is-active .vp-nav-item__label {
        opacity: 1;
    }

    .vp-header__cta {
        padding-left: 1rem;
    }
    .vp-header__cta-link {
        flex-direction: row;
        padding: 0.5rem;
    }
    .vp-header__cta-link svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    .vp-header__cta-link span {
        display: none;
    }
}

/* =========================================================================
   DROPDOWNS (sous-menus desktop)
   ========================================================================= */

.vp-nav-dropdown {
    /* Sur mobile : pas de dropdown (la pilule scrolle horizontalement) */
    display: none;
}

@media (min-width: 768px) {

    .vp-nav-dropdown {
        display: block;
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 50%;
        transform: translateX(-50%) translateY(0.5rem);
        min-width: 14rem;
        max-width: 22rem;
        padding: 0.5rem;
        background-color: #FFFFFF;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: var(--vp-radius-md);
        box-shadow: 0 20px 40px -16px rgba(15, 23, 42, 0.25);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
        z-index: 60;
    }

    /* Petite pointe au-dessus du dropdown qui prolonge la zone hover */
    .vp-nav-dropdown::before {
        content: "";
        position: absolute;
        top: -0.75rem;
        left: 0;
        right: 0;
        height: 0.75rem;
    }

    .vp-nav-item-wrap.has-children:hover .vp-nav-dropdown,
    .vp-nav-item-wrap.has-children:focus-within .vp-nav-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
    }

    .vp-nav-dropdown__item {
        display: block;
        padding: 0.625rem 0.875rem;
        border-radius: var(--vp-radius-sm);
        color: var(--vp-text);
        font-size: 0.875rem;
        font-weight: 500;
        text-decoration: none;
        line-height: 1.3;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .vp-nav-dropdown__item:hover,
    .vp-nav-dropdown__item:focus {
        background-color: rgba(0, 168, 232, 0.08);
        color: var(--vp-primary);
        outline: none;
    }
}

/* Pas de body padding-top : la pilule nav est position:fixed, elle flotte
   au-dessus du contenu sans réserver d'espace. Chaque section (hero, etc.)
   gère son propre padding-top pour éviter d'être recouverte. */

/* =========================================================================
   FOOTER
   ========================================================================= */

.vp-footer {
    background-color: #111827;
    color: #FFFFFF;
    padding: 3rem 0 2rem;
    /* Pas de margin-top : les sections au-dessus gèrent leur propre padding bas */
}
@media (min-width: 768px) {
    .vp-footer {
        padding-top: 4rem;
    }
}

.vp-footer__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}
@media (min-width: 640px) {
    .vp-footer__container {
        padding: 0 1.5rem;
    }
}

.vp-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
@media (min-width: 640px) {
    .vp-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .vp-footer__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
}

.vp-footer__brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.vp-footer__brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--vp-primary) 0%, var(--vp-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.875rem;
}

.vp-footer__brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.vp-footer__about {
    color: #9CA3AF;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Social icons row */
.vp-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vp-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    color: #9CA3AF;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.vp-footer__social-link:hover {
    background: var(--vp-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.vp-footer__social-link svg {
    width: 1.05rem;
    height: 1.05rem;
}

.vp-footer__col-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.vp-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.vp-footer__list li + li {
    margin-top: 0.75rem;
}

.vp-footer__link {
    color: #9CA3AF;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}
.vp-footer__link:hover {
    color: var(--vp-primary);
}

.vp-footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #9CA3AF;
    font-size: 0.875rem;
}
.vp-footer__contact-item + .vp-footer__contact-item {
    margin-top: 0.75rem;
}
.vp-footer__contact-item svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--vp-primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.vp-footer__bottom {
    border-top: 1px solid #1F2937;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: center;
}
@media (min-width: 768px) {
    .vp-footer__bottom {
        flex-direction: row;
        text-align: left;
    }
}

.vp-footer__copyright {
    color: #6B7280;
    font-size: 0.875rem;
}

.vp-footer__credit {
    color: #4B5563;
    font-size: 0.75rem;
}
