* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f8ff;
    color: #102033;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(1180px, 92%);
    margin: auto;
}

.site-header {
    background: #071b3a;
    color: white;
    padding: 18px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 26px;
    font-weight: 800;
}

.logo span {
    color: #ff8a00;
}

nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
}

.btn-small {
    background: #ff8a00;
    padding: 9px 14px;
    border-radius: 8px;
    color: white;
}

.hero {
    padding: 80px 0;
    background: radial-gradient(circle at top left, #174a9c, #071b3a 60%);
    color: white;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.badge {
    display: inline-block;
    background: rgba(255,255,255,0.14);
    padding: 8px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: 48px;
    line-height: 1.05;
    margin: 0 0 20px;
}

.hero p {
    font-size: 19px;
    line-height: 1.6;
    opacity: 0.95;
}

.hero-actions,
.choice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 28px;
}

.btn-primary,
.btn-secondary,
.btn-dark {
    display: inline-block;
    padding: 15px 22px;
    border-radius: 10px;
    font-weight: 700;
}

.btn-primary {
    background: #ff8a00;
    color: white;
}

.btn-secondary {
    background: white;
    color: #071b3a;
}

.btn-dark {
    background: #071b3a;
    color: white;
}

.small-note {
    font-size: 14px !important;
    margin-top: 14px;
}

.hero-card {
    background: white;
    color: #102033;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.hero-card h3 {
    margin-top: 0;
}

.hero-card li {
    margin-bottom: 12px;
}

.features {
    padding: 70px 0;
}

.features h2,
.choice h2 {
    text-align: center;
    font-size: 34px;
    margin-bottom: 35px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.card {
    background: white;
    padding: 26px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(7,27,58,0.08);
}

.card h3 {
    color: #0b3f91;
}

.choice {
    padding: 40px 0 80px;
}

.choice-box {
    background: white;
    border-radius: 20px;
    padding: 45px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(7,27,58,0.1);
}

.choice-box p {
    font-size: 18px;
}

.choice-actions {
    justify-content: center;
}

.site-footer {
    background: #071b3a;
    color: white;
    padding: 45px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.site-footer h4 {
    color: #ff8a00;
    margin-bottom: 15px;
}

.site-footer a {
    display: block;
    margin-bottom: 9px;
    color: #dce7ff;
}

.site-footer p {
    color: #dce7ff;
    line-height: 1.5;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 35px;
    padding-top: 18px;
    text-align: center;
    font-size: 14px;
    color: #dce7ff;
}

@media (max-width: 900px) {
    .header-inner,
    nav {
        flex-direction: column;
        gap: 14px;
    }

    .hero-grid,
    .cards,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 36px;
    }
}
.register-hero {
    padding: 70px 0;
    background:
        radial-gradient(circle at top right, rgba(255,138,0,0.22), transparent 35%),
        radial-gradient(circle at bottom left, rgba(0,132,255,0.25), transparent 40%),
        linear-gradient(135deg, #050b1f, #071b3a 65%, #0b2f75);
    color: white;
    text-align: center;
}

.register-hero h1 {
    font-size: 46px;
    margin: 15px 0;
}

.register-hero p {
    font-size: 19px;
    max-width: 760px;
    margin: auto;
    line-height: 1.6;
}

.register-section {
    padding: 70px 0;
}

.register-grid {
    display: grid;
    grid-template-columns: 0.75fr 1.5fr;
    gap: 30px;
    align-items: start;
}

.register-choice,
.register-form-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 12px 35px rgba(7,27,58,0.1);
}

.plan-card {
    display: block;
    padding: 22px;
    border: 2px solid #e4ecfb;
    border-radius: 16px;
    margin-top: 18px;
    transition: 0.2s ease;
}

.plan-card:hover,
.plan-card.active {
    border-color: #ff8a00;
    background: #fff7ef;
    transform: translateY(-2px);
}

.plan-card h3 {
    margin: 0 0 8px;
    color: #071b3a;
}

.plan-card p {
    color: #52637a;
}

.plan-card strong {
    color: #ff8a00;
}

.alert-info,
.alert-success {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 22px;
}

.alert-info {
    background: #edf4ff;
    color: #0b3f91;
}

.alert-success {
    background: #ecfff4;
    color: #08723b;
}

form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    margin-top: 16px;
    color: #102033;
}

input,
select {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #d7e1f2;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}

input:focus,
select:focus {
    border-color: #0b64d8;
    box-shadow: 0 0 0 4px rgba(11,100,216,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.checkbox-line {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 500;
    margin: 24px 0;
}

.checkbox-line input {
    width: auto;
    margin-top: 4px;
}

.full-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 17px;
}

.disabled-btn {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .register-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .register-hero h1 {
        font-size: 34px;
    }
}
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e4ecfb;
    text-align: left;
}

.data-table th {
    background: #f4f8ff;
    color: #071b3a;
    font-weight: 800;
}

.data-table tr:hover {
    background: #f8fbff;
}
.status-badge {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    background: #edf4ff;
    color: #0b3f91;
    white-space: nowrap;
}

.status-planned {
    background: #edf4ff;
    color: #0b3f91;
}

.status-confirmed {
    background: #ecfff4;
    color: #08723b;
}

.status-on_the_way {
    background: #fff7ef;
    color: #b85c00;
}

.status-delivered {
    background: #eaffea;
    color: #187c18;
}

.status-failed {
    background: #fff0f0;
    color: #b00020;
}

.status-cancelled {
    background: #f1f1f1;
    color: #555;
}
.log-item {
    padding: 14px 0;
    border-bottom: 1px solid #e4ecfb;
}

.log-item p {
    margin: 6px 0;
}

.log-item small {
    color: #52637a;
}
.app {
    min-height: 100vh;
    display: flex;
    background: #eef3fb;
}

.sidebar {
    width: 250px;
    background: #050b1f;
    color: white;
    padding: 24px 18px;
    position: fixed;
    inset: 0 auto 0 0;
}

.sidebar .logo {
    margin-bottom: 30px;
}
.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar nav a {
    display: block;
    padding: 13px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    color: #dce7ff;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.08);
}

.sidebar-user {
    position: absolute;
    bottom: 22px;
    left: 18px;
    right: 18px;
    color: #dce7ff;
    font-size: 14px;
}

.sidebar-user a {
    color: #ff8a00;
    display: inline-block;
    margin-top: 8px;
}

.main {
    margin-left: 250px;
    width: calc(100% - 250px);
}

.topbar {
    height: 72px;
    background: white;
    border-bottom: 1px solid #dfe8f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.search input {
    width: 340px;
    background: #f4f8ff;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.notif {
    position: relative;
    font-size: 22px;
}

.notif-count {
    position: absolute;
    top: -9px;
    right: -12px;
    background: #ff8a00;
    color: white;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 999px;
}

.app-content {
    padding: 30px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.page-head h1 {
    margin: 0;
    font-size: 34px;
    color: #071b3a;
}

.page-head p {
    margin: 6px 0 0;
    color: #52637a;
}

.page-actions {
    display: flex;
    gap: 12px;
}

.date-filter {
    background: white;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: end;
    margin-bottom: 22px;
    box-shadow: 0 8px 25px rgba(7,27,58,0.06);
}

.date-filter label {
    margin: 0 0 8px;
}

.date-filter input {
    width: 220px;
}

.date-filter button {
    border: none;
    cursor: pointer;
}

.planning-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 18px;
}

.planning-column {
    background: white;
    border-radius: 20px;
    padding: 16px;
    min-height: 520px;
    box-shadow: 0 10px 30px rgba(7,27,58,0.08);
}

.unassigned-column {
    border: 2px dashed #ff8a00;
}

.column-title {
    font-weight: 900;
    color: #071b3a;
    margin-bottom: 16px;
}

.column-title small {
    display: block;
    color: #52637a;
    margin-top: 5px;
    font-weight: 500;
}

.empty-column {
    color: #8a98aa;
    font-size: 14px;
}

.delivery-card {
    display: block;
    background: #f8fbff;
    border: 1px solid #e4ecfb;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 14px;
    color: #102033;
    transition: 0.2s ease;
}

.delivery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(7,27,58,0.12);
}

.delivery-card strong,
.delivery-card span,
.delivery-card small {
    display: block;
    margin-bottom: 7px;
}

.delivery-card span {
    font-size: 17px;
    font-weight: 800;
}

.delivery-card em {
    margin-top: 8px;
    font-style: normal;
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: 100%;
    }

    .app {
        display: block;
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .topbar,
    .page-head,
    .date-filter {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        gap: 14px;
    }

    .search input,
    .date-filter input {
        width: 100%;
    }
}
.delivery-card.dragging {
    opacity: 0.45;
}

.drop-zone.drop-active {
    outline: 3px dashed #ff8a00;
    background: #fff7ef;
}
.notif {
    cursor: pointer;
}

.notif-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 34px;
    width: 330px;
    background: white;
    border: 1px solid #e4ecfb;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(7,27,58,0.18);
    padding: 12px;
    z-index: 99;
}

.notif:hover .notif-dropdown {
    display: block;
}

.notif-dropdown a {
    display: block;
    padding: 12px;
    border-radius: 12px;
    color: #102033;
    border-bottom: 1px solid #eef3fb;
}

.notif-dropdown a:hover {
    background: #f4f8ff;
}

.notif-dropdown strong,
.notif-dropdown span,
.notif-dropdown small {
    display: block;
    margin-bottom: 4px;
}

.notif-dropdown span {
    font-size: 14px;
    color: #52637a;
}

.notif-dropdown small {
    font-size: 12px;
    color: #8a98aa;
}
.notification-line {
    display: block;
    padding: 16px;
    border-bottom: 1px solid #e4ecfb;
    color: #102033;
    border-radius: 12px;
}

.notification-line:hover {
    background: #f4f8ff;
}

.notification-line.unread {
    background: #fff7ef;
    border-left: 5px solid #ff8a00;
}

.notification-line strong,
.notification-line span,
.notification-line small {
    display: block;
    margin-bottom: 5px;
}

.notification-line span {
    color: #52637a;
}

.notification-line small {
    color: #8a98aa;
    font-size: 12px;
}
.driver-body {
    background: #eef3fb;
    margin: 0;
}

.driver-app {
    width: min(520px, 94%);
    margin: auto;
    padding: 22px 0 40px;
}

.driver-head {
    background: #071b3a;
    color: white;
    padding: 24px;
    border-radius: 22px;
    margin-bottom: 18px;
}

.driver-head h1 {
    margin: 0 0 8px;
}

.driver-head p {
    margin: 0;
    color: #dce7ff;
}

.driver-card {
    display: block;
    background: white;
    color: #102033;
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 14px;
    box-shadow: 0 8px 25px rgba(7,27,58,0.08);
}

.driver-card h2 {
    margin: 8px 0;
}

.driver-card p {
    margin: 7px 0;
    color: #52637a;
}

.driver-logout {
    display: block;
    text-align: center;
    margin-top: 25px;
    color: #071b3a;
    font-weight: 700;
}
.driver-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.driver-actions a {
    text-align: center;
}

.driver-status-form {
    display: grid;
    gap: 12px;
}

.driver-status-form button {
    border: none;
    cursor: pointer;
    font-size: 17px;
}
.driver-photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.driver-photos img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
}
.delivery-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.delivery-photo-grid img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #e4ecfb;
}

@media (max-width: 700px) {
    .delivery-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.signature-pad {
    width: 100%;
    height: 180px;
    background: white;
    border: 2px dashed #d7e1f2;
    border-radius: 14px;
    touch-action: none;
}

.signature-preview {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    background: white;
    border: 1px solid #e4ecfb;
    border-radius: 14px;
}
.signature-box {
    background: #f8fbff;
    border: 1px solid #e4ecfb;
    border-radius: 16px;
    padding: 16px;
    margin-top: 14px;
}

.signature-box img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    background: white;
    border-radius: 12px;
}

.signature-box p {
    color: #52637a;
    font-size: 14px;
}
/* Pages intérieures */
.page-content {
    max-width: 1050px;
    margin: 0 auto;
    padding: 55px 20px 65px;
    background: #f4f7fb;
}

.page-content h1 {
    font-size: 38px;
    margin-bottom: 22px;
    color: #061f3d;
}

.page-content h2 {
    font-size: 26px;
    margin-top: 34px;
    margin-bottom: 14px;
    color: #061f3d;
}

.page-content p {
    font-size: 17px;
    line-height: 1.7;
    color: #10233f;
    margin-bottom: 18px;
}

.page-content ul,
.page-content ol {
    margin: 18px 0 28px 25px;
    padding: 0;
}

.page-content li {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 8px;
    color: #10233f;
}

.page-content .btn,
.page-content a.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 13px 24px;
    background: #ff9800;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.page-content .btn:hover,
.page-content a.btn:hover {
    background: #e68900;
}

.page-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 25px 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.page-content th,
.page-content td {
    padding: 16px;
    border-bottom: 1px solid #dde5ef;
    text-align: left;
}

.page-content th {
    background: #061f3d;
    color: #fff;
}
.tracking-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.tracking-actions a,
.tracking-actions button {
    min-width: 118px;
    text-align: center;
}
.smart-client-box {
    position: relative;
    background: #f8fbff;
    border: 1px solid #dbe7f5;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}

.customer-results {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 88px;
    background: white;
    border: 1px solid #dbe7f5;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.16);
    z-index: 50;
    overflow: hidden;
}

.customer-result-item {
    display: block;
    width: 100%;
    border: 0;
    background: white;
    text-align: left;
    padding: 13px 15px;
    cursor: pointer;
    border-bottom: 1px solid #edf2f7;
}

.customer-result-item:hover {
    background: #f1f6ff;
}

.customer-result-item strong,
.customer-result-item span,
.customer-result-item small {
    display: block;
}

.customer-result-item strong {
    color: #071b3a;
    font-size: 15px;
}

.customer-result-item span {
    color: #ff8a00;
    font-weight: 700;
    font-size: 13px;
}

.customer-result-item small {
    color: #64748b;
    margin-top: 3px;
}

.customer-result-empty {
    padding: 15px;
    color: #64748b;
}

.selected-customer {
    margin-top: 12px;
    background: #ecfdf5;
    border-left: 5px solid #16a34a;
    border-radius: 10px;
    padding: 12px;
    color: #064e3b;
}

.register-form-card textarea {
    width: 100%;
    min-height: 90px;
    padding: 14px;
    border: 1px solid #d7e1f2;
    border-radius: 10px;
}
/* Smart client search - livraison */
.smart-client-box {
    position: relative;
    background: #f8fbff;
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    padding: 22px;
    margin: 18px 0 28px;
}

.smart-client-box label {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #071b3a;
    margin-bottom: 12px;
}

.smart-client-box input[type="text"] {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border: 1px solid #cfdced;
    border-radius: 14px;
    font-size: 17px;
    box-sizing: border-box;
}

.customer-results {
    display: none;
    position: absolute;
    left: 22px;
    right: 22px;
    top: 96px;
    background: #fff;
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    z-index: 9999;
    overflow: hidden;
}

.customer-result-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 14px;
    width: 100%;
    border: 0;
    background: #fff;
    text-align: left;
    padding: 16px 18px;
    cursor: pointer;
    border-bottom: 1px solid #eef3fa;
}

.customer-result-item:hover {
    background: #eef6ff;
}

.customer-result-item strong {
    color: #071b3a;
    font-size: 16px;
    font-weight: 800;
}

.customer-result-item span {
    color: #ff8a00;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.customer-result-item small {
    grid-column: 1 / 3;
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

.customer-result-empty {
    padding: 18px;
    color: #64748b;
    font-size: 15px;
}

.selected-customer {
    margin-top: 15px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-left: 6px solid #16a34a;
    border-radius: 14px;
    padding: 15px 17px;
    color: #064e3b;
    line-height: 1.5;
}

.register-form-card h3 {
    margin-top: 28px;
    margin-bottom: 16px;
    font-size: 22px;
    color: #071b3a;
}

.register-form-card hr {
    border: 0;
    border-top: 1px solid #e3ebf6;
    margin: 26px 0;
}

.register-form-card label {
    display: block;
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #071b3a;
}

.register-form-card input,
.register-form-card select,
.register-form-card textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 15px;
    border: 1px solid #cfdced;
    border-radius: 13px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
}

.register-form-card textarea {
    min-height: 95px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
/* -------- NOTES -------- */

.register-form-card textarea{
    width:100%;
    min-height:140px;
    padding:16px 18px;
    border:1px solid #d7e3f3;
    border-radius:14px;
    font-size:15px;
    line-height:1.6;
    resize:vertical;
    font-family:inherit;
background:#0f2244;
    transition:.2s;
    box-sizing:border-box;
}

.register-form-card textarea:focus{
    border-color:#ff8a00;
    box-shadow:0 0 0 4px rgba(255,138,0,.12);
    outline:none;
}

.register-form-card label{
    display:block;
    margin:22px 0 8px;
    font-size:16px;
    font-weight:700;
    color:#071b3a;
}

.register-form-card h3{
    margin:35px 0 20px;
    padding-bottom:10px;
    border-bottom:1px solid #edf2f7;
}

.register-form-card hr{
    margin:35px 0;
    border:0;
    border-top:1px solid #e8eef7;
}
/* Notes en colonnes */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 10px;
}

.notes-grid textarea {
    min-height: 150px;
}

/* Fiche client sélectionné */
.selected-customer {
    margin-top: 15px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-left: 6px solid #16a34a;
    border-radius: 16px;
    padding: 16px 18px;
    color: #064e3b;
}

.selected-customer-title {
    font-weight: 800;
    margin-bottom: 8px;
}

.selected-customer-name {
    font-size: 20px;
    font-weight: 900;
    color: #052e1a;
    margin-bottom: 8px;
}

.selected-customer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.selected-customer-meta span {
    background: #d1fae5;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1100px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
}
.customer-results{
    position:absolute;
    left:22px;
    right:22px;
    top:130px;      /* descend sous le champ */
    background:#fff;
    border:1px solid #dbe7f5;
    border-radius:16px;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
    z-index:9999;
}
.smart-client-box{
    padding-bottom:25px;
}

.smart-client-box input[type=text]{
    position:relative;
    z-index:10000;
    background:#fff;
}
.customer-results {
    position: static !important;
    display: none;
    margin-top: 10px;
    background: #fff;
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15,23,42,.10);
    overflow: hidden;
}

.customer-result-empty {
    padding: 18px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.5;
}

.customer-result-empty .btn-small {
    display: inline-block;
    margin-top: 10px;
    background: #ff8a00;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
}

.customer-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    align-items: center;
}

.customer-search-form input {
    flex: 1;
}

.customers-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.customer-card {
    background: #ffffff;
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15,23,42,.06);
}

.customer-card summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 16px;
    align-items: center;
}

.customer-card summary::-webkit-details-marker {
    display: none;
}

.customer-card summary strong {
    display: block;
    font-size: 17px;
    color: #071b3a;
}

.customer-card summary span {
    color: #ff8a00;
    font-weight: 800;
    font-size: 13px;
}

.customer-card summary small {
    color: #64748b;
}

.customer-card[open] summary {
    background: #f8fbff;
    border-bottom: 1px solid #e5edf7;
}

.customer-edit-form {
    padding: 18px;
    background: #ffffff;
}

@media (max-width: 900px) {
    .customer-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-card summary {
        grid-template-columns: 1fr;
    }
}
/* Correction boutons clients */
.customer-card .btn-small,
.customer-card summary .btn-small,
.customer-search-form .btn-primary,
.customers-list .btn-small,
.customer-edit-form .btn-primary {
    color: #ffffff !important;
    background: #ff8a00 !important;
    border: none !important;
    text-decoration: none !important;
    font-weight: 800 !important;
}

.customer-card .btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    min-height: 36px;
    padding: 9px 14px;
    border-radius: 10px;
}


    font-size: 0;
}    font-size: 0;

.customer-card summary .btn-small {
    font-size: 14px;
}
.driver-access-btn {
    font-size: 14px !important;
}
.global-search-form input {
    width: 340px;
}

.search-result-card {
    background: #f8fbff;
    border: 1px solid #dbe7f5;
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 12px;
}

.search-result-card strong {
    font-size: 18px;
    color: #071b3a;
}

.search-result-card small {
    color: #ff8a00;
    font-weight: 800;
}
.delivery-mini.search-hit {
    background: #fff3e6;
    border: 2px solid #ff7a00;
    box-shadow: 0 0 0 3px rgba(255,122,0,.15);
}
.driver-access-actions{
    display:flex;
    gap:12px;
    align-items:center;
    justify-content:flex-start;
    margin-top:25px;
}

.driver-access-actions .btn-primary,
.driver-access-actions .btn-dark{
    width:auto !important;
    min-width:240px;
    padding:12px 22px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.driver-access-actions form{
    margin:0;
}

.driver-access-actions a{
    text-decoration:none;
}
.loading-form{
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:12px;
    margin-top:12px;
}

.radio-line{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin-right:15px;
    font-weight:bold;
}

.radio-line input{
    width:auto;
}

.missing-textarea{
    min-height:65px;
    margin-top:6px;
}
.loading-form{
    margin-top:15px;
    padding:18px;
    background:#f8fafc;
    border:2px solid #dbe4ef;
    border-radius:14px;
}

.loading-form strong{
    display:block;
    font-size:18px;
    margin-bottom:15px;
    color:#10203a;
}

.loading-options{
    display:flex;
    gap:25px;
    align-items:center;
    flex-wrap:wrap;
    margin-bottom:15px;
}

.loading-options label{
    display:flex;
    align-items:center;
    gap:8px;
    font-weight:700;
    font-size:16px;
    cursor:pointer;
}

.loading-options input[type=radio]{
    width:20px;
    height:20px;
}

.loading-form textarea{
    width:100%;
    margin-top:10px;
    min-height:90px;
    padding:12px;
    border:1px solid #cfd8e3;
    border-radius:10px;
    resize:vertical;
    font-size:15px;
}

.loading-form .btn{
    margin-top:15px;
    padding:12px 22px;
}

.warning{
    margin-top:15px;
    padding:15px;
    background:#fff4e5;
    border-left:6px solid #ff9800;
    border-radius:10px;
    font-size:15px;
    line-height:1.5;
}
.loading-box{
    margin-top:18px;
    padding:20px;
    border:2px solid #d9e3ef;
    border-radius:15px;
    background:#f9fbfd;
}

.loading-box h4{
    margin:0 0 18px;
    font-size:22px;
    color:#0b2145;
}

.loading-choice{
    margin-bottom:14px;
}

.loading-choice label{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:18px;
    font-weight:700;
}

.loading-choice input{
    width:22px;
    height:22px;
}

.loading-label{
    display:block;
    margin:20px 0 8px;
    font-weight:700;
    color:#374151;
}

.loading-box textarea{
    width:100%;
    min-height:90px;
    border:1px solid #d6dde7;
    border-radius:10px;
    padding:12px;
    font-size:15px;
}

.loading-save{
    display:block;
    width:100%;
    margin-top:18px;
    font-size:17px;
    padding:14px;
}
.loading-box{
    background:#f8fafc;
    border:2px solid #d9e3ef;
    border-radius:15px;
    padding:20px;
    margin-top:15px;
}

.loading-choice{
    margin-bottom:15px;
}

.loading-choice label{
    font-size:18px;
    font-weight:700;
}

.missing-box{
    background:#fff7ed;
    border-left:5px solid #ff8a00;
    border-radius:12px;
    padding:15px;
    margin-top:18px;
}

.missing-box label{
    display:block;
    font-weight:bold;
    margin-bottom:10px;
}

.missing-box textarea{
    width:100%;
    min-height:110px;
    border:1px solid #d7dce3;
    border-radius:10px;
    padding:12px;
    resize:vertical;
    box-sizing:border-box;
}

.loading-save{
    width:100%;
    margin-top:20px;
    padding:14px;
    font-size:17px;
}
/* Barre d'information */
.top-announcement{
    background:linear-gradient(90deg,#f97316,#ea580c);
    color:#fff;
    text-align:center;
    padding:10px 15px;
    font-size:15px;
    font-weight:500;
    letter-spacing:.2px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.top-announcement strong{
    font-weight:800;
}

@media (max-width:768px){
    .top-announcement{
        font-size:13px;
        padding:8px 12px;
    }
}
.phone-box{
    display:flex;
    align-items:center;
    gap:15px;
    flex-wrap:wrap;
    margin:18px 0;
    padding:15px 18px;
    background:#f8fbff;
    border:2px solid #dbeafe;
    border-radius:14px;
}

.phone-label{
    font-weight:700;
    color:#475569;
}

.phone-number{
    font-size:24px;
    font-weight:800;
    color:#071b3a;
    text-decoration:none;
    letter-spacing:1px;
}

.phone-number:hover{
    color:#ff8a00;
}

@media(max-width:768px){

    .phone-box{
        flex-direction:column;
        align-items:flex-start;
    }

    .phone-number{
        font-size:28px;
    }

    .phone-box .btn{
        width:100%;
        justify-content:center;
    }

}
.client-btn.call{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;

    padding:14px 26px;

    background:linear-gradient(180deg,#ff9d1f,#ff8500);
    color:#fff !important;

    border-radius:14px;
    border:0;

    text-decoration:none;
    font-size:17px;
    font-weight:800;

    box-shadow:0 8px 18px rgba(255,136,0,.35);

    transition:.2s ease;
}

.client-btn.call:hover{
    background:linear-gradient(180deg,#ffab3d,#ff9200);
    transform:translateY(-2px);
    box-shadow:0 12px 24px rgba(255,136,0,.45);
}

.client-btn.call:active{
    transform:scale(.97);
}

.client-btn.call::before{
    content:"📞";
    font-size:20px;
}
.actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:20px;
}

.actions a{
    text-decoration:none !important;
}

.client-btn.call{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;

    min-width:220px;
    height:52px;

    padding:0 24px;

    background:#ff8a00 !important;
    color:#fff !important;

    border-radius:14px;

    font-size:17px;
    font-weight:800;

    border:none !important;

    box-shadow:0 8px 18px rgba(255,136,0,.35);

    transition:.2s;
}

.client-btn.call:hover{
    background:#ff9c1c !important;
    color:#fff !important;
    transform:translateY(-2px);
}

.client-btn.call::before{
    content:"📞";
    margin-right:10px;
    font-size:20px;
}
.product-line input{
    margin-bottom:10px;
}

#addProductBtn{
    width:auto;
    padding:12px 18px;
    border-radius:12px;
}
/* ===========================
   ACCOUNTING
=========================== */

.accounting-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
    flex-wrap:wrap;
    gap:15px;
}

.accounting-header h1{
    margin:0;
    font-size:34px;
    font-weight:700;
    color:#172b4d;
}

.accounting-subtitle{
    color:#6b7280;
    font-size:15px;
    margin-top:5px;
}

.accounting-filters{
    display:flex;
    gap:15px;
    margin-bottom:30px;
    flex-wrap:wrap;
}

.accounting-filters select{
    min-width:180px;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:20px;
    margin-bottom:35px;
}

.stat-card{
    background:#fff;
    border-radius:18px;
    padding:25px;
    box-shadow:0 12px 35px rgba(0,0,0,.08);
    transition:.25s;
    border:1px solid #eef1f5;
}

.stat-card:hover{
    transform:translateY(-4px);
}

.stat-title{
    color:#6b7280;
    font-size:14px;
    margin-bottom:12px;
    font-weight:600;
}

.stat-value{
    font-size:34px;
    font-weight:700;
    color:#111827;
}

.company-card{
    background:#fff;
    border-radius:18px;
    padding:30px;
    box-shadow:0 12px 35px rgba(0,0,0,.08);
    margin-bottom:35px;
}

.company-card h2{
    margin-top:0;
    margin-bottom:20px;
}

.company-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:20px;
}

.company-item strong{
    display:block;
    color:#9ca3af;
    font-size:13px;
    margin-bottom:5px;
}

.company-item span{
    font-size:16px;
    color:#111827;
    font-weight:600;
}

.invoice-card{
    background:#fff;
    border-radius:18px;
    padding:25px;
    box-shadow:0 12px 35px rgba(0,0,0,.08);
}

.invoice-card h2{
    margin-top:0;
    margin-bottom:20px;
}

.invoice-table{
    width:100%;
    border-collapse:collapse;
}

.invoice-table th{
    background:#f8fafc;
    padding:15px;
    text-align:left;
    font-size:14px;
    color:#6b7280;
    border-bottom:1px solid #ececec;
}

.invoice-table td{
    padding:16px;
    border-bottom:1px solid #f2f2f2;
    vertical-align:middle;
}

.invoice-table tr:hover{
    background:#fafafa;
}

.badge-paid{
    background:#dcfce7;
    color:#166534;
    padding:7px 12px;
    border-radius:25px;
    font-weight:700;
    font-size:13px;
}

.invoice-actions{
    display:flex;
    gap:10px;
}

.btn-view{

    background:#2563eb;
    color:#fff;
    padding:10px 16px;
    border-radius:8px;
    text-decoration:none;
    font-weight:600;
}

.btn-download{

    background:#f59e0b;
    color:#fff;
    padding:10px 16px;
    border-radius:8px;
    text-decoration:none;
    font-weight:600;
}

.btn-view:hover,
.btn-download:hover{

    opacity:.9;
}

@media(max-width:900px){

.invoice-table{

display:block;
overflow:auto;

}

}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-review-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 11px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #071b3a;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(7, 27, 58, 0.06);
    transition: 0.2s;
}

.topbar-review-score:hover {
    background: #fff7ed;
    border-color: #ff8a00;
    transform: translateY(-1px);
}

.review-star {
    font-size: 19px;
}

.review-average {
    white-space: nowrap;
    font-size: 14px;
}

.review-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #ff8a00;
    color: #ffffff;
    border-radius: 999px;
    font-size: 11px;
}

@media (max-width: 700px) {
    .review-average {
        display: none;
    }

    .topbar-review-score {
        padding: 0 8px;
    }
}
.footer-social{
    display:flex;
    justify-content:center;
    gap:18px;
    margin-top:15px;
}

.footer-social a{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#0d6efd;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    font-size:20px;
    transition:.2s;
}

.footer-social a:hover{
    transform:scale(1.1);
    background:#0b5ed7;
}
.footer-social{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:20px;
    margin:25px 0;
}

.footer-social a{
    width:46px;
    height:46px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#0d6efd;
    color:#fff;
    font-size:22px;
    text-decoration:none;
    transition:.2s;
}

.footer-social a:hover{
    background:#0b5ed7;
    transform:scale(1.08);
}
/* =========================
   BASE RESPONSIVE MOBILE
   ========================= */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

input,
select,
textarea,
button {
    max-width: 100%;
    font: inherit;
}

/* Conteneurs généraux */
.container,
.page-container,
.content,
.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Footer */
footer {
    width: 100%;
}

.footer-content,
.footer-columns,
.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-column {
    flex: 1 1 220px;
}

/* Réseaux sociaux */
.footer-social {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.footer-social a {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #0d6efd;
    color: #ffffff;
    text-decoration: none;
    font-size: 22px;
}

.footer-social a img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
}

.footer-bottom p {
    margin: 6px 0;
}

/* Tableaux */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    max-width: 100%;
}

/* Boutons */
button,
.btn,
input[type="submit"] {
    min-height: 44px;
}

/* =========================
   TABLETTE
   ========================= */

@media (max-width: 900px) {
    .container,
    .page-container,
    .content,
    .main-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .footer-content,
    .footer-columns,
    .footer-grid {
        gap: 20px;
    }
}

/* =========================
   TÉLÉPHONE
   ========================= */

@media (max-width: 600px) {
    body {
        font-size: 15px;
    }

    .container,
    .page-container,
    .content,
    .main-content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .footer-content,
    .footer-columns,
    .footer-grid {
        display: block;
        text-align: center;
    }

    .footer-column {
        width: 100%;
        margin-bottom: 24px;
    }

    .footer-column a {
        display: block;
        padding: 6px 0;
    }

    .footer-social {
        justify-content: center;
        margin: 20px 0;
    }

    .footer-social a {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .footer-bottom {
        padding: 16px 12px;
        font-size: 13px;
    }

    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 19px;
    }

    input,
    select,
    textarea,
    button,
    .btn {
        width: 100%;
    }

    form {
        width: 100%;
    }
}

/* Très petits téléphones */
@media (max-width: 380px) {
    body {
        font-size: 14px;
    }

    .footer-social {
        gap: 12px;
    }

    .footer-bottom {
        font-size: 12px;
    }
}
input,
select,
textarea {
    width: 100%;
}

button,
.btn,
a.btn {
    width: auto;
    max-width: 100%;
}
/* =========================
   PAGE LIVRAISONS MOBILE
   ========================= */

@media (max-width: 900px) {

    .main-content,
    main,
    .content,
    .page-content,
    .container,
    .page-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        overflow-x: hidden;
    }

    /* Conteneur du tableau */
    .table-responsive,
    .table-wrapper,
    .deliveries-table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        width: max-content;
        min-width: 900px;
        border-collapse: collapse;
    }

    th,
    td {
        white-space: nowrap;
    }

    /* Évite que les cartes dépassent */
    .card,
    .delivery-card,
    .panel,
    .box {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Filtres et boutons */
    .filters,
    .filter-bar,
    .actions,
    .toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .filters input,
    .filters select,
    .filters button,
    .filter-bar input,
    .filter-bar select,
    .filter-bar button {
        width: 100%;
        max-width: 100%;
    }
}
/* =========================
   PAGE LIVRAISONS MOBILE
   ========================= */

@media (max-width:900px){

    .register-grid{
        display:flex !important;
        flex-direction:column !important;
        gap:20px;
    }

    .register-form-card{
        width:100% !important;
        min-width:0 !important;
        max-width:100% !important;
    }

    .table-wrapper{
        width:100%;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    .data-table{
        min-width:700px;
    }

}
/* =========================
   MOBILE
   ========================= */

@media (max-width:900px){

    .register-grid{
        grid-template-columns:1fr;
        gap:20px;
    }

    .register-form-card{
        width:100%;
        min-width:0;
    }

    .table-wrapper{
        width:100%;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    .data-table{
        min-width:700px;
    }

}
@media (max-width:1200px){
    .register-grid{
        grid-template-columns:1fr;
    }
}
@media (max-width: 900px) {
    .register-form-card input,
    .register-form-card select,
    .register-form-card textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .register-form-card input[type="date"] {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        -webkit-appearance: none;
        appearance: none;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .form-row > div {
        min-width: 0;
        width: 100%;
    }
}
@media (max-width: 600px) {
    .register-form-card {
        padding: 16px !important;
        overflow: hidden;
    }
}
@media (max-width: 900px) {
    .date-filter {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .date-filter > div {
        width: 100% !important;
        min-width: 0 !important;
    }

    .date-filter input,
    .date-filter select,
    .date-filter button,
    .date-filter a {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .date-filter input[type="date"] {
        display: block !important;
        -webkit-appearance: none;
        appearance: none;
    }
}
input[type="date"] {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
@media (max-width: 900px) {
    .page-head {
        display: block !important;
    }

    .page-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 15px;
    }

    .page-actions > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .page-actions form {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 8px !important;
        align-items: center;
    }

    .page-actions input[type="date"] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-actions a,
    .page-actions button {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .page-actions {
        grid-template-columns: 1fr !important;
    }

    .page-actions form {
        grid-template-columns: 1fr !important;
    }
}
/* =========================
   SIDEBAR MOBILE
   ========================= */

@media (max-width:900px){

    .sidebar,
    #sidebar,
    aside{
        background:#0f2244 !important;
        color:#fff !important;
    }

    .sidebar .logo,
    .sidebar h2,
    .sidebar h3{
        color:#fff !important;
    }

    .sidebar a{
        color:#fff !important;
        border-radius:10px;
        transition:.2s;
    }

    .sidebar a:hover{
        background:rgba(255,255,255,.12);
    }

    .sidebar a.active,
    .sidebar .active{
        background:#ff8a00 !important;
        color:#fff !important;
    }

    .sidebar small,
    .sidebar p{
        color:#cbd5e1 !important;
    }

}
/* ==========================
   SIDEBAR MOBILE - TEXTE BLANC
   ========================== */

/* Sidebar bleu foncé sur PC et GSM */
.sidebar {
    background: #0f2244 !important;
    color: #ffffff !important;
}

/* Tous les textes et liens en blanc */
.sidebar nav a,
.sidebar nav a:visited,
.sidebar nav a:active,
.sidebar nav a:focus,
.sidebar p,
.sidebar small,
.sidebar span {
    color: #ffffff !important;
}

/* Logo */
.sidebar .logo {
    color: #ffffff !important;
}

.sidebar .logo span {
    color: #ff8a00 !important;
}

/* Survol */
.sidebar nav a:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

/* Lien actif */
.sidebar nav a.active {
    background: #ff8a00 !important;
    color: #ffffff !important;
}

/* Partie basse */
.sidebar .sidebar-footer,
.sidebar .sidebar-footer a,
.sidebar .sidebar-footer p,
.sidebar .sidebar-footer small {
    color: #ffffff !important;
}
/* Scroll horizontal de tous les tableaux */
.table-wrapper,
.table-responsive,
.responsive-table,
.table-container {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper table,
.table-responsive table,
.responsive-table table,
.table-container table {
    min-width: 900px;
    width: max-content;
}
main,
.app-content,
.register-form-card,
.card,
.content {
    overflow-x: visible !important;
}

.table-wrapper {
    display: block;
}
@media (max-width: 900px) {
    .invoice-table-wrapper {
        margin: 0;
        padding-bottom: 8px;
    }

    .invoice-table {
        min-width: 900px;
    }
}
.invoice-table-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.invoice-table {
    width: max-content;
    min-width: 900px;
    border-collapse: collapse;
}

.invoice-table th,
.invoice-table td {
    white-space: nowrap;
}
@media (max-width: 900px) {
    .app-content,
    .register-form-card,
    .card,
    .content,
    .page-content {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .invoice-table-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: scroll !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
        position: relative !important;
    }

    .invoice-table {
        display: table !important;
        width: 1100px !important;
        min-width: 1100px !important;
        max-width: none !important;
    }

    .invoice-table th,
    .invoice-table td {
        white-space: nowrap !important;
    }
}
button,
.btn {
    box-sizing: border-box;
    max-width: 100%;
}
.review-page .btn{
    width:calc(100% - 30px) !important;
    margin:18px auto 0 !important;
    box-sizing:border-box !important;
}
.card{
    overflow:hidden;
}

.return-link {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 18px 0 0 !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    background: #ff8a00 !important;
    color: #fff !important;
    border-radius: 12px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-weight: bold !important;
}
.return-btn{
    display:block !important;
    width:100% !important;
    padding:15px 5px !important;
    margin:18px 0 0 !important;
    box-sizing:border-box !important;
    background:#ff8a00 !important;
    color:#fff !important;
    border-radius:12px !important;
    text-align:center !important;
    text-decoration:none !important;
    font-weight:bold !important;
}
.quick-create-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 35, 67, 0.65);
}

.quick-create-modal.is-open {
    display: flex;
}

.quick-create-box {
    position: relative;
    width: 100%;
    max-width: 500px;
    padding: 28px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 35, 67, 0.3);
}

.quick-create-box h2 {
    margin-top: 0;
    margin-bottom: 22px;
}

.quick-create-close {
    position: absolute;
    top: 12px;
    right: 15px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.quick-create-error {
    min-height: 24px;
    margin: 12px 0;
    color: #b91c1c;
    font-weight: 700;
}
/* TABLETTES */
@media screen and (min-width: 768px) and (max-width: 1100px) {

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    * {
        box-sizing: border-box;
    }

    .container,
    .content,
    .main-content,
    .page-content {
        width: 100%;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .card,
    .panel,
    .bloc,
    .form-section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .row,
    .form-row,
    .filters {
        flex-wrap: wrap;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }

    table {
        min-width: 700px;
    }

    .table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
textarea[name="email_signature"]{
    color:#fff !important;
    background:#1f2937 !important;
}

textarea[name="email_signature"]::placeholder{
    color:#cbd5e1 !important;
}

textarea[name="email_signature"]:focus{
    color:#fff !important;
}

/* ==================================================
   CORRECTION GLOBALE TABLETTE - TOUTES LES PAGES
================================================== */

@media screen and (min-width: 601px) and (max-width: 1200px) {

    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .app-layout,
    .app-main,
    .app-content,
    main,
    .content,
    .page-content,
    .container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .app-content {
        overflow-x: hidden !important;
    }

    .register-grid,
    .dashboard-grid,
    .cards-grid,
    .form-grid,
    .settings-grid,
    .content-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 20px !important;
        box-sizing: border-box !important;
    }

    .register-grid > *,
    .dashboard-grid > *,
    .cards-grid > *,
    .form-grid > *,
    .settings-grid > *,
    .content-grid > * {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .register-form-card,
    .card,
    .panel,
    .box,
    .delivery-card,
    .settings-card,
    .form-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    form,
    .form-row,
    .form-group {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .register-form-card input,
    .register-form-card select,
    .register-form-card textarea,
    .register-form-card button,
    .full-btn {
        width: 100% !important;
    }

    .table-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .data-table,
    table {
        max-width: none !important;
    }

    img,
    video,
    iframe {
        max-width: 100% !important;
        height: auto;
    }
}

.language-selector {
    margin-left: 12px;
}

.language-selector select {
    min-width: 165px;
    padding: 9px 34px 9px 12px;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font: inherit;
    cursor: pointer;
}

.language-selector select:focus {
    outline: 2px solid rgba(13, 110, 253, 0.25);
    border-color: #0d6efd;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .language-selector {
        margin: 10px 0 0;
        width: 100%;
    }

    .language-selector select {
        width: 100%;
    }
}
.footer-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.footer-grid > div {
    min-width: 180px;
    text-align: left;
}
.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 35px 0;
}
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.15);
    margin-top: 30px;
    padding-top: 25px;
}

.footer-bottom p {
    margin: 8px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 220px);
    justify-content: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-grid > div {
        min-width: auto;
        text-align: center;
    }
}

