/* ============================================
   CONVERTISSEUR EUR/THB - STYLE.CSS
   Mobile-first, palette verte cohérente
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#pam-eurthb-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    color: #1b5e20;
    line-height: 1.6;
}

/* Header */
#pam-eurthb-app h1 {
    font-size: 1.8rem;
    color: #00796b;
    text-align: center;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.intro-text {
    text-align: center;
    color: #2e7d32;
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
    padding: 0 10px;
}

/* Affichage taux live */
.rate-display {
    background: linear-gradient(135deg, #00796b 0%, #00695c 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 121, 107, 0.25);
    animation: slideIn 0.5s ease-out;
}

.rate-icon {
    font-size: 1.3rem;
    margin-right: 8px;
}

#rateText {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Card principale */
.converter-card {
    background: white;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

/* Input groups */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #00796b;
    margin-bottom: 8px;
    font-size: 1rem;
}

.flag {
    font-size: 1.2rem;
    margin-right: 6px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 60px 14px 16px;
    font-size: 1.1rem;
    border: 2px solid #c8e6c9;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: #1b5e20;
    font-weight: 500;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #00796b;
    box-shadow: 0 0 0 4px rgba(0, 121, 107, 0.1);
}

.input-wrapper input::placeholder {
    color: #81c784;
    font-weight: 400;
}

.currency-symbol {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: #00796b;
    font-size: 0.95rem;
    pointer-events: none;
}

/* Bouton inverser */
.swap-button {
    display: block;
    margin: 16px auto;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #00796b 0%, #00897b 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 121, 107, 0.3);
    transition: all 0.3s ease;
}

.swap-button:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 6px 16px rgba(0, 121, 107, 0.4);
}

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

/* Résultat animé */
.result-display {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid #00796b;
    padding: 20px;
    border-radius: 10px;
    margin: 24px 0 20px 0;
    animation: slideIn 0.4s ease-out;
}

.result-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1b5e20;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.result-rate {
    font-size: 0.95rem;
    color: #2e7d32;
    font-weight: 500;
}

/* Bouton reset */
.reset-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.25);
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(76, 175, 80, 0.35);
}

.reset-button:active {
    transform: translateY(0);
}

/* Disclaimer */
.disclaimer {
    text-align: center;
    font-size: 0.85rem;
    color: #558b2f;
    padding: 12px;
    background: #f1f8e9;
    border-radius: 8px;
    border: 1px dashed #aed581;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* États input */
.input-wrapper input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.input-wrapper input.active-input {
    border-color: #00796b;
    background-color: #e8f5e9;
}

/* Responsive tablette */
@media (min-width: 768px) {
    #pam-eurthb-app {
        padding: 30px;
    }

    #pam-eurthb-app h1 {
        font-size: 2.2rem;
        margin-bottom: 16px;
    }

    .intro-text {
        font-size: 1.05rem;
        margin-bottom: 32px;
    }

    .converter-card {
        padding: 36px 32px;
    }

    .swap-button {
        width: 64px;
        height: 64px;
        font-size: 2rem;
        margin: 20px auto;
    }

    .result-amount {
        font-size: 1.8rem;
    }
}

/* Responsive desktop */
@media (min-width: 1024px) {
    .converter-card:hover {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
        transition: all 0.3s ease;
    }
}

/* Mode sombre (si thème WordPress actif) */
@media (prefers-color-scheme: dark) {
    #pam-eurthb-app {
        color: #c8e6c9;
    }

    .converter-card {
        background: #1b5e20;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .input-wrapper input {
        background: #2e7d32;
        color: #e8f5e9;
        border-color: #4caf50;
    }

    .input-wrapper input::placeholder {
        color: #81c784;
    }

    .disclaimer {
        background: #2e7d32;
        color: #c8e6c9;
        border-color: #66bb6a;
    }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Erreur API */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 16px;
    border-left: 4px solid #e53935;
    animation: slideIn 0.3s ease-out;
}
