Files

568 lines
10 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ==========================================================================
admin_style.css — Mobile global (≤ 956px)
Charge APRÈS Bootstrap
========================================================================== */
/* --- Dropdown admin (utilisé aussi hors mobile) --- */
:root {
--header: #f1f1f1;
}
/* ==== VISUEL COMMUN POUR TOUS LES MENUS ==== */
.menu-panel {
background: #fff;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 12px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
min-width: 230px;
padding: 8px 0;
}
/* Items menu principal */
.menu-panel > li,
.menu-panel .dropdown-item {
font-size: 16px;
line-height: 1.25;
white-space: nowrap;
cursor: pointer;
transition: background 0.2s ease;
}
/* séparateurs entre blocs du menu principal */
.menu-panel > li + li,
.menu-panel .dropdown-item + .dropdown-item {
border-top: 1px solid #f1f1f1;
}
.menu-panel > li:hover,
.menu-panel .dropdown-item:hover {
background: #f8f9fa;
}
.menu-panel a {
color: inherit;
text-decoration: none;
display: block;
cursor: pointer;
}
/* ==== MENU CUSTOM ==== */
.menu-wrap {
position: relative;
}
.dropdown-menu-custom {
position: absolute;
top: calc(100% + 8px);
right: 0;
list-style: none;
margin: 0;
display: none;
z-index: 1100;
}
.dropdown-menu-custom.is-open {
display: block;
}
/* ==== Sous-menu interne ==== */
.has-submenu {
background: #fff;
}
.has-submenu .submenu-toggle {
width: 100%;
text-align: left;
background: none;
border: 0;
padding: 12px 18px;
font-size: 16px;
line-height: 1.25;
font-weight: 400;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
transition: background 0.2s ease;
}
.has-submenu .submenu-toggle:hover {
background: #f8f9fa;
}
.submenu-arrow {
font-size: 14px;
opacity: 0.7;
transition: transform 0.2s ease;
}
.has-submenu.open .submenu-arrow {
transform: rotate(180deg);
}
.submenu {
list-style: none;
margin: 0;
padding: 0 0 8px 0;
background: #fff;
}
.submenu > li {
padding: 10px 18px 10px 32px;
font-size: 15px;
line-height: 1.25;
cursor: pointer;
transition: background 0.2s ease;
white-space: nowrap;
}
.submenu > li:hover {
background: #f8f9fa;
}
.submenu > li + li {
border-top: 1px solid #f7f7f7;
}
.submenu[hidden] {
display: none;
}
/* bouton logout */
.menu-item-form {
padding: 0;
}
.menu-logout-form {
margin: 0;
}
.menu-logout-btn {
width: 100%;
text-align: left;
background: none;
border: 0;
padding: 12px 18px;
font-size: 16px;
line-height: 1.25;
cursor: pointer;
}
.menu-logout-btn:hover {
background: #f8f9fa;
}
/* sécurité overflow */
.site-header,
.header-actions,
.menu-wrap,
.dropdown {
overflow: visible;
}
/* bouton avatar */
#btnMenu {
background: none;
border: none;
padding: 0;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
padding-left: 10px;
}
#btnMenu:focus,
#btnMenu:active {
outline: none;
box-shadow: none;
}
/* ======================== Mobile-first (≤ 956px) ======================== */
@media (max-width: 956px) {
/* Garde-fous */
html,
body {
width: 100%;
max-width: 100%;
overflow-x: hidden;
-webkit-text-size-adjust: 100%;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
img,
video,
iframe {
max-width: 100%;
height: auto;
display: block;
}
body {
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
-webkit-tap-highlight-color: transparent;
}
/* Grille & conteneurs */
.row {
margin-left: 0 !important;
margin-right: 0 !important;
}
.container {
width: 100% !important;
max-width: 100% !important;
padding-left: 16px !important;
padding-right: 16px !important;
}
/* Layout principal */
main,
.main,
.main1,
.main2 {
display: block !important;
align-items: initial !important;
justify-content: initial !important;
background: transparent !important;
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
max-width: none !important;
}
.btn-lg,
.btn-sm {
min-height: 38px !important;
padding: 0.35rem 0.7rem !important;
font-size: 0.92rem !important;
border-radius: 10px !important;
}
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-dark {
border-width: 1px !important;
box-shadow: none !important;
}
/* groupes d’actions dans les tableaux → même largeur */
.d-flex.gap-2 .btn,
.row .btn {
flex: 1 1 0;
text-align: center;
}
.text-end {
text-align: initial !important;
}
.text-end .btn {
width: 100%;
}
.btn-group {
flex-wrap: wrap;
}
.btn-group .btn {
margin-bottom: 6px;
}
/* Cartes */
.card,
.card * {
overflow-wrap: anywhere;
word-break: break-word;
}
.card,
.card.shadow-sm,
.card.shadow-sm.p-3 {
border-radius: 16px;
overflow: hidden;
}
/* Formulaires */
.form-control,
.form-select,
.form-check-input,
.input-group-text,
.input-group > .btn {
min-height: 44px;
}
/* Tables: scroll horizontal “propre” */
.table-responsive {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
table.table {
font-size: 14px;
}
table.table th,
table.table td {
vertical-align: middle;
}
/* Listes → actions tap-friendly */
td.text-end .d-flex {
gap: 8px;
flex-wrap: wrap;
}
td.text-end .d-flex .btn {
flex: 1 1 calc(50% - 4px);
min-width: 140px;
}
/* Split list/detail */
.row.g-3 > [class*="col-"] .card {
margin-bottom: 0;
}
/* Autocomplete / suggestions */
.suggest,
#suggestions {
position: static !important;
max-height: none !important;
overflow: visible !important;
width: 100% !important;
}
/* Footer */
.site-footer {
font-size: 12px;
padding-bottom: 16px;
}
/* Menu hamburger */
.header-actions .btn {
min-width: 44px;
}
}
/* ====== Composants “pages admin” (tous écrans, pensés mobile) ====== */
.table th {
white-space: nowrap;
}
.table .minw-120 {
min-width: 120px;
}
.photo {
width: 40px;
height: 40px;
object-fit: cover;
border-radius: 8px;
}
.badge {
display: inline-block;
padding: 0.35rem 0.6rem;
border-radius: 9999px;
font-size: 0.85rem;
border: 1px solid transparent;
}
.badge-active {
background: #e8f6ee;
border-color: #27ae60;
color: #2e07a3ff;
}
.badge-expiring {
background: #fff8e6;
border-color: #f39c12;
color: #2e07a3ff;
}
.badge-expired {
background: #fdecea;
border-color: #c0392b;
color: #2e07a3ff;
}
.card pre {
font-size: 0.85rem;
line-height: 1.45;
}
.list-group-item > .badge {
margin-left: auto;
}
:focus-visible {
outline: 2px solid #6366f1;
outline-offset: 2px;
border-radius: 8px;
}
/* ====== Table -> cartes (opt-in via .mobile-cards) ====== */
@media (max-width: 768px) {
table.mobile-cards {
border-collapse: separate;
border-spacing: 0;
}
table.mobile-cards thead {
display: none;
}
table.mobile-cards tbody {
display: block;
}
table.mobile-cards tr {
display: block;
margin: 12px 0;
background: #fff;
border: 1px solid rgba(0, 0, 0, 0.06);
border-radius: 14px;
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
overflow: hidden;
}
table.mobile-cards tr::before {
content: "";
display: block;
height: 3px;
background: #38378b;
opacity: 0.9;
}
table.mobile-cards td {
display: block;
padding: 10px 14px !important;
border: none !important;
background: transparent !important;
}
table.mobile-cards td + td {
border-top: 1px dashed rgba(0, 0, 0, 0.08) !important;
}
table.mobile-cards td::before {
content: attr(data-label);
display: inline-block;
min-width: 120px;
margin-right: 8px;
font-weight: 600;
color: #666;
}
table.mobile-cards td::before:empty {
display: none;
}
}
@media (max-width: 956px) {
.d-flex.justify-content-end.gap-2 .btn {
flex: 1 1 0; /* même largeur */
min-width: 120px; /* évite les boutons trop petits */
text-align: center; /* centre le texte */
}
}
/* Header */
.site-header {
background: var(--header);
border-bottom: 1px solid rgba(168, 39, 39, 0.06);
}
.site-header .container {
margin: 0 auto;
padding: 10px 18px;
display: flex;
align-items: center;
justify-content: space-between;
}
.site-header .btn-circle {
border-radius: 8px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.site-header .avatar {
width: 32px;
height: 32px;
border-radius: 999px;
display: inline-grid;
place-items: center;
font-weight: 600;
background: #eef2ff;
color: #3730a3;
}
/* ==== LOGO: mobile vs desktop (béton) ==== */
.brand {
letter-spacing: 0.5px;
font-weight: 700;
display: flex;
align-items: center;
line-height: 0; /* évite petits décalages baseline */
}
.header-left {
display: flex;
align-items: center;
gap: 8px; /* distance logo ↔ langue */
}
.brand .logo-mobile,
.brand .logo-desktop {
display: none !important; /* on cache tout par défaut */
height: 40px; /* taille unique (tu ajustes) */
width: auto;
}
/* Mobile: logo_u */
@media (max-width: 767.98px) {
.brand .logo-mobile {
display: block !important;
}
}
/* Desktop: logo.png */
@media (min-width: 768px) {
.brand .logo-desktop {
display: block !important;
}
}
/* Langue choix*/
/* Sélecteur de langue dans le header */
.lang-switch {
display: flex;
gap: 6px;
height: 42px;
background: #fff;
padding: 6px;
border-radius: 20px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.lang-btn {
display: inline-block;
padding: 4px 10px;
font-size: 13px;
font-weight: 700;
text-decoration: none;
color: #38378b; /* bleu foncé */
border-radius: 14px;
transition: all 0.2s ease-in-out;
}
.lang-btn:hover {
background: rgba(56, 55, 139, 0.08);
}
.lang-btn.active {
background: #38378b; /* bleu foncé */
color: #fff;
}
.menu-item-form {
padding: 0 !important;
list-style: none;
}
.menu-logout-form {
margin: 0;
width: 100%;
}
.menu-logout-btn {
all: unset;
box-sizing: border-box;
display: block;
width: 100%;
padding: 12px 16px;
cursor: pointer;
font: inherit;
color: inherit;
text-align: left;
}
.menu-logout-btn:hover {
background: #f3f4f6;
}
.menu-logout-btn:focus-visible {
outline: 2px solid #94a3b8;
outline-offset: -2px;
}