/* =============================================
   GLAESENER-BETZ - BON DE LIVRAISON
   Feuille de styles principale
   ============================================= */

:root {
    /* Charte graphique Glaesener-Betz */
    --primary: #0B4595;
    --primary-dark: #083670;
    --primary-light: #e8eef6;
    --accent: #F6951C;
    --accent-light: #fef3e2;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #F6951C;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom);
}

.hidden {
    display: none !important;
}

/* =============================================
   LOGIN
   ============================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 32px 24px;
    width: 100%;
    max-width: 340px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo img {
    max-width: 240px;
    height: auto;
}

.login-card input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    transition: all 0.2s;
    font-family: inherit;
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:active {
    transform: scale(0.98);
    background: var(--primary-dark);
}

.login-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.login-error {
    color: var(--danger);
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
}

/* =============================================
   HEADER
   ============================================= */
.header {
    background: var(--primary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-logo img {
    height: 40px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-btn svg {
    width: 20px;
    height: 20px;
    color: var(--white);
}

.cart-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--white);
    transition: all 0.2s;
}

.logout-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

/* =============================================
   CONTAINER
   ============================================= */
.container {
    padding: 16px;
    max-width: 500px;
    margin: 0 auto;
    padding-bottom: 100px;
}

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* =============================================
   INPUTS
   ============================================= */
.input-field {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-family: inherit;
    background: var(--white);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

textarea.input-field {
    min-height: 80px;
    resize: vertical;
}

/* Style d'erreur pour les inputs */
.input-field.input-error {
    border-color: var(--danger);
    background-color: #fef2f2;
}

.input-field.input-error:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Message d'erreur BL */
.bl-error-msg {
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
    padding-left: 2px;
}

/* Message d'erreur générique */
.input-error-msg {
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
    padding-left: 2px;
}

/* Style d'erreur pour les inputs estimation */
.estimation-input.input-error {
    border-color: var(--danger);
    background-color: #fef2f2;
}

.estimation-input.input-error:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* =============================================
   ACCORDÉON ARTICLES
   ============================================= */
.accordion {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--white);
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--gray-100);
}

.accordion-header:last-child {
    border-bottom: none;
}

.accordion-header:active {
    background: var(--gray-50);
}

.accordion-header.active {
    background: var(--primary-light);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.accordion-count {
    font-size: 12px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 12px;
}

.accordion-arrow {
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    transition: transform 0.3s;
}

.accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--gray-50);
}

.accordion-content.open {
    max-height: 20000px;
}

.accordion-inner {
    padding: 8px;
}

/* =============================================
   ARTICLE ITEMS
   ============================================= */
.article-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border: 1.5px solid transparent;
}

.article-item:active {
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.article-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--gray-100);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-img:active {
    transform: scale(0.95);
}

.article-info {
    flex: 1;
    min-width: 0;
}

.article-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.article-desc {
    font-size: 13px;
    color: var(--gray-600);
    display: -webkit-box;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.article-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 2px;
}

.btn-add {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-add svg {
    width: 18px;
    height: 18px;
}

.btn-add:active {
    transform: scale(0.9);
    background: var(--primary-dark);
}

.btn-add.added {
    background: var(--success);
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    50% {
        transform: scale(1.15);
    }
}

/* =============================================
   BOUTONS TORSION L/R
   ============================================= */
.torsion-pair-item {
    align-items: center;
}

.torsion-btns {
    display: flex;
    flex-direction: row;
    gap: 6px;
    margin-top: 6px;
}

.btn-torsion {
    min-width: 44px;
    height: 30px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    padding: 0 8px;
}

.btn-torsion-left {
    background: var(--primary);
}

.btn-torsion-right {
    background: var(--accent);
}

.btn-torsion:active:not(:disabled) {
    transform: scale(0.93);
}

.btn-torsion.added {
    background: var(--success) !important;
    animation: pulse 0.3s ease;
}

.btn-torsion-disabled {
    background: var(--gray-200) !important;
    color: var(--gray-400) !important;
    cursor: not-allowed;
}

/* Style spécial pour les articles hors-standard */
.hors-standard-item {
    border: 2px dashed var(--accent);
    background: rgba(255, 107, 53, 0.05);
}

/* Grille 3 dimensions pour modale hors-standard */
.hs-dimension-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.hs-dimension-item {
    display: flex;
    flex-direction: column;
}

@media (max-width: 400px) {
    .hs-dimension-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lightboxIn 0.3s ease;
}

@keyframes lightboxIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    background: var(--white);
}

.lightbox-info {
    margin-top: 16px;
    text-align: center;
    color: var(--white);
}

.lightbox-code {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 4px;
}

.lightbox-desc {
    font-size: 14px;
    color: var(--gray-300);
    max-width: 300px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:active {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
}

/* =============================================
   CUSTOM ARTICLE
   ============================================= */
.custom-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:active {
    background: var(--gray-200);
    transform: scale(0.98);
}

.custom-qty-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.custom-qty-input {
    flex: 1;
}

.custom-qty-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 6px;
    display: block;
}

.custom-qty-field {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
}

.custom-qty-field:focus {
    outline: none;
    border-color: var(--primary);
}

.custom-unit-select {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    background: var(--white);
    cursor: pointer;
}

.custom-unit-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* =============================================
   PANIER MODAL
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
}

.modal-overlay.open {
    display: block;
}

.modal-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 201;
}

.modal-overlay.open+.modal-panel,
.modal-panel.open {
    transform: translateY(0);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-close svg {
    width: 18px;
    height: 18px;
    color: var(--gray-500);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    flex-shrink: 0;
}

/* =============================================
   PANIER ITEMS
   ============================================= */
.panier-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-400);
}

.panier-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.panier-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    gap: 12px;
}

.panier-item.custom {
    background: var(--accent-light);
    border: 1px dashed var(--accent);
}

.panier-item-info {
    flex: 1;
    min-width: 0;
}

.panier-item-code {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.panier-item-desc {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panier-item-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-top: 2px;
}

.panier-qty {
    font-size: 12px;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
}

.panier-qty-dimension {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.panier-qty-m {
    background: var(--accent);
    color: var(--white);
}

.panier-qty-m2 {
    background: #8b5cf6;
    color: var(--white);
}

.panier-dimensions {
    font-size: 10px;
    color: var(--gray-400);
    margin-top: 2px;
}

.btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--danger-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-remove svg {
    width: 16px;
    height: 16px;
    color: var(--danger);
}

.btn-remove:active {
    background: var(--danger);
}

.btn-remove:active svg {
    color: var(--white);
}

.panier-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.panier-total-label {
    font-size: 14px;
    color: var(--gray-600);
}

.panier-total-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:active {
    transform: scale(0.98);
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.btn-vider {
    width: 100%;
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-top: 8px;
}

.btn-vider:active {
    background: var(--danger-light);
}

/* =============================================
   ESTIMATION TEMPS
   ============================================= */
.estimation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.estimation-item {
    display: flex;
    flex-direction: column;
}

.estimation-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.estimation-input {
    padding: 10px 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.estimation-input:focus {
    outline: none;
    border-color: var(--primary);
}

.personnes-selector {
    display: flex;
    gap: 8px;
}

.personnes-btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.personnes-btn.selected {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.personnes-btn:active {
    transform: scale(0.98);
}

.temps-total {
    margin-top: 12px;
    padding: 10px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

/* =============================================
   NACELLE
   ============================================= */
.nacelle-selector {
    display: flex;
    gap: 8px;
}

.nacelle-btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.nacelle-btn.selected-success {
    background: var(--success-light);
    color: var(--success);
    border-color: var(--success);
}

.nacelle-btn.selected-danger {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}

/* =============================================
   PHOTOS
   ============================================= */
.photos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.photo-count {
    font-size: 12px;
    color: var(--gray-500);
}

.photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.photo-item {
    position: relative;
    width: 72px;
    height: 72px;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.photo-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: var(--danger);
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.photo-add {
    width: 72px;
    height: 72px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.photo-add:active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.photo-add-icon {
    font-size: 20px;
}

.photo-add-label {
    font-size: 10px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* =============================================
   NOTIFICATION
   ============================================= */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-800);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

/* =============================================
   MODAL DIMENSIONS (m et m²)
   ============================================= */
.dimension-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 250;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dimension-modal.open {
    display: flex;
}

.dimension-modal-content {
    background: var(--white);
    border-radius: var(--radius);
    max-width: calc(100% - 40px);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.dimension-modal-header {
    padding: 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.dimension-modal-code {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.dimension-modal-desc {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.4;
}

.dimension-modal-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    margin-top: 10px;
}

.dimension-modal-body {
    padding: 24px;
}

.dimension-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dimension-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dimension-input-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    min-width: 70px;
}

.dimension-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 20px;
    width: 200px;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: all 0.2s;
}

.dimension-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.dimension-unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-500);
    min-width: 30px;
}

.dimension-price-preview {
    margin-top: 20px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    text-align: center;
}

.dimension-calc-row {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.dimension-price-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.dimension-price-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.dimension-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
}

.dimension-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.dimension-btn:active {
    transform: scale(0.98);
}

.dimension-btn-cancel {
    background: var(--white);
    color: var(--gray-600);
    border: 1.5px solid var(--gray-300);
}

.dimension-btn-add {
    background: var(--accent);
    color: var(--white);
}

.dimension-btn-add:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

/* =============================================
   BADGES CONDITIONNEMENT
   ============================================= */
.badge-unit {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
}

.badge-unit-m {
    background: var(--accent);
    color: var(--white);
}

.badge-unit-m2 {
    background: #8b5cf6;
    color: var(--white);
}

/* =============================================
   RECHERCHE HÖRMANN
   ============================================= */
.hormann-search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.hormann-search-input-wrap {
    flex: 1;
    position: relative;
}

.hormann-search-input-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

.hormann-search-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    font-size: 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    background: var(--white);
}

.hormann-search-input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-search-hormann {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-search-hormann:active {
    transform: scale(0.95);
    background: var(--primary-dark);
}

.btn-search-hormann:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.btn-search-hormann svg {
    width: 22px;
    height: 22px;
    color: var(--white);
}

/* =============================================
   LOADER
   ============================================= */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   SEARCH BOX
   ============================================= */
.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    font-size: 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    background: var(--white);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--gray-200);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-clear svg {
    width: 14px;
    height: 14px;
    color: var(--gray-500);
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--gray-400);
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.empty-text {
    font-size: 14px;
}

/* =============================================
   HÖRMANN RESULTS
   ============================================= */
.hormann-results {
    margin-top: 12px;
    min-height: 80px;
}

.hormann-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 2px dashed var(--gray-200);
}

.hormann-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: var(--gray-500);
    gap: 12px;
}

.hormann-loading .spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.hormann-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--danger-light);
    border-radius: var(--radius-sm);
    color: var(--danger);
    text-align: center;
    gap: 8px;
}

.hormann-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    text-align: center;
    gap: 8px;
}

.hormann-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--gray-500);
}

.hormann-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hormann-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--gray-100);
}

.hormann-item.historical {
    opacity: 0.7;
    background: var(--gray-50);
}

.hormann-item.unavailable {
    opacity: 0.5;
}

.hormann-item-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--gray-100);
    flex-shrink: 0;
    cursor: pointer;
}

.hormann-item-info {
    flex: 1;
    min-width: 0;
}

.hormann-item-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.hormann-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--gray-400);
    color: var(--white);
}

.hormann-item-desc {
    font-size: 13px;
    color: var(--gray-600);
    display: -webkit-box;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.hormann-item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 2px;
}

/* =============================================
   PAGINATION
   ============================================= */
.hormann-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

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

.pagination-btn:not(:disabled):active {
    background: var(--primary-light);
}

.pagination-numbers {
    display: flex;
    gap: 4px;
}

.pagination-num {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-num.active {
    background: var(--primary);
    color: var(--white);
}

.pagination-num:not(.active):active {
    background: var(--gray-100);
}

.pagination-dots {
    display: flex;
    align-items: center;
    padding: 0 4px;
    color: var(--gray-400);
}