/* ⚠️ CSS global (wwwroot/app.css) — pas de .razor.css scopé nécessaire ici,
   Login.razor n'a pas de composant enfant, mais on centralise pour cohérence. */

.mdb-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0000ee;
}

.mdb-carte {
    position: relative;
    width: 780px;
    max-width: 95vw;
    background: #0000ee;
    border: 6px solid #fff;
    border-radius: 6px;
    padding: 20px 28px 28px;
    box-shadow: 0 10px 40px rgba(0,0,0,.35);
}

.mdb-puces {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.mdb-puce {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: inline-block;
}

.mdb-puce-verte {
    background: #22c55e;
}

.mdb-puce-jaune {
    background: #facc15;
}

.mdb-puce-rouge {
    background: #ef4444;
}

.mdb-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mdb-titres h2 {
    color: #ffe100;
    font-size: 1.3rem;
    margin: 0;
    text-align: center;
}

.mdb-titres p {
    color: #ffe100;
    margin: 4px 0 0;
    text-align: center;
    font-size: .95rem;
}

.mdb-btn-activation {
    background: #ff9d8e;
    color: #7a1a00;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

    .mdb-btn-activation:hover {
        background: #ff8a76;
    }

.mdb-image-accueil {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    margin: 4px 0 12px;
}

.mdb-bandeau-porte {
    background: #ffe100;
    color: #0000aa;
    font-weight: 800;
    text-align: center;
    padding: 10px;
    letter-spacing: .5px;
    margin: 0 -28px 16px;
}

.mdb-formulaire-zone {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.mdb-illustration {
    width: 160px;
    flex-shrink: 0;
}

.mdb-formulaire {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mdb-champ {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 6px;
    position: relative;
}

    .mdb-champ i {
        color: #334155;
        font-size: 1.1rem;
    }

.mdb-input, .mdb-select {
    border: none;
    outline: none;
    flex: 1;
    font-size: .95rem;
    background: transparent;
}

.mdb-icone-oeil {
    cursor: pointer;
    color: #2563eb !important;
}

.mdb-erreur {
    color: #dc2626;
    font-size: .85rem;
}

.mdb-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.mdb-lien-oubli {
    color: #ff9d8e;
    font-weight: 700;
    text-decoration: none;
    font-size: .9rem;
}

    .mdb-lien-oubli:hover {
        text-decoration: underline;
    }

.mdb-btn-connexion {
    background: #0000aa;
    color: #ffe100;
    border: none;
    border-radius: 6px;
    padding: 10px 22px;
    font-weight: 700;
    cursor: pointer;
}

    .mdb-btn-connexion:hover {
        background: #000080;
    }

    .mdb-btn-connexion:disabled {
        opacity: .6;
        cursor: default;
    }

/* ===== Modale "Mot de passe oublié" ===== */
.mdb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    overflow-y: auto;
    padding: 2rem 0;
}

.mdb-modal {
    background: #1b2430;
    color: #fff;
    border-radius: 8px;
    width: 380px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.mdb-modal-entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 1.2rem;
    background: #0000aa;
    border-radius: 8px 8px 0 0;
    font-weight: 700;
}

.mdb-modal-fermer {
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}

.mdb-modal-corps {
    padding: 1.2rem;
}

.mdb-modal-champ {
    margin-bottom: .9rem;
}

    .mdb-modal-champ label {
        display: block;
        font-size: .85rem;
        margin-bottom: 4px;
        color: #cbd5e1;
    }

.mdb-modal-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #475569;
    background: #0f172a;
    color: #fff;
}

.mdb-modal-ligne {
    display: flex;
    gap: 8px;
}

.mdb-btn-petit {
    padding: 8px 14px;
    white-space: nowrap;
}

.mdb-succes {
    color: #4ade80;
    font-size: .85rem;
    margin-top: 6px;
}

/* ===== Header : groupe/sous-groupe + photo cliquable ===== */
.header-separateur {
    opacity: .5;
    margin: 0 8px;
}

.header-groupe, .header-sousgroupe {
    font-weight: 400;
    font-size: .95rem;
    opacity: .85;
}

.header-photo-zone {
    position: relative;
}

.header-photo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,.4);
}

.header-photo-defaut {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff9d8e;
    color: #7a1a00;
    font-weight: 700;
    font-size: .9rem;
}

.header-menu-deroulant {
    position: absolute;
    right: 0;
    top: 46px;
    background: #fff;
    color: #1e2a44;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    overflow: hidden;
    min-width: 160px;
    z-index: 100;
}

.header-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    border: none;
    background: none;
    color: #1e2a44;
    text-decoration: none;
    font-size: .9rem;
    cursor: pointer;
}

    .header-menu-item:hover {
        background: #f1f5f9;
    }

/* ===== Sidebar : logo image (remplace le texte "EgliseApp") ===== */
.sidebar-logo-image {
    max-width: 100%;
    max-height: 60px;
    display: block;
    margin: 0 auto;
}

/* ===== Page module (dashboard, eglise, discipolat...) ===== */
.module-page {
    padding: 8px;
}

.module-entete {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.module-entete-icone {
    font-size: 1.8rem;
    color: #1e2a44;
}

.module-entete h2 {
    margin: 0;
    color: #1e2a44;
}

.module-vide {
    opacity: .6;
}

.module-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.module-carte {
    background: #fff;
    border-radius: 8px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1e2a44;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .15s, box-shadow .15s;
}

    .module-carte:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0,0,0,.12);
        color: #1e2a44;
    }

.module-carte-icone {
    font-size: 2rem;
    color: #0000aa;
}

/* ===== Bannière image en haut de chaque page module ===== */
.module-banniere {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    margin-bottom: 24px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

/* ===== Sidebar : module/menu actif (couleurs distinctes) ===== */
.sidebar-module-actif {
    background: rgba(255, 225, 0, .18) !important;
    border-left: 4px solid #ffe100;
    font-weight: 700;
}

.sidebar-sous-menu a.sidebar-menu-actif {
    background: rgba(255, 157, 142, .22);
    color: #fff !important;
    border-left: 4px solid #ff9d8e;
    font-weight: 600;
}

/* ⚠️ Header/Sidebar sont des composants enfants de MainLayout ; un CSS scopé
   sur MainLayout.razor.css ne s'appliquerait pas à eux (isolation Blazor). */

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

.app-corps {
    display: flex;
    flex: 1;
}


.app-contenu {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    padding: var(--contenu-padding);
    background: #f4f6f8;
}

:root {
    --header-height: 64px;
    --contenu-padding: 24px;
}

/* ===== Utilitaire permanent : à ajouter sur la div racine de toute page
   qui doit couvrir tout l'espace disponible (fond plein écran, bannière...),
   sans la bande blanche due au padding de .app-contenu. Réutilisable partout,
   pas besoin de recalculer les valeurs à la main. ===== */
.page-pleine-largeur {
    width: calc(100% + (2 * var(--contenu-padding)));
    min-height: calc(100vh - var(--header-height));
    margin: calc(var(--contenu-padding) * -1);
}

.header-utilisateur {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #1e2a44;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 200;
    min-height: var(--header-height);
    box-sizing: border-box;
}

.header-titre {
    font-weight: 600;
    font-size: 1.1rem;
}

.header-utilisateur-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-role {
    opacity: .7;
    font-size: .85rem;
}

.sidebar {
    width: 240px;
    background: #16213a;
    color: #fff;
    padding: 16px 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.sidebar-logo {
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0 20px 16px;
}

.sidebar-liste {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-sous-menu {
    list-style: none;
    padding: 0 0 0 20px;
    background: rgba(0,0,0,.15);
}

    .sidebar-sous-menu a {
        display: flex;
        gap: 8px;
        align-items: center;
        padding: 8px 20px;
        color: #cfd6e4;
        text-decoration: none;
    }

        .sidebar-sous-menu a:hover {
            color: #fff;
        }

.sidebar-chargement {
    padding: 0 20px;
    opacity: .6;
    font-size: .9rem;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f4f6f8;
}

.login-panel {
    background: #fff;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    width: 360px;
}

/* ===== Sidebar : titre module = bloc cliquable unique (accordéon pur, plus de navigation) ===== */
.sidebar-module-titre {
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: center;
}

    .sidebar-module-titre:hover {
        background: rgba(255,255,255,.08);
    }

    .sidebar-module-titre span {
        flex: 1;
    }

.sidebar-chevron {
    opacity: .7;
}

/* ===== Sidebar : scroll vertical ===== */
/* ===== Photo grande format (5cm x 6cm) — partagée Utilisateur.razor / ProfilAcces.razor ===== */
.photo-grande {
    width: 5cm;
    height: 6cm;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    flex-shrink: 0;
}

.photo-grande-vide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: .85rem;
    text-align: center;
    padding: 8px;
}

/* ===== Utilisateur.razor : recherche de membre (liste de suggestions) ===== */
.utilisateur-suggestions {
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
}

    .utilisateur-suggestions .list-group-item {
        cursor: pointer;
    }

/* Champs auto-remplis : légèrement distingués visuellement */
.utilisateur-champ-auto {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* ===== RegistreMembre.razor : modale fiche membre ===== */
.registre-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    overflow-y: auto;
    padding: 2rem 0;
}

.registre-modal {
    background: #fff;
    border-radius: 8px;
    width: 640px;
    max-width: 92%;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.registre-modal-entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 1.2rem;
    background: #1e2a44;
    color: #fff;
    border-radius: 8px 8px 0 0;
    font-weight: 700;
}

.registre-modal-fermer {
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}

.registre-modal-corps {
    padding: 1.2rem;
}

/* ===== RegistreMembre.razor : en-tête cyan (façon DataGridView) + grande modale ===== */
.registre-table thead th {
    background: #22e5e5;
    color: #0d1a2b;
    font-weight: 700;
}

.registre-modal-large {
    width: 20cm;
    height: 20cm;
    max-width: 96vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

    .registre-modal-large .registre-modal-corps {
        overflow-y: auto;
        flex: 1;
    }

/* ===== Fiche membre : distinction Label / Valeur (façon zone de texte) ===== */
.fiche-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #0000aa;
    font-weight: 700;
    margin-bottom: 2px;
    display: block;
}

.fiche-valeur {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 10px;
    color: #1e293b;
    font-size: .95rem;
}

.fiche-valeur-forte {
    font-weight: 700;
    background: #f8fafc;
}

/* ===== Couleurs des cartes de formulaire — convention à réutiliser sur les prochaines pages ===== */
.carte-rattachement .card-header {
    background: #0000aa;
}

.carte-identite .card-header {
    background: #0d6efd;
}

.carte-adresse .card-header {
    background: #0891b2;
}

.carte-viechretienne .card-header {
    background: #16a34a;
}

/* Variantes disponibles pour d'autres futures cartes (mêmes principes, autres teintes) */
.carte-securite .card-header {
    background: #7c3aed;
}

.carte-finances .card-header {
    background: #ca8a04;
}

.carte-danger .card-header {
    background: #dc2626;
}

/* ===== CertificatBapteme.razor : certificat A4 paysage ===== */
.certificat-page {
    display: none;
}

/* Aperçu affiché à l'écran (plus seulement à l'impression, désormais téléchargé en PDF) */
.certificat-page-apercu {
    display: block;
    max-width: 900px;
    margin: 0 auto 24px;
}

.certificat-cadre {
    border: 4px double #b8860b;
    padding: 24px 32px;
    background: #fff;
    color: #1e293b;
}

.certificat-entete {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    text-align: center;
}

.certificat-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    flex-shrink: 0;
}

.certificat-logo-vide {
    visibility: hidden;
}

.certificat-entete-texte {
    flex: 1;
}

.certificat-nom-groupe {
    font-weight: 700;
    margin: 0;
    font-size: .95rem;
}

.certificat-nom-sousgroupe {
    color: #b8860b;
    margin: 4px 0;
}

.certificat-adresse, .certificat-telephones {
    margin: 2px 0;
    font-size: .85rem;
}

.certificat-titre {
    text-align: center;
    color: #7c3aed;
    margin: 20px 0;
    letter-spacing: 2px;
}

.certificat-corps {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.certificat-texte {
    flex: 1;
    line-height: 2;
}

.certificat-ligne {
    margin: 4px 0;
}

.certificat-label {
    color: #7c3aed;
    font-weight: 600;
}

.certificat-photo-zone {
    flex-shrink: 0;
}

.certificat-photo {
    width: 140px;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
}

.certificat-pied {
    margin-top: 16px;
}

.certificat-pied-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.certificat-bapteme-qr {
    width: 22mm;
    height: 22mm;
    flex-shrink: 0;
}

.certificat-bapteme-bas {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

    .certificat-bapteme-bas .certificat-verset {
        flex: 1;
        min-width: 0;
        margin: 0;
    }

.certificat-bapteme-illustration {
    width: 30mm;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.certificat-pasteur-titre {
    color: #b91c1c;
    font-weight: 700;
    margin-bottom: 4px;
}

.certificat-pasteur-nom {
    font-weight: 700;
    margin-bottom: 12px;
}

.certificat-verset {
    font-size: .85rem;
    font-style: italic;
    color: #334155;
}

/* À l'impression : n'afficher QUE le contenu imprimable, orientation par défaut Portrait
   (le certificat bascule dynamiquement en Paysage via JS, voir imprimerAvecOrientation ci-dessous). */
/* Impression navigateur conservée en repli (Ctrl+P), mais le flux principal
   passe maintenant par le téléchargement PDF direct (html2pdf.js). */
@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    .ecran-seulement,
    .header-utilisateur,
    .sidebar,
    .app-layout > .app-corps > .sidebar {
        display: none !important;
    }

    .certificat-page {
        display: block !important;
    }
}

/* ===== CarteMembre.razor : cartes recto-verso ===== */
.cartes-page {
    display: none;
}

/* Aperçu affiché à l'écran (téléchargé en PDF, plus seulement imprimé) */
.cartes-page-apercu {
    display: block;
    max-width: 700px;
    margin: 0 auto 24px;
}

.carte-ligne {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    break-inside: avoid;
}

.carte-recto, .carte-verso {
    width: 50%;
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
    background: linear-gradient(135deg, #ffffff 0%, #f4f6fb 100%);
    border: 1px solid #d8dee8;
    position: relative;
}

    .carte-recto::after {
        content: "";
        position: absolute;
        top: 8px;
        bottom: 8px;
        right: -9px;
        border-right: 2px dashed #cbd5e1;
    }

.carte-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.carte-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

.carte-entete-texte {
    flex: 1;
    text-align: center;
}

.carte-mission {
    font-size: .6rem;
    font-weight: 700;
    color: #b8860b;
    margin: 0;
    line-height: 1.1;
}

.carte-eglise {
    font-size: .68rem;
    color: #7c3aed;
    margin: 2px 0 0;
    font-weight: 600;
}

.carte-corps {
    position: relative;
    min-height: 96px;
    padding-right: 74px; /* laisse la place à la photo positionnée à droite */
}

.carte-photo {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 96px; /* descend jusqu'au niveau du matricule */
    object-fit: cover;
    border-radius: 4px;
}

.carte-photo-vide {
    background: #f1f5f9;
}

.carte-infos p {
    margin: 1px 0;
    font-size: .72rem;
}

.carte-label {
    font-weight: 700;
    color: #0d6efd;
}

.carte-matricule {
    text-align: right;
    font-size: .68rem;
    font-weight: 700;
    color: #64748b;
    margin: 4px 0 0;
}

.carte-verso-eglise {
    color: #7c3aed;
    font-weight: 700;
    font-size: .8rem;
    margin: 0;
    text-align: center;
}

.carte-verso-tel {
    font-size: .68rem;
    margin: 2px 0 6px;
    text-align: center;
}

.carte-qr {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.carte-signatures {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.carte-signature-bloc {
    text-align: center;
    flex: 1;
}

.carte-signature-titre {
    font-size: .62rem;
    margin: 0;
}

.carte-signature-image {
    height: 26px;
    object-fit: contain;
}

.carte-signature-nom {
    font-size: .68rem;
    font-weight: 700;
    color: #7c3aed;
    margin: 0;
}

@media print {
    .cartes-page {
        display: block !important;
    }
}

/* Injectée dynamiquement en paysage uniquement pour l'impression du certificat (voir JS). */
#page-print-style-paysage {
    display: none;
}

/* ===== CertificatBapteme.razor : signature de l'officiant ===== */
.certificat-signature-image {
    height: 40px;
    object-fit: contain;
    display: block;
    margin: 2px 0;
}

/* ===== Sessionsousgroup.razor : aperçus signature/QR ===== */
.parametre-image-apercu {
    height: 40px;
    object-fit: contain;
    display: block;
    margin-bottom: 4px;
}

/* ===== RangSocial.razor : badge couleur supplémentaire (absente de Bootstrap) ===== */
.bg-purple {
    background-color: #7c3aed !important;
    color: #fff;
}

/* ===== CertificatMariage.razor : reproduit fidèlement la maquette fournie ===== */
/* Tout est dimensionné en millimètres réels (correspond au format A4 paysage 297x210mm
   à l'impression) plutôt qu'en pixels fixes — plus fiable, et évite toute troncature de
   contenu (contrairement à l'ancienne approche width/height fixes + overflow:hidden). */
.certificat-mariage-page {
    width: 272mm;
    margin: 0 auto 24px;
}

.certificat-mariage-cadre {
    border: 2px solid #1e293b;
    padding: 3mm 6mm;
    background: #fff;
    color: #1e293b;
    box-sizing: border-box;
}

.certificat-mariage-entete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6mm;
    text-align: center;
}

.certificat-mariage-logo {
    width: 18mm;
    height: 18mm;
    object-fit: contain;
    flex-shrink: 0;
}

.certificat-mariage-entete-texte {
    flex: 1;
}

.certificat-mariage-mission {
    font-weight: 700;
    font-size: 9pt;
    color: #1e293b;
    margin: 0;
}

.certificat-mariage-eglise {
    color: #1d4ed8;
    font-weight: 700;
    margin: 1mm 0;
    font-size: 15pt;
}

.certificat-mariage-adresse, .certificat-mariage-telephones {
    font-size: 8pt;
    margin: 0.5mm 0;
    color: #334155;
}

.certificat-mariage-titre {
    text-align: center;
    color: #db2777;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 2mm 0 0;
    font-size: 19pt;
}

.certificat-mariage-separateur {
    text-align: center;
    color: #b8860b;
    font-size: 9pt;
    margin-bottom: 2mm;
}

.certificat-mariage-ligne-epoux {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6mm;
    margin-bottom: 3mm;
}

.certificat-mariage-cote {
    width: 62mm;
}

.certificat-mariage-cote-gauche {
    text-align: left;
}

.certificat-mariage-cote-droite {
    text-align: right;
}

.certificat-mariage-role {
    color: #1d4ed8;
    text-decoration: underline;
    font-size: 9pt;
    margin: 0 0 1mm;
}

.certificat-mariage-nom {
    color: #6b21a8;
    font-weight: 700;
    margin: 0 0 1mm;
    font-size: 12pt;
}

.certificat-mariage-nom-petit {
    color: #6b21a8;
    font-weight: 700;
    font-size: 10pt;
    margin: 0;
    text-align: center;
}

.certificat-mariage-detail {
    font-size: 8.5pt;
    margin: 0;
    color: #1e293b;
}

.certificat-mariage-photos {
    display: flex;
    align-items: center;
    gap: 5mm;
    flex-shrink: 0;
}

/* Photos agrandies (retour utilisateur : trop petites) */
.certificat-mariage-photo {
    width: 32mm;
    height: 38mm;
    object-fit: cover;
    border-radius: 2mm;
    border: 1px solid #cbd5e1;
}

.certificat-mariage-alliance {
    width: 16mm;
    height: 16mm;
    object-fit: contain;
}

.certificat-mariage-verset {
    text-align: center;
    font-size: 9pt;
    line-height: 1.4;
    max-width: 220mm;
    margin: 2mm auto 3mm;
    color: #1e293b;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.certificat-mariage-parrainage {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2mm;
}

.certificat-mariage-cote-parrain {
    text-align: center;
    width: 90mm;
}

/* Espace de signature : au moins 1cm entre le libellé et le nom, comme demandé. */
.certificat-mariage-espace-signature {
    height: 11mm;
    border-bottom: 1px dashed #94a3b8;
    margin: 0 15mm;
}

.certificat-mariage-trait {
    border: none;
    border-top: 1px solid #1e293b;
    margin: 2mm 0;
}

.certificat-mariage-officiants {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 2mm;
}

    .certificat-mariage-officiants > div {
        width: 82mm;
    }

.certificat-mariage-pied-bas {
    display: flex;
    align-items: center;
    gap: 4mm;
    border: 1px solid #1e293b;
    padding: 2mm 4mm;
}

.certificat-mariage-qr {
    width: 20mm;
    height: 20mm;
    flex-shrink: 0;
}

.certificat-mariage-verset-bas {
    flex: 1;
    font-size: 9.5pt;
    line-height: 1.4;
    text-align: center;
    margin: 0;
    color: #1e293b;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    min-width: 0;
}

.certificat-mariage-illustration {
    width: 10mm;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}

/* ===== RegistreMariage.razor : fenêtre complète du processus de mariage ===== */
.registre-mariage-fenetre {
    width: 800px;
    max-width: 96%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

    .registre-mariage-fenetre .registre-modal-corps {
        overflow-y: auto;
        flex: 1;
    }

/* ===== Calendrier.razor / Agenda.razor : grille mensuelle Lundi→Dimanche ===== */
.calendrier-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calendrier-grille {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendrier-jour-nom {
    text-align: center;
    font-weight: 700;
    color: #0000aa;
    padding: 6px 0;
}

.calendrier-case {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    transition: background-color .15s;
}

    .calendrier-case:hover {
        background: #eef2ff;
    }

    .calendrier-case.calendrier-hors-mois {
        background: #f3f4f6;
        color: #9ca3af;
        cursor: default;
    }

    .calendrier-case.calendrier-aujourdhui {
        background: #0d6efd;
        color: #fff;
        font-weight: 700;
    }

    .calendrier-case.calendrier-selectionne {
        background: #ffc107;
        color: #1e293b;
        font-weight: 700;
    }

.calendrier-pastille {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #dc2626;
    position: absolute;
    bottom: 6px;
}

/* ===== Agenda.razor : créneaux horaires du jour sélectionné ===== */
.agenda-creneau {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    min-height: 44px;
}

.agenda-heure {
    width: 70px;
    flex-shrink: 0;
    color: #6b7280;
    font-size: .82rem;
    padding-top: 8px;
    text-align: right;
    padding-right: 10px;
}

.agenda-evenement {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 2px 0;
    color: #fff;
}

/* ===== CertificatBapteme.razor : classes DÉDIÉES (indépendantes de .certificat-* génériques
   utilisées ailleurs, ex. ImpressionBulletinDiscipolat.razor — pour ne pas les impacter).
   Tout en mm réels, page fixe A4 paysage 277x190mm de contenu utile (297x210 - 10mm de marge
   de chaque côté, la marge elle-même étant gérée par html2pdf options, pas ici). ===== */
.certificat-bapteme-page {
    width: 272mm;
    margin: 0 auto 24px;
}

.certificat-bapteme-cadre {
    border: 3px double #b8860b;
    padding: 6mm 10mm;
    background: #fff;
    color: #1e293b;
    box-sizing: border-box;
}

.certificat-bapteme-entete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8mm;
    text-align: center;
    margin-bottom: 4mm;
}

.certificat-bapteme-logo {
    width: 24mm;
    height: 24mm;
    object-fit: contain;
    flex-shrink: 0;
}

.certificat-bapteme-logo-vide {
    visibility: hidden;
}

.certificat-bapteme-entete-texte {
    flex: 1;
}

.certificat-bapteme-mission {
    font-weight: 700;
    font-size: 9.5pt;
    margin: 0;
}

.certificat-bapteme-nom-sousgroupe {
    color: #b8860b;
    margin: 1.5mm 0;
    font-size: 18pt;
}

.certificat-bapteme-adresse, .certificat-bapteme-telephones {
    margin: 0.5mm 0;
    font-size: 9pt;
    color: #334155;
}

.certificat-bapteme-titre {
    text-align: center;
    color: #7c3aed;
    margin: 4mm 0 6mm;
    letter-spacing: 2px;
    font-size: 22pt;
}

.certificat-bapteme-corps {
    display: flex;
    justify-content: space-between;
    gap: 8mm;
}

.certificat-bapteme-texte {
    flex: 1;
    min-width: 0;
    line-height: 2;
    font-size: 11.5pt;
}

.certificat-bapteme-intro {
    margin: 0 0 2mm;
}

.certificat-bapteme-ligne {
    margin: 1.5mm 0;
}

.certificat-bapteme-label {
    color: #7c3aed;
    font-weight: 600;
}

.certificat-bapteme-photo-zone {
    flex-shrink: 0;
}

.certificat-bapteme-photo {
    width: 42mm;
    height: 50mm;
    object-fit: cover;
    border-radius: 2mm;
    border: 1px solid #cbd5e1;
}

.certificat-bapteme-trait {
    border: none;
    border-top: 1px solid #cbd5e1;
    margin: 3mm 0;
}

.certificat-bapteme-pied-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.certificat-bapteme-pasteur-titre {
    color: #b91c1c;
    font-weight: 700;
    font-size: 13pt;
    margin: 0;
}

.certificat-bapteme-qr {
    width: 24mm;
    height: 24mm;
    flex-shrink: 0;
}

.certificat-bapteme-signature-image {
    height: 11mm;
    object-fit: contain;
    display: block;
    margin: 0;
}

.certificat-bapteme-pasteur-nom {
    font-weight: 700;
    font-size: 12pt;
    margin: 0;
}

.certificat-bapteme-bas {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8mm;
    margin-top: 1mm;
}

.certificat-bapteme-verset {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 10pt;
    font-style: italic;
    line-height: 1.4;
    color: #334155;
}

.certificat-bapteme-illustration {
    width: 30mm;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}

/* ===== Tableaux de bord : cartes de statistiques + barres de répartition ===== */
.tdb-grille-cartes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.tdb-carte {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    display: flex;
    align-items: center;
    gap: 14px;
    border-left: 5px solid #0d6efd;
}

.tdb-carte-icone {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.tdb-carte-valeur {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
}

.tdb-carte-label {
    font-size: .82rem;
    color: #64748b;
}

.tdb-section-titre {
    font-weight: 700;
    color: #0000aa;
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e2e8f0;
}

.tdb-barre-ligne {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tdb-barre-label {
    width: 160px;
    flex-shrink: 0;
    font-size: .85rem;
    color: #334155;
}

.tdb-barre-fond {
    flex: 1;
    background: #e2e8f0;
    border-radius: 6px;
    height: 18px;
    overflow: hidden;
    min-width: 0;
}

.tdb-barre-remplie {
    height: 100%;
    border-radius: 6px;
    transition: width .3s;
}

.tdb-barre-valeur {
    width: 50px;
    flex-shrink: 0;
    text-align: right;
    font-size: .85rem;
    font-weight: 600;
    color: #1e293b;
}

.tdb-liens-rapides {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.tdb-lien-rapide {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    text-decoration: none;
    color: #0000aa;
    font-weight: 600;
    transition: box-shadow .15s, transform .15s;
}

    .tdb-lien-rapide:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,.12);
        transform: translateY(-2px);
        color: #0000aa;
    }

    .tdb-lien-rapide i {
        display: block;
        font-size: 1.6rem;
        margin-bottom: 6px;
    }
@media (max-width: 640.98px) {
    :root {
        --contenu-padding: 14px;
    }
}
