/* shared-card.css - Charte graphique des cartes de visite Kiki Traiteur */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
    --primary-red: #E52424;
    --primary-red-hover: #C81E1E;
    --button-violet: #6C5CE7;
    --button-violet-hover: #5A4AD1;
    --text-magenta: #9D178D;
    --text-magenta-hover: #801072;
    --bg-gray: #F4F6F9;
    --text-dark: #2D3748;
    --text-light-grey: #718096;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --border-radius-card: 24px;
    --border-radius-btn: 10px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px 15px;
}

/* Card Container */
.card-container {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: var(--border-radius-card);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    padding: 24px;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.card-header {
    background-color: var(--primary-red);
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
    border-radius: 18px;
    padding: 22px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M10 10 Q 50 50, 90 10' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='2'/%3E%3C/svg%3E") repeat;
    opacity: 0.7;
    pointer-events: none;
}

/* Full Width Banner Header */
.card-header-banner {
    margin: -24px -24px 24px -24px;
    width: calc(100% + 48px);
    overflow: hidden;
    display: block;
    background-color: var(--primary-red);
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Avatar / Logo Container */
.logo-container {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 2;
}

.logo-container svg {
    width: 82%;
    height: 82%;
}

/* User Info */
.user-info {
    display: flex;
    flex-direction: column;
    color: #ffffff;
    z-index: 2;
}

.user-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.user-title {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 3px;
}

.user-company {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.8;
    letter-spacing: 1px;
}

/* Primary Button (Télécharger) */
.btn-primary {
    width: 100%;
    background-color: var(--button-violet);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-btn);
    padding: 14px 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.25);
}

.btn-primary:hover {
    background-color: var(--button-violet-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.35);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Info Details Section */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.info-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    color: var(--text-light-grey);
    opacity: 0.85;
}

.info-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.info-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.info-label {
    font-size: 0.78rem;
    color: var(--text-light-grey);
    text-transform: capitalize;
    margin-bottom: 2px;
    font-weight: 500;
}

.info-value {
    font-family: 'Outfit', sans-serif;
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-magenta);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
    word-break: break-all;
}

a.info-value:hover {
    color: var(--text-magenta-hover);
}

/* Specific styling for Address and secondary button */
.address-value {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.btn-secondary {
    align-self: flex-start;
    background: transparent;
    border: 1px solid var(--button-violet);
    color: var(--button-violet);
    border-radius: var(--border-radius-btn);
    padding: 8px 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background-color: rgba(108, 92, 231, 0.05);
    border-color: var(--button-violet-hover);
    color: var(--button-violet-hover);
}

/* Footer Section */
.card-footer {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-light-grey);
    letter-spacing: 0.5px;
    gap: 4px;
    opacity: 0.8;
}

.card-footer svg {
    width: 12px;
    height: 12px;
    fill: var(--primary-red);
}

.card-footer a {
    color: inherit;
    text-decoration: underline;
}

/* Toast Message */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #2D3748;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    z-index: 100;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.toast svg {
    color: #48BB78;
    width: 16px;
    height: 16px;
}

/* QR Modal Styles */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 200;
}

.qr-modal.show {
    opacity: 1;
    visibility: visible;
}

.qr-content {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: var(--card-shadow);
}

.qr-title {
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.qr-subtitle {
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-light-grey);
}

.qr-image-wrapper img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
}

.btn-close {
    background: var(--primary-red);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-btn);
    cursor: pointer;
    font-weight: 500;
    transition: background var(--transition-speed) ease;
}

.btn-close:hover {
    background: var(--primary-red-hover);
}
