@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

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

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.currency-container {
    max-width: 650px;
    margin: 3rem auto;
    padding: 2.8rem;
    background: var(--card-bg);
    border-radius: var(--currency-border-radius-lg);
    box-shadow: var(--currency-shadow-md),
                0 40px 80px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    transition: var(--currency-transition);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.currency-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, 
                rgba(var(--currency-primary-rgb), 0.08),
                transparent 60%);
    z-index: 0;
}

.currency-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
                rgba(255, 255, 255, 0.1) 0%,
                transparent 40%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.currency-container:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: var(--currency-shadow-lg),
                0 60px 100px rgba(0, 0, 0, 0.07);
}

.currency-container:hover::after {
    opacity: 1;
}

.currency-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.8rem;
    position: relative;
    padding-bottom: 1.4rem;
    z-index: 2;
}

.currency-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
                transparent,
                rgba(var(--border-color-rgb, 200, 200, 200), 0.2),
                transparent);
}

.currency-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.5px;
    position: relative;
    background: linear-gradient(120deg, 
                var(--text-color), 
                var(--currency-primary),
                var(--text-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

.currency-title::before {
    content: '';
    position: absolute;
    top: -8px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, 
                rgba(var(--currency-primary-rgb), 0.6), 
                transparent 70%);
    border-radius: 50%;
    filter: blur(8px);
    z-index: -1;
}

.currency-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--currency-primary);
    padding: 0.5rem 1rem;
    background: rgba(var(--currency-primary-rgb), 0.08);
    border-radius: 30px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(var(--currency-primary-rgb), 0.1);
    border: 1px solid rgba(var(--currency-primary-rgb), 0.15);
    transition: all 0.3s ease;
}

.currency-date:hover {
    background: rgba(var(--currency-primary-rgb), 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--currency-primary-rgb), 0.2);
}

.currency-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    z-index: 2;
}

.currency-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
    transition: all 0.3s ease;
}

.currency-input-group:hover {
    transform: translateX(4px);
}

.currency-input-group label {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1rem;
    margin-left: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.currency-input-group label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--currency-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.currency-input-group:hover label::before {
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(var(--currency-primary-rgb), 0.6);
}

.currency-input-wrapper {
    display: flex;
    gap: 1.2rem;
    position: relative;
}

.currency-input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--currency-border-radius-md);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
    transition: var(--currency-transition);
    box-shadow: var(--currency-shadow-sm),
                var(--currency-shadow-inner);
}

.currency-input:focus {
    border-color: var(--currency-primary);
    box-shadow: var(--currency-focus-outline),
                0 8px 20px rgba(0, 0, 0, 0.05);
    outline: none;
    transform: translateY(-2px);
}

.currency-input::placeholder {
    color: rgba(var(--text-color-rgb, 50, 50, 50), 0.4);
}

.currency-select-wrapper {
    position: relative;
    min-width: 160px;
}

.currency-select {
    width: 100%;
    appearance: none;
    padding: 1rem;
    padding-right: 2.5rem;
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.3);
    background-color: var(--input-bg);
    color: var(--text-color);
    border-radius: var(--currency-border-radius-sm);
    font-size: 1rem;
    transition: var(--currency-transition);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background-image: none;
}

.currency-select:focus {
    outline: none;
    border-color: var(--currency-primary);
    box-shadow: var(--currency-focus-outline);
}

.currency-select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color-secondary);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.currency-select-wrapper:hover::after {
    transform: translateY(-50%) translateY(2px);
}

.currency-select option {
    font-weight: 500;
    padding: 1rem;
}

.currency-swap {
    display: flex;
    justify-content: center;
    position: relative;
    margin: 1rem 0;
    height: 60px;
}

.currency-swap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
                transparent 0%,
                rgba(var(--border-color-rgb, 200, 200, 200), 0.2) 30%,
                rgba(var(--border-color-rgb, 200, 200, 200), 0.2) 70%,
                transparent 100%);
    z-index: 1;
}

.currency-swap-button {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, 
                var(--currency-primary), 
                var(--currency-primary-hover));
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(var(--currency-primary-rgb), 0.3),
                0 0 0 6px rgba(var(--currency-primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
    overflow: hidden;
}

.currency-swap-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
                rgba(255, 255, 255, 0.7) 0%,
                transparent 65%);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.currency-swap-button:hover {
    transform: rotate(180deg) scale(1.15);
    box-shadow: 0 6px 25px rgba(var(--currency-primary-rgb), 0.4),
                0 0 0 8px rgba(var(--currency-primary-rgb), 0.15);
    animation: pulse 1.5s infinite;
}

.currency-swap-button:hover::before {
    opacity: 0.7;
}

.currency-swap-button:active {
    transform: rotate(180deg) scale(0.95);
}

.currency-swap-button:focus {
    outline: none;
    box-shadow: var(--currency-focus-outline),
                0 4px 20px rgba(var(--currency-primary-rgb), 0.3);
}

.currency-swap-button svg {
    width: 26px;
    height: 26px;
    stroke: white;
    stroke-width: 2.5;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.currency-result {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: var(--currency-border-radius-lg);
    background: linear-gradient(145deg, 
                rgba(var(--currency-primary-rgb), 0.06), 
                rgba(var(--currency-primary-rgb), 0.12));
    box-shadow: var(--currency-shadow-sm),
                inset 0 1px 2px var(--currency-highlight-dim);
    border: 1px solid rgba(var(--currency-primary-rgb), 0.15);
    transition: var(--currency-transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.currency-result::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, 
                rgba(255, 255, 255, 0.15) 0%,
                transparent 40%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.currency-result:hover {
    box-shadow: var(--currency-shadow-md),
                inset 0 2px 3px var(--currency-highlight);
    transform: translateY(-4px) scale(1.01);
}

.currency-result:hover::before {
    opacity: 1;
}

.currency-result-value {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, 
                var(--text-color), 
                var(--currency-primary) 50%, 
                var(--currency-primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(var(--currency-primary-rgb), 0.3);
    position: relative;
    transform: translateZ(0);
}

.currency-result-value::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
                var(--currency-primary),
                transparent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.currency-result:hover .currency-result-value::after {
    height: 3px;
    background: linear-gradient(90deg, 
                var(--currency-primary),
                var(--currency-primary-hover));
    box-shadow: 0 0 8px rgba(var(--currency-primary-rgb), 0.5);
}

.currency-result-info {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.currency-result-info::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--currency-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(var(--currency-primary-rgb), 0.6);
}

.currency-chart {
    margin-top: 3rem;
    padding: 2.2rem;
    border-radius: var(--currency-border-radius-lg);
    background: linear-gradient(145deg, 
                var(--input-bg), 
                rgba(var(--input-bg-rgb, 255, 255, 255), 0.7));
    box-shadow: var(--currency-shadow-sm),
                inset 0 1px 2px var(--currency-highlight-dim);
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.1);
    transition: var(--currency-transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.currency-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, 
                var(--currency-primary), 
                var(--currency-primary-hover));
    z-index: 2;
}

.currency-chart::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(180deg, 
                rgba(var(--currency-primary-rgb), 0.05),
                transparent);
    opacity: 0.5;
    z-index: 1;
}

.currency-chart:hover {
    box-shadow: var(--currency-shadow-md),
                inset 0 2px 3px var(--currency-highlight);
    transform: translateY(-4px) scale(1.01);
}

.currency-chart-title {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.8rem;
    position: relative;
    display: inline-block;
    font-size: 1.1rem;
    z-index: 3;
}

.currency-chart-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
                var(--currency-primary),
                transparent 80%);
    border-radius: 2px;
}

.currency-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1.2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.currency-button {
    padding: 1.2rem 2rem;
    border: none;
    border-radius: var(--currency-border-radius-md);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.currency-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent,
                rgba(255, 255, 255, 0.2),
                transparent);
    transition: all 0.8s ease;
    z-index: -1;
}

.currency-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
                rgba(255, 255, 255, 0.8) 0%,
                transparent 65%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.currency-button:hover::before {
    left: 100%;
}

.currency-button:hover::after {
    opacity: 0.15;
}

.currency-button:focus {
    outline: none;
    box-shadow: var(--currency-focus-outline);
}

.currency-button {
    background: linear-gradient(135deg, 
                var(--currency-primary), 
                var(--currency-primary-hover));
    color: white;
    box-shadow: 0 8px 15px rgba(var(--currency-primary-rgb), 0.3),
                0 0 0 0px rgba(var(--currency-primary-rgb), 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.currency-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(var(--currency-primary-rgb), 0.4),
                0 0 0 5px rgba(var(--currency-primary-rgb), 0.2);
}

.currency-button:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(var(--currency-primary-rgb), 0.3),
                0 0 0 3px rgba(var(--currency-primary-rgb), 0.3);
}

.currency-button.secondary {
    background: rgba(var(--button-bg-rgb, 230, 230, 230), 0.8);
    color: var(--text-color);
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.3);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05),
                0 0 0 0px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

.currency-button.secondary:hover {
    background: rgba(var(--button-hover-bg-rgb, 220, 220, 220), 0.9);
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08),
                0 0 0 5px rgba(0, 0, 0, 0.03);
}

.currency-button.secondary:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05),
                0 0 0 3px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .currency-container {
        margin: 2rem 1rem;
        padding: 2rem;
        border-radius: var(--currency-border-radius-md);
    }
    
    .currency-title {
        font-size: 1.8rem;
    }
    
    .currency-swap-button {
        width: 50px;
        height: 50px;
    }
    
    .currency-result-value {
        font-size: 2.4rem;
    }
}

@media (max-width: 640px) {
    .currency-container {
        margin: 1.5rem 1rem;
        padding: 1.8rem;
        border-radius: var(--currency-border-radius-sm);
    }

    .currency-header {
        flex-direction: column;
        gap: 1.2rem;
        align-items: flex-start;
        margin-bottom: 2rem;
    }

    .currency-title {
        font-size: 1.6rem;
    }
    
    .currency-date {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .currency-input-wrapper {
        flex-direction: column;
    }
    
    .currency-select {
        min-width: 100%;
    }
    
    .currency-input,
    .currency-select {
        padding: 1rem;
        font-size: 1.1rem;
    }

    .currency-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .currency-button {
        width: 100%;
        text-align: center;
        padding: 1rem 1.5rem;
    }
    
    .currency-result {
        padding: 1.5rem;
    }
    
    .currency-result-value {
        font-size: 2rem;
    }
    
    .currency-chart {
        padding: 1.5rem;
    }
}

/* Animations pour notifications */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive pour notifications */
@media (max-width: 480px) {
    .currency-notification {
        width: 90%;
        max-width: 300px;
        right: 5%;
    }
}

/* Stylisation des taux mis à jour */
.loading-indicator {
    display: inline-flex;
    align-items: center;
    animation: pulse 1.5s infinite;
}

.loading-indicator::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--currency-primary);
    margin-right: 8px;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
}

/* Mode hors ligne */
.offline-message {
    display: none;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--currency-border-radius-md);
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: var(--text-color);
    text-align: center;
}

.offline-message.visible {
    display: block;
    animation: fadeIn 0.5s ease;
}

.offline-icon {
    font-size: 2rem;
    color: #FFC107;
    margin-bottom: 0.8rem;
}

.cached-time {
    font-style: italic;
    margin-top: 1rem;
    color: var(--text-color-secondary);
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
}

.help-note {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(var(--primary-color-rgb, 100, 100, 255), 0.05);
    border-radius: var(--currency-border-radius-sm);
    font-size: 0.9rem;
    font-style: italic;
}

/* Mode plein écran */
.currency-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    max-width: none;
    margin: 0;
    z-index: 9999;
    border-radius: 0;
    overflow-y: auto;
}

/* Suppression des styles liés aux conversions populaires */
.popular-currencies,
.conversion-grid,
.conversion-item,
.conversion-header,
.currency-flag,
.conversion-arrow,
.conversion-rate,
.use-conversion,
.conversion-grid .conversion-item:nth-child(1),
.conversion-grid .conversion-item:nth-child(2),
.conversion-grid .conversion-item:nth-child(3),
.conversion-grid .conversion-item:nth-child(4),
.conversion-grid .conversion-item:nth-child(5),
.conversion-grid .conversion-item:nth-child(6),
.conversion-grid .conversion-item:nth-child(7),
.conversion-grid .conversion-item:nth-child(8),
.conversion-grid .conversion-item:nth-child(9),
.conversion-grid .conversion-item:nth-child(10),
.conversion-grid .conversion-item:nth-child(11),
.conversion-grid .conversion-item:nth-child(12) {
    display: none;
}

/* Conteneur principal */
#currencyTool.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--currency-spacing-lg);
    position: relative;
    overflow: hidden;
    border-radius: var(--currency-border-radius-md);
    transition: var(--currency-transition);
}

#currencyTool.tool-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--currency-primary), var(--currency-secondary));
    z-index: 1;
}

.currency-converter {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
}

/* En-tête et infos sur les taux */
.rates-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1rem;
    background: rgba(var(--currency-primary-rgb), 0.05);
    border-radius: 12px;
    font-size: 0.9rem;
}

.rates-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#refreshRates {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--currency-primary);
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#refreshRates:hover {
    background: var(--currency-primary-hover);
    transform: translateY(-2px);
}

#refreshRates i {
    transition: transform 0.3s ease;
}

#refreshRates:hover i {
    transform: rotate(180deg);
}

/* Amélioration des champs de saisie */
.conversion-input {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.form-input {
    flex: 1;
    padding: 1rem;
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.3);
    background-color: var(--input-bg);
    color: var(--text-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: var(--currency-primary);
    box-shadow: 0 0 0 2px rgba(var(--currency-primary-rgb), 0.2);
}

.currency-select-wrapper {
    position: relative;
    min-width: 160px;
}

.currency-select {
    width: 100%;
    appearance: none;
    padding: 1rem;
    padding-right: 2.5rem;
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.3);
    background-color: var(--input-bg);
    color: var(--text-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background-image: none;
}

.currency-select:focus {
    outline: none;
    border-color: var(--currency-primary);
    box-shadow: 0 0 0 2px rgba(var(--currency-primary-rgb), 0.2);
}

.currency-select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color-secondary);
    pointer-events: none;
}

/* Détails de la conversion */
.conversion-details {
    display: flex;
    justify-content: space-between;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.conversion-details p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
}

/* Conversions populaires */
.currency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.conversion-item {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.2);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.conversion-item:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--currency-primary-rgb), 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.conversion-header {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.currency-flag {
    font-size: 1.1rem;
}

.currency-code {
    font-weight: 600;
    font-size: 0.9rem;
}

.conversion-arrow {
    margin: 0 0.3rem;
    color: var(--currency-primary);
}

.conversion-rate {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.use-conversion {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--currency-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.use-conversion:hover {
    background: rgba(var(--currency-primary-rgb), 0.1);
    transform: scale(1.1);
}

/* Graphique */
.conversion-chart {
    margin-bottom: 2.5rem;
}

.conversion-chart h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-color);
    border-bottom: 2px solid rgba(var(--currency-primary-rgb), 0.2);
    padding-bottom: 0.5rem;
}

.chart-container {
    width: 100%;
    height: 300px;
    margin: 1rem 0;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.2);
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-period {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1rem 0;
}

.chart-period button {
    padding: 0.5rem 1rem;
    margin: 0.2rem;
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.3);
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-period button:hover,
.chart-period button.active {
    background: var(--currency-primary);
    color: white;
    border-color: var(--currency-primary);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(var(--currency-primary-rgb), 0.3);
}

/* Historique des conversions */
.conversion-history {
    margin-top: 1rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
    position: relative;
    padding-left: 1rem;
}

.history-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--currency-primary);
    border-radius: 2px;
}

.history-list {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.2);
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.history-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.1);
    transition: background 0.2s ease;
}

.history-item:hover {
    background: rgba(var(--currency-primary-rgb), 0.05);
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-color-secondary);
    min-width: 110px;
}

.history-content {
    flex: 1;
    margin: 0 1rem;
}

.history-content .currency-code {
    font-weight: 600;
    color: var(--currency-primary);
}

.use-btn {
    padding: 0.4rem;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-color-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.use-btn:hover {
    color: var(--currency-primary);
    background: rgba(var(--currency-primary-rgb), 0.1);
}

.empty-history {
    padding: 2rem;
    text-align: center;
    color: var(--text-color-secondary);
    font-style: italic;
}

/* Message hors ligne */
.offline-message {
    display: none;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: var(--text-color);
    text-align: center;
}

.offline-message.visible {
    display: block;
    animation: fadeIn 0.5s ease;
}

.offline-icon {
    font-size: 2rem;
    color: #FFC107;
    margin-bottom: 0.8rem;
}

.cached-time {
    font-style: italic;
    margin-top: 1rem;
    color: var(--text-color-secondary);
    font-size: 0.9rem;
}

.help-note {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(var(--primary-color-rgb, 100, 100, 255), 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .currency-converter {
        padding: 0.8rem;
        gap: 1.2rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .currency-select-wrapper {
        min-width: 100%;
    }
    
    .swap-btn {
        margin: 1rem auto;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .chart-period {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .chart-period button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .history-item {
        padding: 0.8rem;
    }
    
    .history-date {
        min-width: 100px;
        font-size: 0.75rem;
    }
    
    .history-content {
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }
    
    .conversion-details {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    #currencyTool.tool-container {
        padding: 0.8rem;
    }
    
    .tool-header h2 {
        font-size: 1.2rem;
    }
    
    .rates-info {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
    
    .conversion-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .chart-container {
        height: 200px;
        padding: 0.8rem;
    }
    
    .chart-period {
        flex-wrap: wrap;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .history-date {
        min-width: auto;
        margin-bottom: 0.3rem;
    }
    
    .history-content {
        margin: 0;
        font-size: 0.9rem;
    }
    
    .use-btn {
        align-self: flex-end;
        margin-top: -2rem;
    }
    
    .popular-currencies h3,
    .conversion-chart h3,
    .history-header h3 {
        font-size: 1.1rem;
    }
    
    .conversion-header {
        font-size: 0.8rem;
    }
    
    .conversion-rate {
        font-size: 1rem;
    }
    
    .form-input,
    .currency-select {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
}

/* Bouton d'échange */
.swap-btn {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0.8rem auto;
    border: none;
    border-radius: 50%;
    background: var(--currency-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(var(--currency-primary-rgb), 0.3);
}

.swap-btn:hover {
    transform: rotate(180deg);
    background: var(--currency-primary-hover);
    box-shadow: 0 6px 15px rgba(var(--currency-primary-rgb), 0.4);
}

.swap-btn.active {
    animation: pulse 0.5s;
}

/* Animation en cascade pour les cartes de conversion */
.conversion-grid .conversion-item:nth-child(1) { animation-delay: 0s; }
.conversion-grid .conversion-item:nth-child(2) { animation-delay: 0.05s; }
.conversion-grid .conversion-item:nth-child(3) { animation-delay: 0.1s; }
.conversion-grid .conversion-item:nth-child(4) { animation-delay: 0.15s; }
.conversion-grid .conversion-item:nth-child(5) { animation-delay: 0.2s; }
.conversion-grid .conversion-item:nth-child(6) { animation-delay: 0.25s; }
.conversion-grid .conversion-item:nth-child(7) { animation-delay: 0.3s; }
.conversion-grid .conversion-item:nth-child(8) { animation-delay: 0.35s; }

/* Ajustements pour les éléments dans les cartes */
.conversion-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    flex-wrap: wrap;
    width: 100%;
}

.conversion-rate {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: var(--text-color);
    text-align: center;
}

.use-conversion {
    background: var(--currency-primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    width: 100%;
}

/* Adaptations pour les différentes tailles d'écran */
@media (max-width: 1199px) {
    .conversion-rate {
        font-size: 1.15rem;
    }
}

@media (max-width: 991px) {
    .popular-currencies {
        padding: 0.8rem;
    }
    
    .conversion-header {
        font-size: 0.9rem;
    }
    
    .conversion-rate {
        font-size: 1.1rem;
    }
    
    .use-conversion {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 767px) {
    .conversion-item {
        padding: 0.8rem;
    }
    
    .conversion-header {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }
}

@media (max-width: 575px) {
    .popular-currencies h3 {
        font-size: 1.1rem;
    }
    
    .conversion-item {
        padding: 0.7rem;
    }
    
    .conversion-header {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .currency-flag {
        font-size: 1rem;
    }
    
    .conversion-rate {
        font-size: 1rem;
        margin: 0.3rem 0;
    }
    
    .use-conversion {
        padding: 0.3rem;
        font-size: 0.75rem;
    }
    
    .use-conversion i {
        margin-right: 0.2rem;
    }
}

/* Animation pour faire apparaître la grille entière */
@keyframes fadeInGrid {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Animation en cascade pour les cartes de 1 à 12 (4x3 grille) */
.conversion-grid .conversion-item:nth-child(1) { animation-delay: 0s; }
.conversion-grid .conversion-item:nth-child(2) { animation-delay: 0.05s; }
.conversion-grid .conversion-item:nth-child(3) { animation-delay: 0.1s; }
.conversion-grid .conversion-item:nth-child(4) { animation-delay: 0.15s; }
.conversion-grid .conversion-item:nth-child(5) { animation-delay: 0.2s; }
.conversion-grid .conversion-item:nth-child(6) { animation-delay: 0.25s; }
.conversion-grid .conversion-item:nth-child(7) { animation-delay: 0.3s; }
.conversion-grid .conversion-item:nth-child(8) { animation-delay: 0.35s; }
.conversion-grid .conversion-item:nth-child(9) { animation-delay: 0.4s; }
.conversion-grid .conversion-item:nth-child(10) { animation-delay: 0.45s; }
.conversion-grid .conversion-item:nth-child(11) { animation-delay: 0.5s; }
.conversion-grid .conversion-item:nth-child(12) { animation-delay: 0.55s; }

/* Styles pour les statistiques du graphique */
.chart-info {
    margin-top: 10px;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
}

.chart-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.chart-stat {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--card-bg);
    border: 1px solid rgba(var(--border-color-rgb, 200, 200, 200), 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chart-stat.volatility {
    color: #9b59b6;
    border-left: 3px solid #9b59b6;
}

.chart-stat.trend {
    color: #3498db;
    border-left: 3px solid #3498db;
}

.chart-stat.seasonality {
    color: #f39c12;
    border-left: 3px solid #f39c12;
}

/* Styles pour les variations positives et négatives */
.positive-change {
    color: #2ecc71;
    font-weight: 600;
}

.negative-change {
    color: #e74c3c;
    font-weight: 600;
}

.currency-chart-title .positive-change,
.currency-chart-title .negative-change {
    font-size: 0.9rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.currency-chart-title .positive-change {
    background-color: rgba(46, 204, 113, 0.1);
}

.currency-chart-title .negative-change {
    background-color: rgba(231, 76, 60, 0.1);
}

/* Animation pour les changements de taux */
@keyframes pulse-change {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.rate-change {
    animation: pulse-change 0.5s ease-in-out;
}

/* Styles responsifs pour les statistiques du graphique */
@media (max-width: 768px) {
    .chart-stats {
        gap: 8px;
    }
    
    .chart-stat {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    .currency-chart-title .positive-change,
    .currency-chart-title .negative-change {
        font-size: 0.8rem;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .chart-info {
        margin-top: 8px;
    }
    
    .chart-stats {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .chart-stat {
        width: 100%;
        text-align: center;
        font-size: 0.75rem;
    }
}

/* Mise en page horizontale pour le convertisseur de devises */
.currency-horizontal-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "main"
        "sidebar";
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 1200px) {
    .currency-horizontal-layout {
        grid-template-columns: 1fr 350px;
        grid-template-areas: "main sidebar";
    }
    
    .currency-main-panel {
        grid-area: main;
        background-color: var(--bg-light);
        border-radius: var(--border-radius);
        padding: 1.5rem;
    }
    
    .currency-sidebar {
        grid-area: sidebar;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .conversion-history,
    .currency-chart {
        background-color: var(--bg-light);
        border-radius: var(--border-radius);
        padding: 1.5rem;
    }
    
    .chart-container {
        height: 220px;
        position: relative;
    }
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.period-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background-color: var(--hover-color);
}

.period-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
} 