/**
 * Portail Admission public — styles canoniques (Theme.php).
 */
[data-module="admission-public"] {
  --module-bg: var(--agenla-bg);
}

[data-theme="light"][data-module="admission-public"] {
  --module-bg: #f5f9fc;
}

[data-theme="dark"][data-module="admission-public"],
[data-theme="dark"] body.admission-public {
  --module-bg: #0a1218;
  --ad-header-bg: rgba(15, 23, 42, 0.96);
  --ad-header-border: rgba(148, 163, 184, 0.22);
  --ad-bg: #0a1218;
  --ad-text: #e2e8f0;
  --ad-muted: #94a3b8;
  --ad-white: rgba(30, 41, 59, 0.94);
  --ad-text-strong: #f1f5f9;
  --ad-text-label: #cbd5e1;
  --ad-text-accent: var(--ad-accent-light);
  --ad-surface: rgba(30, 41, 59, 0.94);
  --ad-surface-border: rgba(148, 163, 184, 0.22);
  --ad-input-bg: rgba(15, 23, 42, 0.72);
  --ad-input-border: rgba(148, 163, 184, 0.32);
  --ad-disabled-bg: rgba(51, 65, 85, 0.55);
  --ad-disabled-text: #94a3b8;
  --ad-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

:root {
    /* Bleu pétrole pastel — module Admissions */
    --ad-accent: #5b8494;
    --ad-accent-dark: #466674;
    --ad-accent-soft: #e3eff3;
    --ad-accent-light: #8fafb9;
    --ad-accent-border: #c8dde5;
    --ad-accent-rgb: 91, 132, 148;
    --ad-primary: var(--ad-accent);
    --ad-primary-dark: var(--ad-accent-dark);
    --ad-primary-light: #7fa3b0;
    --ad-header-bg: #ffffff;
    --ad-header-border: #e2ebef;
    --ad-bg: #f3f7f9;
    --ad-text: #1e293b;
    --ad-muted: #64748b;
    --ad-white: #ffffff;
    --ad-shadow: 0 2px 16px rgba(45, 79, 92, 0.08);
    --ad-radius: 12px;
    --ad-text-strong: #0f172a;
    --ad-text-label: var(--ad-accent-dark);
    --ad-text-accent: var(--ad-accent);
    --ad-surface: #ffffff;
    --ad-surface-border: #e8f0f4;
    --ad-input-bg: #fafcfd;
    --ad-input-border: #d4e2e8;
    --ad-disabled-bg: #eef2f5;
    --ad-disabled-text: #6c757d;
}

* { box-sizing: border-box; }

body.admission-public {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--ad-bg);
    color: var(--ad-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    max-width: 100%;
}

/* Remplace le vert Bootstrap par le bleu pétrole */
.admission-public .text-success {
    color: var(--ad-accent) !important;
}

.ad-topbar {
    background: var(--ad-header-bg);
    color: var(--ad-text);
    border-bottom: 1px solid var(--ad-header-border);
    box-shadow: var(--ad-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top, 0);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.ad-topbar-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

.ad-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-left: auto;
}

.ad-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ad-text);
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.ad-brand img {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

.ad-brand-text {
    min-width: 0;
    overflow: hidden;
}

.ad-brand-text strong {
    display: block;
    font-size: clamp(0.82rem, 2.8vw, 1.05rem);
    line-height: 1.2;
    color: var(--ad-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 999px;
    background: var(--ad-accent-soft);
    border: 1px solid var(--ad-accent-border);
    flex-shrink: 0;
}

.ad-lang-btn {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--ad-accent-dark);
    transition: background 0.15s, color 0.15s;
}

.ad-lang-btn.active {
    background: var(--ad-accent);
    color: #fff;
}

.ad-lang-sep {
    color: #cbd5e1;
    font-size: 0.75rem;
    user-select: none;
}

.ad-nav-toggle {
    display: none;
    border: 1px solid var(--ad-header-border);
    background: #fff;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    color: var(--ad-text);
    cursor: pointer;
    flex-shrink: 0;
}

.ad-topbar .agenla-theme-switcher {
    flex-shrink: 0;
}

.ad-topbar .agenla-theme-switcher--compact .agenla-theme-btn {
    min-width: 30px;
    min-height: 30px;
    padding: 4px;
}

.ad-nav {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.25rem 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    box-sizing: border-box;
}

.ad-nav-link {
    color: var(--ad-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.ad-nav-link:hover {
    background: var(--ad-accent-soft);
    color: var(--ad-accent-dark);
}

.ad-nav-link.active {
    background: var(--ad-accent-soft);
    color: var(--ad-accent-dark);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(var(--ad-accent-rgb), 0.35);
}

.ad-nav-link.ad-nav-link-admin {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

.ad-nav-link.ad-nav-link-admin:hover {
    background: rgba(255, 255, 255, 0.22);
    color: var(--ad-accent-dark);
}

.ad-main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
    width: 100%;
}

.ad-footer {
    background: linear-gradient(135deg, #466674 0%, #3a5560 100%);
    color: rgba(255, 255, 255, 0.92);
    padding: 2rem 1.25rem;
    margin-top: auto;
}

.ad-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.9rem;
}

.ad-hero {
    background: linear-gradient(135deg, var(--ad-accent-light) 0%, var(--ad-accent) 55%, var(--ad-accent-dark) 100%);
    color: #fff;
    border-radius: var(--ad-radius);
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--ad-shadow);
}

.ad-hero h1 { margin: 0 0 0.75rem; font-size: clamp(1.35rem, 2.5vw + 0.85rem, 1.85rem); }
.ad-hero p { margin: 0; opacity: 0.95; max-width: 640px; }
.ad-hero-institution h1 { font-size: clamp(1.4rem, 3vw + 0.75rem, 2rem); }
.ad-hero-lead { font-size: clamp(0.95rem, 1.2vw + 0.75rem, 1.05rem); line-height: 1.6; margin-top: 0.75rem !important; max-width: 640px !important; }

.ad-hero-institution {
    text-align: left;
    padding: 3rem 2.5rem;
    background-size: cover;
    background-position: center;
}
.ad-hero-institution .ad-hero-content { max-width: 720px; }
.ad-hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}
.ad-badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.ad-badge-institution {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    font-size: 0.8rem;
    font-weight: 500;
}
.ad-btn-outline-light {
    border-color: rgba(255,255,255,0.75) !important;
    color: #fff !important;
}
.ad-btn-outline-light:hover { background: rgba(255,255,255,0.12); }

.ad-wizard-institution-banner {
    background: var(--ad-accent-soft);
    border: 1px solid var(--ad-accent-border);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: var(--ad-accent-dark);
    margin-bottom: 1rem;
}
.ad-wizard-institution-banner i { margin-right: 0.35rem; }

.ad-autosave-indicator {
    font-size: 0.8rem;
    color: var(--ad-muted);
    min-height: 1.25rem;
    margin-bottom: 0.5rem;
    text-align: right;
}
.ad-autosave-indicator[data-status="saved"] { color: var(--ad-accent); }
.ad-autosave-indicator[data-status="offline"] { color: #b45309; }

.ad-resume-banner,
.ad-resume-page .ad-resume-banner {
    background: var(--ad-accent-soft);
    border: 1px solid var(--ad-accent-border);
    border-radius: var(--ad-radius);
    padding: 1rem 1.25rem;
}
.ad-resume-page { max-width: 720px; margin: 0 auto; }

.ad-about-mission {
    background: var(--ad-accent-soft);
    border-radius: var(--ad-radius);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--ad-accent-border);
}

.ad-card {
    background: var(--ad-white);
    border-radius: var(--ad-radius);
    box-shadow: var(--ad-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e8f0f4;
}

.ad-card h3 i {
    color: var(--ad-accent);
}

.ad-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    min-height: 44px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ad-btn-primary { background: var(--ad-accent); color: #fff; }
.ad-btn-primary:hover { background: var(--ad-accent-dark); color: #fff; }
.ad-btn-outline { background: transparent; border: 2px solid var(--ad-accent); color: var(--ad-accent); }
.ad-btn-outline:hover { background: var(--ad-accent-soft); color: var(--ad-accent-dark); }
.ad-btn-light { background: #fff; color: var(--ad-accent-dark); }
.ad-btn-light:hover { background: var(--ad-accent-soft); color: var(--ad-accent-dark); }

.wizard-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.wizard-step {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--ad-accent-soft);
    font-size: 0.75rem;
    color: var(--ad-accent-dark);
    border: 2px solid transparent;
    font-family: inherit;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.wizard-step.clickable {
    cursor: pointer;
}

.wizard-step.clickable:hover {
    border-color: rgba(var(--ad-accent-rgb), 0.4);
    box-shadow: 0 2px 8px rgba(var(--ad-accent-rgb), 0.14);
}

.wizard-step.locked {
    cursor: not-allowed;
    opacity: 0.55;
}

.wizard-step.active {
    background: var(--ad-accent);
    color: #fff;
    font-weight: 600;
    border-color: var(--ad-accent-dark);
    box-shadow: 0 0 0 3px rgba(var(--ad-accent-rgb), 0.28);
}

.wizard-step.done {
    background: var(--ad-primary-light);
    color: #fff;
}

.wizard-step.done:not(.active) {
    background: #d0e4eb;
    color: var(--ad-accent-dark);
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Wizard fieldsets & help */
.wizard-fieldset {
    border: 1px solid var(--ad-accent-border);
    border-radius: var(--ad-radius);
    padding: 1.25rem 1.25rem 1rem;
    margin-bottom: 1.25rem;
    background: #fff;
}

.wizard-fieldset--plain {
    border: none;
    padding: 0;
    background: transparent;
}

.wizard-legend {
    float: none;
    width: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ad-accent-dark);
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.ad-help-btn {
    border: none;
    background: transparent;
    color: var(--ad-accent);
    padding: 0;
    line-height: 1;
    font-size: 1rem;
    cursor: help;
}

.ad-help-btn:hover,
.ad-help-btn:focus {
    color: var(--ad-accent-dark);
}

/* Recherche classe (Tom Select) */
.ad-class-search-zone {
    background: linear-gradient(180deg, var(--ad-accent-soft) 0%, #fff 100%);
    border: 1px solid var(--ad-accent-border);
    border-radius: var(--ad-radius);
    padding: 1rem 1.25rem;
}

.ad-class-search-label {
    font-weight: 600;
    color: var(--ad-accent-dark);
    margin-bottom: 0.5rem;
}

.ad-class-search-zone .ts-wrapper.ad-class-search-select,
.ad-class-search-zone .ts-wrapper.ad-classe-select {
    width: 100%;
}

.ad-class-search-zone .ts-control {
    min-height: 3rem;
    font-size: 1rem;
    padding: 0.65rem 0.75rem;
}

.ad-class-search-zone.class-search-disabled {
    opacity: 0.55;
    pointer-events: none;
}

/* Étape 2 — deux parcours de sélection */
.ad-step2-choice {
    border: 1px solid var(--ad-accent-border);
    border-radius: var(--ad-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    background: var(--ad-white);
}

.ad-step2-choice--search {
    background: linear-gradient(180deg, var(--ad-accent-soft) 0%, #fff 100%);
}

.ad-step2-choice__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ad-accent-dark);
    background: var(--ad-accent-soft);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.5rem;
}

.ad-step2-choice__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ad-accent-dark);
    margin: 0 0 0.35rem;
}

.ad-step2-or {
    text-align: center;
    margin: 0.75rem 0;
    font-weight: 700;
    color: var(--ad-muted);
}

.ad-step2-or span {
    display: inline-block;
    padding: 0 0.75rem;
    background: var(--ad-bg);
}

.ad-access-card {
    max-width: 560px;
    margin: 0 auto;
}

.ad-access-help {
    border: 1px solid var(--ad-accent-border);
    border-radius: var(--ad-radius);
    padding: 1rem;
    background: var(--ad-accent-soft);
}

.ad-access-option {
    background: #fff;
    border-radius: var(--ad-radius-sm, 8px);
    padding: 0.75rem 1rem;
}

.ad-access-or {
    font-weight: 700;
    color: var(--ad-muted);
}

.ad-access-or span {
    background: var(--ad-accent-soft);
    padding: 0 0.5rem;
}

.path-select.path-select-locked {
    background-color: #eef2f5;
    color: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
}

.path-select:disabled {
    background-color: #eef2f5;
    color: #6c757d;
    cursor: not-allowed;
}

.code-box {
    font-family: monospace;
    font-size: 1.5rem;
    letter-spacing: 2px;
    background: var(--ad-accent-soft);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    color: var(--ad-accent-dark);
    font-weight: 700;
}

.form-select option { white-space: normal; }
.ad-card select.form-select { max-width: 100%; }

/* Tom Select — thème bleu pétrole */
.admission-public .ts-wrapper.ad-classe-select .ts-control {
    border-color: var(--ad-accent-border);
}
.admission-public .ts-wrapper.ad-classe-select.focus .ts-control {
    border-color: var(--ad-accent);
    box-shadow: 0 0 0 0.2rem rgba(var(--ad-accent-rgb), 0.2);
}
.admission-public .ts-dropdown .active {
    background-color: var(--ad-accent-soft);
    color: var(--ad-accent-dark);
}

.admission-public .alert-info {
    background-color: var(--ad-accent-soft);
    border-color: var(--ad-accent-border);
    color: var(--ad-accent-dark);
}

@media (max-width: 992px) {
    .ad-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .ad-nav {
        display: none;
        flex-direction: column;
        padding-top: 0;
    }
    .ad-nav.is-open { display: flex; }
    .ad-nav-link { width: 100%; }
}

@media (max-width: 768px) {
    .ad-main { padding: 1.5rem 1rem 2.5rem; }
    .ad-topbar-inner { padding-left: 0.75rem; padding-right: 0.75rem; }
    .ad-nav { padding-left: 0.75rem; padding-right: 0.75rem; }
}

@media (max-width: 480px) {
    .ad-brand-text { display: none; }
    .ad-brand img { height: 36px; }
    .ad-topbar-actions { gap: 0.25rem; }
    .ad-topbar .agenla-theme-switcher--compact .agenla-theme-btn {
        min-width: 28px;
        min-height: 28px;
        padding: 3px;
        font-size: 0.7rem;
    }
    .ad-lang-btn { padding: 4px 7px; font-size: 0.72rem; }
}

.ad-classe-option { white-space: normal; line-height: 1.35; padding: 4px 0; }
.ts-wrapper.ad-classe-select { width: 100%; }
/* Couleurs école : voir Services/assets/css/classe-select.css */

/* ——— Page À propos ——— */
.ad-about-hero {
    background: linear-gradient(135deg, var(--ad-accent-soft) 0%, #fff 100%);
    border: 1px solid var(--ad-accent-border);
    border-radius: var(--ad-radius);
    padding: 2rem 1.5rem;
    margin-bottom: 1.25rem;
}

.ad-about-hero h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    color: var(--ad-accent-dark);
}

.ad-about-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
    padding: 4px;
    background: var(--ad-white);
    border-radius: var(--ad-radius);
    border: 1px solid var(--ad-accent-border);
    box-shadow: var(--ad-shadow);
}

.ad-about-tab {
    flex: 1 1 auto;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ad-muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ad-about-tab:hover {
    background: var(--ad-accent-soft);
    color: var(--ad-accent-dark);
}

.ad-about-tab.active {
    background: var(--ad-accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(var(--ad-accent-rgb), 0.25);
}

.ad-about-details {
    border: 1px solid var(--ad-accent-border);
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
}

.ad-about-details summary {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--ad-accent-dark);
    cursor: pointer;
    list-style: none;
}

.ad-about-details summary::-webkit-details-marker { display: none; }

.ad-about-details-body {
    padding: 0 16px 14px;
    font-size: 0.95rem;
    line-height: 1.55;
}

.ad-about-list {
    margin: 0;
    padding-left: 1.2rem;
}

.ad-about-list li { margin-bottom: 6px; }

.ad-about-list-cols {
    columns: 2;
    column-gap: 1.5rem;
}

@media (max-width: 576px) {
    .ad-about-list-cols { columns: 1; }
}

.ad-about-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.ad-about-list-inline li {
    background: var(--ad-accent-soft);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.ad-about-strengths li {
    list-style: none;
    margin-bottom: 8px;
}

.ad-about-strengths li i {
    color: var(--ad-accent);
    margin-right: 8px;
}

.ad-about-contact-box {
    background: var(--ad-accent-soft);
    border-radius: var(--ad-radius);
    padding: 1.25rem;
    border: 1px solid var(--ad-accent-border);
}

.ad-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.ad-gallery-item {
    margin: 0;
    border-radius: var(--ad-radius);
    overflow: hidden;
    border: 1px solid var(--ad-accent-border);
    background: #fff;
}

.ad-gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.ad-gallery-placeholder {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ad-accent-soft);
    color: var(--ad-accent-light);
    font-size: 2.5rem;
}

.ad-gallery-item figcaption {
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.ad-video-placeholder {
    background: var(--ad-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ad-accent);
    border-radius: 8px;
}

.ad-video-card {
    background: #fff;
    border: 1px solid var(--ad-accent-border);
    border-radius: var(--ad-radius);
    padding: 12px;
}

.ad-faq-item {
    border: 1px solid var(--ad-accent-border);
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 0 14px;
    background: #fff;
}

.ad-faq-item summary {
    padding: 12px 0;
    font-weight: 600;
    cursor: pointer;
    color: var(--ad-accent-dark);
}

.ad-faq-item p {
    margin: 0 0 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ad-text);
}

.ad-contact-form .form-label {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ——— Système de formulaires custom (sans look Bootstrap) ——— */
.ad-form {
    --ad-field-gap: 1.1rem;
    --ad-input-h: 3rem;
    --ad-input-radius: 10px;
    --ad-input-border: #d4e2e8;
    --ad-input-bg: #fafcfd;
    --ad-input-focus: var(--ad-accent);
}

.ad-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ad-field-gap);
    margin-bottom: 1.25rem;
}

.ad-form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ad-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.ad-field--full { grid-column: 1 / -1; }

.ad-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ad-accent-dark);
    letter-spacing: 0.01em;
}

.ad-required { color: #c0392b; }
.ad-optional { color: var(--ad-muted); font-weight: 400; font-size: 0.78rem; }

.ad-input,
.ad-select,
.ad-textarea,
.ad-form .form-control,
.ad-form .form-select {
    width: 100%;
    min-height: var(--ad-input-h);
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--ad-input-border);
    border-radius: var(--ad-input-radius);
    background: var(--ad-input-bg);
    color: var(--ad-text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.ad-textarea { min-height: 5rem; resize: vertical; }

.ad-input:hover,
.ad-select:hover,
.ad-textarea:hover {
    border-color: #b8cdd6;
    background: #fff;
}

.ad-input:focus,
.ad-select:focus,
.ad-textarea:focus {
    outline: none;
    border-color: var(--ad-input-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(var(--ad-accent-rgb), 0.18);
}

.ad-input-group {
    display: flex;
    align-items: stretch;
}

.ad-input-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 0.85rem;
    background: var(--ad-accent-soft);
    border: 1.5px solid var(--ad-input-border);
    border-right: none;
    border-radius: var(--ad-input-radius) 0 0 var(--ad-input-radius);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ad-accent-dark);
    white-space: nowrap;
}

.ad-input-group .ad-input {
    border-radius: 0 var(--ad-input-radius) var(--ad-input-radius) 0;
}

.ad-select,
.ad-form select.ad-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23466674' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.2rem;
    cursor: pointer;
}

.ad-form-intro,
.ad-form-hint {
    font-size: 0.88rem;
    color: var(--ad-muted);
    line-height: 1.5;
    margin: 0 0 1rem;
}

.ad-form-hint--error { color: #b42318; font-weight: 500; }

.ad-resume-tabs {
    display: flex;
    gap: 8px;
    margin: 1.25rem 0 1rem;
    padding: 4px;
    background: var(--ad-accent-soft);
    border-radius: 10px;
    border: 1px solid var(--ad-accent-border);
}

.ad-resume-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ad-muted);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ad-resume-tab.active {
    background: #fff;
    color: var(--ad-accent-dark);
    font-weight: 600;
    box-shadow: 0 1px 6px rgba(var(--ad-accent-rgb), 0.12);
}

.ad-notice {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.ad-notice--error {
    background: #fde8e8;
    border: 1px solid #f5c2c2;
    color: #b42318;
}

.ad-form-hint--success { color: var(--ad-accent-dark); font-weight: 500; }

.ad-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ad-accent-dark);
    margin: 0.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ad-accent-border);
}

.ad-check-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.ad-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
}

.ad-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ad-check-box {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.1rem;
    border: 2px solid var(--ad-accent-border);
    border-radius: 4px;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}

.ad-check input:checked + .ad-check-box {
    background: var(--ad-accent);
    border-color: var(--ad-accent);
}

.ad-check input:checked + .ad-check-box::after {
    content: '';
    position: absolute;
    left: 0.28rem;
    top: 0.05rem;
    width: 0.35rem;
    height: 0.65rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ad-check-label {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--ad-text);
}

.ad-check-label a { color: var(--ad-accent); }

.ad-check--compact { margin-top: 0.75rem; }

/* Upload documents */
.ad-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ad-upload-card {
    border: 1px solid var(--ad-accent-border);
    border-radius: var(--ad-radius);
    padding: 1rem;
    background: linear-gradient(180deg, #fafcfd 0%, #fff 100%);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ad-upload-card.is-uploaded {
    border-color: rgba(var(--ad-accent-rgb), 0.45);
    box-shadow: 0 0 0 1px rgba(var(--ad-accent-rgb), 0.12);
}

.ad-upload-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ad-upload-card__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: var(--ad-accent-soft);
    color: var(--ad-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ad-upload-card__meta { flex: 1; min-width: 0; }

.ad-upload-card__title {
    display: block;
    font-size: 0.92rem;
    color: var(--ad-text);
}

.ad-upload-card__hint {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--ad-muted);
}

.ad-upload-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #eef2f5;
    color: var(--ad-muted);
    white-space: nowrap;
}

.ad-upload-badge[data-status="ok"] {
    background: #d8f0e4;
    color: #1a6b45;
}

.ad-upload-badge[data-status="error"] {
    background: #fde8e8;
    color: #b42318;
}

.ad-upload-badge[data-status="later"] {
    background: #fff4e5;
    color: #b45309;
}

.ad-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 7rem;
    padding: 1rem;
    border: 2px dashed var(--ad-accent-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.ad-upload-zone:hover,
.ad-upload-zone.is-dragover {
    border-color: var(--ad-accent);
    background: var(--ad-accent-soft);
}

.ad-upload-zone.has-file,
.ad-upload-card.is-uploaded .ad-upload-zone {
    border-style: solid;
    border-color: rgba(var(--ad-accent-rgb), 0.35);
    background: var(--ad-accent-soft);
}

.ad-upload-zone__icon {
    font-size: 1.5rem;
    color: var(--ad-accent);
}

.ad-upload-zone__text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ad-accent-dark);
}

.ad-upload-zone__browse {
    font-size: 0.78rem;
    color: var(--ad-muted);
}

.ad-upload-zone__filename {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ad-accent-dark);
    word-break: break-all;
    max-width: 100%;
}

.ad-resume-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Wizard responsive */
@media (max-width: 900px) {
    .ad-form-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ad-form-grid { grid-template-columns: 1fr; }
    .ad-upload-grid { grid-template-columns: 1fr; }
    .wizard-nav {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0.5rem;
    }
    .wizard-nav .ad-btn { justify-content: center; width: 100%; }
    .wizard-steps {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 4px;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    .wizard-step {
        flex: 0 0 auto;
        min-width: 5.5rem;
        scroll-snap-align: start;
        font-size: 0.68rem;
        padding: 8px 6px;
    }
    .ad-hero-institution { padding: 2rem 1.25rem; }
    .ad-hero-institution .mt-4.d-flex { flex-direction: column; }
    .ad-hero-institution .mt-4.d-flex .ad-btn { width: 100%; justify-content: center; }
}

/* Notices (remplace alert Bootstrap dans le wizard) */
.ad-form .alert {
    border-radius: 10px;
    border-width: 1px;
    font-size: 0.9rem;
}

.ad-form .alert-info {
    background: var(--ad-accent-soft);
    border-color: var(--ad-accent-border);
    color: var(--ad-accent-dark);
}

.path-select.path-select-locked,
.path-select:disabled,
.ad-select:disabled {
    background-color: #eef2f5;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.85;
}

#wizard-app.ad-card {
    padding: 1.75rem;
}

@media (max-width: 480px) {
    #wizard-app.ad-card { padding: 1rem; }
    .wizard-fieldset { padding: 1rem; }
}

@media (max-width: 576px) {
    .ad-main { padding: 1rem 1rem 2rem; }
    .ad-badge-row { flex-direction: column; align-items: flex-start; }
    .ad-main .row.g-4 > [class*="col-"] { margin-bottom: 0.25rem; }
    .ad-main .ad-card .ad-btn { width: 100%; justify-content: center; }
}

/* Formulaires — éviter débordement horizontal (Tom Select, inputs) */
.admission-public .ad-main .form-control,
.admission-public .ad-main .form-select,
.admission-public .ad-main .ts-wrapper,
.admission-public .ad-main .ts-control {
    max-width: 100%;
    box-sizing: border-box;
}

.admission-public .ad-main .ts-wrapper.ad-classe-select {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   Thème sombre — harmonisation texte / surfaces (Admission)
   ═══════════════════════════════════════════════════════════════ */
[data-theme="dark"] body.admission-public {
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public h1,
[data-theme="dark"] body.admission-public h2,
[data-theme="dark"] body.admission-public h3,
[data-theme="dark"] body.admission-public h4,
[data-theme="dark"] body.admission-public h5,
[data-theme="dark"] body.admission-public h6,
[data-theme="dark"] body.admission-public .ad-card > h2,
[data-theme="dark"] body.admission-public .ad-section-title {
    color: var(--ad-text-strong);
}

[data-theme="dark"] body.admission-public p,
[data-theme="dark"] body.admission-public li,
[data-theme="dark"] body.admission-public .ad-about-details-body,
[data-theme="dark"] body.admission-public .ad-check-label,
[data-theme="dark"] body.admission-public .ad-upload-card__title,
[data-theme="dark"] body.admission-public figcaption {
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public .text-muted,
[data-theme="dark"] body.admission-public small,
[data-theme="dark"] body.admission-public .ad-optional,
[data-theme="dark"] body.admission-public .ad-form-hint,
[data-theme="dark"] body.admission-public .ad-form-intro,
[data-theme="dark"] body.admission-public .ad-upload-card__hint,
[data-theme="dark"] body.admission-public .ad-upload-zone__browse {
    color: var(--ad-muted) !important;
}

[data-theme="dark"] body.admission-public .ad-label,
[data-theme="dark"] body.admission-public .wizard-legend,
[data-theme="dark"] body.admission-public .ad-class-search-label,
[data-theme="dark"] body.admission-public .ad-about-details summary,
[data-theme="dark"] body.admission-public .ad-faq-item summary,
[data-theme="dark"] body.admission-public .ad-wizard-institution-banner,
[data-theme="dark"] body.admission-public .ad-form-hint--success,
[data-theme="dark"] body.admission-public .code-box,
[data-theme="dark"] body.admission-public .ad-upload-zone__text,
[data-theme="dark"] body.admission-public .ad-upload-zone__filename,
[data-theme="dark"] body.admission-public .ad-about-hero h1,
[data-theme="dark"] body.admission-public .ad-about-tab:hover,
[data-theme="dark"] body.admission-public .ad-nav-link:hover,
[data-theme="dark"] body.admission-public .ad-nav-link.active,
[data-theme="dark"] body.admission-public .ad-lang-btn,
[data-theme="dark"] body.admission-public .ad-input-prefix {
    color: var(--ad-text-label);
}

[data-theme="dark"] body.admission-public .ad-card,
[data-theme="dark"] body.admission-public .wizard-fieldset,
[data-theme="dark"] body.admission-public .ad-about-details,
[data-theme="dark"] body.admission-public .ad-faq-item,
[data-theme="dark"] body.admission-public .ad-gallery-item,
[data-theme="dark"] body.admission-public .ad-video-card,
[data-theme="dark"] body.admission-public .ad-about-tabs,
[data-theme="dark"] body.admission-public .ad-upload-zone,
[data-theme="dark"] body.admission-public .ad-check-box,
[data-theme="dark"] body.admission-public .ad-resume-tab.active {
    background: var(--ad-surface);
    border-color: var(--ad-surface-border);
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public .ad-about-hero,
[data-theme="dark"] body.admission-public .ad-about-mission,
[data-theme="dark"] body.admission-public .ad-about-contact-box,
[data-theme="dark"] body.admission-public .ad-class-search-zone,
[data-theme="dark"] body.admission-public .ad-resume-banner,
[data-theme="dark"] body.admission-public .ad-upload-card,
[data-theme="dark"] body.admission-public .ad-resume-tabs,
[data-theme="dark"] body.admission-public .wizard-step,
[data-theme="dark"] body.admission-public .ad-about-list-inline li {
    background: var(--ad-accent-soft);
    color: var(--ad-text);
    border-color: var(--ad-accent-border);
}

[data-theme="dark"] body.admission-public .ad-about-hero h1,
[data-theme="dark"] body.admission-public .ad-about-list-inline li {
    color: var(--ad-text-strong);
}

[data-theme="dark"] body.admission-public .wizard-step {
    color: var(--ad-text-label);
}

[data-theme="dark"] body.admission-public .wizard-step.done:not(.active) {
    background: rgba(var(--ad-accent-rgb), 0.22);
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public .wizard-nav {
    border-top-color: var(--ad-surface-border);
}

[data-theme="dark"] body.admission-public .ad-btn-light {
    background: var(--ad-surface);
    color: var(--ad-text-strong);
    border: 1px solid var(--ad-surface-border);
}

[data-theme="dark"] body.admission-public .ad-btn-outline:hover {
    color: var(--ad-text-strong);
}

[data-theme="dark"] body.admission-public .ad-nav-toggle {
    background: var(--ad-surface);
    border-color: var(--ad-surface-border);
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public .path-select.path-select-locked,
[data-theme="dark"] body.admission-public .path-select:disabled,
[data-theme="dark"] body.admission-public .ad-select:disabled,
[data-theme="dark"] body.admission-public .ad-input:disabled,
[data-theme="dark"] body.admission-public .ad-textarea:disabled {
    background-color: var(--ad-disabled-bg);
    color: var(--ad-disabled-text);
}

[data-theme="dark"] body.admission-public .ad-input,
[data-theme="dark"] body.admission-public .ad-select,
[data-theme="dark"] body.admission-public .ad-textarea,
[data-theme="dark"] body.admission-public .form-control,
[data-theme="dark"] body.admission-public .form-select {
    background: var(--ad-input-bg);
    border-color: var(--ad-input-border);
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public .ad-input:hover,
[data-theme="dark"] body.admission-public .ad-select:hover,
[data-theme="dark"] body.admission-public .ad-textarea:hover,
[data-theme="dark"] body.admission-public .form-control:hover,
[data-theme="dark"] body.admission-public .form-select:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.45);
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public .ad-input:focus,
[data-theme="dark"] body.admission-public .ad-select:focus,
[data-theme="dark"] body.admission-public .ad-textarea:focus,
[data-theme="dark"] body.admission-public .form-control:focus,
[data-theme="dark"] body.admission-public .form-select:focus {
    background: rgba(30, 41, 59, 0.95);
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public .ad-input::placeholder,
[data-theme="dark"] body.admission-public .form-control::placeholder {
    color: var(--ad-muted);
}

[data-theme="dark"] body.admission-public .admission-public .alert-info,
[data-theme="dark"] body.admission-public .ad-form .alert-info {
    background: rgba(var(--ad-accent-rgb), 0.18);
    border-color: rgba(var(--ad-accent-rgb), 0.35);
    color: var(--ad-text-strong);
}

[data-theme="dark"] body.admission-public .ad-notice--error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

[data-theme="dark"] body.admission-public .ad-upload-badge {
    background: var(--ad-disabled-bg);
    color: var(--ad-muted);
}

[data-theme="dark"] body.admission-public .ad-upload-badge[data-status="ok"] {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

[data-theme="dark"] body.admission-public .ad-upload-badge[data-status="error"] {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

[data-theme="dark"] body.admission-public .ad-upload-badge[data-status="later"] {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

[data-theme="dark"] body.admission-public .admission-public .ts-control,
[data-theme="dark"] body.admission-public .ts-wrapper.ad-classe-select .ts-control {
    background: var(--ad-input-bg);
    border-color: var(--ad-input-border);
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public .ts-dropdown {
    background: var(--ad-surface);
    border-color: var(--ad-surface-border);
    color: var(--ad-text);
}

[data-theme="dark"] body.admission-public .admission-public .ts-dropdown .active {
    background-color: rgba(var(--ad-accent-rgb), 0.22);
    color: var(--ad-text-strong);
}

[data-theme="dark"] body.admission-public .ad-topbar .agenla-theme-switcher {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(148, 163, 184, 0.25);
}

[data-theme="dark"] body.admission-public .ad-topbar .agenla-theme-btn {
    color: var(--ad-muted);
}

[data-theme="dark"] body.admission-public .ad-check-label a,
[data-theme="dark"] body.admission-public .ad-help-btn,
[data-theme="dark"] body.admission-public .ad-help-btn:hover {
    color: var(--ad-accent-light);
}

[data-theme="dark"] body.admission-public .ad-footer {
    color: rgba(255, 255, 255, 0.92);
}

/* Messagerie candidat ↔ administration */
.ad-msg-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ad-msg-thread {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem;
    background: var(--ad-bg-soft, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--ad-border, rgba(0, 0, 0, 0.08));
    border-radius: 0.5rem;
}

.ad-msg-bubble {
    max-width: 88%;
    padding: 0.55rem 0.75rem;
    border-radius: 0.65rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.ad-msg-bubble.is-mine {
    align-self: flex-end;
    background: var(--ad-accent-soft, rgba(0, 135, 81, 0.12));
    border: 1px solid var(--ad-accent-border, rgba(0, 135, 81, 0.25));
}

.ad-msg-bubble.is-theirs {
    align-self: flex-start;
    background: var(--ad-card-bg, #fff);
    border: 1px solid var(--ad-border, rgba(0, 0, 0, 0.08));
}

.ad-msg-bubble__meta {
    font-size: 0.72rem;
    color: var(--ad-muted);
    margin-bottom: 0.25rem;
}

.ad-msg-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.ad-msg-form textarea {
    flex: 1;
    min-height: 72px;
    resize: vertical;
}

[data-theme="dark"] .ad-msg-thread {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .ad-msg-bubble.is-theirs {
    background: rgba(255, 255, 255, 0.06);
}


[data-theme="dark"] body.admission-public .ad-footer a {
    color: #fff;
}

/* Admission UI — modales, loader, toasts */
.ad-ui-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.ad-ui-modal {
    background: var(--ad-white);
    border-radius: var(--ad-radius);
    box-shadow: var(--ad-shadow);
    max-width: 420px;
    width: 100%;
    padding: 1.25rem;
}
.ad-ui-modal__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.ad-ui-modal__logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.ad-ui-modal__body {
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.ad-ui-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.ad-ui-loader {
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: rgba(243, 247, 249, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
}
.ad-ui-loader.is-visible { display: flex; }
.ad-ui-loader__inner { text-align: center; }
.ad-ui-loader__logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 1rem;
}
.ad-ui-loader__spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border: 3px solid var(--ad-accent-border);
    border-top-color: var(--ad-accent);
    border-radius: 50%;
    animation: ad-ui-spin 0.8s linear infinite;
}
@keyframes ad-ui-spin { to { transform: rotate(360deg); } }
.ad-ui-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10060;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(360px, calc(100vw - 2rem));
}
.ad-ui-toast {
    background: var(--ad-text-strong);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s;
    font-size: 0.9rem;
}
.ad-ui-toast.is-visible { opacity: 1; transform: translateY(0); }
.ad-ui-toast--success { background: var(--ad-accent-dark); }
.ad-ui-toast--error { background: #b91c1c; }
.ad-payment-fields .form-text { font-size: 0.75rem; }
@media (max-width: 767px) {
    .ad-payment-fields .col-md-6 { margin-bottom: 0.5rem; }
}
