/*
 * Académie F1SYH — styles du moteur de cours.
 * Extraction automatique depuis cours.php.
 */

.course-page {
    --course-accent: #0f9f8d;
    --course-blue: #2d83d5;
    --course-orange: #c6782f;
    --course-red: #b91c1c;
    --course-border: rgba(128, 128, 128, 0.24);
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.course-panel {
    border: 1px solid var(--course-border);
    border-radius: 20px;
    background: rgba(128, 128, 128, 0.045);
}

.course-catalog-hero,
.course-hero {
    padding: clamp(1.4rem, 4vw, 3rem);
}

.course-eyebrow {
    margin: 0 0 0.65rem;
    color: var(--course-accent);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.course-catalog-hero h1,
.course-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.course-lead {
    max-width: 950px;
    margin: 1rem 0 0;
    line-height: 1.68;
    opacity: 0.78;
}

.course-search {
    display: grid;
    gap: 0.45rem;
    margin-top: 1rem;
    padding: 1rem;
}

.course-search label {
    font-size: 0.82rem;
    font-weight: 800;
}

.course-search input {
    width: 100%;
    min-height: 50px;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--course-border);
    border-radius: 13px;
    color: inherit;
    background: rgba(128, 128, 128, 0.06);
    font: inherit;
}

.course-catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.course-card {
    display: flex;
    flex-direction: column;
    padding: 1.1rem;
}

.course-card-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: var(--course-accent);
    font-size: 1.3rem;
    font-weight: 900;
}

.course-card h2 {
    margin: 0.8rem 0 0;
    font-size: 1.35rem;
}

.course-card-description {
    flex: 1;
    line-height: 1.6;
    opacity: 0.76;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.course-meta span {
    padding: 0.32rem 0.58rem;
    border-radius: 999px;
    background: rgba(15, 159, 141, 0.1);
    font-size: 0.75rem;
    font-weight: 750;
}

.course-card-progress {
    margin-top: 0.8rem;
}

.course-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.17);
}

.course-progress-value {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--course-accent);
    transition: width 0.25s ease;
}

.course-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    opacity: 0.72;
}

.course-card-link {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 0.85rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--course-border);
    border-radius: 11px;
    color: inherit;
    text-decoration: none;
    font-weight: 800;
}

.course-card-link:hover,
.course-card-link:focus-visible {
    border-color: var(--course-accent);
}

.course-no-result {
    margin-top: 1rem;
    padding: 1rem;
}

.course-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    align-items: start;
}

.course-sidebar {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    padding: 1rem;
}

.course-sidebar-progress {
    margin-bottom: 1rem;
}

.course-sidebar h2 {
    margin: 0.9rem 0 0.45rem;
    font-size: 0.9rem;
}

.course-sidebar ul {
    display: grid;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.course-sidebar a {
    display: block;
    padding: 0.52rem 0.62rem;
    border-radius: 9px;
    color: inherit;
    text-decoration: none;
    font-size: 0.82rem;
}

.course-sidebar a:hover,
.course-sidebar a:focus-visible {
    background: rgba(15, 159, 141, 0.08);
}

.course-sidebar a[aria-current="page"] {
    color: white;
    background: var(--course-accent);
}

.course-sidebar a.is-complete::after {
    content: "✓";
    float: right;
    font-weight: 900;
}

.course-content {
    min-width: 0;
    padding: clamp(1rem, 3vw, 2rem);
}

.course-lesson-counter {
    color: var(--course-accent);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.course-content h2 {
    margin: 0.45rem 0 1rem;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    line-height: 1.08;
}

.course-content p,
.course-content li {
    line-height: 1.72;
}

.course-objectives {
    margin-top: 1rem;
    padding: 1rem;
}

.course-objectives h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.course-callout {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border-left: 4px solid var(--course-blue);
    border-radius: 9px;
    background: rgba(45, 131, 213, 0.08);
}

.course-callout strong {
    display: block;
    margin-bottom: 0.3rem;
}

.course-callout p {
    margin: 0;
}

.course-callout-warning {
    border-left-color: var(--course-red);
    background: rgba(185, 28, 28, 0.08);
}

.course-callout-example {
    border-left-color: var(--course-orange);
    background: rgba(198, 120, 47, 0.08);
}

.course-formula {
    display: grid;
    gap: 0.45rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--course-border);
    border-radius: 13px;
    text-align: center;
}

.course-formula strong {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 1.35rem;
}

.course-formula span {
    opacity: 0.72;
}

.course-table-wrapper {
    margin: 1rem 0;
    overflow-x: auto;
}

.course-table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
}

.course-table th,
.course-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--course-border);
    text-align: left;
    vertical-align: top;
}

.course-table th {
    background: rgba(128, 128, 128, 0.08);
}

.course-content-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 1rem 0;
}

.course-content-cards article {
    padding: 0.9rem;
    border: 1px solid var(--course-border);
    border-radius: 13px;
}

.course-content-cards h4 {
    margin: 0;
}

.course-content-cards p {
    margin-bottom: 0;
}

.course-diagram {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    margin: 1rem 0;
    padding: 0.9rem;
    overflow-x: auto;
}

.course-diagram span {
    display: grid;
    min-width: 120px;
    place-items: center;
    padding: 0.75rem;
    border: 2px solid var(--course-accent);
    border-radius: 12px;
    text-align: center;
    font-weight: 750;
}

.course-diagram b {
    align-self: center;
}

.course-lesson-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.7rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--course-border);
}

.course-action,
.course-complete-button {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--course-border);
    border-radius: 11px;
    color: inherit;
    background: transparent;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.course-complete-button {
    border-color: var(--course-accent);
    color: white;
    background: var(--course-accent);
}

.course-complete-button.is-complete {
    border-color: var(--course-blue);
    background: var(--course-blue);
}

.course-translation-notice {
    margin-top: 1rem;
    padding: 0.8rem;
    border-left: 4px solid var(--course-orange);
    background: rgba(198, 120, 47, 0.08);
}

.course-back-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.course-back-links a {
    padding: 0.62rem 0.82rem;
    border: 1px solid var(--course-border);
    border-radius: 11px;
    color: inherit;
    text-decoration: none;
    font-weight: 800;
}


.course-quiz {
    margin: 1.6rem 0;
    padding: 1rem;
    border: 1px solid var(--course-border);
    border-radius: 18px;
    background: rgba(128, 128, 128, 0.035);
}

.course-quiz-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.course-quiz-header h3 {
    margin: 0.25rem 0 0;
    font-size: 1.45rem;
}

.course-quiz-header p {
    margin-bottom: 0;
}

.course-quiz-eyebrow {
    margin: 0;
    color: var(--course-accent);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.course-quiz-best {
    min-width: 125px;
    padding: 0.75rem;
    border: 1px solid var(--course-border);
    border-radius: 12px;
    text-align: center;
}

.course-quiz-best span {
    display: block;
    font-size: 0.7rem;
    opacity: 0.68;
}

.course-quiz-best strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--course-accent);
    font-size: 1.25rem;
}

.course-quiz-form {
    display: grid;
    gap: 1rem;
}

.course-quiz-question {
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--course-border);
    border-radius: 14px;
}

.course-quiz-question legend {
    max-width: 100%;
    padding: 0 0.35rem;
    font-weight: 800;
    line-height: 1.5;
}

.course-quiz-question legend span {
    display: block;
    color: var(--course-accent);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.course-quiz-options {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.course-quiz-options label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: start;
    padding: 0.72rem;
    border: 1px solid var(--course-border);
    border-radius: 11px;
    cursor: pointer;
}

.course-quiz-options label:hover {
    border-color: var(--course-accent);
    background: rgba(15, 159, 141, 0.055);
}

.course-quiz-options input {
    margin-top: 0.25rem;
}

.course-quiz-options label.is-correct {
    border-color: var(--course-accent);
    background: rgba(15, 159, 141, 0.1);
}

.course-quiz-options label.is-wrong {
    border-color: var(--course-red);
    background: rgba(185, 28, 28, 0.08);
}

.course-quiz-feedback {
    margin-top: 0.8rem;
    padding: 0.75rem;
    border-left: 4px solid var(--course-blue);
    border-radius: 8px;
    background: rgba(45, 131, 213, 0.08);
    line-height: 1.55;
}

.course-quiz-question.is-correct .course-quiz-feedback {
    border-left-color: var(--course-accent);
    background: rgba(15, 159, 141, 0.08);
}

.course-quiz-question.is-wrong .course-quiz-feedback {
    border-left-color: var(--course-red);
    background: rgba(185, 28, 28, 0.08);
}

.course-quiz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.course-quiz-submit,
.course-quiz-reset {
    min-height: 45px;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--course-border);
    border-radius: 11px;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.course-quiz-submit {
    border-color: var(--course-accent);
    color: white;
    background: var(--course-accent);
}

.course-quiz-result {
    padding: 1rem;
    border-left: 5px solid var(--course-blue);
    border-radius: 10px;
    background: rgba(45, 131, 213, 0.08);
}

.course-quiz-result.is-success {
    border-left-color: var(--course-accent);
    background: rgba(15, 159, 141, 0.08);
}

.course-quiz-result.is-warning {
    border-left-color: var(--course-orange);
    background: rgba(198, 120, 47, 0.08);
}

.course-quiz-result.is-failure {
    border-left-color: var(--course-red);
    background: rgba(185, 28, 28, 0.08);
}

.course-quiz-result strong {
    display: block;
    font-size: 1.12rem;
}

.course-quiz-result p {
    margin: 0.35rem 0 0;
}

.course-card-quiz-score {
    margin-top: 0.5rem;
    font-size: 0.76rem;
    opacity: 0.76;
}


.course-certificate {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    margin-top: 1rem;
    padding: 1.1rem;
}

.course-certificate.is-unlocked {
    border-color: rgba(15, 159, 141, 0.55);
    background:
        linear-gradient(
            135deg,
            rgba(15, 159, 141, 0.1),
            rgba(45, 131, 213, 0.045)
        );
}

.course-certificate-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 16px;
    color: white;
    background: rgba(128, 128, 128, 0.45);
    font-size: 1.45rem;
    font-weight: 900;
}

.course-certificate.is-unlocked .course-certificate-icon {
    background: var(--course-accent);
}

.course-certificate h2 {
    margin: 0;
    font-size: 1.4rem;
}

.course-certificate-content > p {
    margin: 0.55rem 0 0;
    line-height: 1.6;
    opacity: 0.78;
}

.course-certificate-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 0.65rem;
    align-items: end;
    margin-top: 1rem;
}

.course-certificate-form label {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    font-weight: 800;
}

.course-certificate-form input {
    width: 100%;
    min-height: 47px;
    padding: 0.68rem 0.8rem;
    border: 1px solid var(--course-border);
    border-radius: 11px;
    color: inherit;
    background: rgba(128, 128, 128, 0.07);
    font: inherit;
}

.course-certificate-button {
    min-height: 47px;
    padding: 0.68rem 0.95rem;
    border: 1px solid var(--course-accent);
    border-radius: 11px;
    color: white;
    background: var(--course-accent);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
}

.course-certificate-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.course-certificate-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.course-certificate-requirements span {
    padding: 0.36rem 0.58rem;
    border-radius: 999px;
    background: rgba(128, 128, 128, 0.1);
    font-size: 0.76rem;
}

.course-certificate-requirements strong {
    color: var(--course-accent);
}


.course-progress-backup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
}

.course-progress-backup h2 {
    margin: 0;
    font-size: 1.25rem;
}

.course-progress-backup p {
    margin: 0.45rem 0 0;
    line-height: 1.55;
    opacity: 0.76;
}

.course-progress-backup-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.course-progress-backup-button {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--course-border);
    border-radius: 11px;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-align: center;
}

.course-progress-backup-button.primary {
    border-color: var(--course-accent);
    color: white;
    background: var(--course-accent);
}

.course-progress-backup-message {
    grid-column: 1 / -1;
    margin: 0 !important;
    padding: 0.75rem;
    border-left: 4px solid var(--course-blue);
    border-radius: 8px;
    background: rgba(45, 131, 213, 0.08);
    opacity: 1 !important;
}

.course-progress-backup-message.is-success {
    border-left-color: var(--course-accent);
    background: rgba(15, 159, 141, 0.08);
}

.course-progress-backup-message.is-error {
    border-left-color: var(--course-red);
    background: rgba(185, 28, 28, 0.08);
}


.course-dashboard {
    margin-top: 1rem;
    padding: 1.1rem;
}

.course-dashboard-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.course-dashboard-eyebrow {
    margin: 0;
    color: var(--course-accent);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.course-dashboard-header h2 {
    margin: 0.3rem 0 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.course-dashboard-header p {
    margin: 0.45rem 0 0;
    opacity: 0.74;
}

.course-dashboard-global {
    display: grid;
    width: 128px;
    height: 128px;
    place-items: center;
    align-content: center;
    border: 10px solid rgba(15, 159, 141, 0.18);
    border-radius: 50%;
    text-align: center;
}

.course-dashboard-global strong {
    color: var(--course-accent);
    font-size: 1.65rem;
}

.course-dashboard-global span {
    max-width: 85px;
    font-size: 0.68rem;
    line-height: 1.25;
    opacity: 0.72;
}

.course-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}

.course-dashboard-stats article {
    padding: 0.85rem;
    border: 1px solid var(--course-border);
    border-radius: 13px;
}

.course-dashboard-stats span {
    display: block;
    font-size: 0.72rem;
    line-height: 1.35;
    opacity: 0.68;
}

.course-dashboard-stats strong {
    display: block;
    margin-top: 0.3rem;
    color: var(--course-accent);
    font-size: 1.45rem;
}

.course-dashboard-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.course-dashboard-block {
    padding: 0.95rem;
    border: 1px solid var(--course-border);
    border-radius: 14px;
}

.course-dashboard-block h3 {
    margin: 0 0 0.7rem;
    font-size: 1rem;
}

.course-dashboard-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.course-dashboard-badge {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.55rem;
    align-items: center;
    padding: 0.6rem 0.72rem;
    border: 1px solid rgba(15, 159, 141, 0.35);
    border-radius: 12px;
    background: rgba(15, 159, 141, 0.07);
}

.course-dashboard-badge-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: white;
    background: var(--course-accent);
    font-weight: 900;
}

.course-dashboard-badge strong,
.course-dashboard-badge span {
    display: block;
}

.course-dashboard-badge strong {
    font-size: 0.82rem;
}

.course-dashboard-badge span {
    margin-top: 0.15rem;
    font-size: 0.68rem;
    opacity: 0.7;
}

.course-dashboard-recommendation {
    display: block;
    padding: 0.8rem;
    border: 1px solid var(--course-border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
}

.course-dashboard-recommendation:hover,
.course-dashboard-recommendation:focus-visible {
    border-color: var(--course-accent);
}

.course-dashboard-recommendation strong,
.course-dashboard-recommendation span {
    display: block;
}

.course-dashboard-recommendation span {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    opacity: 0.72;
}

.course-dashboard-empty {
    margin: 0;
    font-size: 0.82rem;
    opacity: 0.68;
}

.course-dashboard-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--course-border);
}

.course-dashboard-footer p {
    margin: 0;
    font-size: 0.76rem;
    opacity: 0.68;
}

.course-dashboard-reset {
    min-height: 42px;
    padding: 0.6rem 0.78rem;
    border: 1px solid rgba(185, 28, 28, 0.45);
    border-radius: 10px;
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.05);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
}

@media (max-width: 900px) {
    .course-layout {
        grid-template-columns: 1fr;
    }

    .course-dashboard-header {
        grid-template-columns: 1fr;
    }

    .course-dashboard-global {
        width: 110px;
        height: 110px;
    }

    .course-dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .course-dashboard-columns {
        grid-template-columns: 1fr;
    }

    .course-dashboard-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .course-dashboard-reset {
        width: 100%;
    }

    .course-progress-backup {
        grid-template-columns: 1fr;
    }

    .course-progress-backup-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .course-progress-backup-button {
        width: 100%;
    }

    .course-certificate {
        grid-template-columns: 1fr;
    }

    .course-certificate-form {
        grid-template-columns: 1fr;
    }

    .course-certificate-button {
        width: 100%;
    }

    .course-sidebar {
        position: static;
        max-height: none;
    }
}

@media (max-width: 680px) {
    .course-catalog-grid,
    .course-content-cards {
        grid-template-columns: 1fr;
    }

    .course-search input {
        font-size: 16px;
    }

    .course-lesson-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .course-quiz-header {
        grid-template-columns: 1fr;
    }

    .course-quiz-best {
        width: 100%;
    }

    .course-quiz-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .course-quiz-submit,
    .course-quiz-reset {
        width: 100%;
    }

    .course-action,
    .course-complete-button {
        width: 100%;
    }
}

/* ===== BLOC CSS SUIVANT ===== */

:root {
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: #e9edf2;
    color: #102033;
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
}

body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.certificate {
    position: relative;
    width: min(1120px, 100%);
    min-height: 720px;
    overflow: hidden;
    padding: 66px;
    border: 14px solid #102033;
    background:
        linear-gradient(
            135deg,
            rgba(15, 159, 141, 0.09),
            transparent 42%
        ),
        linear-gradient(
            315deg,
            rgba(45, 131, 213, 0.08),
            transparent 40%
        ),
        #ffffff;
    box-shadow: 0 30px 80px rgba(16, 32, 51, 0.22);
}

.certificate::before,
.certificate::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.certificate::before {
    width: 330px;
    height: 330px;
    top: -165px;
    right: -110px;
    border: 45px solid rgba(15, 159, 141, 0.14);
}

.certificate::after {
    width: 250px;
    height: 250px;
    bottom: -130px;
    left: -90px;
    border: 35px solid rgba(45, 131, 213, 0.12);
}

.topline {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: start;
}

.brand {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.callsign {
    color: #0f9f8d;
}

.badge {
    padding: 9px 14px;
    border: 1px solid rgba(16, 32, 51, 0.2);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.main {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 500px;
    align-content: center;
    justify-items: center;
    text-align: center;
}

.eyebrow {
    margin: 0;
    color: #0f9f8d;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1 {
    margin: 18px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 7vw, 76px);
    font-weight: 500;
    line-height: 1;
}

.intro {
    margin: 34px 0 0;
    font-size: 18px;
}

.name {
    margin: 13px 0 0;
    padding: 0 34px 10px;
    border-bottom: 2px solid #0f9f8d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 5vw, 55px);
    font-weight: 600;
}

.completed {
    max-width: 780px;
    margin: 30px 0 0;
    font-size: 18px;
    line-height: 1.6;
}

.course-title {
    display: block;
    margin-top: 8px;
    color: #102033;
    font-size: 26px;
    font-weight: 900;
}

.score {
    margin-top: 24px;
    padding: 11px 18px;
    border-radius: 13px;
    color: #ffffff;
    background: #0f9f8d;
    font-size: 17px;
    font-weight: 900;
}

.footer {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: end;
    margin-top: 10px;
    font-size: 13px;
}

.signature {
    text-align: center;
}

.signature-line {
    width: 220px;
    margin: 0 auto 8px;
    border-top: 1px solid #102033;
}

.identifier {
    text-align: right;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Consolas,
        monospace;
    font-size: 11px;
}

.unofficial {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    color: #64748b;
    font-size: 11px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.actions {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: flex;
    gap: 10px;
}

.actions button {
    min-height: 45px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: #102033;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    html,
    body {
        background: #ffffff;
    }

    body {
        display: block;
        padding: 0;
    }

    .certificate {
        width: 100%;
        min-height: 190mm;
        border-width: 8px;
        box-shadow: none;
        break-inside: avoid;
    }

    .actions {
        display: none;
    }
}

@media (max-width: 700px) {
    body {
        padding: 10px;
    }

    .certificate {
        min-height: 0;
        padding: 34px 22px;
        border-width: 8px;
    }

    .topline,
    .footer {
        grid-template-columns: 1fr;
        display: grid;
        text-align: center;
    }

    .identifier {
        text-align: center;
    }
}

/* F1SYH_COURSE_DARK_MODE_START */

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) {
    color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-mode="dark"] body,
html[data-color-scheme="dark"] body,
html[data-bs-theme="dark"] body,
html.dark body,
html.theme-dark body,
body[data-theme="dark"],
body[data-mode="dark"],
body.dark,
body.dark-mode,
body.theme-dark {
    background: #07111f !important;
    color: #dce7f5 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-page {
    color: #dce7f5 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-panel {
    background:
        linear-gradient(
            145deg,
            rgba(38, 65, 91, 0.18),
            rgba(9, 20, 35, 0.08)
        ),
        #0e1a2b !important;
    border-color: #2b3f58 !important;
    color: #dce7f5 !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22) !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-page :is(h1, h2, h3, h4, h5, strong) {
    color: #f4f8fc !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-page :is(p, li, label, td) {
    color: #c7d4e4;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-hero {
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(45, 212, 191, 0.13),
            transparent 34%
        ),
        radial-gradient(
            circle at 10% 100%,
            rgba(96, 165, 250, 0.11),
            transparent 38%
        ),
        #0e1a2b !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) :is(
    .course-eyebrow,
    .course-dashboard-eyebrow,
    .course-lesson-counter
) {
    color: #35d7c3 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-objectives {
    background: #101d2f !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-meta span {
    background: #17283c !important;
    border-color: #304963 !important;
    color: #dce9f6 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-sidebar {
    background: #0b1727 !important;
    border-color: #293d54 !important;
    scrollbar-color: #49627d #101d2e;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-sidebar a {
    color: #bdcadd !important;
    border-color: transparent;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-sidebar a:hover {
    background: #162a40 !important;
    color: #ffffff !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-sidebar a:is(
    [aria-current="page"],
    .active,
    .is-active
) {
    background: #0d9f91 !important;
    color: #ffffff !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content {
    background: #0e1a2b !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content :is(
    .course-diagram,
    .course-diagram-item,
    .course-content-card,
    .course-card-item,
    .course-note,
    .course-example,
    .course-formula,
    .course-warning,
    fieldset
) {
    background: #132238 !important;
    border-color: #34506b !important;
    color: #dce7f5 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content [class*="diagram"] {
    border-color: #2cae9f !important;
    color: #e7f2fb !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content [class*="diagram"] > * {
    background-color: #13243a;
    border-color: #2cae9f;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content :is(.course-note, .lesson-note) {
    background: #102d2c !important;
    border-color: #269f91 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content :is(.course-warning, .lesson-warning) {
    background: #32250f !important;
    border-color: #d99a25 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content :is(.course-example, .lesson-example) {
    background: #122a46 !important;
    border-color: #4f8cc9 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content table {
    background: #101d2e !important;
    border-color: #31475f !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content th {
    background: #182d44 !important;
    border-color: #3b536d !important;
    color: #ffffff !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-content td {
    background: #101d2e !important;
    border-color: #2b4057 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-progress-track {
    background: #25384d !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-progress-value {
    background: linear-gradient(90deg, #12a997, #31d2bd) !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) :is(
    .course-dashboard-stats article,
    .course-dashboard-block,
    .course-dashboard-global,
    .course-card
) {
    background: #132238 !important;
    border-color: #2f465e !important;
    color: #dce7f5 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-page :is(input, select, textarea) {
    background: #0a1625 !important;
    border-color: #38516c !important;
    color: #f1f6fb !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-page input::placeholder {
    color: #8193a9 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-page :is(
    .course-action,
    .course-card-link,
    .course-complete-button,
    .course-certificate-button,
    .course-progress-backup-button,
    .course-dashboard-reset,
    .course-back-links a
) {
    background: #16283d !important;
    border-color: #3b5773 !important;
    color: #eef6ff !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-page :is(
    .course-complete-button,
    .course-card-link,
    .course-certificate-button,
    .course-progress-backup-button.primary
) {
    background: #0d9f91 !important;
    border-color: #28c7b6 !important;
    color: #ffffff !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) :is(
    [data-course-quiz],
    .course-quiz,
    .course-quiz-question
) {
    background: #101f32 !important;
    border-color: #304b67 !important;
    color: #dce7f5 !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-certificate {
    background:
        linear-gradient(
            135deg,
            rgba(31, 157, 144, 0.12),
            rgba(12, 26, 43, 0.98)
        ) !important;
}

:where(
    html[data-theme="dark"],
    html[data-mode="dark"],
    html[data-color-scheme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    html.theme-dark,
    body[data-theme="dark"],
    body[data-mode="dark"],
    body.dark,
    body.dark-mode,
    body.theme-dark
) .course-page a:not(.course-card-link) {
    color: #70d9cd;
}

/* F1SYH_COURSE_DARK_MODE_END */

