/* POD WARS Widget - CSS Scopé pour intégration sans conflits */

.podwars-widget * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.podwars-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: transparent;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-x: hidden;
}

.podwars-main-container {
    background: rgba(255, 255, 255, 1);
    border-radius: 14px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.podwars-logo {
    margin-bottom: 30px;
    height: 40px;
}

.podwars-step {
    display: none;
    animation: podwars-fadeIn 0.5s ease-in;
}

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

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

.podwars-widget h1 {
    color: #751CBF;
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.podwars-subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
    font-weight: 400;
}

.podwars-widget h2 {
    color: #000;
    margin-bottom: 15px;
    font-size: 1.6em;
    font-weight: 600;
}

.podwars-description {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 25px;
    line-height: 1.5;
}

.podwars-input-group {
    margin: 25px 0;
    position: relative;
}

.podwars-widget input[type="text"],
.podwars-widget input[type="email"] {
    width: 100%;
    padding: 15px 25px;
    border: 2px solid #d6c3e7;
    border-radius: 30px;
    font-size: 1.1em;
    color: #333;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 3px 10px rgba(117, 28, 191, 0.1);
}

.podwars-widget input[type="text"]::placeholder,
.podwars-widget input[type="email"]::placeholder {
    color: #aaa;
}

.podwars-widget input[type="text"]:focus,
.podwars-widget input[type="email"]:focus {
    outline: none;
    border-color: #751CBF;
    box-shadow: 0 0 15px rgba(117, 28, 191, 0.3), inset 0 2px 8px rgba(117, 28, 191, 0.1);
    transform: scale(1.02);
}

.podwars-widget input[type="text"],
.podwars-widget input[type="email"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.podwars-autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.podwars-suggestion {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.podwars-suggestion:last-child {
    border-bottom: none;
}

.podwars-suggestion:hover {
    background: #f3e8ff;
}

.podwars-country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.podwars-country-btn {
    background: #f5f5f5;
    border: 2px solid transparent;
    color: #333;
    padding: 15px 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 600;
}

.podwars-country-btn:hover {
    transform: translateY(-2px);
    border-color: #751CBF;
    background: #f3e8ff;
}

.podwars-country-btn.selected {
    background: #751CBF;
    color: white;
    box-shadow: 0 5px 15px rgba(117, 28, 191, 0.3);
}

.podwars-search-section {
    margin: 30px 0;
}

.podwars-search-results {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.podwars-search-counter {
    background: #f3e8ff;
    color: #751CBF;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.podwars-search-results {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.podwars-search-result {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.podwars-search-result:last-child {
    border-bottom: none;
}

.podwars-search-result:hover {
    background: #f3e8ff;
}

.podwars-search-result.highlight {
    background: #f3e8ff;
    border: 2px solid #751CBF;
    position: relative;
    transition: all 0.3s ease;
}

.podwars-search-result .position {
    font-size: 1.2em;
    font-weight: bold;
    color: #751CBF;
    min-width: 30px;
}

.podwars-search-result .artwork {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.podwars-search-result .info {
    flex: 1;
}

.podwars-search-result .title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.podwars-search-result .artist {
    color: #666;
    font-size: 0.9em;
}

.podwars-search-result .rating {
    text-align: right;
}

.podwars-search-result .stars {
    color: #ffb400;
    font-size: 0.9em;
}

.podwars-search-result .rating-count {
    color: #999;
    font-size: 0.8em;
}

.podwars-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #751CBF;
    border-radius: 50%;
    animation: podwars-spin 1s linear infinite;
    margin: 20px;
}

@keyframes podwars-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.podwars-btn {
    background: #751CBF;
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(117, 28, 191, 0.3);
}

.podwars-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(117, 28, 191, 0.4);
    background: #6217a5;
}

.podwars-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.podwars-btn-secondary {
    background: #f5f5f5;
    color: #751CBF;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #751CBF;
}

.podwars-btn-secondary:hover {
    background: #f3e8ff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.podwars-subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
    font-weight: 400;
}

.podwars-logo {
    margin-bottom: 30px;
    height: 40px;
}

.podwars-search-section {
    margin: 30px 0;
}

.podwars-progress-bar {
    background: rgba(117, 28, 191, 0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin: 30px 0 20px;
}

.podwars-progress-fill {
    background: #751CBF;
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.podwars-error-message {
    background: #ff4444;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-weight: 600;
}

.podwars-success-message {
    background: linear-gradient(135deg, #00E676, #00C853);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin: 15px 0;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 230, 118, 0.3);
    animation: podwars-slideInUp 0.3s ease;
}

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

.podwars-your-podcast-indicator {
    background: #4caf50;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

.podwars-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.podwars-option-btn {
    background: #f5f5f5;
    border: 2px solid transparent;
    color: #333;
    padding: 12px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 600;
}

.podwars-option-btn:hover {
    transform: translateY(-2px);
    border-color: #751CBF;
    background: #f3e8ff;
}

.podwars-option-btn.selected {
    background: #751CBF;
    color: white;
    box-shadow: 0 5px 15px rgba(117, 28, 191, 0.3);
}

.podwars-purpose-list {
   display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.podwars-purpose-btn {
    background: #f5f5f5;
    border: 2px solid transparent;
    color: #333;
    padding: 15px 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.podwars-purpose-btn:hover {
    transform: translateX(5px);
    border-color: #751CBF;
    background: #f3e8ff;
}

.podwars-purpose-btn.selected {
    background: #751CBF;
    color: white;
    box-shadow: 0 5px 15px rgba(117, 28, 191, 0.3);
}

.podwars-purpose-icon {
    font-size: 1.5em;
}

.podwars-main-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

.podwars-main-container.wide {
    max-width: 900px;
    transition: max-width 0.5s ease;
    text-align: center;
}

#searchResultsTitle {
    margin-bottom: 10px;
}

#searchResultsDescription {
    font-size: 1.1em;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

#searchResultsInterface.top10 #searchResultsDescription {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

#searchResultsInterface.beyond10 #searchResultsDescription {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ff9800;
}

#searchResultsInterface.notfound #searchResultsDescription {
    background: #f3e5f5;
    color: #4a148c;
    border: 1px solid #751CBF;
}

@keyframes podwars-pulseHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(76, 175, 80, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
        transform: scale(1);
    }
}

.podwars-pulse-highlight {
    animation: podwars-pulseHighlight 1s ease-in-out 3;
}

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

#searchLoader p {
    animation: podwars-pulse 1.5s ease-in-out infinite;
}

.podwars-powered-by {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes podwars-glow {
    from {
        text-shadow:
            0 0 20px rgba(255, 255, 255, 0.8),
            0 0 40px rgba(255, 255, 255, 0.6),
            0 0 60px rgba(255, 255, 255, 0.4),
            0 0 80px rgba(117, 28, 191, 0.8),
            0 0 100px rgba(117, 28, 191, 0.6);
    }
    to {
        text-shadow:
            0 0 25px rgba(255, 255, 255, 0.9),
            0 0 45px rgba(255, 255, 255, 0.7),
            0 0 65px rgba(255, 255, 255, 0.5),
            0 0 85px rgba(117, 28, 191, 0.9),
            0 0 105px rgba(117, 28, 191, 0.7);
    }
}

.podwars-ausha-logo {
    position: relative;
    margin-bottom: 40px;
    margin-top: 20px;
}

.podwars-ausha-logo img {
    height: 30px;
    opacity: 0.8;
}

.podwars-pso-section {
    background: #f8f5ff;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    text-align: center;
}

.podwars-pso-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.podwars-pso-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.podwars-pso-points li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333;
}

.podwars-pso-points li:last-child {
    margin-bottom: 0;
}

.podwars-pso-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.podwars-btn-pso-primary {
    background: #751CBF;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.podwars-btn-pso-primary:hover {
    background: #6217a5;
    color: white !important;
    transform: translateY(-2px);
}

.podwars-btn-pso-secondary {
    background: #751CBF;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.podwars-btn-pso-secondary:hover {
    background: #6217a5;
    transform: translateY(-2px);
}

#verificationCode {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    font-size: 2em;
    letter-spacing: 1em;
    text-align: center;
    padding: 20px;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

#verificationCode:focus {
    border-color: #751CBF;
    box-shadow: 0 0 20px rgba(117, 28, 191, 0.3);
    transform: scale(1.02);
}

.podwars-resend-button {
    background: none;
    border: none;
    color: #751CBF;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 5px 10px;
}

.podwars-resend-button:hover {
    color: #6217a5;
    transform: translateX(5px);
}

.podwars-resend-button:disabled {
    color: #ccc;
    cursor: not-allowed;
    transform: none;
}

#userEmailDisplay {
    background: #f3e8ff;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
    color: #751CBF;
}

.podwars-code-timer {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
}

.podwars-code-timer.warning {
    color: #ff9800;
    font-weight: 600;
}

.podwars-code-timer.expired {
    color: #f44336;
    font-weight: 600;
}

.podwars-btn.loading {
    position: relative;
    color: transparent;
}

.podwars-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #751CBF;
    border-radius: 50%;
    animation: podwars-spin 1s linear infinite;
}

.podwars-attempts-indicator {
    display: inline-flex;
    gap: 8px;
    margin-top: 10px;
}

.podwars-attempt-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

.podwars-attempt-dot.used {
    background: #f44336;
}

.podwars-attempt-dot.available {
    background: #4caf50;
}

/* Styles pour les médias responsives */
@media screen and (min-width: 768px) {
    .podwars-main-container {
        max-width: 600px;
        padding: 50px;
    }

    .podwars-widget h1 {
        font-size: 3em;
    }

    .podwars-widget h2 {
        font-size: 1.8em;
    }

    .podwars-badge-scanner {
        font-size: 1.4em;
        padding: 25px 50px;
    }

    .podwars-widget input[type="text"],
    .podwars-widget input[type="email"] {
        font-size: 1.2em;
        padding: 20px 25px;
    }

    .podwars-btn {
        font-size: 1.2em;
        padding: 20px 40px;
    }

    .podwars-country-btn {
        font-size: 1em;
        padding: 20px 15px;
    }
}

@media screen and (max-width: 920px) {
    .podwars-main-container.wide {
        max-width: calc(100% - 40px);
    }
}

@media screen and (max-width: 768px) {
    .podwars-purpose-list {
        grid-template-columns: 1fr;
    }
}

@media screen and (min-width: 1200px) {
    .podwars-main-container {
        max-width: 800px;
        padding: 60px;
    }

    .podwars-widget h1 {
        font-size: 3.5em;
    }

    .podwars-widget h2 {
        font-size: 2em;
    }
}

@media screen and (max-width: 480px) {
    .podwars-main-container {
        padding: 20px;
        margin: 10px;
    }

    .podwars-widget h2 {
        font-size: 1.4em;
    }

    .podwars-btn {
        font-size: 1em;
        padding: 12px 24px;
    }
}

#noSearchesInterface a.podwars-btn:hover {
    background: #6217a5;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(117, 28, 191, 0.5);
}