/* ===========================================
   Voyance-AZ - Design clair et accueillant
   =========================================== */

:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --secondary: #f3e8ff;
    --background: #ffffff;
    --surface: #f5f0ff;
    --text: #111827;
    --text-light: #4b5563;
    --border: #d8b4fe;
    --success: #059669;
    --shadow: rgba(124, 58, 237, 0.15);
}

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

body {
    font-family: 'Lora', Georgia, serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.7;
}

/* Fond simple avec leger degrade */
.stars {
    display: none;
}

/* Container principal */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    padding: 2.5rem 0 2rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
    position: relative;
}

/* Language switcher */
.lang-switcher {
    position: absolute;
    top: 1rem;
    right: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.lang-switcher a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-switcher a:hover {
    color: var(--primary);
}

.lang-switcher a.active {
    color: var(--primary);
    font-weight: 600;
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Main content */
main {
    flex: 1;
}

/* Section intro */
.intro {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 2.5rem;
    padding: 1.5rem 2rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.intro p {
    font-size: 1.05rem;
    color: var(--text-light);
}

/* Grille des jeux */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.loading {
    text-align: center;
    color: var(--text-light);
    padding: 3rem;
    font-size: 1rem;
}

/* Carte de jeu */
.game-card {
    background: var(--background);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px var(--shadow);
    transform: translateY(-2px);
}

.game-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.game-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.game-meta span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.game-meta .free-badge {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Section question */
.question-section {
    max-width: 550px;
    margin: 0 auto;
    text-align: center;
}

.question-section label {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-weight: 500;
}

.question-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Lora', serif;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}

.question-section textarea:focus {
    outline: none;
    border-color: var(--primary-light);
}

.question-section textarea::placeholder {
    color: var(--text-light);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 15px var(--shadow);
}

.btn-secondary {
    background: var(--background);
    color: var(--text-light);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

/* Section tirage */
.reading-section {
    padding: 1rem 0;
}

.info-bar {
    text-align: center;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 2rem;
    color: var(--text);
    font-size: 0.95rem;
    border: 1px solid var(--border);
}

.free-info {
    margin-left: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

/* Grille des cartes */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Carte de tarot */
.tarot-card {
    background: var(--background);
    border-radius: 10px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tarot-card:hover:not(.revealed):not(.locked) {
    border-color: var(--primary);
    box-shadow: 0 4px 20px var(--shadow);
    transform: translateY(-3px);
}

.tarot-card.revealed {
    cursor: pointer;
    border-color: var(--success);
    background: #f0fdf4;
}

.tarot-card.revealed:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.tarot-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}

.tarot-card.locked:hover {
    transform: none;
    box-shadow: none;
}

/* Dos de carte */
.card-back {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.card-back .back-image {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
}

.card-back .position-name {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    color: var(--primary-dark);
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    padding: 0.5rem 0.25rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Face de carte revelee */
.card-front {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.card-front img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
}

.card-front .position-name {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    color: var(--success);
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    padding: 0.5rem 0.25rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icone cadenas */
.lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: var(--text-light);
}

/* Modal signification */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--background);
    border-radius: 12px;
    border: 2px solid var(--border);
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text);
}

.modal-header {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px 10px 0 0;
}

.modal-header img {
    width: 90px;
    height: 135px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.modal-header h2 {
    font-family: 'Cinzel', serif;
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-header .card-number {
    color: var(--text-light);
    font-size: 0.85rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.modal-body p {
    color: var(--text);
    line-height: 1.8;
    white-space: pre-line;
    font-size: 0.95rem;
}

.modal-content .btn {
    display: block;
    margin: 0 1.5rem 1.5rem;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 1.25rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .modal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-back .position-name,
    .card-front .position-name {
        font-size: 0.6rem;
        min-height: 2rem;
    }
}

/* ===========================================
   HOROSCOPE
   =========================================== */

.signs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

.sign-card {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sign-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px var(--shadow);
    transform: translateY(-3px);
}

.sign-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.sign-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.sign-card .sign-dates {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Modal horoscope */
.horoscope-modal-content {
    max-width: 550px;
}

.horoscope-header {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 10px 10px 0 0;
    align-items: center;
}

.horoscope-header img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.horoscope-info h2 {
    font-family: 'Cinzel', serif;
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.horoscope-info .sign-dates {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.horoscope-info .horoscope-date {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.horoscope-body {
    padding: 1.5rem;
}

.horoscope-body p {
    color: var(--text);
    line-height: 1.8;
    font-size: 1rem;
}

/* Responsive horoscope */
@media (max-width: 768px) {
    .signs-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .sign-card img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .signs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .horoscope-header {
        flex-direction: column;
        text-align: center;
    }
}
