
/* ===== Checkout Header partagé ===== */
.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    backdrop-filter: blur(10px);
    animation: headerSlideDown 0.6s ease-out;
}

@keyframes headerSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-btn,
.delete-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 18px;
    position: relative;
    overflow: hidden;
}

.back-btn {
    background: #bc010115;
    color: #bc0101;
}

.back-btn::before,
.delete-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.back-btn::before {
    background: #bc010130;
}

.back-btn:hover::before {
    width: 100px;
    height: 100px;
}

.back-btn:hover {
    background: #bc0101;
    color: #ffffff;
    transform: scale(1.15);
    box-shadow: 0 8px 20px #bc010140;
}

.delete-btn {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

.delete-btn::before {
    background: rgba(231, 76, 60, 0.3);
}

.delete-btn:hover::before {
    width: 100px;
    height: 100px;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.5);
}

.delete-btn:active {
    transform: scale(1.05) rotate(5deg);
}

.delete-btn:disabled,
.delete-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.delete-btn:disabled::before,
.delete-btn[disabled]::before {
    display: none;
}

.header-info {
    flex: 1;
    text-align: center;
}

.header-info h1 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 5px 0;
    background: linear-gradient(135deg, #bc0101 0%, #a80000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-info .resto-name {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-info .resto-name.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(188, 1, 1, 0.08);
}

.header-info .resto-name.clickable:hover {
    background: rgba(188, 1, 1, 0.15);
    transform: translateY(-1px);
}

.header-info .resto-name.clickable i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.header-info .resto-name.clickable:hover i {
    transform: translateY(2px);
}

/* Tablette et appareils moyens (iPad Air, Surface Pro, etc.) */
@media (min-width: 768px) and (max-width: 1200px) {
    .checkout-header {
        padding: 20px;
        gap: 15px;
        flex-wrap: nowrap;
    }

    .back-btn,
    .delete-btn {
        width: 50px;
        height: 50px;
        font-size: 19px;
        flex-shrink: 0;
    }

    .header-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .header-info h1 {
        font-size: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        width: 100%;
    }

    .header-info .resto-name {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        width: 100%;
    }
}

/* iPad Air spécifique (820px) et Surface Pro 7 (912px) */
@media (min-width: 820px) and (max-width: 920px) {
    .checkout-header {
        padding: 22px;
        gap: 18px;
    }

    .back-btn,
    .delete-btn {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .header-info h1 {
        font-size: 22px;
    }

    .header-info .resto-name {
        font-size: 14px;
    }
}

/* Mobile : Version compacte */
@media (max-width: 767px) {
    .checkout-header {
        padding: 15px;
        gap: 10px;
    }

    .back-btn,
    .delete-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .header-info h1 {
        font-size: 18px;
    }

    .header-info .resto-name {
        font-size: 12px;
    }
}

/* Petit mobile : Version très compacte */
@media (max-width: 480px) {
    .checkout-header {
        padding: 12px;
    }

    .back-btn,
    .delete-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .header-info h1 {
        font-size: 16px;
    }

    .header-info .resto-name {
        font-size: 11px;
    }
}
