/**
* 2007-2025 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.txt
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2025 PrestaShop SA
* @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/

/* Conteneur principal */
.wk-crowdfunding-milestones {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* En-tête */
.wk-crowdfunding-milestones h3 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Jauge de progression */n.wk-crowdfunding-progress {
    margin-bottom: 30px;
    position: relative;
}

.wk-crowdfunding-progress .progress-percent {
    text-align: center;
    font-size: 2.2em;
    font-weight: 800;
    color: #27ae60;
    margin-bottom: 10px;
    font-family: 'Raleway', sans-serif;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.wk-crowdfunding-progress .progress-container {
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.wk-crowdfunding-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 15px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

/* Effet de vague sur la barre de progression */
.wk-crowdfunding-progress .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: progressWave 1s linear infinite;
    opacity: 0.6;
}

@keyframes progressWave {
    0% { background-position: 0 0; }
    100% { background-position: 30px 0; }
}

/* Marqueurs de paliers */
.wk-crowdfunding-progress .threshold-marker {
    position: absolute;
    height: 40px;
    width: 2px;
    background: #7f8c8d;
    top: -5px;
    transform: translateX(-50%);
    z-index: 2;
}

.wk-crowdfunding-progress .threshold-marker::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #7f8c8d;
    border-radius: 50%;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
}

.wk-crowdfunding-progress .threshold-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8em;
    font-weight: 600;
    color: #7f8c8d;
    white-space: nowrap;
}

/* Conteneur des récompenses */
.wk-crowdfunding-milestones-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

/* Carte de récompense */
.wk-milestone-card {
    flex: 1 1 300px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.wk-milestone-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Badge pour les récompenses atteintes */
.wk-milestone-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #27ae60;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Image de la récompense */
.wk-milestone-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

/* Contenu de la carte */
.wk-milestone-content {
    padding: 15px;
}

.wk-milestone-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.wk-milestone-threshold {
    display: inline-block;
    background: #f1c40f;
    color: #000;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 10px;
}

.wk-milestone-description {
    color: #7f8c8d;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Animation pour les récompenses débloquées */
@keyframes rewardUnlock {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.wk-milestone-achieved {
    border: 2px solid #27ae60;
    animation: rewardUnlock 0.6s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .wk-crowdfunding-milestones-container {
        flex-direction: column;
    }

    .wk-milestone-card {
        flex: 1 1 auto;
    }

    .wk-crowdfunding-progress .progress-percent {
        font-size: 1.8em;
    }
}

/* ========================================
   STYLES POUR LES PALIERS DE RÉCOMPENSES
   ======================================== */

/* Section des récompenses */
.crowdfunding-milestones-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.crowdfunding-milestones-section h2 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.milestones-intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1em;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Timeline des récompenses */
.milestones-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

/* Carte de palier */
.milestone-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.milestone-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

.milestone-item.unlocked::before {
    background: linear-gradient(180deg, #2ecc71, #27ae60);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.milestone-item.next::before {
    background: linear-gradient(180deg, #f39c12, #e67e22);
    animation: pulse 2s ease-in-out infinite;
}

.milestone-item.locked::before {
    background: #bdc3c7;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.milestone-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* En-tête du palier */
.milestone-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.milestone-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.milestone-item.unlocked .milestone-icon {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.milestone-item.next .milestone-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    animation: iconPulse 2s ease-in-out infinite;
}

.milestone-item.locked .milestone-icon {
    background: #ecf0f1;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.milestone-icon i {
    font-size: 28px;
    color: #7f8c8d;
}

.milestone-item.unlocked .milestone-icon i {
    color: white;
}

.milestone-item.next .milestone-icon i {
    color: white;
}

.milestone-threshold {
    display: flex;
    flex-direction: column;
}

.threshold-value {
    font-size: 1.8em;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1;
}

.milestone-item.unlocked .threshold-value {
    color: #27ae60;
}

.milestone-item.next .threshold-value {
    color: #f39c12;
}

.threshold-label {
    font-size: 0.85em;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenu du palier */
.milestone-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
}

.milestone-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.milestone-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.milestone-item:hover .milestone-image img {
    transform: scale(1.05);
}

.milestone-details {
    flex: 1;
}

.milestone-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.milestone-description {
    color: #7f8c8d;
    font-size: 0.95em;
    line-height: 1.6;
}

/* Badges de statut */
.milestone-status {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.unlocked-badge {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.unlocked-badge i {
    font-size: 18px;
}

.next-badge {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Encart pour le prochain palier */
.next-milestone-callout {
    margin-top: 30px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    animation: calloutGlow 3s ease-in-out infinite;
}

@keyframes calloutGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3); }
    50% { box-shadow: 0 6px 25px rgba(243, 156, 18, 0.5); }
}

.callout-content h4 {
    color: white;
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.callout-content p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.05em;
    margin: 0;
}

/* Responsive pour les paliers */
@media (max-width: 768px) {
    .crowdfunding-milestones-section {
        padding: 20px;
    }

    .milestone-content {
        flex-direction: column;
    }

    .milestone-image {
        width: 100%;
        height: 200px;
    }

    .milestone-status {
        position: static;
        margin-top: 15px;
        width: fit-content;
    }

    .milestone-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .threshold-value {
        font-size: 1.5em;
    }
}
