* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f7fb;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-soft: #f8fafc;
    --text: #182033;
    --muted: #677089;
    --line: #e5e9f2;
    --accent: #6d5dfc;
    --accent-strong: #5544ef;
    --shadow: 0 18px 60px rgba(28, 37, 65, 0.10);
    --radius-lg: 26px;
    --radius-md: 18px;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(109, 93, 252, 0.11), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(128, 92, 255, 0.08), transparent 30rem),
        var(--bg);
    color: var(--text);
}

a {
    color: inherit;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark,
.app-icon,
.app-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #745fff, #4f3ae8);
    color: white;
    box-shadow: 0 10px 24px rgba(98, 79, 239, 0.24);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 20px;
    font-weight: 800;
}

.brand span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand strong {
    font-size: 16px;
}

.brand small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.topbar-link {
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}

.topbar-link:hover {
    color: var(--text);
}

.support-container {
    width: min(920px, calc(100% - 40px));
    margin: 30px auto 50px;
    flex: 1;
}

.hero {
    display: flex;
    gap: 26px;
    align-items: center;
    margin-bottom: 28px;
    padding: 10px 8px 22px;
}

.app-icon {
    flex: 0 0 auto;
    width: 92px;
    height: 92px;
    border-radius: 25px;
    font-size: 42px;
    font-weight: 800;
}

.hero-copy h1 {
    margin: 4px 0 10px;
    font-size: clamp(34px, 6vw, 54px);
    letter-spacing: -0.04em;
}

.hero-description {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.version {
    display: inline-block;
    margin: 14px 0 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
}

.panel {
    margin-top: 18px;
    padding: 30px;
    background: var(--surface);
    border: 1px solid rgba(229, 233, 242, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel h2 {
    margin: 4px 0 10px;
    font-size: 23px;
    letter-spacing: -0.02em;
}

.panel > p,
.section-heading > p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-heading {
    margin-bottom: 18px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.app-card {
    min-height: 82px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.app-card:hover {
    transform: translateY(-2px);
    border-color: rgba(109, 93, 252, 0.32);
    box-shadow: 0 12px 30px rgba(28, 37, 65, 0.08);
}

.app-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 800;
}

.app-card-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-card-copy strong {
    font-size: 15px;
}

.app-card-copy small {
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-card-arrow {
    color: var(--muted);
    font-size: 20px;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    overflow: hidden;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.faq-item summary {
    padding: 17px 18px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    float: right;
    color: var(--accent);
    font-size: 21px;
    line-height: 1;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    margin: 0;
    padding: 0 18px 18px;
    color: var(--muted);
    line-height: 1.7;
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(98, 79, 239, 0.22);
}

.email-link {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.legal-links a,
.footer a {
    text-decoration: none;
}

.footer {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
    padding: 0 0 34px;
    display: flex;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1020;
        --surface: rgba(22, 27, 47, 0.88);
        --surface-soft: #171c30;
        --text: #f3f5ff;
        --muted: #a5abc1;
        --line: #29304c;
        --shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
    }

    body {
        background:
            radial-gradient(circle at top left, rgba(109, 93, 252, 0.16), transparent 32rem),
            radial-gradient(circle at bottom right, rgba(128, 92, 255, 0.10), transparent 30rem),
            var(--bg);
    }
}

@media (max-width: 720px) {
    .topbar {
        width: min(100% - 28px, 1120px);
    }

    .support-container {
        width: min(100% - 28px, 920px);
        margin-top: 18px;
    }

    .hero {
        align-items: flex-start;
        gap: 18px;
    }

    .app-icon {
        width: 68px;
        height: 68px;
        border-radius: 20px;
        font-size: 30px;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 22px;
        border-radius: 22px;
    }

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

    .contact-actions {
        align-items: stretch;
    }

    .email-link {
        text-align: center;
    }
}


/* Confidentialité */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 8px 24px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb a {
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--text);
}

.privacy-hero {
    margin-bottom: 12px;
}

.legal-notice {
    margin: 18px 0;
    padding: 18px 20px;
    border: 1px solid rgba(217, 142, 38, 0.34);
    border-radius: var(--radius-md);
    background: rgba(217, 142, 38, 0.08);
}

.legal-notice strong {
    display: block;
    margin-bottom: 6px;
}

.legal-notice p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.legal-section h2 {
    margin-bottom: 14px;
}

.legal-section p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.75;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-list {
    margin: 8px 0 0;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.75;
}

.legal-list li + li {
    margin-top: 8px;
}


.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.secondary-button:hover {
    border-color: rgba(109, 93, 252, 0.42);
}

/* Navigation supérieure : langue + site public */
.topbar {
    position: relative;
    z-index: 20;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-menu {
    position: relative;
}

.language-menu summary {
    list-style: none;
}

.language-menu summary::-webkit-details-marker {
    display: none;
}

.language-menu-trigger,
.topbar-link {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(28, 37, 65, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

.language-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 11px 0 10px;
    cursor: pointer;
    user-select: none;
}

.language-menu-trigger:hover,
.topbar-link:hover,
.language-menu[open] .language-menu-trigger {
    border-color: rgba(109, 93, 252, 0.34);
    box-shadow: 0 10px 28px rgba(28, 37, 65, 0.09);
}

.language-menu-trigger:focus-visible,
.topbar-link:focus-visible,
.language-menu-option:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.14);
}

.language-flag {
    flex: 0 0 auto;
    width: 26px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(103, 112, 137, 0.18);
    border-radius: 5px;
    background: var(--surface-soft);
    box-shadow: 0 1px 3px rgba(28, 37, 65, 0.08);
}

.language-flag img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.language-code-badge {
    display: inline-flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.14), rgba(109, 93, 252, 0.05));
    color: var(--accent-strong);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.language-menu-current {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.language-menu-chevron {
    width: 16px;
    height: 16px;
    color: var(--muted);
    transition: transform 160ms ease;
}

.language-menu[open] .language-menu-chevron {
    transform: rotate(180deg);
}

.language-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 28px));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 20px 60px rgba(28, 37, 65, 0.16);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    animation: language-menu-in 140ms ease-out;
}

@keyframes language-menu-in {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.language-menu-heading {
    padding: 3px 7px 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.language-menu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    max-height: min(430px, calc(100vh - 140px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.language-menu-option {
    min-width: 0;
    min-height: 43px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 18px;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: background-color 140ms ease, border-color 140ms ease;
}

.language-menu-option:hover {
    background: var(--surface-soft);
    border-color: var(--line);
}

.language-menu-option.is-current {
    background: rgba(109, 93, 252, 0.09);
    border-color: rgba(109, 93, 252, 0.18);
}

.language-menu-option-label {
    overflow: hidden;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-menu-check {
    width: 17px;
    height: 17px;
    color: var(--accent);
}

.topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 11px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.topbar-link:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.topbar-link-globe {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.topbar-link-external {
    width: 14px;
    height: 14px;
    opacity: 0.68;
}

/* Sens d'écriture RTL (arabe) */
html[dir="rtl"] .legal-list {
    padding-right: 22px;
    padding-left: 0;
}

html[dir="rtl"] .faq-item summary::after {
    float: left;
}

html[dir="rtl"] .app-card-arrow,
html[dir="rtl"] .breadcrumb-separator {
    display: inline-block;
    transform: rotate(180deg);
}

html[dir="rtl"] .language-menu-panel {
    right: auto;
    left: 0;
}

html[dir="rtl"] .language-menu-option {
    text-align: right;
}

@media (max-width: 720px) {
    .topbar {
        min-height: 76px;
        gap: 12px;
    }

    .topbar-actions {
        gap: 8px;
    }

    .language-menu-panel {
        position: fixed;
        top: 72px;
        right: 14px;
        left: 14px;
        width: auto;
    }

    html[dir="rtl"] .language-menu-panel {
        right: 14px;
        left: 14px;
    }
}

@media (max-width: 520px) {
    .language-menu-list {
        grid-template-columns: 1fr;
    }

    .topbar-link-label,
    .topbar-link-external {
        display: none;
    }

    .topbar-link {
        width: 42px;
        padding: 0;
    }
}

@media (max-width: 420px) {
    .brand small {
        display: none;
    }

    .language-menu-current {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 350px) {
    .language-menu-current {
        display: none;
    }

    .language-menu-trigger {
        width: 42px;
        justify-content: center;
        padding: 0;
    }

    .language-menu-chevron {
        display: none;
    }
}


/* Suppression de compte */
.deletion-contact-panel {
    border-color: rgba(200, 68, 78, 0.22);
    background:
        linear-gradient(135deg, rgba(200, 68, 78, 0.035), rgba(255, 255, 255, 0)),
        var(--surface);
}

.deletion-button {
    background: linear-gradient(135deg, #c84652, #a9323d);
    box-shadow: 0 10px 24px rgba(176, 52, 64, 0.22);
}

.deletion-button:hover {
    filter: brightness(1.03);
}

@media (prefers-color-scheme: dark) {
    .deletion-contact-panel {
        background:
            linear-gradient(135deg, rgba(200, 68, 78, 0.09), rgba(22, 27, 47, 0)),
            var(--surface);
    }
}
