@font-face {
    font-family: Questrial;
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/Questrial-Regular.ttf") format("truetype");
}

@font-face {
    font-family: Archivo;
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url("/assets/fonts/Archivo-Black.ttf") format("truetype");
}

/* .codex-header, .codex-footer, .codex-sidebar {
    font-family: Questrial !important;
} */
body {
    --body-font-family: Questrial, sans-serif !important;
    --font-body-scale: 1.05;
    font-family: Questrial, sans-serif !important;
    top: 0px important;
}

.dashboard-translate-button#google_translate_element {
    position: absolute;
    top: 80px;
    right: 30px;
}

@media screen and (min-width: 750px) {
    body {
        font-size: 1.1rem;
        line-height: calc(1 + 0.8 / var(--font-body-scale));
    }
    .menu-item,
    .menu-item .menu-item-label,
    .codex-menu li > a .icon-item,
    .codex-menu li > a span {
        font-size: 1.1rem !important;
        line-height: calc(1 + 0.8 / var(--font-body-scale)) !important;
    }
    .lifetime-text {
        margin-top: -77px !important;
        transform: translateX(28px);
    }

    .banner-content .row > div:first-child {
        justify-content: flex-end !important;
    }
    .banner-action {
        margin-top: -105px !important;
    }
    .dashboard-translate-button#google_translate_element {
        position: absolute;
        top: 110px;
        right: 30px;
    }

    .search-bar .input-group .input-group-text:not(:last-child) {
        border-top-left-radius: 0px !important;
        border-bottom-left-radius: 0px !important;
        color: #002677;
        background-color: #eff0f5;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: Archivo, serif !important;
}

h1,
h2,
h3,
h4 {
    color: #002677;
}

h1,
h2,
h3 {
    font-weight: 700;
}

.codex-header {
    margin-left: unset !important;
    width: 100% !important;
    background-color: #002677 !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    z-index: 11;
}

.codex-header .header-contain {
    width: 100% !important;
    max-width: 1280px !important;
}

.codex-header .logo-gridwrap,
.codex-header .icon-logo {
    padding: 0px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    inset-block-start: 0;
    inset-inline-start: 0;
    transition: all 0.5s ease;
}

.codex-header .logo-gridwrap .codex-darklogo,
.codex-header .icon-logo .codex-darklogo {
    display: none;
}

.codex-sidebar {
    background-color: #002677 !important;
}

.codex-breadcrumb {
    margin-top: 20px;
}

.themebody-wrap {
    margin-left: unset !important;
    margin-right: unset !important;
    width: 100% !important;
    height: auto;
    position: relative;
}

.codex-footer {
    margin-left: unset !important;
    width: 100% !important;
}

.menu-list {
    margin-left: 50px;
}

.underlined {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.codex-footer * {
    color: #002677 !important;
}

.codex-brand img {
    width: 180px;
    height: auto;
}

.menu-item .menu-item-label {
    font-size: 16px;
    font-weight: 400 !important;
    color: #adb9c9 !important;
}

.codex-header .navicon-wrap:hover svg {
    color: inherit !important;
}

.codex-header a.menu-item .navicon-wrap {
    display: inline-flex;
    color: #adb9c9 !important;
    background-color: #002677 !important;
}

.codex-header a.menu-item.active,
.codex-header a.menu-item:hover,
.menu-item .menu-item-label:hover {
    color: #fff !important;
}

.codex-header a.menu-item:hover .navicon-wrap,
.codex-header a.menu-item.active .navicon-wrap {
    color: #002677 !important;
    background-color: #fff !important;
}

.codex-header a.menu-item.active .menu-item-label {
    font-weight: 500 !important;
    color: #fff !important;
}

.btn-windowfull,
.sidebar-action {
    background-color: #002677 !important;
    color: #adb9c9;
}

.btn-windowfull:hover,
.sidebar-action:hover,
.sidebar-action:hover svg {
    background-color: #ffff !important;
    color: #002677 !important;
}

.banner {
    height: 350px;
    width: 100%;
    position: relative;
}
@media (min-width: 992px) {
    .banner { height: 315px; }
}

.banner .banner-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.banner .banner-actions {
    align-self: flex-end;
    justify-self: flex-end;
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.banner-content {
    position: relative !important;
    width: 100% !important;
    padding-left: 20px;
    padding-right: 20px;
}

.banner-right,
.banner-left {
    min-width: 300px;
}

.banner-left {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: auto;
    flex: 1;
}

.banner-left .lifetime-text {
    white-space: nowrap;
}

.banner-right {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.banner-content .user-data {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto;
    margin-right: auto;
}

.profile-img {
    width: 300px;
    height: 300px;
    margin-top: -50%;
}
.profile-img img,
.user-imgwrap {
    background-color: #dde2f2;
}
.banner-img {
    background-color: #0b1d3e;
}
.profile-img img {
    border: 3px white solid;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.05);
}

.profile-detail-header {
    margin-top: 0px !important;
    /* margin-bottom: 10px !important; */
    padding-left: 0px !important;
    padding-top: 0px !important;
    padding-right: 0px !important;
    padding-bottom: 0px !important;
}

.profile-detail-content-wrap {
    /* padding-left: 200px !important;
    padding-right: 200px !important; */
}

/* .stat-success {
    background-color: rgba(19, 165, 91, .1) !important;
    color: #13a55b !important;
} */
.stat-success h2,
.stat-secondary h2 {
    font-size: 45px !important;
}

.stat-success {
    color: #fff !important;
    background-color: #13a55b !important;
}

/* .stat-secondary {
    background-color: rgba(67, 154, 203, .1) !important;
    color: #439acb !important;
} */

.stat-secondary {
    color: #fff !important;
    background-color: #439acb !important;
}

.modal-close-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #002677;
    font-size: 14px;
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
    padding: 0;
}
.modal-close-btn:hover {
    opacity: 1;
    background: rgba(0, 38, 119, 0.08);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px 12px;
}
.modal-header .modal-title {
    flex: 1;
    min-width: 0;
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.modal-body {
    padding: 14px 20px 20px;
}

.btn-close {
    --bs-btn-close-color: #000;
    --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    --bs-btn-close-opacity: 0.5;
    --bs-btn-close-hover-opacity: 0.75;
    --bs-btn-close-focus-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    --bs-btn-close-focus-opacity: 1;
    --bs-btn-close-disabled-opacity: 0.25;
    --bs-btn-close-white-filter: invert(1) grayscale(100%) brightness(200%);
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: var(--bs-btn-close-color);
    background: rgba(0, 0, 0, 0) var(--bs-btn-close-bg) center/1em auto
        no-repeat;
    border: 0;
    border-radius: 0.375rem;
    opacity: var(--bs-btn-close-opacity);
}

.email-body .nav-tabs li a {
    background-color: #fff !important;
    color: #439acb !important;
    border-color: #439acb !important;
}

.email-body .nav-tabs li a.active {
    color: #fff !important;
    background-color: #439acb !important;
    border-color: #439acb !important;
}

.member-title {
    width: 100%;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.member-desc {
    font-size: 10px;
}

.family-tree-item-contain {
    border: 1px solid var(--bs-border-color);
    border-radius: 5px;
    overflow: visible !important;
    display: inline-flex;
    flex-direction: row;
    gap: 10px;
    padding: 10px 20px;
    margin-right: 20px;
    margin-bottom: 20px;
}

.todo-list {
    overflow: visible !important;
}

.email-body {
    width: 100% !important;
}

.codex-header .form-group .input-group .input-group-text {
    /*height: 62px;*/
    width: 62px;
    font-size: 25px;
    display: flex;
    justify-content: center;
}

/* ── Boutons de suppression photo — frosted glass, reveal on hover ── */
#delete-cover-img,
#delete-photo-img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    /* Frosted glass */
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
    color: #b91c1c !important;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14);
    /* Hidden by default */
    opacity: 0;
    transform: scale(0.78);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(.34,1.56,.64,1);
}

/* Trash buttons hidden on mobile — touch events trigger hover states */
@media (max-width: 767px) {
    #delete-cover-img,
    #delete-photo-img {
        display: none !important;
    }
}

/* #delete-cover-img is in flow inside .banner-actions — no absolute positioning */

#delete-photo-img {
    position: absolute;
    bottom: 15px;
    left: 35px;
}

/* Reveal on parent hover */
/* .banner-img:hover ~ .banner-actions handles the cover photo hover reliably,
   avoiding z-index interference from .banner-content (position:relative, later in DOM) */
.banner-img:hover ~ .banner-actions #delete-cover-img,
.banner-actions:hover #delete-cover-img,
.profile-img:hover #delete-photo-img {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Button own hover — deepen */
#delete-cover-img:hover,
#delete-photo-img:hover {
    background: rgba(254, 226, 226, 0.96) !important;
    border-color: rgba(239, 68, 68, 0.22) !important;
    color: #991b1b !important;
    transform: scale(1.1);
}

#delete-cover-img:active,
#delete-photo-img:active {
    transform: scale(0.94);
    transition: transform 0.08s ease;
}

/* Desktop: align "Voir comme visiteur" with the profile name (h1) */
.banner-action.profile-view-action,
.banner-action.demo-view-action,
.banner-action.profile-share-action {
    padding-top: 198px;
    pointer-events: none;
}

.banner-action.profile-view-action .preview-cta,
.banner-action.demo-view-action .preview-cta,
.banner-action.profile-share-action button,
.banner-action.profile-share-action .dropdown-menu {
    pointer-events: auto;
}

#delete-account-img {
    position: absolute;
    bottom: 0px;
    left: 0px;
    background-color: #fff;
    border-radius: 50%;
    cursor: pointer;
}

@media screen and (max-width: 1280px) {
    .codex-header .form-group {
        width: 300px !important;
    }
}

@media screen and (max-width: 600px) {
    .profile-img {
        width: 150px;
        height: 150px;
        margin-top: -50%;
    }

    .banner {
        height: 200px;
    }

    .banner-content .user-data {
        padding-left: 10px;
        padding-right: 10px;
    }

    .search-bar .input-group .input-group-text {
        border-top-left-radius: 30px !important;
        border-bottom-left-radius: 30px !important;
    }

    .themebody-wrap {
        margin-top: 0px;
        padding-top: 60px;
        min-height: calc(100vh - 60px);
        height: auto;
    }
    .timeline .timeline-content h4 {
        font-size: 14px !important;
    }
}
.timeline-grid .timeline-content .timeline-date {
    margin-bottom: unset;
}

.timeline-grid {
    padding-top: 20px;
}

.product-imgwrap a {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    color: #dde2f2 !important;
}
.product-imgwrap .icon {
    position: absolute;
    top: calc(50% - 50px);
    left: calc(50% - 25px);
    font-size: 100px;
}
.product-imgwrap img {
    object-fit: cover;
    object-position: center;
}
@media screen and (max-width: 480px) {
    .timeline.timeline-left .timeline-grid {
        padding-left: 30px;
    }
    .timeline-grid {
        padding-top: 10px;
    }
    .form-group .form-label {
        transform: none !important;
    }

    .tribute-message-input {
        min-height: 150px !important;
    }
}

@media screen and (max-height: 762px) {
    .codex-authbox {
        margin-top: 15px;
    }
}
@media screen and (max-width: 991px) {
    .codex-header .search-bar {
        flex-grow: 1 !important;
        max-width: 350px !important;
    }

    .codex-brand img {
        width: 50px;
        height: auto;
    }
    .themebody-wrap {
        margin-bottom: 50px;
    }

    .codex-header .form-group {
        flex-grow: 1 !important;
        width: auto !important;
    }

    .codex-header .form-group .input-group .form-control {
    }

    .codex-header .form-group .input-group .form-control.active {
        width: calc(100% - 62px) !important;
        position: relative !important;
        display: flex;
        flex-direction: row-reverse;
    }

    .codex-header .form-group .input-group .form-control {
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    .codex-header .form-group .input-group .input-group-text.active {
        height: 62px;
        width: 62px;
        box-shadow: initial;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }
}

@media screen and (min-width: 601px) {
    .auth-link > a {
        min-width: 150px;
    }

    .themebody-wrap {
        margin-top: 0px;
        padding-top: 82px;
        min-height: calc(100vh - 60px);
    }

    .profile-detail-content {
        padding-left: 50px !important;
        padding-right: 50px !important;
    }
}

#edit-profile-img {
    position: absolute;
    bottom: 5px;
    right: 5px;
}

.btn-primary,
.btn.btn-outline-primary:hover {
    background-color: #4770db !important;
    border-color: #4770db !important;
}

.btn.btn-outline-primary {
    border: 1px solid #4770db !important;
    color: #4770db !important;
}

.btn-primary:hover {
    background-color: rgba(71, 112, 219, 0.9) !important;
    border-color: rgba(71, 112, 219, 0.9) !important;
}

.nav-profile .media-body h6 {
    color: #fff;
}

.project-status h6,
.project-status h5,
.project-status h4,
.project-status h3,
.project-status h2,
.project-status h1 {
    color: #fff !important;
}

.timeline-content h3 {
    color: #000;
}

.page-content {
    display: flex;
    justify-content: center;
    max-width: 1280px !important;
    margin-left: auto;
    margin-right: auto;
}

.form-check .form-check-input {
    background-color: #dde2f2;
    border: #002677 solid 1px !important;
}

/* ── LE CHOIX DU TYPE D'HOMMAGE, COCHE ────────────────────────────────
   La regle juste au-dessus impose un fond pale a TOUTE case, sans variante
   `:checked`. Bootstrap ne peut donc jamais remplir la pastille : cochee ou
   non, elle reste du meme bleu pale, et seul un minuscule point blanc les
   distingue. C'est ce qu'on voit a l'ecran.

   Portee volontairement etroite — `input[name="type"]` — pour ne pas
   repeindre toutes les cases du tableau de bord au passage. Le defaut est
   general, la correction ne l'est pas : elle attend une demande.

   Le point est dessine par un degrade radial plutot que par l'image SVG de
   Bootstrap : celle-ci est definie dans une variable que la regle du dessus
   n'atteint pas, et la reecrire en data-URI serait plus fragile qu'un
   degrade de deux arrets. */
input[name="type"].form-check-input:checked {
    background-color: #002677;
    border-color: #002677 !important;
    background-image: radial-gradient(circle, #ffffff 0 34%, rgba(255, 255, 255, 0) 38%);
}

/* Toute la ligne est cliquable : la pastille seule fait 16 px de cible. */
input[name="type"].form-check-input,
input[name="type"].form-check-input + .form-check-label {
    cursor: pointer;
}

/* Custom style of cards from main plateform  */
/* Start */
.card,
.codex-authbox,
.table > :not(caption) > * > *,
.profile-detail-page .product-card,
.product-detail-page .product-card,
.dropdown,
.codex-header .nav-iconlist .hover-dropdown,
table.dataTable tbody tr,
table.dataTable.cell-border tbody tr td:first-child {
    background-color: #eff0f5;
    border-color: #eff0f5;
    box-shadow: none;
}

.card,
.codex-authbox,
.profile-detail-page .product-card,
.product-detail-page .product-card,
.codex-header .nav-iconlist .hover-dropdown,
.product-detail-page .family-tree-item-contain,
.timeline-grid .timeline-content,
.btn,
.email-body .nav-tabs li a {
    border-radius: 20px !important;
}

.nav-tabs li a {
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
}

/* ── Profile tabs: menu craft (pastille glissante + fantôme survol) ── */
.craft-nav { display: flex; justify-content: center; }
.craft-nav-row {
    position: relative;
    display: inline-flex;
    justify-content: center;
    gap: 20px;
}
.craft-ghost {
    position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 3px 12px rgba(0, 38, 118, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    opacity: 0; pointer-events: none;
    transition: left .34s cubic-bezier(.32,.72,0,1), width .34s cubic-bezier(.32,.72,0,1), opacity .22s ease;
}
.craft-pill {
    position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #002676 0%, #1a52b3 100%);
    pointer-events: none;
    box-shadow: 0 10px 22px -6px rgba(0,38,118,.42), 0 3px 8px rgba(0,38,118,.20), inset 0 1px 0 rgba(255,255,255,.24);
    transition: left .46s cubic-bezier(.32,.72,0,1), width .46s cubic-bezier(.32,.72,0,1);
}
.craft-tab {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 18px; border: none; background: transparent;
    cursor: pointer; border-radius: 999px;
    font-size: 16px; font-weight: 500; white-space: nowrap;
    color: #002676; opacity: .66; letter-spacing: 0; text-decoration: none;
    transition: color .34s cubic-bezier(.32,.72,0,1), opacity .24s cubic-bezier(.32,.72,0,1), font-weight .2s;
}
.craft-tab:hover { opacity: .95; color: #002676; text-decoration: none; }
.craft-tab.is-active { color: #fff !important; opacity: 1; font-weight: 600; letter-spacing: .002em; }
.craft-tab:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(0,38,118,.18); }
.craft-tab svg { width: 24px; height: 24px; display: block; flex-shrink: 0; transition: transform .46s cubic-bezier(.32,.72,0,1); }
.craft-tab.is-active svg { transform: scale(1.06); }
.craft-lock { font-size: 9px; color: rgba(0,38,118,.55); margin-left: 2px; }
.craft-tab.is-active .craft-lock { color: rgba(255,255,255,.65); }
.craft-rule {
    height: 1px; margin-top: 18px; margin-bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0,38,118,.13) 16%, rgba(0,38,118,.13) 84%, transparent);
}
@media (prefers-reduced-motion: reduce) {
    .craft-pill, .craft-ghost, .craft-tab svg { transition: none !important; }
}
/* Mobile — liste verticale, pastille glisse verticalement, pas de fantôme */
@media (max-width: 767px) {
    .craft-nav { display: block; }
    .craft-nav-row { display: flex; flex-direction: column; width: 100%; gap: 4px; }
    .craft-ghost { display: none; }
    .craft-pill { transition: top .46s cubic-bezier(.32,.72,0,1), height .46s cubic-bezier(.32,.72,0,1); }
    .craft-tab { width: 100%; justify-content: flex-start; padding: 8px 15px; font-size: 14px; gap: 8px; opacity: .78; }
    .craft-tab svg { width: 16px; height: 16px; }
    .craft-rule { margin-top: 12px; }
}
/* Tablette — layout horizontal compact (iPad portrait/paysage ≤ 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .craft-nav-row { gap: 4px; }
    .craft-tab    { padding: 8px 10px; font-size: 13px; gap: 4px; }
    .craft-tab svg { width: 18px; height: 18px; }
}
.product-detail-tab .tab-content { margin-top: -6px; }

.timeline::after {
    background-color: #002677;
}

.product-detail-page .card,
.product-detail-page .table > :not(caption) > * > *,
.product-detail-page table.dataTable tbody tr,
.product-detail-page table.dataTable.cell-border tbody tr td:first-child,
.product-detail-page .family-tree-item-contain,
.timeline-grid .timeline-content {
    background-color: #e5e8ef !important;
}

.ecom-product {
    background-color: #e5e8ef !important;
}

.profile-img img {
    border-color: #eff0f5;
}

.codex-footer {
    background-color: #eff0f5;
    z-index: 11;
    position: relative;
}

.form-control,
.input-group {
    font-family: var(--body-font-family);
    background-color: #f8f9ff;
    border: rgba(0, 38, 119, 0.28) solid 1.5px;
    color: #002677 !important;
    border-radius: 16px;
}

.form-control {
    font-size: 20px;
    min-height: 56px;
    padding-block: 13px;
    padding-inline: 20px;
}

.form-control::placeholder {
    font-family: var(--body-font-family);
    color: #002677 !important;
    opacity: 0;
}

.search-bar .form-control::placeholder {
    font-family: var(--body-font-family);
    color: #002677 !important;
    opacity: 1;
    font-size: 1.1rem;
}

.form-control:focus,
.input-group:hover {
    border-color: #002677 !important;
    box-shadow: 0 2px 10px rgba(0, 38, 119, 0.12), 0 0 0 2px rgba(0, 38, 119, 0.18);
}

.input-group .form-control {
    border: none;
}

.input-group .form-control:focus {
    box-shadow: none;
}

.input-group .input-group-text {
    display: flex;
    justify-content: center;
}

.input-group .input-group-text:not(:first-child) {
    border-top-right-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
    color: #002677;
    background-color: #eff0f5;
}

.input-group .input-group-text:not(:last-child) {
    border-top-left-radius: 14px !important;
    border-bottom-left-radius: 14px !important;
    color: #002677;
    background-color: #eff0f5;
}

.showhide-password:focus + span {
    background-color: rgb(221, 226, 242) !important;
}

.search-bar .input-group {
    background-color: #002677 !important;
}

.search-bar .input-group .form-control {
    border-top-left-radius: 14px !important;
    border-bottom-left-radius: 14px !important;
}

/* Reset search bar to header-appropriate size (bio form-control changes are too large here) */
.search-bar .form-control {
    font-size: 15px;
    min-height: 40px;
    padding-block: 8px;
    padding-inline: 14px;
}

.codex-header .form-group .form-control {
    border: none;
}

.alert {
    border-radius: 30px !important;
}

.form-group {
    position: relative;
}

.form-group .form-label {
    display: block;
    position: static;
    color: #002677;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.85;
    margin-bottom: 5px;
    padding-left: 6px;
    pointer-events: auto;
    transition: none;
    transform: none;
}

/* Neutralize floating label state changes */
.form-control:focus ~ .form-label,
.form-group .form-label.focused,
.form-group.text-area .form-label,
.form-group-textarea .form-label.focused,
.form-group.text-area .form-control:focus ~ .form-label,
.form-group.text-area .form-label.focused {
    font-size: 0.9rem;
    top: auto;
    transform: none;
}

.product-detail-tab .nav-tabs .nav-link svg,
.product-detail-tab .nav-tabs .nav-link i {
    width: 20px !important;
    margin-right: 5px;
}

/* Réduit l'espace au-dessus du menu de navigation des profils (view + edit).
   :not(.profile-detail-header) exclut la carte bannière qui dépend de padding:25px
   pour que la photo de couverture reste collée sur le header. */
.product-detail-tab:not(.profile-detail-header) {
    padding-top: 12px !important;
}
.dropzone {
    border-radius: 30px;
}

/* ── "facultatif" badge — shared across all forms ── */
.form-label__opt {
    font-family: "Lora", Georgia, serif;
    font-style: italic;
    font-weight: 400;
    color: #9aa5bb;
    font-size: 11.5px;
    float: right;
    line-height: 1.4;
}

/* ── Family-tree modal forms (compact) ── */
.ft-modal-form .form-group {
    margin-bottom: 6px;
}
.ft-modal-form .form-label {
    font-size: 0.78rem;
    margin-bottom: 1px;
}
.ft-modal-form .form-label__opt {
    float: none;
    margin-left: 4px;
    font-size: 11px;
}
.ft-modal-form .form-control {
    min-height: 36px !important;
    padding-block: 5px !important;
    padding-inline: 12px !important;
    font-size: 0.875rem !important;
    border-radius: 10px;
}
@media (max-width: 767px) {
    .ft-modal-form .form-control {
        font-size: 0.875rem !important;
        min-height: 36px !important;
        padding-block: 5px !important;
        padding-inline: 12px !important;
    }
}
/* Photo dropzone in modal */
.ft-modal-form .file-dropzone {
    min-height: unset !important;
    padding: 0 !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: border-color 0.15s;
}
.ft-modal-form .file-dropzone .dz-message {
    padding: 14px 10px !important;
    text-align: center;
    margin: 0;
}
.ft-modal-form .file-dropzone .upload-icon {
    font-size: 1.15rem;
    color: #6b7280;
    margin-bottom: 3px;
}
.ft-modal-form .file-dropzone .dz-message h3 {
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    margin: 0 0 1px !important;
    color: #374151;
}
.ft-modal-form .file-dropzone .dz-message > p {
    font-size: 0.7rem !important;
    color: #9ca3af !important;
    margin: 0 !important;
}
/* Strip Dropzone.js default dz-preview / dz-image styles */
.ft-modal-form .dz-preview {
    display: block !important;
    margin: 0 !important;
    vertical-align: unset !important;
}
.ft-modal-form .dz-image {
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background: none !important;
    overflow: visible !important;
    position: static !important;
    z-index: auto !important;
}
.ft-modal-form .dz-preview:hover .dz-image img {
    filter: none !important;
    transform: none !important;
}
/* Premium circular photo preview */
.ft-modal-form .preview-dropzon {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 10px;
}
.ft-modal-form #spouse-image img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    box-shadow: 0 4px 18px rgba(0, 38, 119, 0.16),
                0 0 0 3px #fff,
                0 0 0 5px rgba(0, 38, 119, 0.18);
}
/* ── Zoom toolbar ── */
.tree-actions__zoom {
    display: flex;
    align-items: center;
    height: 44px;
    background: #fff;
    border: 1px solid rgba(0, 38, 118, 0.13);
    border-radius: 14px;
    overflow: hidden;
}
.tree-actions__zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 100%;
    border: none;
    background: transparent;
    color: #002676;
    cursor: pointer;
    transition: background 120ms ease;
    padding: 0;
    font-size: 15px;
}
.tree-actions__zoom-btn:hover  { background: rgba(0, 38, 118, 0.06); }
.tree-actions__zoom-btn:active { background: rgba(0, 38, 118, 0.10); }
.tree-actions__zoom-btn:focus  { outline: none; }
.tree-actions__zoom-btn:focus-visible {
    outline: 2px solid #002676;
    outline-offset: -2px;
}
.tree-actions__zoom-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.tree-actions__zoom-btn + .tree-actions__zoom-btn,
.tree-actions__zoom-label + .tree-actions__zoom-btn,
.tree-actions__zoom-btn + .tree-actions__zoom-label {
    border-left: 1px solid rgba(0, 38, 118, 0.08);
}
.tree-actions__zoom-label {
    min-width: 54px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Questrial', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: #6c7992;
    user-select: none;
}

/* ── Family-tree optional section toggle ── */
.ft-extra-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0 6px;
    color: #9aa5bb;
    font-size: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.15s;
}
.ft-extra-toggle:hover {
    color: #002677;
}
.ft-extra-toggle__line {
    flex: 1;
    height: 1px;
    background: #e9ecf5;
}
.ft-extra-toggle__label {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ft-extra-toggle .fa-chevron-down {
    font-size: 9px;
    transition: transform 0.25s ease;
}
.ft-extra-toggle.is-open {
    color: #002677;
}
.ft-extra-toggle.is-open .fa-chevron-down {
    transform: rotate(180deg);
}
.ft-extra-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease;
}
.ft-extra-fields.is-open {
    max-height: 700px;
}

/* ── Edit modal — card-style photo layout ── */
.ft-edit-layout {
    display: flex;
    gap: 16px;
    align-items: center;
}
.ft-edit-photo-col {
    flex-shrink: 0;
}
.ft-edit-fields-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Avatar wrapper — positioning context for the X button */
.ft-edit-avatar-wrap {
    position: relative;
    display: inline-block;
    width: 88px;
    height: 88px;
    cursor: pointer;
}

/* The circle itself */
.ft-edit-avatar {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 2.5px #fff,
        0 0 0 4.5px rgba(0, 38, 119, 0.30),
        0 3px 12px rgba(0, 38, 119, 0.16);
    transition: box-shadow 0.2s;
}
.ft-edit-avatar-wrap:hover .ft-edit-avatar {
    box-shadow:
        0 0 0 2.5px #fff,
        0 0 0 5px rgba(0, 38, 119, 0.44),
        0 5px 18px rgba(0, 38, 119, 0.22);
}

/* Empty state — icon only, no label */
.ft-edit-avatar--empty {
    background: #eef1fa;
}
.ft-edit-avatar__icon {
    font-size: 1.15rem;
    color: #002677;
    opacity: 0.50;
    transition: opacity 0.2s;
}
.ft-edit-avatar-wrap:hover .ft-edit-avatar__icon {
    opacity: 0.85;
}

/* Filled state: image fills the circle */
.ft-edit-avatar #spouse-image {
    width: 88px;
    height: 88px;
}
.ft-edit-avatar #spouse-image img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Hover overlay — pencil icon appears over the photo */
.ft-edit-avatar__overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 22, 70, 0.50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.ft-edit-avatar-wrap:hover .ft-edit-avatar__overlay {
    opacity: 1;
}

/* Delete X button — outside overflow:hidden circle */
.ft-edit-avatar__delete {
    position: absolute;
    top: 1px;
    right: 1px;
    z-index: 10;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background 0.15s, transform 0.12s;
}
.ft-edit-avatar__delete:hover {
    background: #dc2626;
    transform: scale(1.12);
}

/* Name field — primary, visually dominant */
.ft-name-field.form-control {
    font-size: 0.975rem !important;
    font-weight: 600 !important;
    min-height: 40px !important;
    color: #0f1f40 !important;
    letter-spacing: -0.01em;
}

/* Heritage link toggle */
.ft-heritage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0 3px;
}
.ft-heritage-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e2d4e;
    cursor: pointer;
    margin: 0;
}
.ft-heritage-switch {
    width: 2.4em;
    height: 1.25em;
    cursor: pointer;
    margin: 0;
}
.ft-heritage-switch:checked {
    background-color: #002677;
    border-color: #002677;
}
.ft-heritage-switch:focus {
    border-color: #002677;
    box-shadow: 0 0 0 0.15rem rgba(0, 38, 119, 0.20);
}
#ft-heritage-url-wrap {
    padding-top: 6px;
}

/* Submit footer with separator */
.ft-edit-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(0, 38, 119, 0.08);
    padding-top: 14px;
    margin-top: 14px;
}

/* ============================================================
   MODAL — Add/Edit member (v2)
   ============================================================ */

#edit-member-modal .modal-content,
#create-member-modal .modal-content {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: ph-modalIn .28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
}
@keyframes ph-modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}
#edit-member-modal .modal-body,
#create-member-modal .modal-body {
    padding: 0;
}
#edit-member-modal .modal-dialog,
#create-member-modal .modal-dialog {
    max-width: 540px;
}

/* Header */
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 38, 118, 0.08);
    background: #fff;
}
.modal__title {
    margin: 0;
    font-family: "Outfit", system-ui, sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #102347;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.modal__subject-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(216, 162, 63, 0.10);
    color: #8a6720;
    border-radius: 999px;
    font-family: "Questrial", sans-serif;
    font-size: 12px;
    font-weight: 600;
}
.modal__subject-chip i { font-size: 10px; }
.modal__close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 38, 118, 0.06);
    border-radius: 12px;
    color: #002676;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .12s, color .12s;
    font-size: 14px;
    padding: 0;
}
.modal__close:hover {
    background: rgba(0, 38, 118, 0.13);
    color: #002676;
}

/* Body */
.modal__body {
    padding: 14px 24px 8px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-height: 70vh;
}

/* Section */
.modal__section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal__section-title {
    display: block;
    font-family: "Questrial", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #6c7992;
}

/* Photo row */
.photo-row {
    display: flex;
    align-items: center;
    gap: 18px;
}
.photo-row__preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 38, 118, 0.06);
    border: 2.5px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(0,38,118,0.14), 0 2px 8px rgba(16, 24, 40, 0.10);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-row__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-row__preview--monogram > span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: "Archivo Black", sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.photo-row__preview--empty {
    color: rgba(0, 38, 118, 0.28);
    font-size: 1.6rem;
}
.photo-row__preview--deceased {
    box-shadow: 0 0 0 2px rgba(184, 127, 31, 0.50), 0 2px 8px rgba(16,24,40,0.10);
}
.photo-row__preview--subject {
    box-shadow: 0 0 0 2.5px #d8a23f, 0 0 0 5px rgba(216,162,63,0.20), 0 2px 8px rgba(16,24,40,0.10);
}
.photo-row__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.photo-row__btn-change,
.photo-row__btn-remove {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    font-family: "Questrial", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
    transition: background .12s, border-color .12s;
}
.photo-row__btn-change {
    background: rgba(0, 38, 118, 0.06);
    color: #002676;
    border: none;
}
.photo-row__btn-change:hover { background: rgba(0, 38, 118, 0.13); }
.photo-row__btn-remove {
    background: transparent;
    color: #c2412d;
    border: 1.5px solid rgba(194, 65, 45, 0.22);
}
.photo-row__btn-remove:hover {
    background: rgba(194, 65, 45, 0.08);
    border-color: rgba(194, 65, 45, 0.45);
}
.photo-row__hint {
    font-family: "Questrial", sans-serif;
    font-size: 12px;
    color: #6c7992;
    padding-left: 2px;
}

/* Fields */
.modal__body .field {
    display: flex;
    flex-direction: column;
}
.field__label {
    display: block;
    font-family: "Questrial", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #002676;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.field__label .req {
    color: #c2412d;
    margin-left: 2px;
}
.field__input {
    width: 100%;
    min-height: 34px;
    padding: 5px 12px;
    font-family: "Questrial", sans-serif;
    font-size: 15px;
    color: #102347;
    background: #f8f9fc;
    border: 1.5px solid rgba(0, 38, 118, 0.13);
    border-radius: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-appearance: none;
    appearance: none;
}
.field__input::placeholder { color: #8a94ab; }
.field__input:focus {
    border-color: #002676;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 38, 118, 0.08);
}
.field__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' stroke='%236c7992' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}
.field__hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6c7992;
    line-height: 1.4;
}
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Toggle row */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: #f8f9fc;
    border: 1.5px solid rgba(0, 38, 118, 0.13);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    margin: 0;
    -webkit-user-select: none;
    user-select: none;
}
.toggle-row:hover { border-color: rgba(0, 38, 118, 0.28); }
.toggle-row--active {
    border-color: #002676;
    background: rgba(0, 38, 118, 0.04);
}
.toggle-row__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.toggle-row__title {
    font-family: "Questrial", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #102347;
    line-height: 1.2;
}
.toggle-row__hint {
    font-family: "Questrial", sans-serif;
    font-size: 12px;
    color: #6c7992;
    line-height: 1.4;
}

/* Custom toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}
.toggle-switch__input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}
.toggle-switch__track {
    position: absolute;
    inset: 0;
    background: rgba(0, 38, 118, 0.18);
    border-radius: 999px;
    transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(16, 24, 40, 0.15);
    transition: left 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.toggle-switch__input:checked ~ .toggle-switch__track { background: #002676; }
.toggle-switch__input:checked ~ .toggle-switch__thumb  { left: 21px; }

/* Collapsible field */
.field--collapsible {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 250ms cubic-bezier(0.4, 0, 0.2, 1),
                opacity    200ms ease;
}
.field--collapsible--open {
    max-height: 80px;
    opacity: 1;
}

/* Divider label (ex: "Et l'autre parent ?") */
.modal__divider-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal__divider-line {
    flex: 1;
    height: 1px;
    background: #e6eaf2;
}
.modal__divider-text {
    font-family: "Questrial", sans-serif;
    font-size: 0.75rem;
    color: #6c7992;
    white-space: nowrap;
}

/* Footer */
.modal__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-top: 1px solid rgba(0, 38, 118, 0.08);
    background: #fff;
    flex-shrink: 0;
}

/* Modal-scoped buttons (scoped to .modal__footer to not override global Bootstrap) */
.modal__footer .btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 46px !important;
    padding: 0 24px !important;
    background: linear-gradient(135deg, #002676 0%, #1a52b3 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 14px !important;
    font-family: "Questrial", sans-serif !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    box-shadow: 0 8px 24px rgba(0, 38, 118, 0.28) !important;
    transition: transform .18s, box-shadow .18s !important;
    text-decoration: none !important;
}
.modal__footer .btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 28px rgba(0, 38, 118, 0.38) !important;
    color: #fff !important;
}
.modal__footer .btn-ghost {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    background: transparent;
    color: #6c7992;
    border: none;
    border-radius: 12px;
    font-family: "Questrial", sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: color .12s, background .12s;
}
.modal__footer .btn-ghost:hover {
    color: #002676;
    background: rgba(0, 38, 118, 0.04);
}

/* Family tree modals — border-radius + animation aligned to ph-modal system */
#create-member-modal .modal-content,
#edit-member-modal   .modal-content,
#tree-crop-modal     .modal-content {
    border-radius: 28px !important;
    overflow: hidden;
    border: none;
    box-shadow: 0 30px 80px rgba(8, 15, 40, 0.30);
    animation: ph-popIn .26s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
/* Remove Bootstrap's own padding on modal-body since inner modal__ sections handle layout */
#create-member-modal .modal-body,
#edit-member-modal   .modal-body {
    padding: 0 !important;
}

/* Responsive */
@media (max-width: 540px) {
    #edit-member-modal .modal-dialog,
    #create-member-modal .modal-dialog {
        max-width: calc(100vw - 24px);
        margin: 12px auto;
    }
    .modal__header,
    .modal__footer { padding-left: 20px; padding-right: 20px; }
    .modal__body   { padding-left: 20px; padding-right: 20px; }
    .field-row     { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    #edit-member-modal .modal-content,
    #create-member-modal .modal-content,
    .toggle-switch__track,
    .toggle-switch__thumb,
    .field--collapsible {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* End */
.product-detail-page .product-detail-tab .tab-content .form-group textarea {
    height: 80px;
    overflow-y: auto;
    padding-top: 20px;
}

.info-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #002677;
    color: white;
    text-align: center;
    border-radius: 50%;
    line-height: 20px;
    cursor: pointer;
    position: relative;
    top: -15px; /* Position above the checkbox */
    left: 10px; /* Adjust as needed */
}
.message-box {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    top: -50px; /* Adjust as needed */
    left: 30px; /* Adjust as needed */
    z-index: 1000;
    width: 300px;
}

.shadow-0 {
    box-shadow: none !important;
}

select.form-control {
    padding-block: 13px;
    padding-right: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23002677' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    background-size: 14px 10px;
}
.border.border-primary {
    border-color: #002677 !important;
}

.lifetime-text {
    font-size: large;
    border-radius: 120px;
    border: 1px solid #002677;
    padding: 10px 15px;
}

.datepicker--pointer {
    background: #dde2f2 !important;
}

.skiptranslate iframe {
    display: none !important;
}
.auth-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dropzone .dz-preview {
    margin: unset;
}
.file-dropzone-group {
    cursor: pointer;
    position: relative;
}
.file-dropzone {
    z-index: 9;
    position: relative;
}
.file-dropzone input {
    width: 100%;
    height: 100%;
    z-index: 2;
}

.file-dropzone img {
    width: inherit;
}
.cdxlight-box,
.cdxlight-box .card {
    height: calc(100% - 25px);
}
.cdxlight-box .ecom-product .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cdxlight-box .ecom-product .product-imgwrap {
    flex: 0 0 250px;
    height: 250px;
    overflow: hidden;
}
.cdxlight-box .ecom-product .detail-wrap p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 767px) {
    /* ── Mobile scale-down: inputs & labels ── */
    .form-control,
    select.form-control {
        font-size: 17px !important;
        min-height: 46px;
        padding-block: 8px;
    }
    .form-group .form-label {
        font-size: 0.875rem;
    }

    .cdxlight-box .ecom-product .detail-wrap p {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }
    .search-bar .form-control {
        font-size: 13px !important;
        min-height: 36px;
        padding-block: 6px;
        padding-inline: 10px;
    }
}
.w-full {
    width: 100% !important;
}
/* ── User account dropdown (unchanged) ── */
.codex-header .user-dropdown {
    border-radius: 20px !important;
    width: 100% !important;
    padding: 0;
}
.codex-header .user-dropdown ul li { padding: 15px; }
.codex-header .user-dropdown ul li:not(:first-child) { padding: 15px; border-top: 1px solid var(--bs-border-color); }
.codex-header .user-dropdown ul li:hover { background-color: var(--bs-bodybg-color); }
.codex-header .user-dropdown ul li a { display: flex; width: 100%; gap: 10px; }
.codex-header .user-dropdown ul li a img { width: 40px !important; height: 40px !important; background-color: var(--bs-bodybg-color); }
.codex-header .user-dropdown ul li a .profile-info { display: flex; flex-direction: column; margin-left: 10px; }
.codex-header .user-dropdown ul li:first-child { border-top-left-radius: 20px !important; border-top-right-radius: 20px !important; }
.codex-header .user-dropdown ul li:last-child { border-bottom-left-radius: 20px !important; border-bottom-right-radius: 20px !important; }

/* ── Premium autocomplete dropdown ── */
@keyframes acDropFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.codex-header #autocomplete-dropdown {
    z-index: 2000 !important;
    padding: 6px 0 !important;
    background: #fff !important;
    border: 1px solid rgba(0,38,118,0.09) !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 8px -2px rgba(0,0,0,0.07), 0 20px 52px -8px rgba(0,38,118,0.20) !important;
    max-height: 60vh;
    overflow: hidden;
    overflow-y: auto;
    animation: acDropFadeIn 0.18s ease;
}
.codex-header #autocomplete-dropdown ul { padding: 0; margin: 0; list-style: none; }
.codex-header #autocomplete-dropdown ul li {
    padding: 0;
    border-top: 1px solid rgba(0,38,118,0.05);
    transition: background 0.12s;
}
.codex-header #autocomplete-dropdown ul li:first-child { border-top: none; }
.codex-header #autocomplete-dropdown ul li:hover { background: rgba(0,38,118,0.04); }
.codex-header #autocomplete-dropdown ul li a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 16px;
    text-decoration: none;
    width: 100%;
}
.codex-header #autocomplete-dropdown .ac-avatar {
    flex-shrink: 0;
    width: 46px; height: 46px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0,38,118,0.11);
    background: #eef2ff;
}
.codex-header #autocomplete-dropdown .ac-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.codex-header #autocomplete-dropdown .ac-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #002676, #1e3a8a);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.codex-header #autocomplete-dropdown .ac-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.codex-header #autocomplete-dropdown .ac-name {
    font-size: 14.5px;
    font-weight: 600;
    color: #0b1d3e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.2;
}
.codex-header #autocomplete-dropdown .ac-dates {
    font-size: 12px;
    color: #8899b4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.3;
}
.codex-header #autocomplete-dropdown ul li.ac-see-all {
    border-top: 1px solid rgba(0,38,118,0.09) !important;
    background: rgba(0,38,118,0.025);
}
.codex-header #autocomplete-dropdown ul li.ac-see-all:hover { background: rgba(0,38,118,0.07); }
.codex-header #autocomplete-dropdown ul li.ac-see-all a {
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #002676;
    gap: 7px;
    padding: 11px 16px;
}

.pagination {
    justify-content: center !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:hover {
    color: #fff !important;
    cursor: pointer;
}
.dataTables_wrapper {
    overflow: scroll;
}
.account-profile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    gap: 15px;
}
.account-profile img {
    height: 100px;
    width: 100px;
    border-radius: 50%;
}
.account-profile .user-icon {
    position: relative;
}

.account-profile .btn.edit-photo-btn {
    padding: 5px !important;
    border-radius: 50%;
    box-shadow: none !important;
    height: 40px;
    width: 40px;
    position: absolute;
    top: 0px;
    right: 0px;
}
.hidden {
    display: none !important;
}
.codex-authbox .auth-header,
.codex-authbox .form-label,
.card .card-header h4,
.form-label,
.codex-breadcrumb {
    text-transform: inherit;
}
.dz-details {
    display: none !important;
}
.hv-item-actions {
    z-index: 100;
}

.hv-item
    > .hv-item-parent.couple.no-children
    + .hv-item-children
    > .hv-item-child::before {
    height: 75px !important;
}
.tribute-img {
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
}

div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm) {
    background-color: #4770db !important;
}
.text-strong {
    font-weight: bold !important;
}

.codex-authbox .auth-footer .login-list .bg-google {
    -webkit-box-shadow: 0 0 30px 5px rgba(5, 23, 34, 0.07);
    box-shadow: 0 0 30px 5px rgba(5, 23, 34, 0.07);
}
.codex-authbox .auth-footer .login-list a {
    padding: 10px 30px;
    border-radius: 30px;
    text-transform: capitalize;
    display: block;
    font-weight: 600;
}

@media screen and (max-width: 575px) {
    .login-section {
        display: none !important;
    }
}

@media screen and (min-width: 575px) {
    .blgcomment-list li .media img.media-img {
        width: 50%;
        height: auto !important;
    }
}

.bft-img-button,
.bft-button {
    background-color: #4770db !important;
}
.bft-button {
    border-color: #4770db !important;
}
.bft-button.transparent {
    background-color: transparent !important;
    color: #4770db !important;
}
.bft-img-button:hover,
.bft-button:hover {
    opacity: 0.9;
}
.bft-button.transparent {
    color: #4770db !important;
}
.bft-link:hover {
    color: #f57c00;
}

.account-profile img.cropper-uploaded-img {
    border-radius: 0 !important;
}
.fs-13 {
    font-size: 13px;
    line-height: 14px;
}
img.tribute-media {
    height: 250px;
}

@media screen and (max-width: 575px) {
    img.tribute-media {
        width: 100% !important;
        height: auto !important;
    }
}

.media-img {
    height: 250px;
    object-fit: cover;
    object-position: center !important;
}

.male .bft-edit-form-header {
    background: linear-gradient(90deg, #00d3a5 0%, #00a7d4 100%);
}

.female .bft-edit-form-header {
    background: linear-gradient(90deg, #ff8024 0%, #ff46a3 100%);
}

[class^="VIpgJd"] {
    background-color: inherit !important;
    box-shadow: inherit !important;
}

#goog-gt-tt {
    display: none !important;
}

.locked-profile {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(5px) saturate(180%);
    background-color: #dde2f2cc;
    padding-top: 250px;
}
.tab-pane {
    position: relative;
    min-height: 300px;
}

.locked-section {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(5px) saturate(180%);
    background-color: #dde2f2cc;
    z-index: 10;
}
.locked-profile .lock-icon {
    font-weight: 300;
    font-size: 50px;
    color: #002677;
}
.locked-section .lock-icon {
    font-weight: 300;
    font-size: 50px;
    color: #e54a4a;
}
.locked-section .locked-section-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    gap: 20px;
}
.locked-profile .locked-profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    gap: 20px;
}

/* ── Section verrouillée — nouveau design Heritage ───────────── */
.lk-wall {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    background: rgba(221, 226, 242, 0.68);
    z-index: 10;
}

.lk-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 420px;
    text-align: center;
    padding: 24px;
}

.lk-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 38, 118, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #002676;
    margin-bottom: 6px;
}

.lk-title {
    font-size: 18px;
    font-weight: 700;
    color: #002676;
    margin: 0;
}

.lk-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.lk-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    background: #002676;
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.lk-btn:hover { opacity: 0.85; }

/* ── Modal déverrouillage — design Heritage ──────────────────── */
.unlock-section .modal-dialog { max-width: 420px; }

.unlock-section .modal-content {
    border: none;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 38, 118, 0.18);
    overflow: hidden;
}

.unlock-section .modal-header {
    background: linear-gradient(135deg, #002676 0%, #1a52b3 100%);
    border-bottom: none;
    padding: 18px 24px;
}

.unlock-section .modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.unlock-section .modal-close-btn {
    color: rgba(255, 255, 255, 0.70);
    font-size: 16px;
}

.unlock-section .modal-close-btn:hover { color: #fff; }

.unlock-section .modal-body { padding: 24px; }

.lk-modal-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 18px;
    line-height: 1.5;
}

.lk-modal-pw-wrap {
    display: flex;
    align-items: center;
    background: #f8f9fc;
    border: 1.5px solid rgba(0, 38, 118, 0.18);
    border-radius: 12px;
    padding: 0 12px;
    transition: border-color 0.15s;
}

.lk-modal-pw-wrap:focus-within { border-color: rgba(0, 38, 118, 0.55); }

.lk-modal-pw-icon { color: #9ca3af; flex-shrink: 0; margin-right: 10px; }

.lk-modal-pw-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: #102347;
    padding: 13px 0;
}

.lk-modal-pw-input::placeholder { color: #b0b8cc; }

.lk-modal-pw-eye {
    background: none;
    border: none;
    padding: 0;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lk-modal-pw-eye:hover { color: #002676; }

.lk-modal-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #c2412d;
}

.lk-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 22px;
}

.lk-modal-btn-cancel {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
}

.lk-modal-btn-cancel:hover { color: #102347; }

.lk-modal-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 24px;
    border-radius: 12px;
    background: #002676;
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 38, 118, 0.25);
    transition: opacity 0.15s;
}

.lk-modal-btn-primary:hover { opacity: 0.88; }

.tab-lock-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 9px;
    color: rgba(0, 38, 118, 0.55);
}

.nav-link.active + .tab-lock-icon {
    color: rgba(255, 255, 255, 0.65);
}

.orgchart .couple:has(> .nodes) > .node:first-child::after {
    top: 148px;
}
.orgchart .couple::after {
    top: 148px;
    width: 30px;
    left: calc(50% - 15px);
}
.orgchart .couple:first-child:not(:only-child)::before {
    width: calc(100% - 74px);
    left: 74px;
}
.orgchart .hierarchy.couple:only-child::before {
    width: 152px;
    left: calc(50% - 76px);
}
.orgchart .couple:last-child:not(:only-child)::before {
    width: calc(50% + 76px);
}
.menu-icon {
    color: #fff;
}
text.dropdown-item {
    background-color: red;
    width: 100%;
}
#m-tree {
    width: 100%;
    height: 900px;
    background: #444;
}

/* For computer screens and larger */
@media screen and (min-width: 992px) {
    .codex-header .form-group {
        width: 350px;
    }
}

/* Corriger la casse des titres dans les cartes de profil */
.user-card .card-body .user-detailwrap h6 {
    text-transform: none !important;
}

.user-card .user-detailwrap h6 {
    text-transform: none !important;
}
/* ── Toastr — supprime la transparence ── */
#toast-container > div {
    opacity: 1 !important;
    filter: alpha(opacity=100) !important;
}

/* ── Toastr — style premium on-brand ── */
#toast-container > div {
    opacity: 1 !important;
    filter: none !important;
    background-color: #4770db !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 28px rgba(71, 112, 219, 0.22), 0 2px 8px rgba(71, 112, 219, 0.12) !important;
    padding: 14px 20px 14px 52px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    width: fit-content !important;
    min-width: 0 !important;
    max-width: 340px;
}
@media (min-width: 768px) {
    #toast-container > div {
        max-width: 520px;
    }
}

#toast-container > div:hover {
    opacity: 1 !important;
    box-shadow: 0 10px 32px rgba(71, 112, 219, 0.28), 0 3px 10px rgba(71, 112, 219, 0.14) !important;
}

#toast-container.toast-bottom-center {
    bottom: 24px;
}

#toast-container.toast-bottom-center > div {
    margin-left: auto;
    margin-right: auto;
}

.toast-success {
    background-color: #4770db !important;
}

.toast-error {
    background-color: #c0392b !important;
}

.toast-warning {
    background-color: #d68910 !important;
}

.toast-info {
    background-color: #1a5276 !important;
}

/* ── Toastr — animation entrée premium ── */
@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#toast-container > div {
    animation: toastSlideUp 0.3s cubic-bezier(0.34, 1.1, 0.64, 1) forwards;
}

.grecaptcha-badge {
    visibility: hidden !important;
}

/* ── Auth pages (login / register): overflow-safe + premium ── */

/* Apply gradient to body + hide sidebar on auth pages so no background mismatch */
body:has(.auth-main) {
    background:
        radial-gradient(circle at top left,  rgba(0,38,118,0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(67,154,203,0.08), transparent 26%),
        linear-gradient(180deg, #f7f8fb 0%, #eef1f7 100%) !important;
    min-height: 100vh;
}
/* On long pages (ex: search results), the browser propagates the body background to
   the canvas using the viewport height as tile size → gradient repeats every ~100vh.
   Fix: transparent body + fixed pseudo-element that always covers exactly the viewport.
   Scoped to .auth-gradient-bg so login/register/profile inline overrides are unaffected. */
body:has(.auth-gradient-bg) {
    background: transparent !important;
}
body:has(.auth-gradient-bg)::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at top left,  rgba(0,38,118,0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(67,154,203,0.08), transparent 26%),
        linear-gradient(180deg, #f7f8fb 0%, #eef1f7 100%);
}
body:has(.auth-main) .codex-sidebar {
    display: none !important;
}
body:has(.auth-main) .page-content {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}
body:has(.auth-main) .themebody-wrap {
    background: transparent !important;
}
body:has(.auth-main) .codex-footer {
    display: none !important;
}

/* Auth container: column direction so margin:auto works reliably on the vertical axis */
.themebody-wrap.auth-main {
    height: auto !important;
    min-height: 100vh !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding-bottom: 36px !important;
    background: transparent !important;
}

/* Card */
.codex-authbox {
    flex-shrink: 0 !important;
    padding: 28px 32px !important;
    box-shadow: 0 12px 48px rgba(0, 38, 119, 0.13), 0 2px 10px rgba(0, 38, 119, 0.07) !important;
    border-bottom: none !important;
    border-radius: 24px !important;
}

/* Title */
.codex-authbox .auth-header h3 {
    color: #002677 !important;
    font-weight: 700 !important;
    font-size: 1.85rem !important;
    margin-bottom: 12px !important;
}

/* ── "Autres langues" — premium divider + ghost pill ── */
.codex-authbox .auth-footer {
    margin-top: 18px !important;
    padding-top: 0 !important;
}
.codex-authbox .auth-footer .auth-with {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 0.68rem !important;
    font-weight: 500 !important;
    color: #b0bcd0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.09em !important;
    margin-bottom: 10px !important;
}
.codex-authbox .auth-footer .auth-with::before,
.codex-authbox .auth-footer .auth-with::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background: rgba(0, 38, 119, 0.12) !important;
}
.codex-authbox .auth-footer .login-list .bg-google {
    background: transparent !important;
    border: 1px solid rgba(0, 38, 119, 0.18) !important;
    color: #4770db !important;
    padding: 5px 20px !important;
    border-radius: 20px !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    transition: background 0.15s, border-color 0.15s !important;
}
.codex-authbox .auth-footer .login-list .bg-google:hover {
    background: rgba(71, 112, 219, 0.07) !important;
    border-color: #4770db !important;
}

/* Scale down inputs — global form-control is 20px/56px, far too large here */
.codex-authbox .form-control {
    font-size: 15px !important;
    min-height: 44px !important;
    padding-block: 9px !important;
    border-radius: 12px !important;
}
.codex-authbox .input-group {
    border-radius: 12px !important;
}

/* Tighten Bootstrap utility margins */
.codex-authbox form {
    margin-top: 18px !important;
}
.codex-authbox .form-group {
    margin-bottom: 12px !important;
}

/* Submit button — full width, branded gradient */
.codex-authbox .btn.btn-primary {
    width: 100% !important;
    background: linear-gradient(135deg, #002677 0%, #4770db 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    padding-block: 11px !important;
}

/* Password toggle */
.codex-authbox .group-input .input-group-text {
    font-size: 15px !important;
    border-radius: 0 12px 12px 0 !important;
}

/* ================================================================
   AUTH-PAGE HEADER — login + register only
   ================================================================ */
body:has(.auth-main) .codex-header {
    height: 80px !important;
    min-height: 80px !important;
    padding: 0 32px !important;
}

/* ── Brand: icon + text — all non-demo headers ── */
.codex-header:not(.demo-header-mode) .logo-gridwrap {
    padding: 0 !important;
    gap: 6px !important;
    justify-content: flex-start !important;
}

.codex-header:not(.demo-header-mode) .codexbrand-logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
}

.codex-header:not(.demo-header-mode) .codexbrand-logo img {
    height: 36px !important;
    width: 36px !important;
    max-width: none !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

.ph-brand-name {
    color: #fff !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    letter-spacing: -0.01em !important;
    line-height: 1 !important;
}

/* ── Authenticated header nav items (Accueil, Boutique, Utilisateurs) ── */
.codex-header:not(.demo-header-mode) .nav-iconlist {
    margin-left: 24px !important;
}
.codex-header:not(.demo-header-mode) .nav-iconlist a.menu-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 7px 12px !important;
    border-radius: 10px !important;
    color: rgba(255, 255, 255, 0.78) !important;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s !important;
}
.codex-header:not(.demo-header-mode) .nav-iconlist a.menu-item:hover,
.codex-header:not(.demo-header-mode) .nav-iconlist a.menu-item.active {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #fff !important;
}
.codex-header:not(.demo-header-mode) .nav-iconlist a.menu-item .menu-item-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: inherit !important;
    line-height: 1 !important;
}
.codex-header:not(.demo-header-mode) .nav-iconlist a.menu-item .navicon-wrap {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    color: inherit !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
.codex-header:not(.demo-header-mode) .nav-iconlist a.menu-item .navicon-wrap svg {
    width: 16px !important;
    height: 16px !important;
    color: inherit !important;
}
.codex-header:not(.demo-header-mode) .nav-iconlist a.menu-item .d-lg-inline {
    color: inherit !important;
}

/* ── Search bar: pill shaped, 40px tall — all non-demo headers ── */
.codex-header:not(.demo-header-mode) .search-bar {
    flex-grow: 1 !important;
    margin-left: 80px !important;
}

.codex-header:not(.demo-header-mode) .search-bar .form-group {
    margin: 0 !important;
}

.codex-header:not(.demo-header-mode) .search-bar .input-group {
    height: 40px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 2px 10px rgba(0, 38, 118, 0.14) !important;
    border: none !important;
}

.codex-header:not(.demo-header-mode) .search-bar .form-control {
    height: 40px !important;
    min-height: 40px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 999px 0 0 999px !important;
    padding: 0 8px 0 18px !important;
    font-size: 15.5px !important;
    color: #102347 !important;
    box-shadow: none !important;
}

.codex-header:not(.demo-header-mode) .search-bar .form-control::placeholder {
    color: rgba(0, 38, 118, 0.32) !important;
    font-size: 15.5px !important;
}

.codex-header:not(.demo-header-mode) .search-bar .input-group-text {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 999px 999px 0 !important;
    padding: 0 14px 0 10px !important;
    box-shadow: none !important;
    color: rgba(0, 38, 118, 0.45) !important;
    cursor: pointer !important;
}

/* ── Mobile authenticated header: no search bar ── */
@media (max-width: 767px) {
    .codex-header:not(.demo-header-mode) .search-bar {
        display: none !important;
    }
}

/* ── Tablet (768–991px): reduce search margin now that nav-iconlist is hidden ── */
@media (min-width: 768px) and (max-width: 991px) {
    .codex-header:not(.demo-header-mode) .search-bar {
        margin-left: 40px !important;
        max-width: none !important;
    }
    body:has(.auth-main) .search-bar {
        margin-left: 32px !important;
        margin-right: 20px !important;
        max-width: none !important;
    }
    /* Neutralise ALL old-theme .active layout-shift rules inside our pill headers */
    .codex-header:not(.demo-header-mode) .search-bar .form-control,
    .codex-header:not(.demo-header-mode) .search-bar .form-control.active,
    .codex-header:not(.demo-header-mode) .search-bar .input-group,
    .codex-header:not(.demo-header-mode) .search-bar .input-group.active,
    body:has(.auth-main) .search-bar .form-control,
    body:has(.auth-main) .search-bar .form-control.active,
    body:has(.auth-main) .search-bar .input-group,
    body:has(.auth-main) .search-bar .input-group.active {
        width: 100% !important;
        position: static !important;
        flex-direction: row !important;
        /* Override old-theme visibility:hidden/opacity:0 that hides the input on ≤991px */
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ── Mobile ≤640px: match auth page header height + logo size ── */
@media (max-width: 640px) {
    .codex-header:not(.demo-header-mode) {
        height: 54px !important;
        min-height: 54px !important;
        padding: 0 18px !important;
    }
    .codex-header:not(.demo-header-mode) .codexbrand-logo img {
        height: 28px !important;
        width: 28px !important;
    }
    .codex-header:not(.demo-header-mode) .ph-brand-name {
        font-size: 0.85rem !important;
    }
}

/* Override 991px rule that shrinks .codex-brand img */
@media screen and (max-width: 991px) {
    body:has(.auth-main) .codex-brand img {
        width: auto !important;
        height: 36px !important;
    }
}

/* ── Hide Accueil on auth pages (but not nav-profile) ── */
body:has(.auth-main) .nav-iconlist > li:first-child:not(.nav-profile) {
    display: none !important;
}

/* ── Header-contain: wider on auth pages to push logo closer to left edge ── */
body:has(.auth-main) .codex-header .header-contain {
    max-width: 1360px !important;
}

/* ── Search bar: spaced from logo, pill shaped, 40px tall, pale placeholder ── */
body:has(.auth-main) .search-bar {
    margin-left: 48px !important;
    flex-grow: 1 !important;
    max-width: 320px !important;
}

body:has(.auth-main) .search-bar .form-group {
    margin: 0 !important;
}

body:has(.auth-main) .search-bar .input-group {
    height: 40px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 2px 10px rgba(0, 38, 118, 0.14) !important;
    border: none !important;
}

body:has(.auth-main) .search-bar .form-control {
    height: 40px !important;
    min-height: 40px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 999px 0 0 999px !important;
    padding: 0 8px 0 18px !important;
    font-size: 15.5px !important;
    color: #102347 !important;
    box-shadow: none !important;
}

body:has(.auth-main) .search-bar .form-control::placeholder {
    color: rgba(0, 38, 118, 0.32) !important;
    font-size: 15.5px !important;
}

body:has(.auth-main) .search-bar .input-group-text {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 999px 999px 0 !important;
    padding: 0 14px 0 10px !important;
    box-shadow: none !important;
    color: rgba(0, 38, 118, 0.45) !important;
    cursor: pointer !important;
}

/* ── Boutique link: vertical alignment with pills, gap before pills ── */
body:has(.auth-main) .nav-iconlist {
    margin-right: 20px !important;
}

body:has(.auth-main) .nav-iconlist a.menu-item {
    display: inline-flex !important;
    align-items: center !important;
    height: 40px !important;
    padding: 0 8px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
}

body:has(.auth-main) .nav-iconlist a.menu-item .menu-item-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    line-height: 1 !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

body:has(.auth-main) .nav-iconlist a.menu-item .navicon-wrap {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

body:has(.auth-main) .nav-iconlist a.menu-item .navicon-wrap svg {
    width: 16px !important;
    height: 16px !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ── Auth pills ── */
body:has(.auth-main) .login-section {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body:has(.auth-main) .login-section .auth-link {
    list-style: none !important;
}

body:has(.auth-main) .login-section .auth-link > a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 9px 18px !important;
    border-radius: 999px !important;
    font-family: "Questrial", sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    transition: background 0.18s, color 0.18s, border-color 0.18s !important;
    background: transparent !important;
    border: 1.4px solid rgba(255, 255, 255, 0.75) !important;
    color: #fff !important;
    box-shadow: none !important;
}

body:has(.auth-main) .login-section .auth-link > a i {
    display: none !important;
}

body:has(.auth-main) .login-section .auth-link > a:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    color: #fff !important;
}

body:has(.auth-main) .login-section .auth-link > a.ph-pill-active {
    background: #fff !important;
    border-color: #fff !important;
    color: #002676 !important;
}

body:has(.auth-main) .login-section .auth-link > a.ph-pill-active:hover {
    background: rgba(255, 255, 255, 0.92) !important;
    color: #002676 !important;
}

/* ── Mobile ≤640px ── */
@media (max-width: 640px) {
    body:has(.auth-main) .codex-header {
        height: 54px !important;
        min-height: 54px !important;
        padding: 0 18px !important;
    }

    body:has(.auth-main) .codexbrand-logo img,
    body:has(.auth-main) .codex-brand img {
        height: 28px !important;
        width: auto !important;
    }

    body:has(.auth-main) .ph-brand-name {
        font-size: 0.85rem !important;
    }

    body:has(.auth-main) .search-bar {
        display: none !important;
    }

    body:has(.auth-main) .login-section .auth-link > a {
        padding: 7px 12px !important;
        font-size: 13px !important;
    }
}

/* ── Auth pages mobile: circle-reveal search overlay ── */
.auth-inline-search { display: none; }

@media (max-width: 767px) {
    body:has(.auth-main) .login-section .auth-link { display: none !important; }
    body:has(.auth-main) .auth-search-toggle { display: flex !important; }

    /* Positioning context for the absolute overlay */
    body:has(.auth-main) .codex-header .header-contain { position: relative; }

    /* Loupe + logo: hide instantly on open, reappear after close morph finishes */
    body:has(.auth-main) .auth-search-toggle,
    body:has(.auth-main) .codex-header .logo-gridwrap {
        transition: opacity 0s 0.36s;
    }
    body:has(.auth-main) .codex-header.searching .auth-search-toggle,
    body:has(.auth-main) .codex-header.searching .logo-gridwrap {
        opacity: 0;
        transition: opacity 0s;
    }

    /* Overlay: starts as a 48px circle centred on the loupe, morphs into a full-width pill */
    body:has(.auth-main) .auth-inline-search {
        display: flex !important;
        position: absolute;
        inset: 0;
        padding: 0 16px;
        align-items: center;
        gap: 12px;
        background: #002677;
        z-index: 5;
        pointer-events: none;
        opacity: 0;
        /* Circle at loupe: left/right insets create a 44px-wide pill = perfect circle */
        clip-path: inset(
            calc(var(--loupe-y, 50%) - 22px)
            calc(100% - var(--loupe-x, calc(100% - 36px)) - 22px)
            calc(100% - var(--loupe-y, 50%) - 22px)
            calc(var(--loupe-x, calc(100% - 36px)) - 22px)
            round 22px
        );
        /* On close: pill shrinks back to circle (0.36s), then opacity snaps off */
        transition: clip-path 0.36s cubic-bezier(0.4, 0, 0.2, 1), opacity 0s 0.36s;
    }

    /* On tap: opacity snaps on (reveals circle at loupe), pill stretches left to full width */
    body:has(.auth-main) .codex-header.searching .auth-inline-search {
        opacity: 1;
        pointer-events: all;
        clip-path: inset(
            calc(var(--loupe-y, 50%) - 22px)
            16px
            calc(100% - var(--loupe-y, 50%) - 22px)
            16px
            round 22px
        );
        transition: clip-path 0.36s cubic-bezier(0.4, 0, 0.2, 1), opacity 0s;
    }

    /* Input + cancel fade in once pill is mostly expanded */
    body:has(.auth-main) .auth-inline-search .auth-inline-search__wrap,
    body:has(.auth-main) .auth-inline-search .auth-inline-search__cancel {
        opacity: 0;
        transition: opacity 0.15s ease;
    }
    body:has(.auth-main) .codex-header.searching .auth-inline-search .auth-inline-search__wrap,
    body:has(.auth-main) .codex-header.searching .auth-inline-search .auth-inline-search__cancel {
        opacity: 1;
        transition: opacity 0.18s ease 0.26s;
    }

    .auth-inline-search form { flex: 1; }

    .auth-inline-search__wrap {
        display: flex;
        align-items: center;
        gap: 8px;
        height: 36px;
        background: rgba(255, 255, 255, 0.11);
        border: 1.5px solid rgba(255, 255, 255, 0.24);
        border-radius: 999px;
        padding: 0 14px;
        transition: border-color 0.15s, background 0.15s;
    }
    .auth-inline-search__wrap:focus-within {
        border-color: rgba(255, 255, 255, 0.55);
        background: rgba(255, 255, 255, 0.16);
    }
    .auth-inline-search__wrap i {
        color: rgba(255, 255, 255, 0.50);
        font-size: 13px;
        flex-shrink: 0;
    }
    .auth-inline-search__wrap input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        color: #fff;
        font-size: 16px; /* ≥16px prevents iOS auto-zoom on focus */
        padding: 0;
        min-width: 0;
    }
    .auth-inline-search__wrap input::placeholder { color: rgba(255, 255, 255, 0.42); }

    .auth-inline-search__cancel {
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.75);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0;
        transition: color 0.15s;
    }
    .auth-inline-search__cancel:hover { color: #fff; }

    /* Mobile auth search autocomplete dropdown — premium */
    /* Positioned relative to header-contain (position:relative), below the header */
    .auth-search-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 16px; right: 16px;
        background: #fff;
        border-radius: 20px;
        border: 1px solid rgba(0,38,118,0.09);
        box-shadow: 0 4px 8px -2px rgba(0,0,0,0.07), 0 20px 52px -8px rgba(0,38,118,0.24);
        z-index: 20;
        max-height: 52vh;
        overflow: hidden;
        overflow-y: auto;
        padding: 6px 0;
        animation: acDropFadeIn 0.18s ease;
    }
    .auth-search-dropdown::-webkit-scrollbar { display: none; }
    .auth-search-dropdown { -ms-overflow-style: none; scrollbar-width: none; }
    .auth-search-dropdown ul { padding: 0; margin: 0; list-style: none; }
    .auth-search-dropdown li { border-top: 1px solid rgba(0,38,118,0.05); transition: background 0.12s; }
    .auth-search-dropdown li:first-child { border-top: none; }
    .auth-search-dropdown li:hover { background: rgba(0,38,118,0.04); }
    .auth-search-dropdown li a {
        display: flex; align-items: center; gap: 12px;
        padding: 10px 16px;
        color: #0b1d3e; text-decoration: none;
    }
    .auth-search-dropdown .ac-avatar {
        flex-shrink: 0; width: 44px; height: 44px;
        border-radius: 50%; overflow: hidden;
        border: 2px solid rgba(0,38,118,0.11); background: #eef2ff;
    }
    .auth-search-dropdown .ac-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .auth-search-dropdown .ac-avatar--initials {
        display: flex; align-items: center; justify-content: center;
        background: linear-gradient(135deg, #002676, #1e3a8a);
        color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 0.03em;
    }
    .auth-search-dropdown .ac-body { display: flex; flex-direction: column; gap: 0; min-width: 0; flex: 1; overflow: hidden; }
    .auth-search-dropdown .ac-name { font-size: 14px; font-weight: 600; color: #0b1d3e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 1.2; }
    .auth-search-dropdown .ac-dates { font-size: 12px; color: #8899b4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 1.3; }
    .auth-search-dropdown li.ac-see-all { border-top: 1px solid rgba(0,38,118,0.09) !important; background: rgba(0,38,118,0.025); }
    .auth-search-dropdown li.ac-see-all:hover { background: rgba(0,38,118,0.07); }
    .auth-search-dropdown li.ac-see-all a { justify-content: center; font-size: 13px; font-weight: 600; color: #002676; gap: 7px; }
}

/* ════════════════════════════════
   SEARCH RESULTS PAGE — Premium cards V2
════════════════════════════════ */
.sr-page-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,38,118,0.08);
}
.sr-page-title {
    font-size: 22px;
    font-weight: 800;
    color: #001a4d;
    margin: 0;
}
.sr-page-count {
    font-size: 14px;
    color: #8899b4;
    font-weight: 500;
}

/* ── Card link ── */
.sr-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
}

/* ── Card shell ── */
.sr-card {
    background: #f8faff;
    border: 1px solid rgba(0,38,118,0.07);
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0,38,118,0.05), 0 6px 20px rgba(0,38,118,0.08);
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.sr-card-link:hover .sr-card {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,38,118,0.10), 0 20px 52px rgba(0,38,118,0.18);
}

/* ── Body ── */
.sr-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 22px 18px;
    flex: 1;
}

/* ── Avatar ── */
.sr-card__avatar-wrap {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid rgba(0,38,118,0.10);
    box-shadow: 0 4px 16px rgba(0,38,118,0.16);
    overflow: hidden;
    flex-shrink: 0;
    background: #eef2ff;
}
.sr-card__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.sr-card__avatar--initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #002676, #1e3a8a);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

/* ── Name ── */
.sr-card__name {
    font-size: 16.5px;
    font-weight: 800;
    color: #001a4d;
    text-align: center;
    margin: 13px 0 0;
    line-height: 1.18;
    letter-spacing: -0.02em;
    text-transform: none !important;
}

/* ── Title/role ── */
.sr-card__title {
    font-size: 12.5px;
    color: #a0aec0;
    text-align: center;
    margin: 5px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-weight: 500;
}

/* ── Dates ── */
.sr-card__dates {
    font-size: 12.5px;
    color: #8899b4;
    text-align: center;
    margin: 7px 0 0;
    letter-spacing: 0.01em;
}

/* ── Quote ── */
.sr-card__quote {
    font-size: 12.5px;
    font-style: italic;
    color: #6b7280;
    text-align: center;
    margin: 12px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ── CTA: full-bleed, anchored bottom ── */
.sr-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    margin-top: auto;
    background: rgba(0,38,118,0.04);
    font-size: 13px;
    font-weight: 700;
    color: #002676;
    transition: background 0.18s, color 0.18s;
    flex-shrink: 0;
}
.sr-card-link:hover .sr-card__cta {
    background: rgba(0,38,118,0.08);
    color: #001a4d;
}

/* Desktop autocomplete — Bootstrap dropdown plugin not used (BS5), jQuery .show()/.hide() handles visibility */

/* ── Mobile avatar dropdown — premium on-brand ── */
.nav-profile .dropdown-menu {
    border: none;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0, 38, 118, 0.18), 0 2px 8px rgba(0, 38, 118, 0.08);
    padding: 6px;
    min-width: 240px;
    overflow: hidden;
    background: #fff;
}

/* Name block */
.nav-profile .dropdown-menu li:first-child .dropdown-item {
    background: linear-gradient(135deg, #002677 0%, #1845a0 100%);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 2px;
    pointer-events: none;
    cursor: default;
}

.nav-profile .dropdown-menu li:first-child .dropdown-item h6 {
    color: #fff !important;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0;
}

/* Divider */
.nav-profile .dropdown-menu .dropdown-divider {
    margin: 4px 6px;
    border-color: rgba(0, 38, 118, 0.08);
}

/* All items */
.nav-profile .dropdown-menu .dropdown-item {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #102347;
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    transition: background 0.15s ease, color 0.15s ease;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    line-height: 1 !important;
}

/* Reset form wrapper around logout button */
.nav-profile .dropdown-menu li form {
    margin: 0;
    padding: 0;
}

.nav-profile .dropdown-menu .dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: #4a5d8a;
}

.nav-profile .dropdown-menu .dropdown-item:hover,
.nav-profile .dropdown-menu .dropdown-item:focus {
    background: rgba(0, 38, 118, 0.06);
    color: #002677;
}

.nav-profile .dropdown-menu .dropdown-item:hover svg,
.nav-profile .dropdown-menu .dropdown-item:focus svg {
    stroke: #002677;
}

/* ── Desktop profile hover-dropdown V3 — premium on-brand ── */
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop {
    background: #fff !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 52px rgba(0, 38, 118, 0.20), 0 2px 8px rgba(0, 38, 118, 0.08) !important;
    border: 1px solid rgba(0, 38, 118, 0.07) !important;
    padding: 5px !important;
    min-width: 230px !important;
    overflow: hidden !important;
}
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Hover on li only — one single effect */
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li {
    border-radius: 10px !important;
    transition: background 0.13s ease;
}
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li:hover {
    background: rgba(0, 38, 118, 0.07) !important;
}

/* a and button: no background ever, just text+icon */
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li a,
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li button.dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 13px !important;
    font-size: 0.97rem !important;
    font-weight: 500 !important;
    color: #102347 !important;
    text-decoration: none !important;
    text-transform: none !important;
    background: none !important;
    border: none !important;
    width: 100% !important;
    cursor: pointer;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: 1 !important;
}
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li a:hover,
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li a:focus,
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li a:active,
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li button.dropdown-item:hover,
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li button.dropdown-item:focus,
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li button.dropdown-item:active {
    background: none !important;
    color: #002677 !important;
}
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li a svg,
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li button.dropdown-item svg {
    width: 17px !important;
    height: 17px !important;
    flex-shrink: 0 !important;
    stroke: #4a5d8a !important;
}
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li:hover a,
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li:hover button.dropdown-item {
    color: #002677 !important;
}
.codex-header .nav-iconlist .hover-dropdown.navprofile-drop ul li:hover svg {
    stroke: #002677 !important;
}

/* Separator + logout */
.navprofile-drop__logout {
    border-top: 1px solid rgba(0, 38, 118, 0.08) !important;
    margin-top: 3px !important;
}
.navprofile-drop__logout form {
    margin: 0;
    padding: 0;
}

/* ── Dashboard welcome title ── */
.dash-welcome {
    font-size: 1.5rem;
    font-weight: 800;
    color: #002677;
    margin: 20px 0 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Dashboard stat cards ── */
.dash-stat-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 20px;
    border-radius: 16px;
    text-decoration: none !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dash-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 38, 118, 0.18);
}

.dash-stat-card--green  { background: linear-gradient(135deg, #2e9e5b 0%, #27864c 100%); }
.dash-stat-card--indigo { background: linear-gradient(135deg, #4a7bc8 0%, #3a66b0 100%); }
.dash-stat-card--blue   { background: linear-gradient(135deg, #002677 0%, #1845a0 100%); }

.dash-stat-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash-stat-card__value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.dash-stat-card__unit {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
}

.dash-create-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #002677 0%, #1845a0 100%);
    box-shadow: 0 8px 24px rgba(0, 38, 118, 0.30);
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    text-decoration: none !important;
    margin-bottom: 16px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}
.dash-create-btn:hover {
    background: linear-gradient(135deg, #001f60 0%, #1648a0 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(0, 38, 118, 0.38);
    color: #fff !important;
}
.dash-create-btn svg {
    flex-shrink: 0;
}
.dash-create-btn--compact {
    width: auto;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0;
    box-shadow: 0 4px 14px rgba(0, 38, 118, 0.22);
}

/* Tighten recent-ordertbl card header padding */
.recent-ordertbl .card-header {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Fix feather icon vertical alignment inside header CTA button */
.recent-ordertbl .card-header .btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* ── Dashboard profile list ── */
.ph-profile-list {
    display: flex;
    flex-direction: column;
}
.ph-profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 38, 118, 0.07);
    transition: background 0.15s;
}
.ph-profile-row:last-child { border-bottom: none; }
.ph-profile-row:hover { background: rgba(0, 38, 118, 0.025); }
.ph-profile-row__main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
}
.ph-profile-row__photo {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 38, 118, 0.12);
    box-shadow: 0 2px 8px rgba(0, 38, 118, 0.10);
}
.ph-profile-row__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ph-profile-row__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ph-profile-row__name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #102347;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    transition: color 0.15s;
}
.ph-profile-row:hover .ph-profile-row__name { color: #002677; }
.ph-profile-row__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #8392a5;
    flex-wrap: nowrap;
}
.ph-profile-row__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}
.ph-profile-row__badge--public  { background: rgba(19, 165, 91, 0.12); color: #0e8a4a; }
.ph-profile-row__badge--private { background: rgba(107, 122, 153, 0.12); color: #4b5563; }
.ph-profile-row__edit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(0, 38, 118, 0.07);
    color: #002677;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.ph-profile-row__edit:hover { background: rgba(0, 38, 118, 0.13); color: #002677; }
.ph-profile-empty {
    padding: 36px 20px;
    text-align: center;
    color: #8392a5;
    font-size: 0.9rem;
}
.ph-profile-pagination {
    padding: 10px 20px;
    border-top: 1px solid rgba(0, 38, 118, 0.07);
}

@media (max-width: 480px) {
    .ph-profile-row { padding: 12px 16px; gap: 10px; }
    .ph-profile-row__photo { width: 44px; height: 44px; }
}

@media (max-width: 767px) {
    .dash-welcome {
        font-size: 1.25rem;
        margin: 14px 0 16px;
    }
    .dash-stat-card {
        padding: 14px 14px;
        border-radius: 14px;
    }
    .dash-stat-card__value {
        font-size: 1.7rem;
    }
}

/* ============================================================
   Section Arbre généalogique — refonte v2
   Tout ce qui entoure le SVG f3 (header, search, footer, modale).
   ============================================================ */

/* ── En-tête de la section ──────────────────────────────── */
.family-tree-head {
  margin-top: 10px;
  margin-bottom: 18px;
  padding: 0 22px;
}
.family-tree-title {
  margin: 0;
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: 28px; color: #102347; letter-spacing: -0.02em; line-height: 1.1;
  text-transform: none !important;
}
.family-tree-subtitle {
  margin: 0;
  font-family: 'Questrial', system-ui, sans-serif;
  font-style: normal;
  font-size: 14px;
  color: #9aa5bb;
  line-height: 1.6;
}
.family-tree-counts {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 13px; color: #6c7992;
}
.family-tree-counts strong {
  color: #002676; font-weight: 700; font-size: 17px;
  font-family: 'Archivo', sans-serif; margin-right: 4px;
}

/* Contour de la carte plus visible (desktop + mobile) */
#m-tree.f3, .f3.f3-cont {
    border: 1.5px solid rgba(0, 38, 118, 0.22) !important;
    box-shadow: 0 4px 18px rgba(0, 38, 118, 0.13), 0 1px 4px rgba(0, 38, 118, 0.08) !important;
}

/* Partenaire non-actuel — carte pâle */
.f3 .card-former-partner {
    opacity: 0.48;
    transition: opacity 0.18s;
}
.f3 .card-former-partner:hover {
    opacity: 0.72;
}

/* ── Barre d'actions au-dessus du canevas ───────────────── */
.tree-actions {
  display: flex; align-items: center; gap: 12px;
  margin-top: 20px; margin-bottom: 14px; flex-wrap: wrap;
  padding: 0 22px;
}
.tree-actions__search-wrap {
  position: relative; flex: 1;
  min-width: 260px; max-width: 360px;
}
.tree-actions__search {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 44px; padding: 0 16px;
  background: #fff;
  border: 1px solid rgba(0, 38, 118, 0.13);
  border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
  cursor: text;
}
.tree-actions__search:focus-within {
  border-color: #002676;
  box-shadow: 0 0 0 4px rgba(0, 38, 118, 0.08);
}
.tree-actions__search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: 'Questrial', sans-serif; font-size: 14.5px;
  color: #102347; min-width: 0;
}
.tree-actions__search input::placeholder { color: #9aa5bb; }
.tree-actions__search i { color: #6c7992; flex-shrink: 0; }

.tree-actions__search-clear {
  width: 22px; height: 22px;
  border: none; background: rgba(0, 38, 118, 0.06);
  border-radius: 50%;
  color: #6c7992; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; padding: 0;
}
.tree-actions__search-clear:hover { background: rgba(0, 38, 118, 0.13); color: #002676; }

/* Dropdown des résultats */
.tree-actions__results {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid rgba(0, 38, 118, 0.13);
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(16, 24, 40, 0.11);
  padding: 6px; z-index: 25;
  max-height: 360px; overflow-y: auto;
}
.tree-actions__result {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: none; background: transparent;
  border-radius: 10px;
  font-family: 'Questrial', sans-serif;
  text-align: left; cursor: pointer;
}
.tree-actions__result:hover { background: rgba(0, 38, 118, 0.06); }
.tree-actions__result-avatar {
  width: 36px; height: 36px;
  border-radius: 50%; overflow: hidden;
  background: rgba(0, 38, 118, 0.06);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tree-actions__result-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tree-actions__result-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tree-actions__result-name {
  font-family: 'Archivo', sans-serif;
  font-size: 14px; color: #102347;
  letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.15;
}
.tree-actions__result-dates {
  font-size: 12px; color: #6c7992;
  line-height: 1.3; margin-top: 1px;
}
.tree-actions__result-badge {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #8a6720; background: rgba(216,162,63,0.15);
  border-radius: 6px; padding: 3px 7px; flex-shrink: 0;
}
.tree-actions__result-empty {
  padding: 14px 12px; font-size: 13.5px; color: #6c7992;
  font-family: 'Questrial', sans-serif;
}

.tree-actions__spacer { flex: 1; }

.tree-actions__add {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  background: linear-gradient(135deg, #002676 0%, #1a52b3 100%);
  color: #fff; border: none; border-radius: 14px;
  font-family: 'Questrial', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 38, 118, 0.30);
  transition: transform .18s, box-shadow .18s, background .18s;
}
.tree-actions__add:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #001f60 0%, #1648a0 100%);
  box-shadow: 0 12px 28px rgba(0, 38, 118, 0.38);
}

/* ── Footer (hint + Réinitialiser) ──────────────────────── */
/* Overlay zoom toolbar inside the tree card (public view) */
.f3-overlay-wrap {
    position: relative;
}
.tree-zoom-overlay {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    pointer-events: auto;
}

.family-tree-footer {
  margin-top: 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.family-tree-hint {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; color: #4b5563; max-width: 720px;
}
.family-tree-hint p { margin: 0; }
.family-tree-hint-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0, 38, 118, 0.08); color: #002676;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btn-reset {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px;
  background: #fff; color: #002676;
  border: 1.5px solid rgba(0, 38, 118, 0.28);
  border-radius: 14px;
  font-family: 'Questrial', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-reset:hover {
  background: rgba(0, 38, 118, 0.06);
  border-color: #002676;
}

/* ─────────────────────────────────────────────────────────────
   TABLETTES & GRANDS TÉLÉPHONES (≤ 1100px) — hauteur réduite
   Couvre les écrans Retina dont le viewport CSS dépasse 767px.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #m-tree.f3, .f3.f3-cont {
    height: 60vh;
  }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE — Arbre généalogique (≤ 767px)
   Aucun changement desktop.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 767px) {

  /* Titre + sous-titre compacts sur mobile */
  .family-tree-title    { font-size: 22px; }
  .family-tree-subtitle { font-size: 13px; }

  /* Toolbar nettoyée — spacer retiré, counter masqué, bouton centré */
  .tree-actions         { gap: 8px; margin-bottom: 10px; }
  .tree-actions__spacer { display: none; }
  .family-tree-counts   { display: none; }
  .tree-actions__add    { margin: 0 auto; min-height: 44px; font-size: 14.5px; gap: 8px; }

  /* Zoom déplacé dans la carte via JS sur mobile — pas de fixed ici */

  /* Canvas — breakout des paddings conteneurs + hauteur réduite */
  #m-tree.f3, .f3.f3-cont {
    height: 28vh;
    margin-left: -14px;
    margin-right: -14px;
    width: calc(100% + 28px) !important;
    border-radius: 16px;
  }

  /* Gaps footer réduits */
  .family-tree-footer { gap: 12px; margin-top: 14px; }
}

/* ── Marque typographique des dates ─────────────────────── */
.ph-dates-mark {
  color: #102347;
  font-weight: 400;
  margin: 0 2px;
  opacity: 0.65;
}

/* ── Modale Ajouter un membre — picker de relation ──────── */
.relation-picker { margin-bottom: 18px; }
.relation-picker__label {
  display: block;
  font-family: 'Questrial', sans-serif;
  font-size: 14px; font-weight: 700; color: #002676;
  margin-bottom: 10px;
}
.relation-picker__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.relation-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border: 1.5px solid rgba(0, 38, 118, 0.10);
  border-radius: 14px;
  background: #fff; cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
  font-family: 'Questrial', sans-serif;
}
.relation-tile input[type="radio"] { display: none; }
.relation-tile:hover {
  border-color: rgba(0, 38, 118, 0.28);
  background: rgba(0, 38, 118, 0.04);
}
.relation-tile:has(input:checked) {
  border-color: #002676;
  background: rgba(0, 38, 118, 0.08);
  box-shadow: 0 0 0 4px rgba(0, 38, 118, 0.08);
}
.relation-tile__label {
  font-size: 15px; font-weight: 600; color: #102347;
  line-height: 1.1;
}

.f3-watermark {
  position: absolute;
  bottom: 16px;
  left: 20px;
  font-family: 'Questrial', sans-serif;
  font-size: 12px;
  color: rgba(16, 35, 71, 0.32);
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 3px;
}
.f3-watermark img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.32;
}

/* ── SweetAlert2 — thème on-brand ────────────────────────────── */
.swal-ph {
    border-radius: 20px !important;
    padding: 36px 32px 32px !important;
    font-family: 'Outfit', sans-serif !important;
    max-width: 460px !important;
    width: 460px !important;
}
.swal-ph-title {
    font-family: 'Archivo Black', Archivo, sans-serif !important;
    font-size: 1.3rem !important;
    color: #102347 !important;
    font-weight: 800 !important;
    padding: 0 0 2px !important;
    margin: 0 !important;
}
.swal-ph-content {
    margin: 0 !important;
    padding: 2px 0 14px !important;
}
.swal-ph-desc {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}
.swal-ph-desc strong {
    color: #102347;
    font-weight: 600;
}
/* Select dans le picker membre */
#swal-member-select {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #102347;
    background: #f8faff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-top: 10px;
}
#swal-member-select:focus {
    border-color: #002677;
    box-shadow: 0 0 0 3px rgba(0, 38, 119, 0.10);
}
/* Input texte (reset) */
.swal-ph-input.swal2-input {
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 10px 14px !important;
    font-size: 0.875rem !important;
    box-shadow: none !important;
    color: #102347 !important;
    height: auto !important;
    margin: 10px 0 0 !important;
    width: 100% !important;
}
.swal-ph-input.swal2-input:focus {
    border-color: #002677 !important;
    box-shadow: 0 0 0 3px rgba(0, 38, 119, 0.10) !important;
}
/* Boutons */
.swal-ph .swal2-actions {
    gap: 10px !important;
    margin-top: 6px !important;
}
.swal-ph-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}
.swal-ph-btn {
    border-radius: 50px;
    padding: 10px 28px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, box-shadow 0.15s;
    font-family: 'Outfit', sans-serif;
    line-height: 1.4;
    margin: 0 !important;
}
.swal-ph-btn--primary {
    background: #002677;
    color: #fff;
}
.swal-ph-btn--primary:hover {
    background: #001d5c;
    box-shadow: 0 4px 12px rgba(0, 38, 119, 0.25);
}
.swal-ph-btn--danger {
    background: #ef4444;
    color: #fff;
}
.swal-ph-btn--danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.30);
}
.swal-ph-btn--outline {
    background: transparent;
    color: #102347;
    border: 1.5px solid rgba(0, 38, 119, 0.20) !important;
}
.swal-ph-btn--outline:hover {
    border-color: #002677 !important;
    background: rgba(0, 38, 119, 0.04);
}
/* Message de validation */
.swal-ph .swal2-validation-message {
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    margin-top: 8px !important;
}
/* Mobile : width fixe → full width adaptatif */
@media (max-width: 540px) {
    .swal-ph {
        width: calc(100vw - 32px) !important;
        max-width: calc(100vw - 32px) !important;
        padding: 28px 20px 24px !important;
    }
    /* Masquer la barre de zoom quand un SweetAlert est ouvert */
    body.swal2-shown .tree-actions .tree-actions__zoom {
        display: none;
    }
}

/* ============================================================
   Section Souvenirs — styles partagés modales & formulaires
   ============================================================ */

/* ── Drop zone ──────────────────────────────────────────── */
.ph-dropzone {
  border: 1.5px dashed rgba(0, 38, 118, 0.30) !important;
  border-radius: 18px !important;
  background: rgba(0, 38, 118, 0.025) !important;
  padding: 28px 20px !important;
  text-align: center;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.ph-dropzone:hover,
.ph-dropzone.dz-drag-hover {
  border-color: #002676 !important;
  background: rgba(0, 38, 118, 0.055) !important;
}
.ph-dropzone__disc {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #002676 0%, #1a52b3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 18px rgba(0, 38, 118, 0.28);
}
.ph-dropzone__disc i { font-size: 22px; color: #fff; }
.ph-dropzone__title {
  margin: 0 0 4px;
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: 18px;
  color: #102347;
  letter-spacing: -0.02em;
}
.ph-dropzone__sub {
  margin: 0 0 6px;
  font-family: 'Questrial', sans-serif;
  font-size: 14px;
  color: #4b5563;
}
.ph-dropzone__hint {
  margin: 0;
  font-family: 'Questrial', sans-serif;
  font-size: 12.5px;
  color: #9aa5bb;
}

/* ── Champs de formulaire (modales souvenirs) ────────────── */
.ph-form-group {
  margin-bottom: 16px;
}
.ph-form-label {
  display: block;
  font-family: 'Questrial', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #002676;
  margin-bottom: 7px;
}
.ph-form-hint {
  font-weight: 400;
  color: #9aa5bb;
  font-size: 12px;
  margin-left: 6px;
}
.ph-form-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  background: #f7f8fb;
  border: 1.5px solid rgba(0, 38, 118, 0.12);
  border-radius: 14px;
  font-family: 'Questrial', sans-serif;
  font-size: 14.5px;
  color: #102347;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  display: block;
}
.ph-form-input::placeholder { color: #9aa5bb; }
.ph-form-input:focus {
  background: #fff;
  border-color: #002676;
  box-shadow: 0 0 0 4px rgba(0, 38, 118, 0.08);
}
.ph-form-input.is-invalid { border-color: #c2412d; }
.ph-form-textarea {
  height: auto;
  padding: 12px 16px;
  resize: none;
  min-height: 72px;
}

/* ── Footer des modales ──────────────────────────────────── */
.ph-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 38, 118, 0.07);
}

/* ── Lien helper sous la drop zone ──────────────────────── */
.ph-form-helper-link {
  font-family: 'Questrial', sans-serif;
  font-size: 12.5px;
  color: #9aa5bb;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
}
.ph-form-helper-link a {
  color: #6c7992;
  text-decoration: underline;
}

/* ── Bouton "Voir comme visiteur" — preview-cta ── */
.preview-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 16px 6px 6px;
  font-size: 15px;
  font-weight: 600;
  color: #002676;
  background: #fff;
  border: 1.5px solid rgba(0, 38, 118, .18);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(9, 31, 84, .08);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .24s cubic-bezier(.4,0,.2,1),
              box-shadow .24s cubic-bezier(.4,0,.2,1),
              border-color .24s cubic-bezier(.4,0,.2,1);
}
.preview-cta__qr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #002676;
  transition: background .24s cubic-bezier(.4,0,.2,1);
}
.preview-cta__qr svg {
  fill: #fff;
  width: 20px;
  height: 20px;
}
.preview-cta__arrow {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transition: transform .24s cubic-bezier(.4,0,.2,1);
}
.preview-cta__arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}
.preview-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(16, 24, 40, .09);
  border-color: rgba(0, 38, 118, .28);
  color: #002676;
}
.preview-cta:hover .preview-cta__qr {
  background: #0f3a94;
}
.preview-cta:hover .preview-cta__arrow {
  transform: translateX(3px);
}
.preview-cta:active {
  transform: translateY(0);
  box-shadow: 0 4px 20px rgba(9, 31, 84, .08);
}
.preview-cta:focus-visible {
  outline: none;
  box-shadow: 0 14px 28px rgba(16, 24, 40, .09), 0 0 0 4px rgba(0, 38, 118, .08);
}

/* ── Variante démo (.ph-visitor-btn) : photo plaque à la place du QR navy ── */
.preview-cta.ph-visitor-btn {
  gap: 11px;
  padding: 10px 22px 10px 18px;
}
.preview-cta.ph-visitor-btn .preview-cta__qr {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 0;
  transition: none;
}
.preview-cta.ph-visitor-btn .preview-cta__qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .18));
  transition: transform .24s cubic-bezier(.4,0,.2,1),
              filter .24s cubic-bezier(.4,0,.2,1);
}
.preview-cta.ph-visitor-btn:hover .preview-cta__qr {
  background: transparent;
}
.preview-cta.ph-visitor-btn:hover .preview-cta__qr img {
  transform: scale(1.07) translateY(-1px);
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .24));
}

@media (prefers-reduced-motion: reduce) {
  .preview-cta,
  .preview-cta__qr,
  .preview-cta__qr img,
  .preview-cta__arrow { transition: none; }
  .preview-cta:hover,
  .preview-cta:hover .preview-cta__qr img,
  .preview-cta:hover .preview-cta__arrow { transform: none; }
}
@media (max-width: 767px) {
  .preview-cta {
    font-size: 14px;
    padding: 6px 14px 6px 6px;
  }
  .preview-cta.ph-visitor-btn {
    padding: 8px 18px 8px 16px;
    gap: 9px;
  }
  .preview-cta.ph-visitor-btn .preview-cta__qr {
    width: 34px;
    height: 34px;
  }
  .profile-view-hint,
  .demo-view-hint {
    display: none;
  }
}

/* ── Titre de section VIEW (Moments clés, Famille, Hommages) ── */
.ph-view-section-title {
    margin: 0;
    font-family: 'Archivo Black', 'Archivo', sans-serif;
    font-size: 19px !important;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #002676;
    text-transform: none !important;
    font-weight: 900;
}

/* Moments clés — toolbar avec titre à gauche + tri à droite */
.ph-ms-view-toolbar {
    justify-content: space-between !important;
    align-items: center !important;
}
@media (max-width: 767px) {
    .ph-ms-view-toolbar {
        gap: 8px;
        padding-left: 0.75rem;
        align-items: center;
    }
    .ph-view-section-title {
        font-size: clamp(15px, 4.5vw, 18px) !important;
    }
}

/* Famille — header au-dessus de l'arbre */
.ph-tree-header {
    display: flex;
    align-items: center;
    padding: 30px 0 16px;
}
@media (min-width: 768px) {
    .ph-tree-header {
        padding-left: 0.75rem;
    }
}
@media (max-width: 767px) {
    .ph-tree-header {
        margin-left: -3px;
        padding-top: 22px;
    }
}

/* Hommages — espacement du titre de section */
.ph-tr-section-title {
    margin-bottom: 20px;
    margin-top: 12px;
}
@media (max-width: 767px) {
    .ph-tr-section-title {
        padding-left: 5px;
    }
}
@media (min-width: 768px) {
    .ph-tr-section-title {
        max-width: 920px;
        margin-left: auto;
        margin-right: auto;
        margin-top: 22px;
        padding-left: 0;
    }
}
@media (min-width: 992px) {
    .ph-tr-section-title {
        max-width: 1060px;
    }
}
