/* ==========================================================================
   TAROT — Carte du jour
   Design system aligné sur le site (sombre, gradient violet/rose, serif)
   ========================================================================== */

:root {
    /* Palette */
    --tarot-bg:           #0a0a0f;
    --tarot-bg-card:      #14141c;
    --tarot-bg-card-2:    #1a1a24;
    --tarot-border:       rgba(139, 92, 246, 0.15);
    --tarot-border-hover: rgba(139, 92, 246, 0.4);
    --tarot-text:         #f5f5f7;
    --tarot-text-soft:    #a1a1aa;
    --tarot-text-mute:    #71717a;
    --tarot-violet:       #8b5cf6;
    --tarot-pink:         #ec4899;
    --tarot-blue:         #6366f1;
    --tarot-gradient:     linear-gradient(135deg, var(--tarot-blue) 0%, var(--tarot-violet) 50%, var(--tarot-pink) 100%);
    --tarot-glow:         0 0 40px rgba(139, 92, 246, 0.35);

    /* Typo */
    --font-serif:         'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans:          'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tarot-scope {
    background: var(--tarot-bg);
    color: var(--tarot-text);
    font-family: var(--font-sans);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Atmosphère : nébuleuse subtile en arrière-plan */
.tarot-scope::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(139, 92, 246, 0.12), transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(236, 72, 153, 0.08), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.tarot-page {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* --------- En-tête --------- */
.tarot-header {
    position: relative;
    margin-bottom: 4rem;
    text-align: center;
}

.tarot-retour {
    position: absolute;
    left: 0;
    top: 0.5rem;
    color: var(--tarot-text-soft);
    text-decoration: none;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid var(--tarot-border);
}
.tarot-retour:hover {
    color: var(--tarot-text);
    border-color: var(--tarot-border-hover);
    background: rgba(139, 92, 246, 0.05);
}

.tarot-titre {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.tarot-sous-titre {
    color: var(--tarot-text-soft);
    font-size: 1.05rem;
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* --------- Zone principale --------- */
.carte-zone {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4rem;
    align-items: center;
    background: linear-gradient(180deg, var(--tarot-bg-card) 0%, var(--tarot-bg-card-2) 100%);
    border: 1px solid var(--tarot-border);
    border-radius: 24px;
    padding: 3.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .carte-zone {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2rem 1.5rem;
    }
    .tarot-page { padding: 2rem 1rem; }
}

/* --------- La carte (flip 3D) --------- */
.carte-wrapper {
    perspective: 1500px;
    width: 280px;
    height: 480px;
    margin: 0 auto;
}

.carte {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 16px;
}

.carte.tirage-en-cours {
    animation: melange 0.6s ease-in-out;
}

.carte.revelee {
    transform: rotateY(180deg);
}

.carte.revelee.renversee .carte-avant {
    transform: rotateY(180deg) rotate(180deg);
}

/* Carte revelee : halo violet + ombre pour la faire ressortir (coherent avec la landing). */
.carte.revelee .carte-avant {
    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.6),
        0 0 42px rgba(139, 92, 246, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

@keyframes melange {
    0%, 100% { transform: rotateY(0) translateY(0); }
    25%      { transform: rotateY(15deg) translateY(-10px); }
    50%      { transform: rotateY(-10deg) translateY(0); }
    75%      { transform: rotateY(8deg) translateY(-5px); }
}

.carte-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Dos de la carte */
.carte-dos {
    background:
        linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #831843 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carte-dos::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    pointer-events: none;
}

.carte-dos::after {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    pointer-events: none;
}

.carte-dos-motif {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 20px 20px, 24px 24px;
}

.carte-dos-motif .etoile {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
    animation: pulser 3s ease-in-out infinite;
}

@keyframes pulser {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.05); }
}

/* Avant de la carte */
.carte-avant {
    background: linear-gradient(180deg, #2a1f3d 0%, #1a1325 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s ease;
}

.carte-avant img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carte-avant img[src=""],
.carte-avant img:not([src]) {
    display: none;
}

/* Fallback si l'image n'existe pas (placeholder élégant) */
.carte-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(180deg, #2a1f3d 0%, #1a1325 100%);
    text-align: center;
}

.carte-fallback::before {
    content: '✦';
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
}
.carte-fallback::after {
    content: '✦';
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
}

.carte-fallback-numero {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 500;
    background: var(--tarot-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.carte-fallback-nom {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--tarot-text);
    line-height: 1.2;
}

.carte-avant.image-manquante .carte-fallback {
    display: flex;
}
.carte-avant:not(.image-manquante) .carte-fallback {
    display: none;
}

/* --------- Zone d'interprétation --------- */
.interpretation {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.interpretation-instruction {
    color: var(--tarot-text-soft);
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 2rem;
    max-width: 480px;
}

/* État révélé */
.interpretation.revelee {
    animation: apparition 0.8s ease-out 0.6s both;
}

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

.carte-nom {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.carte-position {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--tarot-text-mute);
    margin-bottom: 1.5rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--tarot-border);
    border-radius: 20px;
}

.carte-position.renversee {
    color: var(--tarot-pink);
    border-color: rgba(236, 72, 153, 0.3);
}

.mots-cles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mot-cle {
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 100px;
    color: #c4b5fd;
    font-weight: 400;
}

.carte-texte {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--tarot-text-soft);
    font-weight: 300;
    margin-bottom: 2rem;
    max-width: 520px;
}

.carte-texte::first-letter {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--tarot-text);
    float: left;
    line-height: 1;
    margin-right: 0.4rem;
    margin-top: 0.2rem;
}

/* --------- Boutons --------- */
.btn-tirer {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: white;
    background: var(--tarot-gradient);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    align-self: flex-start;
}

.btn-tirer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5), var(--tarot-glow);
}

.btn-tirer:active {
    transform: translateY(0);
}

.btn-tirer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--tarot-pink) 0%, var(--tarot-violet) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-tirer:hover::before { opacity: 1; }
.btn-tirer span { position: relative; z-index: 1; }

.btn-tirer:disabled {
    opacity: 0.5;
    cursor: wait;
    transform: none !important;
}

.btn-secondaire {
    background: transparent;
    color: var(--tarot-text-soft);
    border: 1px solid var(--tarot-border);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 400;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.75rem;
}

.btn-secondaire:hover {
    color: var(--tarot-text);
    border-color: var(--tarot-border-hover);
    background: rgba(139, 92, 246, 0.05);
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* --------- Erreur --------- */
.erreur {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ==========================================================================
   TIRAGE 3 CARTES — Passé / Présent / Futur
   ========================================================================== */

.tirage-3-zone {
    background: linear-gradient(180deg, var(--tarot-bg-card) 0%, var(--tarot-bg-card-2) 100%);
    border: 1px solid var(--tarot-border);
    border-radius: 24px;
    padding: 4rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    min-height: 600px;
}

/* --------- État initial : invitation --------- */
.tirage-3-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 500px;
    animation: apparition 0.6s ease-out;
}

.tirage-3-icone {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    font-size: 1.8rem;
    background: var(--tarot-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tirage-3-icone span {
    animation: pulser 3s ease-in-out infinite;
}
.tirage-3-icone span:nth-child(2) { animation-delay: 0.3s; }
.tirage-3-icone span:nth-child(3) { animation-delay: 0.6s; }

.tirage-3-instruction {
    color: var(--tarot-text-soft);
    font-size: 1.15rem;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

/* --------- Layout 3 colonnes --------- */
.tirage-3-cartes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.tirage-3-colonne {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    /* État initial : caché et décalé pour animation d'entrée */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

/* Animation d'entrée décalée (passé → présent → futur) */
.tirage-3-colonne.apparue                 { opacity: 1; transform: translateY(0); }
.tirage-3-colonne[data-position="0"]      { transition-delay: 0s; }
.tirage-3-colonne[data-position="1"]      { transition-delay: 0.2s; }
.tirage-3-colonne[data-position="2"]      { transition-delay: 0.4s; }

/* Label de position */
.position-label {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--tarot-text);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    position: relative;
    padding-bottom: 0.5rem;
}

.position-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: var(--tarot-gradient);
}

/* Carte plus compacte en mode 3 cartes */
.tirage-3-colonne .carte-wrapper {
    width: 200px;
    height: 340px;
}

.tirage-3-colonne .carte-fallback-numero { font-size: 3rem; }
.tirage-3-colonne .carte-fallback-nom    { font-size: 1.2rem; }

/* --------- Détail sous chaque carte --------- */
.carte-detail {
    margin-top: 1.5rem;
    max-width: 280px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.carte-detail.revele {
    opacity: 1;
    transform: translateY(0);
}

.position-intro {
    font-size: 0.85rem;
    color: var(--tarot-text-mute);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.carte-nom-petit {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tarot-text);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.carte-position-petit {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tarot-text-mute);
    margin-bottom: 1rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--tarot-border);
    border-radius: 20px;
}

.carte-position-petit.renversee {
    color: var(--tarot-pink);
    border-color: rgba(236, 72, 153, 0.3);
}

.carte-detail .mots-cles {
    justify-content: center;
    margin-bottom: 1rem;
}

.carte-detail .mot-cle {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
}

.carte-texte-petit {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--tarot-text-soft);
    font-weight: 300;
}

/* --------- Actions après tirage --------- */
.tirage-3-actions {
    margin-top: 3rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tirage-3-actions.apparition {
    opacity: 1;
    transform: translateY(0);
}

.tirage-3-conseil {
    color: var(--tarot-text-soft);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 300;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--tarot-border);
    border-bottom: 1px solid var(--tarot-border);
}

.tirage-3-actions .btn-secondaire {
    margin-left: 0;
}

/* --------- Responsive : pile verticale sur mobile --------- */
@media (max-width: 900px) {
    .tirage-3-cartes {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .tirage-3-zone {
        padding: 2rem 1rem;
    }
    .tirage-3-colonne .carte-wrapper {
        width: 240px;
        height: 410px;
    }
    .carte-detail {
        max-width: 100%;
    }
}

/* ==========================================================================
   OUI OU NON
   ========================================================================== */

.oui-non-zone {
    background: linear-gradient(180deg, var(--tarot-bg-card) 0%, var(--tarot-bg-card-2) 100%);
    border: 1px solid var(--tarot-border);
    border-radius: 24px;
    padding: 4rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    min-height: 600px;
}

/* --------- Intro : formulaire --------- */
.oui-non-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 500px;
    animation: apparition 0.6s ease-out;
}

.oui-non-instruction {
    color: var(--tarot-text-soft);
    font-size: 1.15rem;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 2.5rem;
    max-width: 520px;
}

.oui-non-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 480px;
}

.oui-non-label {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--tarot-text-mute);
}

.oui-non-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--tarot-border);
    border-radius: 100px;
    color: var(--tarot-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 300;
    text-align: center;
    transition: all 0.3s ease;
    outline: none;
}

.oui-non-input::placeholder {
    color: var(--tarot-text-mute);
    font-style: italic;
}

.oui-non-input:focus {
    border-color: var(--tarot-violet);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* --------- Résultat : layout 2 colonnes --------- */
.oui-non-resultat {
    animation: apparition 0.5s ease-out;
}

.resultat-question {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--tarot-border);
}

.question-libelle {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--tarot-text-mute);
    margin-bottom: 0.75rem;
}

.question-texte {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--tarot-text);
    font-weight: 400;
    line-height: 1.4;
}

.resultat-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4rem;
    align-items: center;
}

.resultat-carte {
    display: flex;
    justify-content: center;
}

.resultat-carte .carte-wrapper {
    width: 240px;
    height: 410px;
}

/* --------- La grande réponse --------- */
.resultat-reponse {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out 0.6s, transform 0.7s ease-out 0.6s;
}

.resultat-reponse.revelee {
    opacity: 1;
    transform: translateY(0);
}

.grande-reponse {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    background: var(--tarot-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}

/* Couleur spécifique selon la réponse */
.grande-reponse.oui {
    background: linear-gradient(135deg, #34d399 0%, #06b6d4 50%, var(--tarot-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.grande-reponse.non {
    background: linear-gradient(135deg, #f87171 0%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.grande-reponse.peut_etre {
    background: linear-gradient(135deg, var(--tarot-blue) 0%, var(--tarot-violet) 50%, var(--tarot-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.reponse-nuance {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--tarot-text);
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: 480px;
}

.reponse-divider {
    width: 60px;
    height: 1px;
    background: var(--tarot-gradient);
    margin: 2rem 0;
    opacity: 0.6;
}

.reponse-carte-info {
    max-width: 480px;
}

.reponse-carte-info .carte-nom-petit {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.reponse-carte-info .mots-cles {
    margin-bottom: 1rem;
    justify-content: flex-start;
}

.oui-non-actions {
    margin-top: 3rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--tarot-border);
}

/* --------- Responsive --------- */
@media (max-width: 900px) {
    .oui-non-zone {
        padding: 2rem 1rem;
    }
    .resultat-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .resultat-reponse {
        text-align: center;
    }
    .reponse-carte-info .mots-cles {
        justify-content: center;
    }
    .reponse-divider {
        margin: 2rem auto;
    }
}

/* ==========================================================================
   TIRAGE SPREAD (shared base)
   Mecanique reutilisable : N cartes choisies par l'utilisateur dans un
   paquet etale. Couleur par defaut : violet (--tarot-violet, rgba 124,67,171).
   Variations chromatiques via modifieurs (.tirage-spread--amour, etc.).
   ========================================================================== */

/* Glyphe d'icone a cote du titre (heritage : utilise par amour avec coeur rose) */
.tarot-scope .tarot-titre-icon {
    display: inline-block;
    margin-left: 0.4rem;
    color: var(--tarot-violet);
    font-size: 0.7em;
    vertical-align: middle;
    transform: translateY(-0.15em);
}

/* --------- Zone principale --------- */
.tarot-scope .tirage-spread-zone {
    background: linear-gradient(180deg, var(--tarot-bg-card) 0%, var(--tarot-bg-card-2) 100%);
    border: 1px solid var(--tarot-border);
    border-radius: 24px;
    padding: 3rem 2.5rem 3.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* --------- Slots de position --------- */
.tarot-scope .tirage-spread-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.tarot-scope .tirage-spread-slot {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tarot-scope .tirage-spread-slot__label {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--tarot-text);
    letter-spacing: 0.01em;
    margin: 0;
    position: relative;
    padding-bottom: 0.5rem;
}

.tarot-scope .tirage-spread-slot__label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 1px;
    background: var(--tarot-violet);
    opacity: 0.7;
}

.tarot-scope .tirage-spread-slot__intro {
    font-size: 0.85rem;
    color: var(--tarot-text-mute);
    font-style: italic;
    margin: 0 0 1rem;
    line-height: 1.5;
    max-width: 220px;
}

.tarot-scope .tirage-spread-slot__placeholder {
    width: 200px;
    height: 340px;
    border-radius: 16px;
    border: 2px dashed rgba(124, 67, 171, 0.4);
    background: rgba(124, 67, 171, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.4s ease, background 0.4s ease, transform 0.4s ease;
    perspective: 1500px;
}

.tarot-scope .tirage-spread-slot__placeholder::before {
    content: '✦';
    color: rgba(124, 67, 171, 0.35);
    font-size: 1.6rem;
    transition: opacity 0.3s ease;
}

.tarot-scope .tirage-spread-slot--filled .tirage-spread-slot__placeholder {
    border: 1px solid rgba(124, 67, 171, 0.6);
    background: transparent;
    padding: 0;
}

.tarot-scope .tirage-spread-slot--filled .tirage-spread-slot__placeholder::before {
    display: none;
}

/* La carte revelee occupe tout l'emplacement */
.tarot-scope .tirage-spread-slot__placeholder .carte-wrapper {
    width: 100%;
    height: 100%;
    margin: 0;
}

.tarot-scope .tirage-spread-slot__placeholder .carte-fallback-numero { font-size: 3rem; }
.tarot-scope .tirage-spread-slot__placeholder .carte-fallback-nom    { font-size: 1.2rem; }

/* --------- Texte d'instruction --------- */
.tarot-scope .tirage-spread-instruction {
    text-align: center;
    color: var(--tarot-text-soft);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 auto 2rem;
    max-width: 520px;
    padding: 1rem 0;
    border-top: 1px solid var(--tarot-border);
    border-bottom: 1px solid var(--tarot-border);
    transition: color 0.3s ease;
}

.tarot-scope .tirage-spread-instruction--error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

/* --------- Paquet etale de N cartes face cachee --------- */
.tarot-scope .tirage-spread {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: nowrap;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    position: relative;
    min-height: 180px;
    transition: opacity 0.6s ease;
}

.tarot-scope .tirage-spread--done {
    opacity: 0.25;
    pointer-events: none;
}

/* Carte face cachee dans le paquet */
.tarot-scope .tirage-spread-card-back {
    /* Reset bouton */
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--tarot-border);
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;

    width: 80px;
    height: 130px;
    flex: 0 0 80px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #831843 100%);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s ease,
                opacity 0.35s ease,
                border-color 0.3s ease;
}

/* Chevauchement progressif (premiere carte sans recouvrement) */
.tarot-scope .tirage-spread-card-back + .tirage-spread-card-back {
    margin-left: -52px;
}

/* Empile les cartes : la derniere passe par-dessus pour effet "etale" */
.tarot-scope .tirage-spread-card-back { z-index: 1; }
.tarot-scope .tirage-spread-card-back:nth-child(1)  { z-index: 1; }
.tarot-scope .tirage-spread-card-back:nth-child(2)  { z-index: 2; }
.tarot-scope .tirage-spread-card-back:nth-child(3)  { z-index: 3; }
.tarot-scope .tirage-spread-card-back:nth-child(4)  { z-index: 4; }
.tarot-scope .tirage-spread-card-back:nth-child(5)  { z-index: 5; }
.tarot-scope .tirage-spread-card-back:nth-child(6)  { z-index: 6; }
.tarot-scope .tirage-spread-card-back:nth-child(7)  { z-index: 7; }
.tarot-scope .tirage-spread-card-back:nth-child(8)  { z-index: 8; }
.tarot-scope .tirage-spread-card-back:nth-child(9)  { z-index: 9; }
.tarot-scope .tirage-spread-card-back:nth-child(10) { z-index: 10; }
.tarot-scope .tirage-spread-card-back:nth-child(11) { z-index: 11; }
.tarot-scope .tirage-spread-card-back:nth-child(12) { z-index: 12; }
.tarot-scope .tirage-spread-card-back:nth-child(13) { z-index: 13; }
.tarot-scope .tirage-spread-card-back:nth-child(14) { z-index: 14; }
.tarot-scope .tirage-spread-card-back:nth-child(15) { z-index: 15; }
.tarot-scope .tirage-spread-card-back:nth-child(16) { z-index: 16; }
.tarot-scope .tirage-spread-card-back:nth-child(17) { z-index: 17; }
.tarot-scope .tirage-spread-card-back:nth-child(18) { z-index: 18; }
.tarot-scope .tirage-spread-card-back:nth-child(19) { z-index: 19; }
.tarot-scope .tirage-spread-card-back:nth-child(20) { z-index: 20; }
.tarot-scope .tirage-spread-card-back:nth-child(21) { z-index: 21; }
.tarot-scope .tirage-spread-card-back:nth-child(22) { z-index: 22; }

/* Bordures fines internes (clin d'oeil au dos de carte) */
.tarot-scope .tirage-spread-card-back::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    pointer-events: none;
}

.tarot-scope .tirage-spread-card-back__motif {
    color: rgba(124, 67, 171, 0.55);
    font-size: 1.4rem;
    text-shadow: 0 0 12px rgba(124, 67, 171, 0.4);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.tarot-scope .tirage-spread-card-back:hover:not(:disabled),
.tarot-scope .tirage-spread-card-back:focus-visible:not(:disabled) {
    transform: translateY(-14px);
    z-index: 100;
    border-color: rgba(124, 67, 171, 0.5);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(124, 67, 171, 0.25);
    outline: none;
}

.tarot-scope .tirage-spread-card-back:hover:not(:disabled) .tirage-spread-card-back__motif {
    color: rgba(124, 67, 171, 0.9);
    text-shadow: 0 0 18px rgba(124, 67, 171, 0.6);
}

/* Animation au moment du choix : la carte se souleve avant de filer */
.tarot-scope .tirage-spread-card-back--leaving {
    transform: translateY(-40px) scale(0.92) rotate(-3deg);
    opacity: 0.2;
    pointer-events: none;
}

/* Apres le choix : carte estompee, non cliquable */
.tarot-scope .tirage-spread-card-back--used {
    opacity: 0.18;
    pointer-events: none;
    cursor: default;
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* --------- Interpretations detaillees --------- */
.tarot-scope .tirage-spread-interpretations {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--tarot-border);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.tarot-scope .tirage-spread-interpretations[hidden] {
    display: none;
}

.tarot-scope .tirage-spread-interpretations--visible {
    opacity: 1;
    transform: translateY(0);
}

.tarot-scope .tirage-spread-interpretation {
    background: rgba(124, 67, 171, 0.04);
    border: 1px solid var(--tarot-border);
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
}

.tarot-scope .tirage-spread-interpretation__position {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tarot-violet);
    margin: 0;
    line-height: 1.1;
}

.tarot-scope .tirage-spread-interpretation__intro {
    font-size: 0.85rem;
    color: var(--tarot-text-mute);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.tarot-scope .tirage-spread-interpretation__nom {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--tarot-text);
    margin: 0.25rem 0 0.5rem;
}

.tarot-scope .tirage-spread-interpretation .carte-position-petit {
    align-self: center;
    margin: 0 0 0.75rem;
}

.tarot-scope .tirage-spread-interpretation .mots-cles {
    justify-content: center;
    margin-bottom: 0.75rem;
}

.tarot-scope .tirage-spread-interpretation__texte {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--tarot-text-soft);
    font-weight: 300;
    margin: 0;
    text-align: left;
}

/* --------- Bouton "Nouveau tirage" --------- */
.tarot-scope .tirage-spread-actions {
    margin-top: 2.5rem;
    text-align: center;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tarot-scope .tirage-spread-actions[hidden] {
    display: none;
}

.tarot-scope .tirage-spread-actions--visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------- Responsive --------- */
@media (max-width: 900px) {
    .tarot-scope .tirage-spread-zone {
        padding: 2rem 1rem 2.5rem;
    }
    .tarot-scope .tirage-spread-slots {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .tarot-scope .tirage-spread-slot__placeholder {
        width: 220px;
        height: 374px;
    }
    .tarot-scope .tirage-spread-interpretations {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    /* Paquet plus serre, cartes plus petites */
    .tarot-scope .tirage-spread {
        padding: 1.5rem 0.5rem 2rem;
        flex-wrap: wrap;
        gap: 0;
    }
    .tarot-scope .tirage-spread-card-back {
        width: 54px;
        height: 88px;
        flex: 0 0 54px;
        border-radius: 6px;
    }
    .tarot-scope .tirage-spread-card-back + .tirage-spread-card-back {
        margin-left: -34px;
    }
    .tarot-scope .tirage-spread-card-back__motif {
        font-size: 1rem;
    }
    .tarot-scope .tirage-spread-card-back:hover:not(:disabled),
    .tarot-scope .tirage-spread-card-back:focus-visible:not(:disabled) {
        transform: translateY(-8px);
    }
    .tarot-scope .tirage-spread-slot__placeholder {
        width: 200px;
        height: 340px;
    }
}

/* ==========================================================================
   TIRAGE SPREAD : variante AMOUR
   Accent rose plutot que violet, glyphe coeur, fond rose subtil sur les
   blocs d'interpretation. Toutes les regles ci-dessous overrident
   uniquement les couleurs ; geometrie, tailles et animations heritent
   de la base ci-dessus.
   ========================================================================== */

/* Coeur rose a cote du titre (utilise par amour.php) */
.tarot-scope .tirage-spread--amour .tarot-titre-icon,
.tarot-scope.tirage-spread--amour .tarot-titre-icon {
    color: var(--tarot-pink);
}

/* Slot label : trait inferieur rose */
.tarot-scope .tirage-spread--amour .tirage-spread-slot__label::after {
    background: var(--tarot-pink);
}

/* Placeholder : bordure pointillee rose, fond rose tres subtil */
.tarot-scope .tirage-spread--amour .tirage-spread-slot__placeholder {
    border-color: rgba(236, 72, 153, 0.4);
    background: rgba(236, 72, 153, 0.03);
}
.tarot-scope .tirage-spread--amour .tirage-spread-slot__placeholder::before {
    color: rgba(236, 72, 153, 0.35);
}
.tarot-scope .tirage-spread--amour .tirage-spread-slot--filled .tirage-spread-slot__placeholder {
    border-color: rgba(236, 72, 153, 0.6);
    background: transparent;
}

/* Cartes face cachee : motif rose, hover rose */
.tarot-scope .tirage-spread--amour .tirage-spread-card-back__motif {
    color: rgba(236, 72, 153, 0.55);
    text-shadow: 0 0 12px rgba(236, 72, 153, 0.4);
}
.tarot-scope .tirage-spread--amour .tirage-spread-card-back:hover:not(:disabled),
.tarot-scope .tirage-spread--amour .tirage-spread-card-back:focus-visible:not(:disabled) {
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(236, 72, 153, 0.25);
}
.tarot-scope .tirage-spread--amour .tirage-spread-card-back:hover:not(:disabled) .tirage-spread-card-back__motif {
    color: rgba(236, 72, 153, 0.9);
    text-shadow: 0 0 18px rgba(236, 72, 153, 0.6);
}

/* Interpretations : fond rose subtil, position rose */
.tarot-scope .tirage-spread--amour .tirage-spread-interpretation {
    background: rgba(236, 72, 153, 0.04);
}
.tarot-scope .tirage-spread--amour .tirage-spread-interpretation__position {
    color: var(--tarot-pink);
}

/* ============ CROIX CELTIQUE — layout en croix + colonne ============ */

/*
 * 10 emplacements en grille : la croix occupe les 4 premieres colonnes
 * (positions 0-5 sur 3 colonnes x 3 rangees) avec position 1 superposee
 * en rotation 90deg sur position 0. La 5eme colonne accueille la
 * colonne traditionnelle de droite (positions 6-9, lue de bas en haut).
 *
 * grid-template-areas decrit la disposition cellule par cellule, ce
 * qui rend la lecture directe : un point pour les cellules vides,
 * un nom (p0..p9) pour celles occupees. Plus simple qu'une suite
 * de grid-row/grid-column manuels.
 */
.tirage-spread--croix .tirage-spread-slots--croix {
    display: grid;
    grid-template-columns: minmax(140px, 160px) minmax(140px, 160px) minmax(140px, 160px) 1.5rem minmax(140px, 160px);
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
        ".   p4  .   . p9"
        "p3  p0  p5  . p8"
        ".   p2  .   . p7"
        ".   .   .   . p6";
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2.5rem;
    max-width: 100%;
}

.tirage-spread--croix .tirage-spread-slot[data-position="0"] { grid-area: p0; }
/* Position 1 partage la cellule p0 avec position 0 et pivote a 90deg
   pour figurer "ce qui croise". z-index: 2 force la superposition. */
.tirage-spread--croix .tirage-spread-slot[data-position="1"] {
    grid-area: p0;
    transform: rotate(90deg);
    z-index: 2;
}
.tirage-spread--croix .tirage-spread-slot[data-position="2"] { grid-area: p2; }
.tirage-spread--croix .tirage-spread-slot[data-position="3"] { grid-area: p3; }
.tirage-spread--croix .tirage-spread-slot[data-position="4"] { grid-area: p4; }
.tirage-spread--croix .tirage-spread-slot[data-position="5"] { grid-area: p5; }
.tirage-spread--croix .tirage-spread-slot[data-position="6"] { grid-area: p6; }
.tirage-spread--croix .tirage-spread-slot[data-position="7"] { grid-area: p7; }
.tirage-spread--croix .tirage-spread-slot[data-position="8"] { grid-area: p8; }
.tirage-spread--croix .tirage-spread-slot[data-position="9"] { grid-area: p9; }

/* Cartes plus compactes pour densifier 10 emplacements sans deborder */
.tirage-spread--croix .tirage-spread-slot__placeholder {
    width: 130px;
    height: 220px;
    border-radius: 8px;
}
.tirage-spread--croix .tirage-spread-slot__label {
    font-size: 0.72rem;
    margin-bottom: 0.35rem;
    letter-spacing: 0.05em;
}
/* Le label de la carte pivotee s'afficherait a 90deg : on le cache
   sur desktop, il reapparait sur mobile ou la rotation est annulee. */
.tirage-spread--croix .tirage-spread-slot[data-position="1"] .tirage-spread-slot__label {
    display: none;
}

/* Mobile / tablette : on bascule sur un stack vertical lisible.
   Les positions perdent leurs grid-area, la rotation de la 1 est
   neutralisee, et son label redevient visible. */
@media (max-width: 768px) {
    .tirage-spread--croix .tirage-spread-slots--croix {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        grid-template-areas: none;
    }
    .tirage-spread--croix .tirage-spread-slot[data-position="0"],
    .tirage-spread--croix .tirage-spread-slot[data-position="1"],
    .tirage-spread--croix .tirage-spread-slot[data-position="2"],
    .tirage-spread--croix .tirage-spread-slot[data-position="3"],
    .tirage-spread--croix .tirage-spread-slot[data-position="4"],
    .tirage-spread--croix .tirage-spread-slot[data-position="5"],
    .tirage-spread--croix .tirage-spread-slot[data-position="6"],
    .tirage-spread--croix .tirage-spread-slot[data-position="7"],
    .tirage-spread--croix .tirage-spread-slot[data-position="8"],
    .tirage-spread--croix .tirage-spread-slot[data-position="9"] {
        grid-area: unset;
    }
    .tirage-spread--croix .tirage-spread-slot[data-position="1"] {
        transform: none;
        z-index: auto;
    }
    .tirage-spread--croix .tirage-spread-slot[data-position="1"] .tirage-spread-slot__label {
        display: block;
    }
    .tirage-spread--croix .tirage-spread-slot__placeholder {
        width: 160px;
        height: 270px;
    }
    .tirage-spread--croix .tirage-spread-slot__label {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   TABLE DE TIRAGE (.tt-*) : socle commun des tirages refaits (11/2026)
   Une table qui tient dans l'ecran : rail de cartes, carte au centre,
   lecture a cote. Gestes dans public/js/tarot/tarot-table.js.
   Polices du site : Playfair Display (titres), Outfit (texte).
   ========================================================================== */

.tarot-scope .tt-page { padding-top: 2rem; padding-bottom: 3rem; }
.tarot-scope .tt-header { margin-bottom: 1.5rem; }
.tarot-scope .tt-header .tarot-titre {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
}
.tarot-scope .tt-header .tarot-sous-titre { max-width: 34rem; margin: 0 auto; }

.tt-table {
    --tt-ratio: 800 / 1512;
    --tt-carte-h: clamp(300px, calc(100svh - var(--tt-haut, 72px) - 300px), 420px);
    --tt-mini-l: 58px;
    --tt-violet: #c084fc;
    position: relative;
    display: grid;
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto 2.5rem;
    padding: 1.1rem 1.75rem 1.75rem;
    border-radius: 24px;
    border: 1px solid rgba(192, 132, 252, 0.3);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.2), rgba(20, 20, 28, 0) 62%),
        linear-gradient(180deg, #16141f, #121118);
    box-shadow: 0 30px 80px -34px rgba(0, 0, 0, 0.85);
    font-family: 'Outfit', system-ui, sans-serif;
    color: #f5f5f7;
}

/* ---- Barre : compteur et son ---- */
.tt-barre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2rem;
}
.tt-compteur {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ddd6fe;
}
.tt-son {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: #a1a1aa;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.tt-son:hover { color: #f5f5f7; border-color: rgba(255, 255, 255, 0.3); }
.tt-son[aria-pressed="true"] { color: #f5f5f7; border-color: rgba(192, 132, 252, 0.6); }
.tt-son[aria-pressed="true"] .tt-son__croix,
.tt-son[aria-pressed="false"] .tt-son__ondes { display: none; }
.tt-son:focus-visible,
.tt-mini:focus-visible,
.tt-bouton:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }

/* ---- Dos de carte ---- */
.tt-dos {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23d8b4fe' stroke-width='1.4'%3E%3Ccircle cx='50' cy='50' r='27'/%3E%3Ccircle cx='50' cy='50' r='40' stroke-opacity='.35'/%3E%3C/g%3E%3Cpath fill='%23e9d5ff' d='M50 12l4.5 33.5L88 50l-33.5 4.5L50 88l-4.5-33.5L12 50l33.5-4.5z'/%3E%3Cpath fill='%23c4b5fd' fill-opacity='.7' d='M50 30l2.6 17.4L70 50l-17.4 2.6L50 70l-2.6-17.4L30 50l17.4-2.6z' transform='rotate(45 50 50)'/%3E%3C/svg%3E") center / 62% auto no-repeat,
        radial-gradient(ellipse at 50% 42%, rgba(139, 92, 246, 0.5), rgba(139, 92, 246, 0) 68%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 8px),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 8px),
        linear-gradient(160deg, #2a1d5c, #130f2b);
    box-shadow:
        inset 0 0 0 1px rgba(216, 180, 254, 0.55),
        0 10px 22px -12px rgba(0, 0, 0, 0.9);
}

/* ---- Rail : les cartes du tirage ---- */
.tt-rail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(7, var(--tt-mini-l));
    justify-content: center;
    gap: 12px;
}
.tt-mini {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--tt-ratio);
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tt-mini[data-etat="vide"],
.tt-mini[data-etat="parti"] {
    cursor: default;
    box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.2);
}
.tt-mini[data-etat="vide"] > *,
.tt-mini[data-etat="parti"] > * { visibility: hidden; }
.tt-mini[data-etat="dos"]:hover,
.tt-mini.est-choisie { transform: translateY(-7px); }
.tt-mini.est-choisie { box-shadow: 0 0 24px -2px rgba(192, 132, 252, 0.8); }
.tt-mini__face {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    box-shadow: 0 0 0 1px rgba(233, 213, 255, 0.3), 0 8px 18px -10px rgba(0, 0, 0, 0.9);
    opacity: 0.72;
    transition: opacity 0.2s;
}
.tt-mini__face--renversee { transform: rotate(180deg); }
.tt-mini[data-etat="face"]:hover .tt-mini__face,
.tt-mini[aria-current="true"] .tt-mini__face { opacity: 1; }
.tt-mini[aria-current="true"] { box-shadow: 0 0 0 2px #14121c, 0 0 0 4px var(--tt-violet); }

/* Carte en vol pendant la donne (posee dans <body>). */
.tt-vol {
    position: fixed;
    z-index: 60;
    border-radius: 6px;
    pointer-events: none;
    will-change: transform;
}

/* ---- Scene : carte au centre, lecture a cote ---- */
.tt-scene {
    display: grid;
    grid-template-columns: auto minmax(0, 30rem);
    grid-template-areas: "focus tete" "focus corps";
    justify-content: center;
    column-gap: 2.75rem;
    row-gap: 0.9rem;
    padding-top: 0.5rem;
}
.tt-focus {
    grid-area: focus;
    align-self: center;
    position: relative;
    height: var(--tt-carte-h);
    aspect-ratio: var(--tt-ratio);
    border-radius: 12px;
}
.tt-focus::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px dashed rgba(192, 132, 252, 0.28);
}
.tt-tete { grid-area: tete; align-self: end; min-width: 0; }
.tt-corps { grid-area: corps; align-self: start; min-width: 0; }

/* Paquet : quelques dos decales, visible jusqu'a la fin de la donne. */
.tt-paquet {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.tt-paquet .tt-dos { position: absolute; inset: 0; }
.tt-paquet .tt-dos:nth-child(1) { transform: translate(-6px, 6px); }
.tt-paquet .tt-dos:nth-child(2) { transform: translate(-4px, 4px); }
.tt-paquet .tt-dos:nth-child(3) { transform: translate(-2px, 2px); }
.tt-table[data-etat="choix"] .tt-paquet,
.tt-table[data-etat="lecture"] .tt-paquet,
.tt-table[data-etat="fin"] .tt-paquet { opacity: 0; scale: 0.96; pointer-events: none; }

/* Carte a deux faces. */
.tt-carte {
    display: block;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    perspective: 1400px;
    z-index: 2;
}
.tt-carte__int {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.tt-carte.est-retournee .tt-carte__int { transform: rotateY(180deg); }
.tt-carte.est-figee .tt-carte__int { transition: none; }
.tt-carte__face {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.tt-carte__face--avant {
    transform: rotateY(180deg);
    background: #efe6d6;
    box-shadow:
        0 0 0 1px rgba(233, 213, 255, 0.4),
        0 26px 54px -20px rgba(0, 0, 0, 0.9),
        0 0 70px -14px rgba(139, 92, 246, 0.55);
}
.tt-carte__face--avant img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tt-carte--renversee .tt-carte__face--avant img { transform: rotate(180deg); }
/* Reflet doux sur la lame. */
.tt-carte__face--avant::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 38%);
    pointer-events: none;
}
.tt-carte__face--sans-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}
.tt-carte__nom { font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; color: #2a1d5c; }

/* ---- Lecture ---- */
.tt-invite {
    margin: 0 0 1.1rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    line-height: 1.4;
    color: #f5f5f7;
}
.tt-invite--erreur { font-family: inherit; font-size: 1rem; color: #fbcfe8; }
.tt-bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1.6rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(to right, #6366f1, #a855f7, #ec4899);
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.4);
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s, transform 0.2s;
}
.tt-bouton:hover { box-shadow: 0 0 26px rgba(168, 85, 247, 0.6); transform: translateY(-1px); }
.tt-bouton:disabled { opacity: 0.5; cursor: default; transform: none; }

.tt-kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c4b5fd;
}
.tt-nom {
    margin: 0.25rem 0 0.55rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.6rem, 3.2vw, 2.3rem);
    font-weight: 500;
    line-height: 1.1;
    color: #f5f5f7;
}
.tt-sens {
    display: inline-block;
    margin: 0;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(192, 132, 252, 0.45);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ddd6fe;
}
.tt-sens-note { margin: 0.5rem 0 0; font-size: 0.86rem; line-height: 1.45; color: #c4c4cc; }
.tt-mots { margin: 0.6rem 0 0; font-size: 0.9rem; color: #a1a1aa; }
.tt-texte { margin: 0; font-size: 1.04rem; line-height: 1.62; color: #e7e5f2; }
.tt-conseil {
    margin-top: 0.9rem;
    padding: 0.7rem 1rem;
    border-left: 2px solid #a78bfa;
    border-radius: 0 10px 10px 0;
    background: rgba(139, 92, 246, 0.12);
}
.tt-conseil__label {
    margin: 0 0 0.2rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c4b5fd;
}
.tt-conseil__texte { margin: 0; font-size: 1rem; line-height: 1.5; color: #f5f5f7; }
.tt-suite { margin: 0.8rem 0 0; font-size: 0.88rem; color: #a1a1aa; }

.tt-apparait {
    animation: tt-monte 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--tt-rang, 0) * 70ms);
}
@keyframes tt-monte {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* ---- Telephone : carte et en-tete cote a cote, texte dessous ---- */
@media (max-width: 720px) {
    .tarot-scope .tt-page { padding-top: 0.75rem; }
    .tarot-scope .tt-header { margin-bottom: 0.9rem; }
    .tarot-scope .tt-header .tarot-titre { margin-bottom: 0.4rem; }
    .tarot-scope .tt-header .tarot-sous-titre { font-size: 0.92rem; line-height: 1.45; padding: 0 1rem; }
    .tt-table {
        --tt-carte-h: 180px;
        gap: 0.6rem;
        padding: 0.6rem 0.8rem 1rem;
        border-radius: 18px;
    }
    .tt-compteur { font-size: 0.68rem; letter-spacing: 0.08em; }
    .tt-compteur__plus { display: none; }
    .tt-son { padding: 0.25rem 0.55rem; }
    .tt-son span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .tt-rail { grid-template-columns: repeat(7, minmax(0, 36px)); gap: 7px; }
    .tt-mini { border-radius: 4px; }
    .tt-vol { border-radius: 4px; }
    .tt-scene {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas: "focus tete" "corps corps";
        justify-content: stretch;
        column-gap: 0.9rem;
        row-gap: 0.75rem;
        padding-top: 0.25rem;
    }
    .tt-focus { border-radius: 8px; }
    .tt-tete { align-self: center; }
    .tt-invite { font-size: 1.05rem; margin-bottom: 0.8rem; }
    .tt-bouton { min-height: 2.75rem; padding: 0.6rem 1rem; font-size: 0.92rem; }
    .tt-kicker { font-size: 0.64rem; letter-spacing: 0.1em; }
    .tt-nom { font-size: 1.4rem; margin-bottom: 0.45rem; }
    .tt-sens { font-size: 0.66rem; }
    .tt-sens-note { margin-top: 0.4rem; font-size: 0.8rem; line-height: 1.4; }
    .tt-mots { font-size: 0.82rem; margin-top: 0.45rem; }
    .tt-texte { font-size: 0.95rem; line-height: 1.5; }
    .tt-conseil { margin-top: 0.65rem; padding: 0.5rem 0.8rem; }
    .tt-conseil__texte { font-size: 0.94rem; line-height: 1.45; }
    .tt-suite { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .tt-mini, .tt-paquet, .tt-carte__int, .tt-bouton { transition: none; }
    .tt-apparait { animation: none; }
}

/* ==========================================================================
   TABLE DE TIRAGE : tirages a positions (3 cartes, amour, oui ou non, croix)
   Gabarit templates/tarot/_table.php, gestes public/js/tarot/tirage.js.
   ========================================================================== */

/* ---- Emplacement : une carte a sa place (bouton) ---- */
.tt-emplacement {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--tt-ratio);
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.tt-emplacement:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.tt-emplacement[data-etat="vide"] {
    cursor: default;
    box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.2);
}
.tt-emplacement[data-etat="vide"] > * { visibility: hidden; }
.tt-emplacement[data-etat="dos"]:hover,
.tt-emplacement.est-choisie { transform: translateY(-6px); }
.tt-emplacement.est-suivante { animation: tt-appel 1.8s ease-in-out infinite; }
.tt-emplacement[aria-current="true"] { box-shadow: 0 0 0 2px #14121c, 0 0 0 4px var(--tt-violet); }
.tt-emplacement:disabled { cursor: default; }
.tt-table[data-etat="fin"] .tt-emplacement[data-etat="dos"] { opacity: 0.35; transform: none; }
@keyframes tt-appel {
    0%, 100% { box-shadow: 0 0 0 0 rgba(192, 132, 252, 0); }
    50%      { box-shadow: 0 0 22px 2px rgba(192, 132, 252, 0.75); }
}

/* ---- Plateau en ligne : 3 cartes cote a cote, lecture a droite ---- */
.tt-table--ligne {
    --tt-place-l: clamp(104px, calc((100svh - var(--tt-haut, 72px) - 250px) * 0.529), 160px);
    max-width: 1080px;
}
.tt-table--ligne .tt-scene {
    grid-template-columns: auto minmax(0, 26rem);
    grid-template-areas: "plateau tete" "plateau corps";
}
.tt-plateau { grid-area: plateau; align-self: center; position: relative; }
.tt-places {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, var(--tt-place-l));
    gap: 16px;
}
.tt-place { display: grid; gap: 0.5rem; text-align: center; }
.tt-place__label {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    color: #f5f5f7;
}
/* Le paquet attend sur l'emplacement du milieu. */
.tt-plateau > .tt-paquet {
    inset: auto auto 0 50%;
    width: var(--tt-place-l);
    aspect-ratio: var(--tt-ratio);
    border-radius: 10px;
    translate: -50% 0;
}

/* ---- Plateau en croix : miniatures, carte choisie au centre ---- */
.tt-table--croix {
    --tt-mini-l: clamp(46px, calc(((100svh - var(--tt-haut, 72px) - 170px) / 4 - 10px) * 0.529), 74px);
    max-width: 1120px;
}
.tt-table--croix .tt-scene {
    grid-template-columns: auto auto minmax(0, 24rem);
    grid-template-areas: "plateau focus tete" "plateau focus corps";
    column-gap: 2.25rem;
}
.tt-table--croix .tt-plateau { display: flex; align-items: center; gap: 22px; }
.tt-croix,
.tt-colonne { list-style: none; margin: 0; padding: 0; }
.tt-croix {
    display: grid;
    grid-template-columns: repeat(3, var(--tt-mini-l));
    grid-template-areas: ". but ." "passe centre futur" ". fondations .";
    gap: 10px;
}
.tt-croix > li:nth-child(1),
.tt-croix > li:nth-child(2) { grid-area: centre; }
.tt-croix > li:nth-child(2) { rotate: 90deg; z-index: 2; pointer-events: none; }
.tt-croix > li:nth-child(2) .tt-emplacement { pointer-events: auto; }
.tt-croix > li:nth-child(3) { grid-area: fondations; }
.tt-croix > li:nth-child(4) { grid-area: passe; }
.tt-croix > li:nth-child(5) { grid-area: but; }
.tt-croix > li:nth-child(6) { grid-area: futur; }
.tt-colonne { display: flex; flex-direction: column-reverse; gap: 10px; width: var(--tt-mini-l); }
.tt-table--croix .tt-mini[data-etat="vide"] { box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.2); }

/* ---- Lecture : position, question, verdict, actions ---- */
.tt-position { margin: 0 0 0.6rem; font-size: 0.92rem; line-height: 1.45; color: #a1a1aa; }
.tt-position strong {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 500;
    font-style: italic;
    color: #d8b4fe;
}
.tt-question { margin: 0 0 0.5rem; font-style: italic; color: #a1a1aa; overflow-wrap: anywhere; }
.tt-verdict {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
}
.tt-nom--second { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin-bottom: 0.45rem; }
.tt-verdict--oui       { color: #6ee7b7; }
.tt-verdict--non       { color: #fda4af; }
.tt-verdict--peut-etre { color: #fcd34d; }
.tt-nuance { margin: 0 0 0.7rem; font-size: 0.98rem; line-height: 1.5; color: #d4d4d8; }
.tt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; margin-top: 1rem; }
.tt-bouton--discret {
    min-height: 2.6rem;
    padding: 0.5rem 1.2rem;
    background: rgba(192, 132, 252, 0.12);
    box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.5);
    font-weight: 500;
}
.tt-bouton--discret:hover { box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.9); }
.tt-lien {
    color: #ddd6fe;
    font-size: 0.92rem;
    text-decoration: underline;
    text-decoration-color: rgba(192, 132, 252, 0.5);
    text-underline-offset: 3px;
}
.tt-lien:hover { color: #ffffff; }
.tt-champ { display: grid; gap: 0.35rem; margin: 0 0 1rem; font-size: 0.82rem; color: #a1a1aa; }
.tt-champ input {
    width: 100%;
    min-height: 2.9rem;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(10, 10, 15, 0.6);
    color: #f5f5f7;
    font: inherit;
    font-size: 1rem;
}
.tt-champ input::placeholder { color: #71717a; }
.tt-champ input:focus-visible { outline: 2px solid var(--tt-violet); outline-offset: 2px; }

/* ---- Teinte du tirage amour ---- */
.tt-table--amour {
    --tt-violet: #f472b6;
    border-color: rgba(244, 114, 182, 0.32);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(236, 72, 153, 0.18), rgba(20, 20, 28, 0) 62%),
        linear-gradient(180deg, #17141d, #121118);
}
.tt-table--amour .tt-position strong { color: #f9a8d4; }

/* ---- Autres tirages, sous la table ---- */
.tt-autres { max-width: 960px; margin: 0 auto 2.5rem; font-family: 'Outfit', system-ui, sans-serif; }
.tt-autres__titre {
    margin: 0 0 1rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 500;
    text-align: center;
    color: #f5f5f7;
}
.tt-autres__liste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.8rem;
}
.tt-autres__lien {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: 100%;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, #14141c, #1a1a24);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}
.tt-autres__lien:hover { border-color: rgba(192, 132, 252, 0.55); transform: translateY(-2px); }
.tt-autres__lien:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.tt-autres__lien img { flex: none; width: 2.4rem; height: auto; border-radius: 4px; }
.tt-autres__lien > span { display: grid; gap: 0.15rem; }
.tt-autres__lien strong { font-weight: 600; color: #f5f5f7; }
.tt-autres__lien span span { font-size: 0.85rem; line-height: 1.4; color: #a1a1aa; }

/* ---- Carte du jour : le jeu entier etale, une carte a choisir ---- */
/* Etats (data-etat) : attente, melange = paquet au centre ; donne, rebours,
   choix = jeu etale ; lecture, fin = carte choisie et sa lecture. */
.tt-annonce {
    margin: 0;
    min-height: 1.9rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    line-height: 1.35;
    text-align: center;
    color: #f5f5f7;
}
.tt-annonce:empty { display: none; }
.tt-lecteur-ecran {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.tt-etal {
    --tt-par-rang: 39;
    --tt-pas: 21px;
    list-style: none;
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    width: calc(var(--tt-par-rang) * var(--tt-pas) + var(--tt-mini-l) - var(--tt-pas));
    max-width: 100%;
    margin: 0 auto;
    /* Les rangs se chevauchent : chaque carte remonte sur le rang du dessus. */
    padding: calc(var(--tt-mini-l) * 0.85 + 10px) calc(var(--tt-mini-l) - var(--tt-pas)) 6px 0;
}
.tt-table[data-etat="donne"] .tt-etal,
.tt-table[data-etat="rebours"] .tt-etal,
.tt-table[data-etat="choix"] .tt-etal { display: flex; }
.tt-table[data-etat="donne"] .tt-scene,
.tt-table[data-etat="rebours"] .tt-scene,
.tt-table[data-etat="choix"] .tt-scene { display: none; }
.tt-etal > li {
    flex: 0 0 var(--tt-pas);
    width: var(--tt-pas);
    margin-top: calc(var(--tt-mini-l) * -0.85);
}
.tt-etal__carte {
    width: var(--tt-mini-l);
    rotate: var(--tt-biais, 0deg);
    transition: transform 0.2s ease, opacity 0.3s ease, box-shadow 0.2s ease;
}
/* Chaque carte se detache de sa voisine : tranche claire a gauche, ombre portee. */
.tt-etal__carte .tt-dos {
    box-shadow:
        inset 0 0 0 1px rgba(216, 180, 254, 0.6),
        inset 2px 0 0 rgba(233, 213, 255, 0.28),
        -4px 0 8px -3px rgba(0, 0, 0, 0.75);
}
.tt-etal__carte:not(:disabled):hover,
.tt-etal__carte:not(:disabled):focus-visible { transform: translateY(-10px); z-index: 3; }
.tt-etal__carte.est-choisie { transform: translateY(-12px); z-index: 4; box-shadow: 0 0 24px -2px rgba(192, 132, 252, 0.85); }
.tt-etal__carte.est-partie { visibility: hidden; }
.tt-etal__carte:disabled { cursor: default; }
/* Pendant le compte a rebours, le jeu attend : un peu en retrait, non cliquable. */
.tt-table[data-etat="rebours"] .tt-etal__carte { opacity: 0.55; }
.tt-table[data-etat="melange"] .tt-tete,
.tt-table[data-etat="melange"] .tt-corps { visibility: hidden; }
.tt-table[data-etat="melange"] .tt-scene { grid-template-columns: auto; }

/* ---- Inscription aux emails, sous la table ---- */
.tt-inscription {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 1.5rem 2.5rem;
    align-items: center;
    max-width: 960px;
    margin: 0 auto 2.5rem;
    padding: 1.6rem 1.75rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, #14141c, #1a1a24);
    font-family: 'Outfit', system-ui, sans-serif;
    color: #f5f5f7;
}
.tt-inscription__titre {
    margin: 0 0 0.5rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1.2;
}
.tt-inscription__texte p { margin: 0; font-size: 0.98rem; line-height: 1.55; color: #c4c4cc; }
.tt-inscription__label { display: block; margin-bottom: 0.35rem; font-size: 0.82rem; color: #a1a1aa; }
.tt-inscription__ligne { display: flex; gap: 0.6rem; }
.tt-inscription__ligne input {
    flex: 1;
    min-width: 0;
    min-height: 3rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(10, 10, 15, 0.6);
    color: #f5f5f7;
    font: inherit;
    font-size: 1rem;
}
.tt-inscription__ligne input::placeholder { color: #71717a; }
.tt-inscription__ligne input:focus-visible { outline: 2px solid #c084fc; outline-offset: 2px; }
.tt-inscription__retour { min-height: 1.4rem; margin: 0.55rem 0 0; font-size: 0.92rem; line-height: 1.45; color: #a7f3d0; }
.tt-inscription__retour--erreur { color: #fbcfe8; }
.tt-inscription__note { margin: 0.35rem 0 0; font-size: 0.78rem; line-height: 1.5; color: #a1a1aa; }
.tt-inscription__note a { color: #ddd6fe; text-underline-offset: 2px; }
/* Champ piege pour les robots : hors ecran, hors tabulation. */
.tt-inscription__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
    .tt-table--croix .tt-scene {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas: "plateau focus" "tete tete" "corps corps";
    }
    .tt-table--croix .tt-focus { justify-self: center; }
    .tt-table--croix .tt-tete { align-self: start; }
}

@media (max-width: 720px) {
    .tt-emplacement { border-radius: 6px; }
    .tt-table--ligne .tt-scene {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "plateau" "tete" "corps";
    }
    .tt-table--ligne { --tt-place-l: calc((100% - 20px) / 3); }
    .tt-places { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .tt-place { gap: 0.3rem; }
    .tt-place__label { font-size: 0.9rem; }
    .tt-plateau > .tt-paquet { border-radius: 6px; }
    .tt-table--ligne .tt-tete { align-self: start; }
    .tt-table--croix { --tt-mini-l: 36px; --tt-carte-h: 230px; }
    .tt-table--croix .tt-plateau { gap: 14px; }
    .tt-croix, .tt-colonne { gap: 6px; }
    .tt-position { margin-bottom: 0.4rem; font-size: 0.86rem; }
    .tt-position strong { font-size: 1.05rem; }
    .tt-nuance { font-size: 0.92rem; margin-bottom: 0.6rem; }
    .tt-actions { margin-top: 0.8rem; }
    .tt-autres__liste { grid-template-columns: 1fr; }
    .tt-etal { --tt-par-rang: 20; --tt-pas: calc((100% - var(--tt-mini-l)) / 20); width: 100%; }
    .tt-table:not(.tt-table--croix) .tt-etal { --tt-mini-l: 36px; }
    .tt-annonce { min-height: 1.6rem; }
    /* Carte du jour : la lecture et le bouton « Tirage suivant » au plus pres de l'ecran. */
    .tt-table:not([class*="tt-table--"]) .tt-mots { display: none; }
    .tt-table:not([class*="tt-table--"]) .tt-actions { margin-top: 0.7rem; }
    .tt-inscription { grid-template-columns: 1fr; gap: 1rem; padding: 1.2rem 1rem; border-radius: 16px; }
    .tt-inscription__ligne { flex-direction: column; }
    .tt-inscription__ligne .tt-bouton { width: 100%; }
    /* Fin de tirage : un seul bouton dans la table, les autres tirages sont juste dessous. */
    .tt-actions .tt-bouton ~ .tt-lien { display: none; }
    .tt-table[data-etat="fin"] .tt-suite { display: block; }
    .tt-table--ligne .tt-plateau { width: min(100%, 17.5rem); justify-self: center; }
    .tt-table--ligne .tt-mots { display: none; }
    .tt-table--croix .tt-mots,
    .tt-table--croix .tt-position span { display: none; }
    .tt-question {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        font-size: 0.86rem;
    }
    .tt-verdict { font-size: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .tt-emplacement, .tt-autres__lien, .tt-etal__carte { transition: none; }
    .tt-emplacement.est-suivante { animation: none; box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.8); }
}
