/* =====================================================================
   GOLD BRIDGE MARKET — habillage « Aurora » (inspiré du logiciel Carburant)
   Couche purement visuelle : arrondis généreux, ombres douces, pastilles
   dégradées, boutons « pilule », fenêtres qui rebondissent, entrée en douceur.
   Aucune structure de page n'est modifiée. Pour revenir à l'ancien rendu,
   retirer la ligne <link ... aurora.css> de templates/base.html.
   ===================================================================== */
:root {
    --au-ombre: 0 10px 34px rgba(194, 65, 12, .10);
    --au-ombre-forte: 0 18px 50px rgba(194, 65, 12, .22);
    --au-degrade: linear-gradient(135deg, #F97316 0%, #F59E0B 100%);
    --au-ease: cubic-bezier(.2, .8, .2, 1);
}
[data-bs-theme="dark"] { --au-ombre: 0 10px 34px rgba(0, 0, 0, .45); --au-ombre-forte: 0 18px 50px rgba(0, 0, 0, .6); }

body { font-size: 15.5px; line-height: 1.45; transition: background .3s, color .3s; }
h1, h2, h3, h4 { letter-spacing: -.015em; }

/* ---------- entrée en douceur ---------- */
@keyframes auMonte { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes auSaut { 0% { transform: scale(.9) translateY(14px); opacity: 0; } 60% { transform: scale(1.015); } 100% { transform: none; opacity: 1; } }
@keyframes auPop { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
#main-container { animation: auMonte .45s ease backwards; }
#main-container .row > [class*="col"] { animation: auMonte .5s var(--au-ease) backwards; }
#main-container .row > [class*="col"]:nth-child(2) { animation-delay: .05s; }
#main-container .row > [class*="col"]:nth-child(3) { animation-delay: .10s; }
#main-container .row > [class*="col"]:nth-child(4) { animation-delay: .15s; }
#main-container .row > [class*="col"]:nth-child(5) { animation-delay: .20s; }
#main-container .row > [class*="col"]:nth-child(6) { animation-delay: .25s; }
.au-fini { animation: auPop .35s var(--au-ease); transform-origin: 50% 60%; }

/* ---------- cartes ---------- */
.card { border-radius: 22px; box-shadow: var(--au-ombre); }
.card.px-hover, .px-stat { transition: transform .22s var(--au-ease), box-shadow .22s var(--au-ease); }
.card.px-hover:hover, .px-stat:hover { transform: translateY(-4px); box-shadow: var(--au-ombre-forte); }
.card .card, .modal .card { box-shadow: none; }

/* ---------- pastilles d'icônes dégradées (cartes de chiffres) ---------- */
.px-stat { padding: 1.2rem 1.25rem; }
.px-stat .ico { width: 48px; height: 48px; border-radius: 16px; color: #fff !important; font-size: 1.3rem; background: var(--au-degrade); box-shadow: 0 8px 18px rgba(249, 115, 22, .32); }
.px-stat .ico-orange { background: linear-gradient(135deg, #F97316, #F59E0B); box-shadow: 0 8px 18px rgba(249, 115, 22, .32); }
.px-stat .ico-green { background: linear-gradient(135deg, #10b981, #84cc16); box-shadow: 0 8px 18px rgba(16, 185, 129, .30); }
.px-stat .ico-red { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 8px 18px rgba(225, 29, 72, .30); }
.px-stat .ico-blue { background: linear-gradient(135deg, #06b6d4, #3b82f6); box-shadow: 0 8px 18px rgba(59, 130, 246, .32); }
.px-stat .ico-amber { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 8px 18px rgba(245, 158, 11, .30); }
.px-stat .ico-violet { background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 8px 18px rgba(139, 92, 246, .30); }
.px-stat .value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.px-stat .label { font-weight: 700; }

/* ---------- bandeau héros ---------- */
.px-hero { border-radius: 26px; padding: 1.8rem 1.9rem; box-shadow: var(--au-ombre-forte); }
.px-hero .display-6 { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; }
.px-chip { backdrop-filter: blur(4px); }

/* ---------- boutons « pilule » ---------- */
.btn { border-radius: 30px; }
.btn-sm { border-radius: 24px; }
.input-group .btn, .btn-group .btn, .btn-group-vertical .btn { border-radius: var(--bs-btn-border-radius); }
.btn-primary { box-shadow: 0 8px 20px rgba(249, 115, 22, .32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(245, 158, 11, .42); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-outline-primary, .btn-outline-secondary, .btn-outline-dark, .btn-light { border-width: 1.5px; }

/* ---------- champs ---------- */
.form-control, .form-select { border-radius: 14px; border-width: 1.5px; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.form-control-sm, .form-select-sm { border-radius: 11px; }
.form-control:focus, .form-select:focus { border-color: #F97316; box-shadow: 0 0 0 4px rgba(249, 115, 22, .16); }
.input-group > .form-control, .input-group > .form-select { border-radius: 14px; }
.input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group-text { border-radius: 14px; border-width: 1.5px; }

/* ---------- tableaux ---------- */
.table thead th:first-child { border-radius: 14px 0 0 14px; }
.table thead th:last-child { border-radius: 0 14px 14px 0; }
.table thead th { border-bottom: 0; }
.table-responsive { border-radius: 16px; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--bs-table-hover-bg); }

/* ---------- barre de navigation : lien actif en pilule dégradée ---------- */
.px-header .nav-link { border-radius: 14px; transition: background-color .15s, color .15s, transform .15s, box-shadow .15s; }
.px-header .nav-link:hover { transform: translateY(-1px); }
.px-header .nav-link.active { background: var(--au-degrade); color: #fff; box-shadow: 0 8px 22px rgba(249, 115, 22, .38); }
.px-header .nav-link.active:hover { color: #fff; background: var(--au-degrade); }
.px-bell, .px-theme-btn { border: 1px solid var(--px-line); background: var(--bs-body-bg); border-radius: 14px; transition: transform .15s, box-shadow .15s, background-color .15s; }
.px-bell:hover, .px-theme-btn:hover { transform: translateY(-2px); box-shadow: var(--au-ombre); }

/* ---------- fenêtres ---------- */
.modal-content { border-radius: 28px; box-shadow: var(--au-ombre-forte); }
.modal.show .modal-content { animation: auSaut .4s var(--au-ease); }
.modal-backdrop.show { opacity: .55; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-title { font-weight: 800; letter-spacing: -.01em; }
@media (max-width: 575.98px) {
    .modal-fullscreen-sm-down .modal-content { border-radius: 0; }
}

/* ---------- menus, onglets, pastilles ---------- */
.dropdown-menu { border-radius: 18px; }
.nav-pills { gap: .25rem; }
.nav-pills .nav-link.active { background-image: var(--au-degrade); box-shadow: 0 6px 16px rgba(249, 115, 22, .30); }
.badge { border-radius: 30px; padding: .38em .75em; }
.alert { border-radius: 16px; }
.page-link { border-radius: 12px !important; }

/* ---------- barres de progression ---------- */
.progress { height: 10px; border-radius: 10px; background: var(--px-orange-100); overflow: hidden; }
[data-bs-theme="dark"] .progress { background: #2A303C; }
.progress-bar { border-radius: 10px; background-image: var(--au-degrade); transition: width 1s var(--au-ease); }

/* ---------- fenêtre de confirmation d'opération ---------- */
.au-popup-fond { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(40, 18, 4, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: auApparait .2s; }
.au-popup-fond.ferme { opacity: 0; transition: opacity .25s; }
@keyframes auApparait { from { opacity: 0; } to { opacity: 1; } }
.au-popup { background: #fff; color: var(--px-ink); border: 1px solid var(--px-line); border-radius: 30px; padding: 30px 26px 24px; max-width: 400px; width: 100%; text-align: center; box-shadow: var(--au-ombre-forte); animation: auSaut .45s var(--au-ease); }
[data-bs-theme="dark"] .au-popup { background: #1B202B; }
.au-popup h3 { margin: 12px 0 6px; font-size: 1.3rem; font-weight: 800; }
.au-popup p { margin: 4px 0; color: var(--px-muted); }
.au-popup .btn { margin-top: 16px; min-width: 130px; }
.au-popup-icone { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.au-popup.ok .au-popup-icone { background: linear-gradient(135deg, #34d399, #0fa968); box-shadow: 0 10px 26px rgba(15, 169, 104, .45); animation: auPop .5s .25s var(--au-ease); }
.au-popup.erreur .au-popup-icone { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 10px 26px rgba(225, 29, 72, .45); animation: auSecoue .45s .2s; }
.au-popup-icone svg { width: 46px; height: 46px; fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.au-cercle { stroke-opacity: .35; stroke-dasharray: 151; stroke-dashoffset: 151; animation: auTrace .55s .1s ease forwards; }
.au-trait { stroke-dasharray: 50; stroke-dashoffset: 50; animation: auTrace .4s .45s ease forwards; }
@keyframes auTrace { to { stroke-dashoffset: 0; } }
@keyframes auSecoue { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
