/* Gallazini Gift Card - Design Moderne Noir/Orange/Blanc */

* {
    box-sizing: border-box;
}

.giftcard-buy-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Titre principal */
.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

/* Layout 2 colonnes */
.giftcard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

/* Colonne gauche - Sélection */
.giftcard-selection {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #f5f5f5;
}

/* Colonne droite - Récapitulatif */
.giftcard-summary {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    padding: 40px;
    color: white;
    position: sticky;
    top: 220px;
    height: fit-content;
    box-shadow: 0 8px 30px rgba(255, 107, 0, 0.3);
}

/* Alert info */
.alert-info {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border: none;
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.alert-info i {
    font-size: 28px;
}

/* Section titles */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border-radius: 2px;
}

/* Boutons de montant */
.amount-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.amount-option {
    position: relative;
    display: block;
    cursor: pointer;
    margin: 0;
}

.amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.amount-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.amount-option:hover span {
    border-color: #ff6b00;
    background: #fff5ed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

.amount-option input[type="radio"]:checked+span {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
    transform: scale(1.05);
}

/* Montant personnalisé */
.custom-amount-section {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #e5e5e5;
}

.custom-amount-section label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.custom-amount-wrapper {
    position: relative;
}

.custom-amount-wrapper::before {
    content: '€';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 700;
    color: #ff6b00;
}

.custom-amount-section input[type="number"] {
    width: 100%;
    height: 60px;
    padding: 0 50px 0 20px;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    background: white;
    transition: all 0.3s;
    color: #1a1a1a;
}

.custom-amount-section input[type="number"]:focus {
    outline: none;
    border-color: #ff6b00;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
}

/* Section cadeau */
.gift-toggle {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.gift-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.gift-toggle-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gift-toggle input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: white;
}

.gift-toggle label {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

/* Champs cadeau */
#gift_fields {
    background: white;
    border: 2px solid #ff6b00;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#gift_fields h5 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    background: white;
    transition: all 0.3s;
    color: #1a1a1a;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b00;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-text {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

.text-danger {
    color: #ff6b00;
}

/* Colonne droite - Récapitulatif */
.summary-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: white;
}

.summary-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 107, 0, 0.3);
}

.summary-amount {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
    margin: 20px 0;
    color: #ff6b00;
    text-shadow: 0 2px 10px rgba(255, 107, 0, 0.5);
}

.summary-info {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.summary-info:last-child {
    border-bottom: none;
}

.summary-info strong {
    font-weight: 600;
    color: white;
}

/* Bouton principal */
.btn-add-cart {
    width: 100%;
    height: 70px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.6);
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
}

.btn-add-cart i {
    font-size: 28px;
}

/* CGU */
.cgu-text {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 20px;
}

.cgu-text a {
    color: #ff6b00;
    text-decoration: underline;
    font-weight: 600;
}

.cgu-text a:hover {
    color: #ff8c00;
}

/* Messages d'erreur */
.alert-danger {
    background: #fff5f5;
    border: 2px solid #ff6b00;
    color: #1a1a1a;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 992px) {
    .giftcard-layout {
        grid-template-columns: 1fr;
    }

    .giftcard-summary {
        position: static;
    }

    .amount-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {

    .giftcard-selection,
    .giftcard-summary {
        padding: 25px;
    }

    .amount-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .amount-option span {
        height: 60px;
        font-size: 18px;
    }

    .summary-amount {
        font-size: 36px;
    }

    .page-header h1 {
        font-size: 28px;
    }
}

/* Animation d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.giftcard-layout {
    animation: fadeInUp 0.6s ease;
}

/* Séparateur entre code promo et bon cadeau */
.giftcard-form-separator {
    text-align: center;
    margin: 20px 0 15px 0;
    position: relative;
}

.giftcard-form-separator span {
    background: #fff;
    padding: 0 15px;
    color: #7a7a7a;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.giftcard-form-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e5e5;
    transform: translateY(-50%);
}

/* Input bon cadeau */
.giftcard-input-group {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
}

.giftcard-input-group input {
    flex: 1;
    text-transform: uppercase;
}

.giftcard-help {
    display: block;
    color: #7a7a7a;
    font-size: 12px;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* Bon cadeau appliqué */
.giftcard-applied {
    margin: 15px 0 !important;
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    position: relative;
}

.giftcard-applied-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.giftcard-applied-content i {
    font-size: 24px;
    color: #28a745;
    flex-shrink: 0;
}

.giftcard-applied .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    opacity: 0.7;
}

.giftcard-applied .close:hover {
    opacity: 1;
    cursor: pointer;
}

/* ========================================
   BOUTON FLOTTANT AVEC TOOLTIP - STYLE SCREENSHOT
   ======================================== */

/* Conteneur principal */
.giftcard-floating-wrapper {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    z-index: 999999 !important;
}

/* Bulle tooltip blanche */
.giftcard-tooltip {
    background: white !important;
    color: #333 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    position: relative !important;
    white-space: nowrap !important;
}

/* Flèche du tooltip */
.giftcard-tooltip::after {
    content: '' !important;
    position: absolute !important;
    right: -6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 6px solid white !important;
    border-top: 6px solid transparent !important;
    border-bottom: 6px solid transparent !important;
}

/* Bouton carré blanc */
.giftcard-floating-box {
    background: white !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
}

.giftcard-floating-box:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    text-decoration: none !important;
}

/* Icône cadeau rouge */
.giftcard-floating-box svg {
    width: 28px !important;
    height: 28px !important;
    color: #ff3b30 !important;
    flex-shrink: 0 !important;
}

/* Texte "Offrir" */
.giftcard-floating-box span {
    color: #333 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

/* SUPPRIMER L'ANCIEN STYLE INCORRECT */
.giftcard-floating-btn {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .giftcard-tooltip {
        display: none !important;
    }

    .giftcard-floating-wrapper {
        bottom: 16px !important;
        right: 16px !important;
    }

    .giftcard-floating-box {
        width: 56px !important;
        height: 56px !important;
    }

    .giftcard-floating-box svg {
        width: 26px !important;
        height: 26px !important;
    }

    .giftcard-floating-box span {
        font-size: 10px !important;
    }
}