/* ========================================
   YI KING KARMIQUE - STYLE HARMONISÉ
   Palette : #9a624a (marron), #f5efe8 (beige), #6e4636 (marron foncé)
   ======================================== */

/* === WIDGET 310x400px === */
.yiking-widget {
    width: 310px;
    height: 400px;
    background: #f5efe8;
    border: 3px solid #9a624a;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(154, 98, 74, 0.3);
    display: flex;
    flex-direction: column;
    font-family: 'Georgia', serif;
    overflow: hidden;
}

.yiking-widget-header {
    background: linear-gradient(135deg, #9a624a 0%, #6e4636 100%);
    color: #f5efe8;
    padding: 20px;
    text-align: center;
}

.yiking-widget-header h3 {
    margin: 0 0 5px 0;
    font-size: 22px;
    font-weight: bold;
}

.yiking-subtitle {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.yiking-widget-body {
    flex: 1;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

.yiking-trigrammes {
    display: flex;
    gap: 15px;
    font-size: 32px;
}

.trigramme-icon {
    animation: pulse 2s ease-in-out infinite;
}

.trigramme-icon:nth-child(2) { animation-delay: 0.5s; }
.trigramme-icon:nth-child(3) { animation-delay: 1s; }
.trigramme-icon:nth-child(4) { animation-delay: 1.5s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

.yiking-coins-animation {
    display: flex;
    gap: 20px;
    font-size: 40px;
}

.coin {
    animation: coinFloat 3s ease-in-out infinite;
}

.coin:nth-child(2) { animation-delay: 1s; }
.coin:nth-child(3) { animation-delay: 2s; }

@keyframes coinFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(180deg); }
}

.yiking-modes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.mode-badge {
    background: #fff;
    color: #6e4636;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 11px;
    border: 1px solid #9a624a;
}

.yiking-widget-footer {
    background: #fff;
    padding: 20px;
    text-align: center;
    border-top: 2px solid #9a624a;
}

.yiking-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #9a624a 0%, #6e4636 100%);
    color: #f5efe8;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.yiking-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(154, 98, 74, 0.4);
    color: #fff;
}

.yiking-tagline {
    margin: 10px 0 0 0;
    font-size: 11px;
    color: #9a624a;
    font-style: italic;
}

/* === ORACLE COMPLET === */
.yiking-oracle-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.yiking-step {
    display: none;
    animation: fadeIn 0.5s;
}

.yiking-step.active {
    display: block;
}

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

.yiking-oracle-title {
    text-align: center;
    color: #6e4636;
    font-size: 36px;
    margin-bottom: 10px;
}

.yiking-oracle-intro {
    text-align: center;
    color: #9a624a;
    font-size: 18px;
    margin-bottom: 40px;
}

/* Choix du mode */
.yiking-mode-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.yiking-mode-card {
    background: #f5efe8;
    border: 3px solid #9a624a;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.yiking-mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(154, 98, 74, 0.3);
    border-color: #6e4636;
}

.mode-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.yiking-mode-card h3 {
    color: #6e4636;
    margin: 15px 0;
}

.yiking-mode-card p {
    color: #9a624a;
    font-size: 14px;
    line-height: 1.6;
}

.mode-label {
    display: inline-block;
    background: #9a624a;
    color: #f5efe8;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    margin-top: 15px;
}

/* Question */
.step-subtitle {
    text-align: center;
    color: #9a624a;
    margin-bottom: 30px;
}

#yiking-question {
    width: 100%;
    padding: 15px;
    border: 2px solid #9a624a;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    background: #f5efe8;
    color: #6e4636;
    resize: vertical;
}

#yiking-question:focus {
    outline: none;
    border-color: #6e4636;
    box-shadow: 0 0 10px rgba(154, 98, 74, 0.2);
}

.yiking-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.yiking-btn-primary, .yiking-btn-secondary {
    padding: 15px 40px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.yiking-btn-primary {
    background: linear-gradient(135deg, #9a624a 0%, #6e4636 100%);
    color: #f5efe8;
}

.yiking-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(154, 98, 74, 0.4);
}

.yiking-btn-secondary {
    background: #f5efe8;
    color: #6e4636;
    border: 2px solid #9a624a;
}

.yiking-btn-secondary:hover {
    background: #fff;
}

/* Hexagramme construction */
.yiking-hexagramme-construction {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.ligne-display {
    width: 200px;
    height: 30px;
    border: 2px dashed #9a624a;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #f5efe8;
}

.ligne-display.yang::before {
    content: '━━━━━';
    color: #6e4636;
    font-weight: bold;
}

.ligne-display.yin::before {
    content: '━━  ━━';
    color: #9a624a;
    font-weight: bold;
}

/* Coins launcher */
.yiking-coins-launcher {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 30px 0;
    font-size: 50px;
}

.coin-animation {
    transition: transform 0.5s;
}

.coin-animation.flip {
    animation: coinFlip 0.6s ease-in-out;
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg) scale(1.2); }
    100% { transform: rotateY(360deg); }
}

/* Loading */
.yiking-loading {
    text-align: center;
    padding: 60px 20px;
}

.yin-yang-spinner {
    font-size: 80px;
    animation: spin 2s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Résultat */
#yiking-result-container {
    background: #f5efe8;
    border: 3px solid #9a624a;
    border-radius: 15px;
    padding: 40px;
}

.hexagramme-visual {
    text-align: center;
    margin-bottom: 30px;
}

.hexagramme-symboles {
    font-size: 60px;
    margin: 20px 0;
}

.hexagramme-nom {
    color: #6e4636;
    font-size: 28px;
    margin: 10px 0;
}

.hexagramme-chinois {
    color: #9a624a;
    font-size: 20px;
}

.interpretation-section {
    margin: 30px 0;
    padding: 25px;
    background: #fff;
    border-left: 4px solid #9a624a;
    border-radius: 8px;
}

.interpretation-section h3 {
    color: #6e4636;
    margin: 0 0 15px 0;
}

.interpretation-section p {
    color: #6e4636;
    line-height: 1.8;
    margin: 0;
}

.mots-cles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.mot-cle {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
}

.mot-cle.positif {
    background: #d4edda;
    color: #155724;
}

.mot-cle.negatif {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
    .yiking-mode-selection {
        grid-template-columns: 1fr;
    }
    
    .yiking-oracle-container {
        padding: 20px 10px;
    }
}
