@import url("/static/css/contact_brand_grid.css");
@import url("/static/css/contact_brand_grid_v2.css");
@import url("/static/css/contact_brand_grid_v3.css");
@import url("/static/css/vision_mission_mobile.css");

/* ==========================================================
   PWA MOBILE V1 — Mutuelle INFAS 15-18
   Couche visuelle mobile chargée après mobile.css.
   ========================================================== */

:root {
    --pwa-green: #0b6b3a;
    --pwa-green-dark: #07522d;
    --pwa-green-soft: #eaf7f0;
    --pwa-gold: #f4bf3a;
    --pwa-ink: #173229;
    --pwa-muted: #66756f;
    --pwa-surface: #ffffff;
    --pwa-bg: #f4f8f6;
    --pwa-border: rgba(11, 107, 58, .12);
    --pwa-shadow: 0 14px 36px rgba(10, 66, 42, .10);
}

.pwa-install-card,
.pwa-install-help {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.pwa-install-card {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 18px;
    background: rgba(7, 82, 45, .96);
    color: #fff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
    backdrop-filter: blur(14px);
}

.pwa-install-card.is-visible {
    display: flex;
}

.pwa-install-card img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    background: #fff;
}

.pwa-install-copy {
    min-width: 0;
    flex: 1;
}

.pwa-install-copy strong,
.pwa-install-copy span {
    display: block;
}

.pwa-install-copy strong {
    font-size: .88rem;
    line-height: 1.15;
}

.pwa-install-copy span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .78);
    font-size: .72rem;
    line-height: 1.25;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pwa-install-button,
.pwa-install-close {
    border: 0;
    cursor: pointer;
}

.pwa-install-button {
    min-height: 40px;
    padding: 0 13px;
    border-radius: 11px;
    background: var(--pwa-gold);
    color: #18382a;
    font-weight: 800;
    font-size: .76rem;
}

.pwa-install-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1rem;
}

.pwa-install-help {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    place-items: end center;
    padding: 18px;
    background: rgba(6, 28, 19, .56);
}

.pwa-install-help.is-visible {
    display: grid;
}

.pwa-install-help-panel {
    width: min(100%, 480px);
    padding: 22px;
    border-radius: 24px;
    background: #fff;
    color: var(--pwa-ink);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.pwa-install-help-panel h2 {
    margin: 0 0 8px;
    font-size: 1.18rem;
}

.pwa-install-help-panel p {
    margin: 0;
    color: var(--pwa-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.pwa-install-help-panel button {
    width: 100%;
    min-height: 46px;
    margin-top: 18px;
    border: 0;
    border-radius: 13px;
    background: var(--pwa-green);
    color: #fff;
    font-weight: 800;
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 72px;
    }

    body.premium-home {
        background: var(--pwa-bg);
        color: var(--pwa-ink);
        -webkit-tap-highlight-color: transparent;
    }

    .premium-home .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        min-height: 64px;
        padding: 8px 14px;
        background: rgba(255, 255, 255, .94);
        border-bottom: 1px solid var(--pwa-border);
        box-shadow: 0 8px 24px rgba(8, 64, 40, .06);
        backdrop-filter: blur(14px);
    }

    .premium-home .brand img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(11, 107, 58, .14);
    }

    .premium-home .brand strong {
        color: var(--pwa-green-dark);
        font-size: .83rem;
        line-height: 1.15;
    }

    .premium-home .brand small {
        color: #718079;
        font-size: .64rem;
    }

    .premium-home .menu-button {
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--pwa-border);
        border-radius: 13px;
        background: var(--pwa-green-soft);
        color: var(--pwa-green-dark);
    }

    .premium-home .main-nav {
        top: 64px;
        padding: 12px 14px calc(18px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .98);
    }

    .premium-home .main-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 11px 13px;
        border-radius: 12px;
        color: var(--pwa-ink);
        font-size: .9rem;
        font-weight: 700;
    }

    .premium-home .main-nav .nav-cta {
        justify-content: center;
        margin: 8px 0 0;
        background: var(--pwa-green);
        color: #fff;
    }

    .premium-home .premium-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 38px 18px 52px;
        text-align: left;
        background:
            radial-gradient(circle at 90% 10%, rgba(244, 191, 58, .22), transparent 31%),
            linear-gradient(145deg, #07522d 0%, #0b6b3a 58%, #14814b 100%);
    }

    .premium-home .premium-hero::before {
        background: linear-gradient(180deg, rgba(0, 0, 0, .02), rgba(0, 0, 0, .14));
    }

    .premium-home .hero-content {
        text-align: left;
    }

    .premium-home .hero-content .eyebrow {
        display: inline-flex;
        padding: 7px 10px;
        border: 1px solid rgba(255, 255, 255, .2);
        border-radius: 999px;
        background: rgba(255, 255, 255, .09);
        color: #fff3c7;
        font-size: .66rem;
        letter-spacing: .08em;
    }

    .premium-home .hero-content h1 {
        max-width: 14ch;
        margin: 16px 0 14px;
        font-size: clamp(2rem, 9.5vw, 2.65rem);
        line-height: 1.03;
        letter-spacing: -.035em;
    }

    .premium-home .hero-lead {
        margin: 0;
        max-width: 34rem;
        font-size: .96rem;
        line-height: 1.58;
        color: rgba(255, 255, 255, .88);
    }

    .premium-home .hero-signature {
        margin-top: 16px;
        color: #ffe19a;
        font-size: .83rem;
        line-height: 1.45;
    }

    .premium-home .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 24px;
    }

    .premium-home .hero-actions .button {
        min-height: 50px;
        width: 100%;
        padding: 13px 18px;
        border-radius: 14px;
        font-size: .9rem;
    }

    .premium-home .hero-actions .button.primary {
        background: var(--pwa-gold);
        color: #193c2c;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
    }

    .premium-home .hero-actions .button.secondary {
        background: rgba(255, 255, 255, .08);
        border-color: rgba(255, 255, 255, .7);
    }

    .premium-home .hero-trust {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-top: 20px;
        text-align: left;
    }

    .premium-home .hero-trust span {
        justify-content: flex-start;
        padding: 4px 0;
        color: rgba(255, 255, 255, .84);
        font-size: .76rem;
    }

    .premium-home .premium-hero-logo {
        display: none;
    }

    .premium-home .section,
    .premium-home .benefits-section,
    .premium-home .vision-section {
        padding: 56px 16px;
    }

    .premium-home .section-heading {
        margin-bottom: 28px;
        text-align: left;
    }

    .premium-home .section-heading h2,
    .premium-home .purpose-grid h2,
    .premium-home .vision-grid h2 {
        font-size: clamp(1.65rem, 7vw, 2rem);
        line-height: 1.08;
        letter-spacing: -.025em;
    }

    .premium-home .section-heading p,
    .premium-home .purpose-grid p,
    .premium-home .vision-grid p {
        font-size: .9rem;
        line-height: 1.6;
    }

    .premium-home .premium-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: -24px;
        padding: 0 14px 28px;
    }

    .premium-home .premium-stats > div {
        min-height: 128px;
        padding: 17px 10px;
        border: 1px solid var(--pwa-border);
        border-radius: 18px;
        box-shadow: var(--pwa-shadow);
    }

    .premium-home .premium-stats strong {
        font-size: 1.65rem;
    }

    .premium-home .premium-stats span {
        font-size: .78rem;
        line-height: 1.22;
    }

    .premium-home .premium-stats small {
        font-size: .68rem;
        line-height: 1.25;
    }

    .premium-home .quick-access-grid,
    .premium-home .feature-grid,
    .premium-home .public-grid,
    .premium-home .contact-grid {
        gap: 12px;
    }

    .premium-home .quick-access-card,
    .premium-home .feature-grid article,
    .premium-home .public-card,
    .premium-home .dashboard-preview,
    .premium-home .contact-grid > div {
        border: 1px solid var(--pwa-border);
        border-radius: 18px;
        box-shadow: 0 10px 28px rgba(10, 66, 42, .07);
    }

    .premium-home .quick-access-card {
        padding: 18px;
    }

    .premium-home .quick-access-card h3 {
        font-size: 1rem;
    }

    .premium-home .quick-access-card p {
        font-size: .82rem;
        line-height: 1.45;
    }

    .premium-home .member-promo-section .dashboard-preview {
        padding: 18px;
    }

    .premium-home .president-card {
        gap: 20px;
        padding: 18px;
        border-radius: 22px;
    }

    .premium-home .president-photo {
        width: 100%;
        max-height: 360px;
        object-fit: cover;
        border-radius: 18px;
    }

    .premium-home .president-card blockquote {
        font-size: .92rem;
        line-height: 1.6;
    }

    .premium-home .final-cta-section {
        padding: 52px 18px;
    }

    .premium-home .final-cta-section h2 {
        font-size: 1.75rem;
        line-height: 1.12;
    }

    .premium-home .contact-grid {
        grid-template-columns: 1fr;
    }

    .premium-home .contact-grid > div {
        min-height: 88px;
        padding: 17px;
        background: #fff;
    }

    .premium-home .contact-grid a {
        overflow-wrap: anywhere;
    }

    .premium-home .premium-footer {
        gap: 14px;
        padding: 34px 18px calc(34px + env(safe-area-inset-bottom));
        text-align: center;
    }

    .premium-home .back-to-top {
        right: 14px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        width: 44px;
        height: 44px;
    }

    @media (display-mode: standalone) {
        .premium-home .site-header {
            padding-top: max(8px, env(safe-area-inset-top));
        }
    }
}

@media (max-width: 370px) {
    .premium-home .brand strong {
        font-size: .76rem;
    }

    .premium-home .brand small {
        display: none;
    }

    .premium-home .premium-stats {
        gap: 8px;
        padding-inline: 10px;
    }

    .pwa-install-card {
        left: 8px;
        right: 8px;
        gap: 8px;
        padding: 9px;
    }

    .pwa-install-copy span {
        display: none;
    }
}

/* ==========================================================
   CONTACT — cartes officielles claires et tactiles
   ========================================================== */

@media (max-width: 768px) {
    .premium-home #contact {
        position: relative;
        overflow: hidden;
        padding-top: 48px;
        padding-bottom: 52px;
        background:
            radial-gradient(circle at 100% 0%, rgba(244, 191, 58, .12), transparent 30%),
            linear-gradient(180deg, #f8fbf9 0%, #eef7f2 100%);
    }

    .premium-home #contact .section-heading {
        margin-bottom: 22px;
        text-align: left;
    }

    .premium-home #contact .section-heading h2 {
        margin-bottom: 8px;
        color: var(--pwa-green-dark);
        font-size: clamp(1.65rem, 7vw, 2.15rem);
        line-height: 1.08;
    }

    .premium-home #contact .section-heading > p:last-child {
        max-width: 34rem;
        color: var(--pwa-muted);
        line-height: 1.6;
    }

    .premium-home #contact .contact-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .premium-home #contact .contact-grid > div {
        position: relative;
        display: grid;
        gap: 7px;
        min-height: 92px;
        padding: 17px 18px 17px 62px;
        border: 1px solid rgba(11, 107, 58, .11);
        border-radius: 18px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 10px 26px rgba(7, 82, 45, .07);
    }

    .premium-home #contact .contact-grid > div::before {
        position: absolute;
        top: 17px;
        left: 17px;
        display: grid;
        width: 32px;
        height: 32px;
        place-items: center;
        border-radius: 10px;
        background: var(--pwa-green-soft);
        color: var(--pwa-green-dark);
        content: "•";
        font-size: 1.15rem;
        font-weight: 900;
    }

    .premium-home #contact .contact-grid > div:nth-child(1)::before {
        content: "G";
    }

    .premium-home #contact .contact-grid > div:nth-child(2)::before {
        content: "f";
        font-family: Arial, sans-serif;
        text-transform: lowercase;
    }

    .premium-home #contact .contact-grid > div:nth-child(3)::before {
        content: "@";
    }

    .premium-home #contact .contact-grid > div:nth-child(4)::before {
        content: "☎";
    }

    .premium-home #contact .contact-grid > div:nth-child(5)::before {
        content: "W";
    }

    .premium-home #contact .contact-grid > div:nth-child(6)::before {
        content: "⌖";
    }

    .premium-home #contact .contact-grid strong {
        color: var(--pwa-ink);
        font-size: .79rem;
        letter-spacing: .02em;
    }

    .premium-home #contact .contact-grid span,
    .premium-home #contact .contact-grid a {
        color: var(--pwa-green-dark);
        font-size: .9rem;
        font-weight: 750;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .premium-home #contact .contact-grid a {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
        text-decoration: none;
    }

    .premium-home #contact .contact-grid a:active {
        opacity: .72;
    }
}

@media (min-width: 769px) {
    .premium-home #contact .contact-grid > div {
        border: 1px solid rgba(11, 107, 58, .1);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(7, 82, 45, .06);
        transition: transform .2s ease, box-shadow .2s ease;
    }

    .premium-home #contact .contact-grid > div:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 34px rgba(7, 82, 45, .1);
    }
}
