/* ajouter-produit.css */

:root {
    --navy: #10243A;
    --navy-light: #193650;
    --teal: #13B8A6;
    --background: #F4F7FA;
    --white: #FFFFFF;
    --text: #243447;
    --muted: #8492A3;
    --border: #E7EDF2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "DM Sans", sans-serif;
    background: var(--background);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 255px;
    min-width: 255px;
    background: var(--navy);
    color: white;
    padding: 27px 17px 20px;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 10px;
    margin-bottom: 35px;
    font-family: "Manrope", sans-serif;
    font-size: 25px;
    font-weight: 800;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--teal);
    color: var(--navy);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand span:last-child > span {
    color: var(--teal);
}

.shop-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 10px;
    background: rgba(255,255,255,.07);
    border-radius: 11px;
    margin-bottom: 31px;
}

.shop-avatar {
    width: 41px;
    height: 41px;
    background: #D5F4EF;
    color: #087E72;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 800;
}

.shop-card strong,
.shop-card small {
    display: block;
}

.shop-card strong {
    font-size: 13px;
    margin-bottom: 5px;
}

.shop-card small {
    font-size: 10px;
    color: #B3C3D0;
}

.shop-card small i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #35D69D;
    margin-right: 4px;
}

.nav-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #8093A5;
    padding: 0 12px;
    margin-bottom: 12px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-link {
    min-height: 44px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    color: #B6C4D0;
    font-size: 12px;
    font-weight: 600;
    transition: .2s;
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(255,255,255,.07);
    color: white;
}

.nav-link.active {
    background: var(--teal);
    color: var(--navy);
    font-weight: 800;
}

.count {
    margin-left: auto;
    background: #F59E0B;
    color: #392607;
    border-radius: 20px;
    padding: 4px 8px;
    font-size: 10px;
}

.management-title {
    margin-top: 32px;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.logout {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #F3A1A1;
    font-size: 12px;
    padding: 10px 12px;
}

/* MAIN */

.main {
    flex: 1;
    min-width: 0;
}

.topbar {
    height: 85px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 35px;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.breadcrumb {
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 5px;
}

.breadcrumb strong {
    color: var(--text);
}

.topbar h1 {
    font-family: "Manrope", sans-serif;
    font-size: 20px;
    color: var(--navy);
    font-weight: 800;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.notification {
    width: 39px;
    height: 39px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    color: #647587;
    position: relative;
    cursor: pointer;
}

.notification span {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 7px;
    height: 7px;
    background: #F05B5B;
    border-radius: 50%;
}

.user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #DCE9F4;
    color: #214D70;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 12px;
}

.user strong,
.user small {
    display: block;
}

.user strong {
    font-size: 11px;
}

.user small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 21px;
}

/* PAGE CONTENT */

.content {
    padding: 30px 35px;
    max-width: 1600px;
    margin: auto;
}

.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.page-intro h2 {
    font-family: "Manrope", sans-serif;
    color: var(--navy);
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 7px;
}

.page-intro p {
    color: var(--muted);
    font-size: 12px;
}

.back-button {
    padding: 11px 15px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    color: #5F7081;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.back-button i {
    margin-right: 7px;
}

/* FORM LAYOUT */

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 22px;
}

.form-main,
.form-aside {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 23px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 21px;
    border-bottom: 1px solid #EFF2F5;
}

.heading-icon {
    width: 40px;
    height: 40px;
    background: #E0F7F2;
    color: #0C9D8F;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
}

.section-heading h3,
.form-card h3 {
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 5px;
}

.section-heading p,
.publication-card > p {
    font-size: 10px;
    color: var(--muted);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 19px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    color: #35475A;
    font-size: 11px;
    font-weight: 700;
}

.field label span {
    color: #E34D4D;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #DFE6ED;
    border-radius: 7px;
    padding: 11px 13px;
    color: var(--text);
    background: white;
    outline: none;
    font-size: 12px;
    transition: .2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(19,184,166,.09);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #AAB5C0;
}

.field textarea {
    resize: vertical;
    line-height: 1.7;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    margin-bottom: 19px;
}

.field-row.single-field {
    grid-template-columns: minmax(0, 1fr);
}

.field-row[hidden] {
    display: none;
}

.field-row .field {
    margin-bottom: 0;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

.input-unit {
    display: flex;
    border: 1px solid #DFE6ED;
    border-radius: 7px;
    overflow: hidden;
}

.input-unit:focus-within {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(19,184,166,.09);
}

.input-unit input {
    border: none;
    border-radius: 0;
    box-shadow: none !important;
}

.input-unit > span {
    min-width: 48px;
    background: #F4F7F9;
    border-left: 1px solid #DFE6ED;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #68798A;
    font-size: 11px;
    font-weight: 700;
}

/* IMAGE UPLOAD */

.upload-area {
    border: 2px dashed #CBD8E2;
    border-radius: 10px;
    background: #FAFCFD;
    padding: 30px 15px;
    text-align: center;
    cursor: pointer;
    transition: .2s;
}

.upload-area:hover,
.upload-area.dragging {
    border-color: var(--teal);
    background: #F1FBF9;
}

.upload-icon {
    width: 53px;
    height: 53px;
    background: #DFF7F2;
    color: #0D9F91;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    margin: 0 auto 13px;
}

.upload-content strong {
    display: block;
    font-size: 13px;
    color: var(--navy);
    margin-bottom: 6px;
}

.upload-content p {
    color: #748394;
    font-size: 11px;
    margin-bottom: 8px;
}

.upload-content small {
    display: block;
    color: #9AA7B3;
    font-size: 9px;
}

.choose-button {
    margin-top: 17px;
    border: 1px solid var(--teal);
    color: #0D9F91;
    background: white;
    border-radius: 7px;
    padding: 10px 16px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.image-item {
    width: 85px;
    height: 85px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.image-item.featured-image {
    border: 2px solid var(--teal);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    background: #D94C4C;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.image-item .featured-image-button {
    top: auto;
    right: 3px;
    bottom: 3px;
    width: auto;
    height: auto;
    padding: 4px 5px;
    border-radius: 5px;
    background: rgba(16, 28, 58, .92);
    color: white;
    font-size: 8px;
    font-weight: 800;
}

.image-item.featured-image .featured-image-button {
    background: var(--teal);
}

.upload-help,
.video-file-name {
    display: block;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

.video-file-name {
    margin: 12px 0 0;
}

.product-video-preview {
    display: block;
    width: min(100%, 520px);
    max-height: 320px;
    margin-top: 12px;
    border-radius: 9px;
    background: #101c3a;
}

.ad-image-preview {
    display: block;
    width: min(100%, 520px);
    max-height: 260px;
    margin-top: 12px;
    border-radius: 9px;
    object-fit: contain;
    background: #101c3a;
}

.publish-status {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.publish-status a {
    color: var(--teal);
    font-weight: 800;
}

.publish-button:disabled {
    opacity: .65;
    cursor: wait;
}

.publish-button.is-uploading,
.publish-button.is-uploading:hover {
    overflow: hidden;
    isolation: isolate;
    position: relative;
    opacity: 1;
    background: #e8f0ee;
    color: var(--navy);
    cursor: progress;
}

.publish-progress-fill {
    position: absolute;
    z-index: 0;
    inset: 0 auto 0 0;
    width: var(--publish-progress, 0%);
    background: var(--teal);
    transition: width .12s linear;
    pointer-events: none;
}

.publish-button.is-uploading > :not(.publish-progress-fill) {
    position: relative;
    z-index: 1;
}

.publish-button.is-uploading i {
    display: none;
}

.publish-button-percent {
    min-width: 3ch;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* PUBLICATION */

.publication-card > p {
    margin-bottom: 18px;
}

.publication-status {
    padding: 11px;
    background: #F5F7F9;
    border-radius: 7px;
    color: #718091;
    font-size: 10px;
    margin-bottom: 17px;
}

.status-indicator {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #EAA63C;
    border-radius: 50%;
    margin-right: 6px;
}

.publish-button,
.draft-button {
    width: 100%;
    min-height: 44px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s;
}

.publish-button {
    border: none;
    background: var(--teal);
    color: var(--navy);
    margin-bottom: 10px;
}

.publish-button:hover {
    background: #0FA594;
}

.draft-button {
    border: 1px solid #DCE4EB;
    background: white;
    color: #607184;
}

.publish-button i,
.draft-button i {
    margin-right: 7px;
}

.draft-status,
.draft-help {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}



.publication-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding-top: 17px;
    margin-top: 17px;
    border-top: 1px solid #EFF2F5;
    color: #7C8B99;
    font-size: 9px;
    line-height: 1.7;
}

.publication-note i {
    color: #0E9E8F;
    font-size: 14px;
}

/* PREVIEW */

.preview-card {
    padding: 18px;
}

.preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.preview-heading h3 {
    margin: 0;
}

.preview-heading > span {
    font-size: 8px;
    color: #0D9F91;
    font-weight: 800;
    background: #E0F7F2;
    padding: 5px 7px;
    border-radius: 4px;
}

.preview-image {
    width: 100%;
    height: 185px;
    border-radius: 8px;
    background: #F0F4F7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #A2AFBA;
    font-size: 11px;
    overflow: hidden;
}

.preview-image > i {
    font-size: 30px;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-details {
    padding: 15px 2px;
}

.preview-category {
    display: inline-block;
    color: #0D9F91;
    font-size: 9px;
    background: #E0F7F2;
    padding: 5px 8px;
    border-radius: 4px;
    margin-bottom: 9px;
}

.preview-promotion-badge {
    display: inline-block;
    margin: 0 0 9px 5px;
    padding: 5px 8px;
    border-radius: 4px;
    background: #FFF2C2;
    color: #8A5A00;
    font-size: 9px;
    font-weight: 800;
}

.preview-promotion-badge[hidden] {
    display: none;
}

.preview-details h4 {
    font-family: "Manrope", sans-serif;
    color: var(--navy);
    font-size: 14px;
    margin-bottom: 10px;
}

.preview-price {
    display: flex;
    align-items: center;
    gap: 9px;
}

.preview-price strong {
    color: #0D9F91;
    font-size: 16px;
}

.preview-price del {
    color: #A5B0BB;
    font-size: 10px;
}

.preview-details p {
    color: #82909D;
    font-size: 10px;
    line-height: 1.7;
    margin-top: 10px;
    overflow-wrap: anywhere;
}

.preview-footer {
    border-top: 1px solid #EFF2F5;
    padding-top: 13px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #718091;
    font-size: 9px;
}

.preview-footer i {
    color: #0D9F91;
}

.preview-stock {
    margin-left: auto;
}

/* TIPS */

.tips-card {
    background: #EAF8F5;
    border: 1px solid #D5EFE9;
    border-radius: 11px;
    padding: 18px;
}

.tips-title {
    color: #087E72;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 13px;
}

.tips-title i {
    margin-right: 7px;
}

.tips-card ul {
    padding-left: 17px;
}

.tips-card li {
    color: #587D79;
    font-size: 10px;
    line-height: 1.8;
    margin-bottom: 6px;
}

/* FOOTER */

.footer {
    display: flex;
    justify-content: space-between;
    padding: 25px 0 5px;
    color: #9AA6B2;
    font-size: 10px;
}

/* RESPONSIVE */

.overlay {
    display: none;
}

@media (max-width: 1150px) {
    .sidebar {
        width: 225px;
        min-width: 225px;
    }

    .content {
        padding: 25px 20px;
    }

    .topbar {
        padding: 0 20px;
    }

    .form-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 15px;
    }

    .form-card {
        padding: 18px;
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        z-index: 1000;
        top: 0;
        bottom: 0;
        left: -270px;
        width: 255px;
        min-width: 255px;
        overflow-y: auto;
        transition: left .3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .overlay.visible {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(10,25,40,.5);
        z-index: 999;
    }

    .menu-toggle {
        display: block;
    }

    .form-layout {
        grid-template-columns: 1fr;
    }

    .form-aside {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .tips-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .topbar {
        height: 75px;
        padding: 0 13px;
    }

    .topbar h1 {
        font-size: 16px;
    }

    .breadcrumb {
        font-size: 8px;
    }

    .top-right {
        gap: 10px;
    }

    .user > div:last-child {
        display: none;
    }

    .content {
        padding: 22px 13px;
    }

    .page-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-intro h2 {
        font-size: 20px;
    }

    .page-intro p {
        line-height: 1.6;
    }

    .back-button {
        width: 100%;
        text-align: center;
    }

    .form-card {
        padding: 16px 13px;
    }

    .section-heading h3 {
        font-size: 13px;
    }

    .section-heading p {
        font-size: 9px;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .field label {
        font-size: 11px;
    }

    .field input,
    .field select,
    .field textarea {
        font-size: 12px;
    }

    .textarea-footer {
        flex-direction: column;
    }

    .form-aside {
        display: flex;
    }

    .preview-image {
        height: 210px;
    }

    .footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}