/* =================================
   STYLES GÉNÉRAUX
   ================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    color: #0F0A3D;
    min-height: 100vh;
    position: relative;
}

/* =================================
   PAGE DE LOGIN
   ================================= */
.login-page {
    background-image: url(https://rexel.dev/gen/img/fond_ident.jpg);
    background-size: cover;
    height: 100vh;
}

.login-container {
    height: 80vh;
}

/* =================================
   CONTENEUR PRINCIPAL
   ================================= */
#mkt-page {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    line-height: 22.4px;
    font-style: normal;
    font-size: 16px;
    color: #0F0A3D;
}

#mkt-page h3,
#mkt-page .h3 {
    font-family: "Rexel-Regular", sans-serif;
    font-weight: 400;
    line-height: 38px;
    font-size: 30px;
    color: #0A287D;
}

#mkt-page h5,
#mkt-page .h5 {
    font-family: "Rexel-Regular", sans-serif;
    font-weight: 400;
    line-height: 26px;
    font-size: 20px;
    color: #0A287D;
}

#mkt-page .bg-op {
    background: rgba(255, 255, 255, 0.1);
}

#mkt-page .btn {
    border-radius: 0 8px 0 8px;
}

/* =================================
   FORMULAIRES
   ================================= */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group-prepend {
    display: flex;
}

.input-group-text {
    height: 3rem !important;
    display: flex !important;
    align-items: center !important;
    padding: 0.625rem 0.7rem !important;
    margin-bottom: 0 !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    line-height: 1.2857 !important;
    color: #585858 !important;
    text-align: center !important;
    white-space: nowrap !important;
    background-color: #f5f5f5 !important;
    border: 3px solid #fff !important;
    border-radius: 0 0 0 8px !important;
}

input.form-control,
textarea.form-control {
    margin: 0 !important;
    display: block !important;
    height: 3rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #495057 !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 3px solid #fff !important;
    border-radius: 0 8px 0 0 !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    font-family: "Roboto", sans-serif !important;
    padding: 8px !important;
}

select.form-control {
    margin: 0 !important;
    display: block !important;
    height: 3rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #495057 !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 3px solid #fff !important;
    border-radius: 0 8px 0 0 !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    font-family: "Roboto", sans-serif !important;
    padding: 8px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 35px !important;
}

.input-group select.form-control {
    border: 3px solid #fff !important;
    border-radius: 0 8px 0 0 !important;
}

.form-control::placeholder {
    color: #aeb6be;
    opacity: 1;
}

.form-control:focus {
    color: #585858;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 0.125rem rgba(0, 131, 255, 0.25);
}

/* =================================
   ICÔNES MATERIAL
   ================================= */
.material-symbols-outlined {
    font-size: 24px;
    vertical-align: middle;
    font-variation-settings: 'FILL'0, 'wght'400, 'GRAD'0, 'opsz'24;
}

/* =================================
   WRAPPER & LAYOUT
   ================================= */
.wrapper {
    position: relative;
    top: 0;
    min-height: 100vh;
}

.wrapper::after {
    display: table;
    clear: both;
    content: " ";
}

/* =================================
   SIDEBAR
   ================================= */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 260px;
    display: block;
    z-index: 1;
    color: #fff;
}

.sidebar .sidebar-wrapper {
    position: relative;
    z-index: 4;
    width: 260px;
    overflow: auto;
    padding-bottom: 180px;
    min-height: calc(100vh - 100px);
}

.sidebar[data-image]::after,
.sidebar.has-image::after {
    opacity: 0.95;
}

.sidebar::after,
.sidebar::before {
    display: block;
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
}

.sidebar .logo {
    padding: 12px 0;
    position: relative;
    z-index: 4;
    display: block;
    margin-top: 12px;
    margin-left: 23px;
}

.sidebar .user {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 20px;
    padding-top: 20px;
}

.sidebar .user .photo {
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 50%;
    float: left;
    margin-right: 11px;
    margin-left: 23px;
    z-index: 5;
    background: transparent;
}

.sidebar .user .photo img {
    width: 100%;
}

.sidebar .user span {
    color: #FFFFFF;
    padding: 8px 14px;
    display: block;
    white-space: nowrap;
}

.sidebar .accordion {
    padding: 20px 15px;
}

.sidebar .accordion .card,
.sidebar .accordion .card-header {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 16px;
}

.sidebar .accordion .btn-link {
    color: #FFFFFF;
    opacity: 1;
    background: rgba(255, 255, 255, 0.23);
    padding: 10px;
    margin: 5px 0 0;
    border-radius: 8px;
    text-decoration: none;
    display: block;
}

.sidebar .accordion .collapsed,
.sidebar .nav .nav-item {
    background: transparent;
}

.sidebar .accordion .collapsed:hover,
.sidebar .nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.13);
}

.sidebar .accordion .btn-active {
    background-color: #0083FF !important;
}

.sidebar .sidebar-wrapper p {
    margin: 0;
    line-height: 30px;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
    color: #FFFFFF;
    transform: translate3d(0px, 0, 0);
    display: block;
    height: auto;
    opacity: 1;
    padding-top: 2px;
}

.sidebar .caret {
    display: inline-block;
    width: 0;
    height: 0;
    vertical-align: middle;
    border-top: 4px dashed;
    border-top: 4px solid\9;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    margin-top: 13px;
    position: absolute;
    right: 0;
    transition: all 150ms ease-in;
}

.sidebar div[data-toggle="collapse"][aria-expanded="true"] .caret {
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
    transform: rotate(180deg);
}

.sidebar .nav-item {
    padding: 2px 0 0;
    width: 100%;
    margin: 0;
    color: #fff;
    border-radius: 8px;
}

.sidebar .nav-item:first-of-type {
    margin: 5px 0 0;
}

.sidebar .nav-item a {
    color: #fff !important;
    font-weight: 300;
}

.sidebar .nav-link {
    padding: 10px !important;
}

.sidebar .nav-link.active {
    background-color: #0083FF !important;
    border-radius: 8px;
}

.sidebar .material-symbols-outlined {
    font-variation-settings: 'FILL'0, 'wght'300, 'GRAD'200, 'opsz'48;
    padding-bottom: 4px;
    font-size: 31px;
    margin-right: 8px;
}

.sidebar .sidebar-normal .material-symbols-outlined {
    font-variation-settings: 'FILL'0, 'wght'100, 'GRAD'100, 'opsz'48;
    padding-bottom: 4px;
    font-size: 25px;
    margin-right: 8px;
    padding-left: 4px;
    padding-right: 4px;
}

/* =================================
   MAIN PANEL
   ================================= */
.main-panel {
    background: #F5F5F5;
    position: relative;
    float: right;
    width: calc(100% - 260px);
    min-height: 100vh;
}

.main-panel .content {
    padding: 24px 30px;
}

.main-panel .content .card {
    border: 0;
}

.main-panel .content .material-symbols-outlined {
    font-variation-settings: 'FILL'1, 'wght'300, 'GRAD'200, 'opsz'48;
    font-size: 20px;
}

.main-panel .content .auteur .material-symbols-outlined {
    margin-bottom: 3px;
}

/* =================================
   SIDEBAR BOTTOM (Admin + Déconnexion)
   ================================= */
.sidebar-bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px 15px;
    background: linear-gradient(to top, rgba(10, 40, 125, 0.95) 0%, rgba(10, 40, 125, 0) 100%);
}

.sidebar-bottom .accordion {
    padding: 0;
}

.sidebar-bottom .card {
    background: transparent;
    border: 0;
    padding: 0;
    margin-bottom: 0;
    font-size: 16px;
}

.sidebar-bottom .card-header {
    background: transparent;
    border: 0;
    padding: 0;
}

.sidebar-bottom .btn-link {
    color: #FFFFFF;
    opacity: 1;
    background: transparent;
    padding: 10px;
    margin: 5px 0 0;
    border-radius: 8px;
    text-decoration: none;
    display: block;
}

.sidebar-bottom .btn-link:hover {
    background: rgba(255, 255, 255, 0.13);
}

.sidebar-bottom .btn-link p {
    margin: 0;
    line-height: 30px;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
    color: #FFFFFF;
}

/* =================================
   FORMULAIRES ADMINISTRATION
   ================================= */
.main-panel .alert {
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.main-panel .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.main-panel .alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* =================================
   TABLEAUX
   ================================= */
.main-panel .table {
    width: 100%;
    margin-bottom: 0;
}

.main-panel .table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    color: #0A287D;
    border-bottom: 2px solid #e9ecef;
    padding: 12px;
}

.main-panel .table td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.main-panel .table tbody tr:hover {
    background-color: #f8f9fa;
}

.main-panel .badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.main-panel .badge-success {
    background-color: #28a745;
    color: white;
}

.main-panel .badge-danger {
    background-color: #dc3545;
    color: white;
}

.main-panel .badge-info {
    background-color: #0083FF;
    color: white;
}

.main-panel .badge-secondary {
    background-color: #6c757d;
    color: white;
}

.main-panel .badge-warning {
    background-color: #ffc107;
    color: #000;
}

.main-panel .btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.main-panel .btn-sm .material-symbols-outlined {
    font-size: 18px;
}

/* =================================
   TEMPLATE EDITABLE
   ================================= */
.template-editable {
    position: relative;
}

.btn-edit {
    background: #0083FF;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 131, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: #0A287D;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(10, 40, 125, 0.4);
}

.btn-edit .material-symbols-outlined {
    font-size: 20px;
}

#mkt-page .badge {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

#mkt-page .badge-warning {
    background-color: #FF9D00;
    color: white;
}

#mkt-page .badge-success {
    background-color: #009F8C;
    color: white;
}

/* Styles pour les modals */
.modal-header {
    background-color: #0083FF;
    color: white;
    flex-direction: row !important;
}

.modal-body {
    background: #F5F5F5 !important;
}

.modal-header .close {
    color: white;
    opacity: 1;

}

.modal-title {
    font-size: 1.3125rem;
    font-weight: normal;
    color: #fff !important;
    margin-bottom: 0px !important;
    line-height: 1.5 !important;
}

.modal-body .card {
    border: 0;
}

.modal-header .close span::after {
    content: ;
    display: none;
}

.modal-header .material-symbols-outlined {
    vertical-align: middle;
    margin-right: 8px;
}

.product-item {
    border: 0px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    background: #fff !important;
}

.argument-item {
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.product-item-header,
.argument-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-controls {
    display: flex;
    gap: 5px;
}

.btn-move,
.btn-delete-item {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-item {
    border: 2px dashed #0083FF;
    color: #0083FF;
    background: transparent;
}

.btn-add-item:hover {
    background: rgba(0, 131, 255, 0.1);
    color: #0083FF;
}

/* Gradient light pour les boutons */
.bg-gradient-light {
    background: linear-gradient(87deg, #f5f7fa 0, #c3cfe2 100%) !important;
    color: #0A287D !important;
    border: 1px solid #d1d9e6 !important;
}

.bg-gradient-light:hover {
    background: linear-gradient(87deg, #e4e8ed 0, #b3c2d9 100%) !important;
}

/* =================================
   FORCE TOOLTIP BOOTSTRAP STYLE
   ================================= */
.ui-tooltip {
    background: #000000 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.25rem !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    opacity: 0.9 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.ui-tooltip-content {
    color: #ffffff !important;
}

/* =================================
   DROPDOWN DATE PERSONNALISÉ
   ================================= */
.date-dropdown-wrapper {
    position: relative;
}

.date-dropdown-wrapper select.date-dropdown-trigger {
    pointer-events: auto;
    cursor: pointer;
}

.date-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 8px 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 12px;
    margin-top: 2px;
}

.date-dropdown-menu.show {
    display: block;
}

.date-dropdown-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #0A287D;
    margin-bottom: 10px;
    padding-left: 4px;
}

.date-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.date-dropdown-item {
    padding: 8px 10px;
    font-size: 13px;
    color: #495057;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.date-dropdown-item:hover {
    background: #0083FF;
    color: #fff;
}

.date-dropdown-item.active {
    background: #0A287D;
    color: #fff;
}

.date-dropdown-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 12px 0;
}

.date-dropdown-back {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #0083FF;
    cursor: pointer !important;
    margin-bottom: 10px;
    padding: 4px;
    user-select: none;
}

.date-dropdown-back:hover {
    color: #0A287D;
    cursor: pointer !important;
}

.date-dropdown-back .material-symbols-outlined {
    font-size: 16px;
}

.date-dropdown-full-year {
    background: #0A287D;
    color: #fff;
    font-weight: 500;
}

.date-dropdown-full-year:hover {
    background: #0083FF;
}
