/* ==========================================================================
   Génération Saint Joseph — base partagée
   Esprit « annuaire de promo » : serif éditorial, filets fins, aplats marine,
   formes droites. Couleurs du logo : marine, bleu roi, bleu ciel, blanc, sable.
   ========================================================================== */

:root {
    --navy: #0b2a5b;
    --navy-deep: #061c3f;
    --royal: #1e5bb8;
    --sky: #4c9be8;
    --sky-soft: #dcebfa;
    --sand: #ebe3d3;
    --sand-deep: #c9b892;

    --paper: #f7f8fa;
    --white: #ffffff;
    --rule: rgba(11, 42, 91, 0.14);
    --rule-strong: rgba(11, 42, 91, 0.3);

    --ink: #1c2740;
    --ink-2: #4f5d75;
    --ink-3: #8290a6;

    --ok: #1f7a4d;
    --ok-soft: #e3f3ea;
    --bad: #b83232;
    --bad-soft: #fae7e7;
    --warn: #b26a00;
    --warn-soft: #fbf0dc;

    --radius: 4px;
    --shadow: 0 10px 30px -18px rgba(11, 42, 91, 0.45);

    --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* --- Reset ---------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* L'attribut hidden doit gagner sur toute règle display (sinon .field-row { display: grid } le neutralise :
   c'est ce qui laissait la ligne ville / département visible quand Monaco était choisi) */
[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    color-scheme: light;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--navy);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

::selection {
    background: var(--sand);
    color: var(--navy);
}

:focus-visible {
    outline: 2px solid var(--royal);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Textes utilitaires ------------------------------------------------------- */

.kicker {
    display: block;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--royal);
    margin-bottom: 12px;
}

.lead {
    font-size: 18px;
    color: var(--ink-2);
    line-height: 1.55;
}

.muted {
    color: var(--ink-2);
}

.page-title {
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--rule);
}

.page-title h1 {
    font-size: 34px;
    font-weight: 500;
}

.page-title p {
    color: var(--ink-2);
    margin-top: 6px;
    max-width: 640px;
}

/* --- Marque ------------------------------------------------------------------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
}

/* Le logo complet de l'association (emblème + nom), jamais recadré */
.brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: var(--radius);
    background: #fff;
    flex-shrink: 0;
}

.brand-name {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.1;
    white-space: nowrap;
}

.brand-name em {
    font-style: italic;
    font-weight: 600;
}

/* --- Bandeau de tête (pages publiques) ------------------------------------------ */

.masthead {
    background: var(--white);
    border-bottom: 1px solid var(--rule);
}

.masthead-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 28px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.masthead-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.masthead-nav a:not(.btn) {
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--ink-2);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.masthead-nav a:not(.btn):hover,
.masthead-nav a:not(.btn).active {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

/* --- Pied de page -------------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--rule);
    background: var(--white);
}

.site-footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 22px 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    font-size: 13.5px;
    color: var(--ink-3);
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.site-footer a {
    color: var(--ink-2);
    transition: color 0.15s ease;
}

.site-footer a:hover {
    color: var(--navy);
    text-decoration: underline;
}

/* --- Coquille des pages connectées : barre latérale + contenu ------------------- */

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    width: 248px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--navy);
    color: rgba(255, 255, 255, 0.85);
    padding: 26px 18px 22px;
}

.sidebar .brand {
    color: #fff;
    padding: 0 8px;
    margin-bottom: 36px;
    align-items: flex-start;
}

/* Le nom passe sur deux lignes dans la barre latérale (« Génération » / « Saint Joseph ») */
.sidebar .brand-name {
    white-space: normal;
    font-size: 17px;
    line-height: 1.15;
    max-width: 120px;
}

.sidebar .brand-logo {
    width: 60px;
    height: 60px;
    padding: 2px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-nav a.active {
    background: var(--white);
    color: var(--navy);
}

.sidebar-nav a.active i {
    opacity: 1;
    color: var(--royal);
}

.sidebar-foot {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

/* Deux liens en bas de la barre : Contact (mailto) puis Déconnexion */
.sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-foot a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: var(--radius);
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.78);
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-foot a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: 44px 48px 80px;
}

.app-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* --- Boutons ------------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 20px;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.2;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.btn-primary:hover:not(:disabled) {
    background: var(--royal);
    border-color: var(--royal);
}

.btn-secondary,
.btn-ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--rule-strong);
}

.btn-secondary:hover:not(:disabled),
.btn-ghost:hover:not(:disabled) {
    border-color: var(--navy);
    background: var(--white);
}

.btn-danger {
    background: transparent;
    color: var(--bad);
    border-color: rgba(184, 50, 50, 0.4);
}

.btn-danger:hover:not(:disabled) {
    background: var(--bad-soft);
    border-color: var(--bad);
}

.btn-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--royal);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-link:hover:not(:disabled) {
    color: var(--navy);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13.5px;
}

.btn-lg {
    padding: 14px 26px;
    font-size: 15.5px;
}

.btn-light {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

.btn-light:hover:not(:disabled) {
    background: var(--sand);
    border-color: var(--sand);
}

.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline-light:hover:not(:disabled) {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* --- Panneaux ------------------------------------------------------------------- */

.panel {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--rule);
}

.panel-head h2 {
    font-size: 20px;
    font-weight: 600;
}

.panel-body {
    padding: 24px;
}

.section-hint {
    color: var(--ink-2);
    font-size: 14px;
    margin-bottom: 18px;
}

/* --- Formulaires ---------------------------------------------------------------- */

.field-group {
    margin-bottom: 20px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--navy);
    margin-bottom: 7px;
}

.field-group input,
.field-group select,
.field-group textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    color-scheme: light;
}

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 d='M1 1l5 5 5-5' fill='none' stroke='%230b2a5b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}

input::placeholder,
textarea::placeholder {
    color: var(--ink-3);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px var(--sky-soft);
}

input[readonly],
input:disabled,
select:disabled {
    background: var(--paper);
    color: var(--ink-2);
    cursor: not-allowed;
}

input.error {
    border-color: var(--bad);
}

.error-message {
    color: var(--bad);
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.info-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-2);
    margin-top: 8px;
    line-height: 1.5;
}

.info-message i {
    color: var(--royal);
    font-size: 12px;
    margin-top: 4px;
}

input[type="checkbox"],
input[type="radio"] {
    appearance: auto;
    -webkit-appearance: auto;
    width: auto;
    accent-color: var(--navy);
}

/* Champ mot de passe avec œil */
.password-container {
    position: relative;
}

.password-container input {
    padding-right: 44px;
}

.password-toggle,
.password-toggle-confirm,
.iconPass {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-3);
    cursor: pointer;
    transition: color 0.15s ease;
}

.password-toggle:hover,
.password-toggle-confirm:hover,
.iconPass:hover {
    color: var(--navy);
}

/* --- Bandeau « compte en attente de validation » -------------------------------- */

.validation-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 28px;
    padding: 16px 20px;
    background: var(--sand);
    border-left: 4px solid var(--navy);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 14.5px;
    line-height: 1.55;
}

.validation-banner i {
    color: var(--navy);
    font-size: 18px;
    margin-top: 2px;
}

.validation-banner strong {
    font-family: var(--serif);
    font-size: 16px;
    color: var(--navy);
}

/* Lien dans un bandeau (« Régler ma cotisation », « renouveler maintenant ») : qu'il se voie */
.validation-banner a {
    color: var(--royal);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.validation-banner a:hover {
    color: var(--navy);
}

/* Bandeau de retour de paiement HelloAsso (page Cotisation, annuaire) : succès, erreur, avertissement */
.retour-banner.retour-success {
    background: var(--ok-soft);
    border-left-color: var(--ok);
}

.retour-banner.retour-success i,
.retour-banner.retour-success strong {
    color: var(--ok);
}

.retour-banner.retour-error {
    background: var(--bad-soft);
    border-left-color: var(--bad);
}

.retour-banner.retour-error i,
.retour-banner.retour-error strong {
    color: var(--bad);
}

.retour-banner.retour-warning {
    background: var(--warn-soft);
    border-left-color: var(--warn);
}

.retour-banner.retour-warning i,
.retour-banner.retour-warning strong {
    color: var(--warn);
}

/* --- Modales -------------------------------------------------------------------- */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 28, 63, 0.55);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 24px 24px;
    z-index: 1000;
    overflow-y: auto;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 30px 70px -20px rgba(6, 28, 63, 0.6);
    width: 100%;
    max-width: 560px;
    animation: drop 0.25s ease both;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px;
    border-bottom: 1px solid var(--rule);
}

.modal-header h3 {
    font-size: 21px;
}

.modal-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-3);
    font-size: 17px;
    transition: color 0.15s ease;
}

.modal-close:hover {
    color: var(--navy);
}

.modal-body {
    padding: 26px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 26px;
    border-top: 1px solid var(--rule);
}

/* --- Suggestions (liste déroulante des pays) ------------------------------------ */

.suggestions-container {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-y: auto;
    z-index: 50;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--rule);
    transition: background 0.12s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--sky-soft);
}

.suggestion-item.no-results {
    cursor: default;
    color: var(--ink-2);
    font-size: 13.5px;
}

.suggestion-item.no-results:hover {
    background: transparent;
}

/* --- Sélecteur de pays (drapeaux) ----------------------------------------------- */

.country-select {
    position: relative;
}

.country-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 11px 36px 11px 13px;
    font-size: 15px;
    color: var(--ink);
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b2a5b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.country-trigger:hover,
.country-trigger:focus-visible {
    outline: none;
    border-color: var(--navy);
}

.country-trigger-label {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.country-trigger-label.placeholder {
    color: var(--ink-3);
}

.country-flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px var(--rule);
}

.country-list {
    max-height: 280px;
}

.country-search {
    position: sticky;
    top: 0;
    padding: 10px;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    z-index: 1;
}

.country-search input {
    padding: 9px 12px;
    font-size: 14px;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
    border-bottom: 1px solid var(--rule);
    transition: background 0.12s ease;
}

.country-item:last-child {
    border-bottom: none;
}

.country-item:hover {
    background: var(--sky-soft);
}

/* --- Badges / étiquettes --------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: var(--radius);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-niveau,
.badge-info {
    background: var(--sky-soft);
    color: var(--royal);
}

.badge-nouveau {
    background: var(--bad-soft);
    color: var(--bad);
}

.badge-traite {
    background: var(--ok-soft);
    color: var(--ok);
}

.badge-attente {
    background: var(--warn-soft);
    color: var(--warn);
}

.badge-promo {
    background: var(--sand);
    color: var(--navy);
}

/* --- Toasts (en bas au centre) ----------------------------------------------------- */

.toast-container,
#toastContainer {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: min(92vw, 440px);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    width: 100%;
    background: var(--navy-deep);
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 14px;
    animation: riseIn 0.25s ease-out;
    word-wrap: break-word;
    pointer-events: auto;
}

.toast i {
    flex-shrink: 0;
    font-size: 16px;
}

.toast.success i { color: #7fe0ad; }
.toast.error i   { color: #ff9a9a; }
.toast.warning i { color: #ffcf7a; }
.toast.info i    { color: #9fcdf7; }

@keyframes riseIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; }
    to   { opacity: 0; transform: translateY(8px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes drop {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- État vide --------------------------------------------------------------------- */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--ink-2);
    border: 1px dashed var(--rule-strong);
    border-radius: var(--radius);
}

.empty-state i {
    display: block;
    font-size: 24px;
    color: var(--ink-3);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14.5px;
    margin: 0;
}

/* --- Écran coupé en deux (connexion, vérification) ---------------------------------- */

.split {
    display: grid;
    grid-template-columns: minmax(320px, 46%) 1fr;
    min-height: 100vh;
}

.split-panel {
    position: relative;
    background:
        radial-gradient(600px 400px at 100% 100%, rgba(76, 155, 232, 0.35), transparent 70%),
        linear-gradient(160deg, var(--navy-deep), var(--navy));
    color: #fff;
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.split-panel .brand {
    color: #fff;
}

.split-panel-body {
    margin: auto 0;
    padding: 48px 0;
    max-width: 440px;
}

.split-panel-body .embleme {
    width: 240px;
    height: 240px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.55);
    margin-bottom: 32px;
}

.split-panel-body h2 {
    color: #fff;
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 14px;
}

.split-panel-body p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 16px;
}

.split-panel-foot {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.split-panel-foot a {
    color: rgba(255, 255, 255, 0.75);
}

.split-panel-foot a:hover {
    color: #fff;
}

.split-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--white);
}

.split-form-inner {
    width: 100%;
    max-width: 400px;
    animation: rise 0.35s ease both;
}

.split-form-inner h1 {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 8px;
}

.split-form-inner .lead {
    font-size: 15.5px;
    margin-bottom: 30px;
}

.split-mobile-brand {
    display: none;
}

/* --- SweetAlert : accorder au thème --------------------------------------------------- */

.swal2-popup {
    font-family: var(--sans) !important;
    border-radius: var(--radius) !important;
    background: var(--white) !important;
    color: var(--ink) !important;
    padding: 28px 24px 24px !important;
}

.swal2-title {
    font-family: var(--serif) !important;
    font-weight: 600 !important;
    color: var(--navy) !important;
    font-size: 24px !important;
}

.swal2-html-container {
    color: var(--ink-2) !important;
    font-size: 15px !important;
}

.swal2-input,
.swal2-textarea,
.swal2-select {
    border: 1px solid var(--rule-strong) !important;
    border-radius: var(--radius) !important;
    box-shadow: none !important;
    font-size: 15px !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
    border-color: var(--navy) !important;
    box-shadow: 0 0 0 3px var(--sky-soft) !important;
}

.swal2-select {
    /* Le select global est en width:100% ; avec les marges latérales de SweetAlert il déborde du popup */
    width: calc(100% - 4em) !important;
    margin: 1em 2em 3px !important;
}

.swal2-actions {
    gap: 10px;
}

.swal2-confirm {
    background: var(--navy) !important;
    color: #fff !important;
    border-radius: var(--radius) !important;
    font-weight: 600 !important;
    padding: 11px 22px !important;
    box-shadow: none !important;
}

.swal2-confirm:hover {
    background: var(--royal) !important;
}

.swal2-cancel {
    background: transparent !important;
    color: var(--navy) !important;
    border: 1px solid var(--rule-strong) !important;
    border-radius: var(--radius) !important;
    font-weight: 600 !important;
    padding: 11px 22px !important;
}

.swal2-cancel:hover {
    background: var(--paper) !important;
}

/* --- Responsive ------------------------------------------------------------------------ */

@media (max-width: 960px) {
    .app {
        flex-direction: column;
    }

    /* La barre latérale devient une barre en haut, avec les liens en ligne */
    .sidebar {
        position: static;
        height: auto;
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 10px 16px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }

    .sidebar .brand {
        margin-bottom: 0;
        padding: 0;
    }

    .sidebar .brand-name {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 2px;
        margin-left: auto;
    }

    .sidebar-nav a {
        padding: 9px 12px;
        font-size: 14px;
    }

    .sidebar-foot {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        flex-direction: row;
    }

    .sidebar-foot a span {
        display: none;
    }

    .app-main {
        padding: 28px 20px 64px;
    }

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

    .split-panel {
        display: none;
    }

    .split-mobile-brand {
        display: inline-flex;
        margin-bottom: 32px;
    }

    .split-form {
        align-items: flex-start;
        padding: 40px 24px;
    }
}

@media (max-width: 640px) {
    .masthead-inner {
        padding: 0 18px;
        height: 62px;
    }

    .masthead-nav {
        gap: 14px;
    }

    .masthead .brand-name {
        font-size: 16px;
    }

    .masthead-nav .btn {
        padding: 7px 12px;
        font-size: 13px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .page-title h1 {
        font-size: 28px;
    }

    .sidebar-nav a span {
        display: none;
    }

    .sidebar-nav a i {
        font-size: 16px;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .masthead .brand-name {
        display: none;
    }
}
