/* GONFREVILLE HANDBALL - PLATEFORME PRO V1 */

:root {
    --gh-pro-black: #010101;
    --gh-pro-red: #d01120;
    --gh-pro-red-dark: #a80e19;
    --gh-pro-white: #ffffff;
    --gh-pro-bg: #f4f5f8;
    --gh-pro-text: #111827;
    --gh-pro-muted: #667085;
    --gh-pro-border: #e3e5eb;
    --gh-pro-shadow: 0 16px 42px rgba(15, 23, 42, .10);
}

/* Erreurs propres */
.gh-error-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(208,17,32,.32), transparent 36%),
        linear-gradient(135deg, #010101, #171717);
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
}

.gh-error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    box-sizing: border-box;
}

.gh-error-card {
    width: min(560px, 100%);
    background: #fff;
    color: #111827;
    border-radius: 30px;
    padding: 34px;
    text-align: center;
    box-shadow: 0 34px 90px rgba(0,0,0,.42);
    box-sizing: border-box;
}

.gh-error-card img {
    width: 112px;
    height: 112px;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
}

.gh-error-card > span {
    display: block;
    color: #d01120;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.gh-error-card h1 {
    margin: 10px 0 8px;
    font-size: clamp(34px, 6vw, 56px);
    line-height: .9;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: -.055em;
}

.gh-error-card p {
    margin: 0 auto 22px;
    max-width: 430px;
    color: #667085;
    line-height: 1.5;
}

.gh-error-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 13px;
    background: #d01120;
    color: #fff;
    text-decoration: none;
    font-weight: 950;
}

.gh-error-card small {
    display: block;
    margin-top: 16px;
    color: #98a2b3;
    font-size: 12px;
}

.gh-error-card details {
    margin-top: 18px;
    text-align: left;
    border: 1px solid #e3e5eb;
    border-radius: 14px;
    padding: 12px;
    background: #f8fafc;
}

.gh-error-card pre {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 260px;
    overflow: auto;
    color: #111827;
}

/* Admin / collab stabilisation */
.admin-sidebar,
.internal-pro-sidebar,
.admin-shell aside,
aside[class*="sidebar"] {
    background: #010101 !important;
    background-image: none !important;
}

.admin-nav .nav-section,
.pro-sidebar-nav .nav-section,
.internal-pro-nav > span {
    margin-top: 18px !important;
    color: rgba(255,255,255,.55) !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase !important;
}

.admin-nav a,
.pro-sidebar-nav a,
.internal-pro-nav a {
    border-radius: 12px !important;
}

.admin-nav a:hover,
.pro-sidebar-nav a:hover,
.internal-pro-nav a:hover,
.admin-nav a.is-active,
.pro-sidebar-nav a.is-active,
.internal-pro-nav a.is-active {
    background: #d01120 !important;
    color: #fff !important;
}

.admin-content .alert,
.internal-pro-content .alert,
.gh-login-card .alert {
    border: 0 !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    font-weight: 850 !important;
    line-height: 1.4 !important;
    box-shadow: 0 8px 22px rgba(15,23,42,.08) !important;
}

.alert-success,
.alert-success.alert {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.alert-error,
.alert-danger,
.alert-error.alert {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.platform-version-footer {
    padding: 14px 24px 24px;
    color: #98a2b3;
    font-size: 12px;
    text-align: right;
}

/* Utilisateurs : rôles plus lisibles */
.access-role-help-pro {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.access-role-help-pro article {
    border-left: 4px solid #d01120 !important;
}

/* Santé plateforme */
.platform-health-page {
    display: grid;
    gap: 16px;
}

.platform-health-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    background: #fff;
    border: 1px solid #e3e5eb;
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--gh-pro-shadow);
}

.platform-health-hero span {
    display: block;
    color: #d01120;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.platform-health-hero h2 {
    margin: 6px 0 4px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: .9;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: -.05em;
}

.platform-health-hero p {
    margin: 0;
    color: #667085;
}

.platform-health-hero > strong {
    background: #010101;
    color: #fff;
    padding: 12px 14px;
    border-radius: 14px;
    white-space: nowrap;
}

.platform-health-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.platform-health-kpis article,
.platform-health-card {
    background: #fff;
    border: 1px solid #e3e5eb;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(15,23,42,.07);
}

.platform-health-kpis strong {
    display: block;
    font-size: 26px;
    line-height: 1;
}

.platform-health-kpis span {
    display: block;
    margin-top: 6px;
    color: #667085;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.platform-health-kpis .warning {
    background: #fffbeb;
}

.platform-health-kpis .error {
    background: #fff1f2;
}

.platform-card-head h3 {
    margin: 0 0 4px;
    font-size: 22px;
}

.platform-card-head p {
    margin: 0 0 14px;
    color: #667085;
}

.platform-check-list {
    display: grid;
    gap: 9px;
}

.platform-check-list article {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e3e5eb;
    border-radius: 14px;
    background: #f8fafc;
}

.platform-check-list article.ok {
    border-left: 5px solid #16a34a;
}

.platform-check-list article.warning {
    border-left: 5px solid #f59e0b;
}

.platform-check-list article.error {
    border-left: 5px solid #dc2626;
}

.platform-check-list strong,
.platform-check-list span {
    display: block;
}

.platform-check-list span {
    margin-top: 3px;
    color: #667085;
    font-size: 13px;
}

.platform-check-list em {
    align-self: center;
    color: #111827;
    font-style: normal;
    font-weight: 950;
    text-align: right;
}

/* Lecture seule CRM */
body .ghcrm-page.readonly .ghcrm-btn[data-open-modal],
body .ghcrm-page.readonly form[action*="/delete"] {
    display: none !important;
}

@media (max-width: 860px) {
    .platform-health-hero,
    .platform-check-list article {
        display: grid;
    }

    .platform-health-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .platform-version-footer {
        text-align: center;
    }
}

@media (max-width: 560px) {
    .platform-health-kpis {
        grid-template-columns: 1fr;
    }

    .gh-error-card {
        padding: 26px;
        border-radius: 24px;
    }
}
