/**
 * Styles pour le système de partage social
 * Fonctionnalité modulaire et indépendante
 */

/* Bouton de partage principal */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
}

.share-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-1px);
}

.share-btn:active {
    transform: translateY(0);
}

.share-btn--small {
    padding: 6px 12px;
    font-size: 12px;
}

.share-btn .share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn .share-text {
    margin-left: 8px;
}

/* Dropdown de partage */
.share-dropdown {
    position: relative;
    display: inline-block;
}

.share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 280px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.share-menu--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.share-menu__content {
    padding: 16px;
}

.share-menu__header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.share-menu__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

.share-menu__platforms {
    display: grid;
    gap: 8px;
}

/* Boutons des plateformes */
.share-platform-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 12px;
}

.share-platform-btn:hover {
    background: var(--platform-color, #f8f9fa);
    border-color: var(--platform-color, #dee2e6);
    color: white;
    transform: translateX(4px);
}

.share-platform-btn:active {
    transform: translateX(2px);
}

.share-platform-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.share-platform-name {
    flex: 1;
    text-align: left;
}

/* Couleurs spécifiques des plateformes */
.share-platform-btn[data-share-platform="linkedin"]:hover {
    background: #0077b5;
    border-color: #0077b5;
}

.share-platform-btn[data-share-platform="twitter"]:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.share-platform-btn[data-share-platform="facebook"]:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.share-platform-btn[data-share-platform="whatsapp"]:hover {
    background: #25d366;
    border-color: #25d366;
}

.share-platform-btn[data-share-platform="email"]:hover {
    background: #6b7280;
    border-color: #6b7280;
}

.share-platform-btn[data-share-platform="copy"]:hover {
    background: #6b7280;
    border-color: #6b7280;
}

/* Notifications de partage */
.share-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.share-notification--success {
    border-left: 4px solid #10b981;
}

.share-notification--error {
    border-left: 4px solid #ef4444;
}

.share-notification--info {
    border-left: 4px solid #3b82f6;
}

.share-notification__content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.share-notification__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.share-notification--success .share-notification__icon {
    background: #10b981;
}

.share-notification--error .share-notification__icon {
    background: #ef4444;
}

.share-notification--info .share-notification__icon {
    background: #3b82f6;
}

.share-notification__message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .share-menu {
        right: auto;
        left: 0;
        min-width: 260px;
    }
    
    .share-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .share-btn .share-text {
        display: none;
    }
    
    .share-btn--small .share-text {
        display: none;
    }
}

/* Intégration avec les cartes d'offres */
.offer-card .share-btn {
    background: transparent;
    border: none;
    padding: 8px;
    color: #6b7280;
}

.offer-card .share-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.offer-list-item .share-btn {
    background: transparent;
    border: none;
    padding: 6px;
    color: #9ca3af;
}

.offer-list-item .share-btn:hover {
    background: #f9fafb;
    color: #6b7280;
}

/* Styles spécifiques pour la page de détail d'offre */
.share-btn[style*="background"] {
    transition: all 0.2s ease;
}

.share-btn[style*="background"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.share-btn[style*="background"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive pour les boutons de partage sur la page de détail */
@media (max-width: 640px) {
    .share-btn[style*="background"] {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    
    .share-btn[style*="background"] span:last-child {
        display: none;
    }
    
    .share-btn[style*="background"] svg {
        margin-right: 0;
    }
}

/* Animation d'entrée */
@keyframes shareMenuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-menu--open {
    animation: shareMenuSlideIn 0.2s ease;
}

/* États de focus pour l'accessibilité */
.share-btn:focus,
.share-platform-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .share-btn {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .share-btn:hover {
        background: #4b5563;
        border-color: #6b7280;
    }
    
    .share-menu {
        background: #1f2937;
        border-color: #374151;
    }
    
    .share-menu__title {
        color: #f9fafb;
    }
    
    .share-platform-btn {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .share-platform-btn:hover {
        color: white;
    }
    
    .share-notification {
        background: #1f2937;
    }
    
    .share-notification__message {
        color: #f3f4f6;
    }
}
/* St
yles spécifiques pour les boutons de partage dans la page de détail */
.share-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-buttons-container .share-platform-btn {
    transition: all 0.2s ease;
    border-radius: 8px;
    font-weight: 500;
}

.share-buttons-container .share-platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.share-buttons-container .share-platform-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive pour les boutons de partage dans la page de détail */
@media (max-width: 640px) {
    .share-buttons-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .share-buttons-container .share-platform-btn {
        font-size: 12px;
        padding: 10px 12px;
        justify-content: center;
    }
    
    .share-buttons-container .share-platform-btn svg {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }
}

@media (max-width: 480px) {
    .share-buttons-container .share-platform-btn span:last-child {
        display: none;
    }
    
    .share-buttons-container .share-platform-btn svg {
        margin-right: 0;
    }
}