@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Special+Elite&family=Special+Elite&display=swap');

/* ==========================================
   PALETTE DE COULEURS & STYLES GLOBEAUX
   ========================================== */
body {
    margin: 0;
    font-family: 'Special Elite', cursive;
    background: #191b1d; /* Bureau sombre */
    color: #2b2b2b;
    background-image: radial-gradient(#2c3035 1px, transparent 1px);
    background-size: 20px 20px;
}

header {
    background: #111315;
    border-bottom: 3px solid #d4a72c; /* Jaune ruban de scène de crime */
    color: #e5e5e5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.header-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.brand-logo {
    display: block;
    width: 48px;
    height: 42px;
    object-fit: contain;
}

.badge {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4a72c;
    background: #25282c;
    padding: 0.2rem 0.6rem;
    border: 1px solid #d4a72c;
    border-radius: 2px;
}

/* ==========================================
   BARRE DE NAVIGATION (Dossiers / Archives)
   ========================================== */
.site-navbar {
    background: #212428;
    border-bottom: 1px solid #33373d;
}

.navbar-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-navbar ul {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-navbar a {
    display: block;
    padding: 0.85rem 1rem;
    border-bottom: 3px solid transparent;
    color: #a0aab0;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 160ms ease;
}

.site-navbar a:hover,
.site-navbar a:focus-visible,
.site-navbar a.is-active {
    color: #f0c243;
    border-bottom-color: #f0c243;
    background: #2a2e33;
}

.logout-nav-form {
    margin: 0;
}

.site-navbar button.logout-link {
    display: block;
    padding: 0.85rem 1rem;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #c55a5a;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.site-navbar button.logout-link:hover,
.site-navbar button.logout-link:focus-visible {
    color: #ff6b6b;
    border-bottom-color: #ff6b6b;
    background: #2a2e33;
}

@media (max-width: 520px) {
    .navbar-container { padding: 0 0.75rem; }
    .site-navbar ul { gap: 0; }
    .site-navbar a, 
    .site-navbar button.logout-link { padding: 0.85rem 0.75rem; }
}

/* ==========================================
   CONTENU & CARTES (Pochettes Dossier "Manila")
   ========================================== */
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

/* Carte façon chemise carton/dossier confidentiel */
.case-file-card {
    background: #e6d5b8; /* Couleur enveloppe kraft / papier vieilli */
    border: 2px solid #b8a686;
    border-radius: 2px;
    padding: 2.5rem 2rem 2rem;
    width: min(100%, 420px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    position: relative;
    color: #1a1a1a;
}

/* Onglet de dossier sur le haut */
.case-file-card::before {
    content: "DOSSIER CONFIDENTIEL";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #8b0000;
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 8px;
    letter-spacing: 0.1em;
    border-radius: 2px;
}

.case-file-card h2 {
    margin-top: 0;
    font-family: 'Special Elite', cursive;
    text-transform: uppercase;
    border-bottom: 2px solid #222;
    padding-bottom: 0.5rem;
}

.subtitle {
    color: #554838;
    margin-bottom: 1.25rem;
    font-style: italic;
}

/* ==========================================
   FORMULAIRES & INPUTS
   ========================================== */
.auth-form {
    display: grid;
    gap: 1rem;
}

.form-group {
    display: grid;
    gap: 0.45rem;
}

label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

input, textarea {
    padding: 0.75rem 0.85rem;
    border: 1px solid #8c7a6b;
    border-radius: 0;
    background: #fdfbf7;
    color: #111;
    font-family: 'Courier Prime', monospace;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

input:focus, textarea:focus {
    outline: 2px solid #d4a72c;
    border-color: transparent;
}

textarea {
    flex: 1;
    min-height: 8rem;
    width: 100%;
    line-height: 1.4;
    resize: vertical;
    box-sizing: border-box;
}

button {
    padding: 0.8rem 1rem;
    border: 1px solid #000;
    border-radius: 0;
    background: #222;
    color: #f0f0f0;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #d4a72c;
    color: #000;
}

.btn-logout {
    background: #5a1a1a;
    border-color: #3a1010;
    color: #fff;
}

.btn-logout:hover {
    background: #8b0000;
    color: #fff;
}

/* ==========================================
   ALERTES & MESSAGES
   ========================================== */
.flash-wrapper {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-weight: bold;
    border-left: 5px solid;
}

.alert.error {
    background: #2d1818;
    border-color: #ff4d4d;
    color: #ff9999;
}

.alert.success {
    background: #182d1f;
    border-color: #2eca68;
    color: #8ce6ad;
}

.alert.info {
    background: #182535;
    border-color: #4a9eff;
    color: #9bc5ff;
}

/* ==========================================
   PAGE D'ACCUEIL & CLASSEMENT
   ========================================== */
.home-page {
    display: grid;
    gap: 1.5rem;
}

.hero {
    padding-top: 0.5rem;
    color: #e5e5e5;
}

.eyebrow {
    margin: 0 0 0.5rem;
    letter-spacing: 0.15em;
    color: #b98d14;
    font-size: 0.85rem;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    
}

.hero h2 {
    margin: 0 0 0.5rem;
    font-family: 'Special Elite', cursive;
    font-size: 2.2rem;
    color: #fff;
}

.intro {
    margin: 0;
    color: #aaa;
}

.user_info {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

/* Carte Agent / Badge de police */
.user-info {
    background: #24272c;
    color: #fff;
    border: 2px solid #3a3f47;
    border-left: 6px solid #d4a72c;
    border-radius: 4px;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1.5rem;
}

.user-identity {
    grid-column: 1;
    grid-row: 1;
}

.user-kicker,
.score-block span,
.progress-label {
    display: block;
    color: #aaa;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.user-info h3 {
    margin: 0;
    font-family: 'Special Elite', cursive;
    font-size: 1.3rem;
    color: #f0c243;
}

.score-block {
    grid-column: 2;
    grid-row: 1;
    min-width: 9rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid #3a3f47;
    background: #17191c;
    text-align: right;
}

.score-block strong {
    display: block;
    margin-top: 0.1rem;
    color: #f0c243;
    font-size: 1.45rem;
    line-height: 1;
}

.progress-block {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
}

.progress-block strong {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.king-status {
    grid-column: 2;
    grid-row: 2;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    color: #d4a72c;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: right;
}

.king-icon {
    display: inline-flex;
}

.king-crown {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    color: #d4a72c;
    vertical-align: -0.25em;
    margin-right: 0.2em;
}

.king-crown-disabled {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    color: #383838;
    vertical-align: -0.25em;
    margin-right: 0.2em;
}

.user-info ul {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.25rem 0 0;
    padding: 0;
    list-style: none;
}

.user-info li {
    padding: 0.25rem 0.65rem;
    border: 1px stroke #555;
    background: #17191c;
    color: #ccc;
    font-size: 0.8rem;
}

/* Tableau d'affichage des Suspects / Classement */
.ranking-list {
    display: grid;
    gap: 0.7rem;
}

.ranking-row {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 4.25rem;
    padding: 0.75rem 1.1rem 0.75rem 0.75rem;
    background: #e6d5b8;
    border: 1px solid #b8a686;
    border-left: 6px solid #666;
    border-radius: 2px;
    color: #222;
}

.ranking-gold { border-left-color: #d4a72c; }
.ranking-silver { border-left-color: #a0aab0; }
.ranking-bronze { border-left-color: #cd7f32; }

.ranking-position {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0;
    background: #222;
    color: #fff;
    font-family: 'Special Elite', cursive;
    font-size: 1.2rem;
}

.ranking-gold .ranking-position { background: #d4a72c; color: #000; }
.ranking-silver .ranking-position { background: #a0aab0; color: #000; }
.ranking-bronze .ranking-position { background: #cd7f32; color: #000; }

.ranking-team h3 {
    color: #111;
    font-size: 1.1rem;
    font-weight: bold;
}

.ranking-team span {
    margin-top: 0.25rem;
    color: #554838;
    font-size: 0.85rem;
}

.ranking-score {
    color: #111;
    font-weight: bold;
    font-size: 1.1rem;
}

.ranking-score span {
    color: #665544;
}

@media (max-width: 520px) {
    .user-info { grid-template-columns: 1fr; }
    .user-identity,
    .score-block,
    .progress-block,
    .king-status { grid-column: 1; grid-row: auto; }
    .score-block,
    .king-status { text-align: left; justify-content: flex-start; }
    .ranking-row { grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0.75rem; padding-right: 0.75rem; }
    .ranking-score { grid-column: 2; grid-row: 2; font-size: 1rem; }
}

/* ==========================================
   CARTES ÉNIGMES (Pièces à conviction)
   ========================================== */
.enigme-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.enigme-card {
    background: #f4ebd9;
    border: 1px solid #c8b89b;
    border-top: 8px solid #333;
    border-radius: 2px;
    padding: 1.2rem;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
}

.puzzle-points {
    margin: 0;
    color: #555;
    font-family: 'Special Elite', cursive;
    font-size: 0.85rem;
    font-weight: 700;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag {
    font-family: 'Special Elite', cursive;
    color: #111;
    font-size: 1.1rem;
}

.level {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid;
    border-radius: 0;
}

.level-1 { background: #e2f0d9; color: #2e5b1e; border-color: #88b04b; }
.level-2 { background: #fff2cc; color: #7f6000; border-color: #d6b656; }
.level-3 { background: #fce4d6; color: #c65911; border-color: #e07a5f; }
.level-4 { background: #f2ceef; color: #7030a0; border-color: #b15bde; }

/* Tampon rouge « dossier confidentiel » pour les niveaux sur l'accueil. */
.home-page .enigme-list .card-top {
    flex-wrap: wrap;
    gap: 0.8rem;
}

.home-page .enigme-list .level {
    display: inline-flex;
    position: relative;
    isolation: isolate;
    min-width: 136px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.65rem;
    border: 4px double #b83c28;
    border-radius: 2px;
    background: transparent;
    color: #b83c28;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    transform: rotate(-3deg);
    text-shadow: 0.35px 0 currentColor, -0.35px 0 currentColor;
}

.home-page .enigme-list .level::before {
    position: absolute;
    inset: 3px;
    border: 1px dashed currentColor;
    content: '';
    pointer-events: none;
}

.home-page .enigme-list .level::after {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.8px);
    background-size: 11px 8px;
    content: '';
    opacity: 0.45;
    pointer-events: none;
}

.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
    color: #fff;
    border: 1px solid #000;
    padding: 0.6rem 0.8rem;
    border-radius: 0;
    width: 174px;
    max-width: 100%;
    height: 42px;
    background: #222;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.link-button:hover {
    background: #d4a72c;
    color: #000;
}

.archived-button,
.archived-button:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    overflow: visible;
    margin-left: 0.35rem;
    box-sizing: border-box;
    width: 174px;
    max-width: calc(100% - 1.7rem);
    height: 42px;
    border: 1px solid #171717;
    background-color: #e5bd28;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent 0 14px,
        rgba(20, 20, 20, 0.9) 14px 22px
    );
    color: #faf9f9;
    cursor: default;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    white-space: nowrap;
    text-transform: uppercase;
    transform: rotate(-2deg);
    box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.16);
}

.archived-button::before,
.archived-button::after {
    position: absolute;
    z-index: -1;
    top: 50%;
    width: 1.1rem;
    height: 1.35rem;
    background: #e5bd28;
    content: '';
    transform: translateY(-50%);
}

.archived-button::before {
    left: -0.85rem;
    border-left: 1px solid #171717;
    transform: translateY(-50%) rotate(-4deg);
}

.archived-button::after {
    right: -0.85rem;
    border-right: 1px solid #171717;
    transform: translateY(-50%) rotate(4deg);
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    border-top: 2px dashed #33373d;
    text-align: center;
    color: #888;
}

.site-footer p {
    margin: 0 0 0.5rem;
    font-family: 'Special Elite', cursive;
    color: #aaa;
}

.site-footer ul {
    margin: 0; padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer a {
    color: #d4a72c;
    text-decoration: none;
}

/* ==========================================
   PANNEAU D'ADMINISTRATION
   ========================================== */
.admin-page { max-width: 900px; }

.admin-section {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    background: #e6d5b8;
    border: 2px solid #b8a686;
    border-radius: 2px;
    color: #111;
}

.admin-section h3 {
    margin: 0;
    font-family: 'Special Elite', cursive;
    font-size: 1.4rem;
    border-bottom: 1px solid #8c7a6b;
    padding-bottom: 0.5rem;
}

.admin-team-list {
    display: grid;
    gap: 0;
    max-height: 22rem;
    min-width: 0;
    padding-right: 0.5rem;
    overflow-y: auto;
}

.admin-team-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.75rem 0;
    border-top: 1px dashed #a89678;
}

.admin-team-name { flex: 1; min-width: 0; margin: 0; font-weight: 700; }
.admin-team-form.action-form { display: flex; align-items: center; gap: 0.5rem; }
.admin-score-form.action-form { display: flex; align-items: center; gap: 0.55rem; white-space: nowrap; }
.admin-score-display {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 7.5rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid #8c7a6b;
    background: linear-gradient(135deg, #f7efdc, #dfcfad);
    box-shadow: 2px 2px 0 rgba(68, 51, 34, 0.22);
}
.admin-score-label {
    color: #665544;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.admin-score-display strong {
    color: #25251f;
    font-family: 'Courier Prime', monospace;
    font-size: 1.3rem;
    line-height: 1;
}
.admin-score-unit {
    color: #665544;
    font-size: 0.7rem;
    text-transform: uppercase;
}
.admin-score-form form { margin: 0; }
.admin-score-form button {
    min-width: 2.7rem;
    padding: 0.55rem 0.6rem;
    border-width: 1px;
    box-shadow: 2px 2px 0 rgba(68, 51, 34, 0.25);
}
.admin-score-form form:first-of-type button {
    border-color: #873b32;
    background: #873b32;
    color: #fff4e5;
}
.admin-score-form form:first-of-type button:hover:not(:disabled) {
    background: #a44b3e;
}
.admin-score-form form:last-of-type button {
    border-color: #55633a;
    background: #55633a;
    color: #fff4e5;
}
.admin-score-form form:last-of-type button:hover {
    background: #6b7d49;
}
.admin-score-form button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}
.admin-score-form label { color: #443322; font-size: 0.85rem; }
.admin-score-form input { width: 5rem; }
.admin-team-form button { padding: 0.5rem 0.7rem; font-size: 0.8rem; }

.admin-create-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.admin-create-fields input { min-width: 0; }
.admin-create-fields button { grid-column: 1 / -1; justify-self: end; }

@media (max-width: 600px) {
    .admin-team-item { grid-template-columns: minmax(0, 1fr) auto; }
    .admin-team-form { grid-column: 2; }
    .admin-score-form { grid-column: 1 / -1; justify-content: flex-end; }
    .admin-create-fields { grid-template-columns: 1fr; }
    .admin-create-fields button { grid-column: auto; justify-self: stretch; }
}

/* ==========================================
   PAGE ÉNIGME & SCHÉMA SQL
   ========================================== */
.enigme-page {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    max-width: 1200px;
    margin: 0 auto;
}

.enigme-content {
    grid-column: 2;
    display: grid;
    gap: 1.25rem;
}

.schema_sql {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    position: sticky;
    top: 1.25rem;
    background: #222;
    border: 2px solid #3a3f47;
    padding: 4px;
}

.schema-title {
    color: #f0c243;
}

.schema_sql iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    height: max(700px, calc(100vh - 10rem));
    border: 0;
}

.back-link {
    color: #d4a72c;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover { text-decoration: underline; }

.enigme-header, .panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #fff;
}

.enigme-header h2 {
    font-family: 'Special Elite', cursive;
    font-size: 2.25rem;
    color: #f0c243;
}

.enigme-description {
    margin: 0;
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.5;
}

.enigme-panel {
    display: grid;
    gap: 1rem;
    background: #e6d5b8;
    border: 1px solid #b8a686;
    border-radius: 2px;
    padding: 1.25rem;
    color: #111;
}

.counter {
    color: #554838;
    font-size: 0.9rem;
}

.counter strong { color: #000; }

.action-form, .query-result { display: grid; gap: 0.45rem; }
.form-row { display: flex; gap: 0.6rem; }
.form-row input { flex: 1; }
.query-form-row { flex-direction: column; align-items: flex-end; }
.query-form-row textarea { flex: none; }

.feedback { min-height: 1.2rem; margin: 0; font-weight: bold; }

.answer-feedback {
    display: grid;
    gap: 0.3rem;
    padding: 0.8rem;
    border-left: 5px solid;
}

.answer-success { background: #d4edda; border-color: #28a745; color: #155724; }
.answer-error { background: #f8d7da; border-color: #dc3545; color: #721c24; }

/* Zone de résultat Terminal / Base de données */
.query-result {
    margin: 0;
    padding: 0.8rem;
    background: #17191c;
    color: #00ff66; /* Style moniteur vert vintage */
    border-left: 4px solid #d4a72c;
    font-family: 'Courier Prime', monospace;
}

.query-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #444;
    background: #111;
}

.query-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #eee;
}

.query-table th, .query-table td {
    padding: 0.65rem 0.8rem;
    border: 1px solid #333;
    text-align: left;
}

.query-table th {
    background: #25282e;
    color: #d4a72c;
    text-transform: uppercase;
}

.query-table tbody tr:nth-child(even) { background: #1a1c20; }

.query-empty, .query-meta { color: #888; font-size: 0.85rem; }
.query-error { color: #ff6b6b; }
.result-label { color: #d4a72c; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; }

@media (max-width: 600px) {
    .header-container { flex-direction: column; align-items: flex-start; }
    .site-footer ul { flex-direction: column; gap: 0.35rem; }
    .enigme-header, .panel-heading { align-items: flex-start; flex-direction: column; }
    .enigme-header h2 { font-size: 1.8rem; }
    .enigme-page { grid-template-columns: minmax(0, 1fr); }
    .enigme-content { grid-column: 1; }
    .schema_sql { grid-column: 1; grid-row: auto; position: static; }
    .schema_sql iframe { height: 500px; }
    .form-row { flex-direction: column; }
}