:root {
    --fond: #0a0a1a; --fond2: #1a1a2e; --fond3: #16213e;
    --texte: #f5f0e8; --or: #d4af37; --gap: 10px;
    --coeur: #ff6b6b; --trefle: #55ff77; --carreau: #ffd700; --pique: #87ceeb;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--fond); }
body {
    margin: 0; min-height: 100vh; color: var(--texte); font-family: Georgia, 'Times New Roman', serif; line-height: 1.6;
    background: linear-gradient(160deg, var(--fond) 0%, var(--fond2) 55%, var(--fond3) 100%) fixed;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.entete { text-align: center; padding: 18px 16px 6px; }
.entete h1 { margin: 0; font-size: 1.45rem; color: var(--or); font-weight: normal; letter-spacing: .5px; }
.validite { margin: 6px 0 0; font-size: .85rem; color: rgba(245, 240, 232, .7); }
.onglets { display: flex; gap: 6px; padding: 12px 12px 4px; position: sticky; top: 0; z-index: 5; justify-content: center;
    background: linear-gradient(180deg, var(--fond) 70%, transparent); }
.onglet { flex: 1; max-width: 110px; padding: 9px 4px; border: 1px solid rgba(212, 175, 55, .45); border-radius: 20px;
    background: transparent; color: var(--texte); font: inherit; font-size: .9rem; cursor: pointer; }
.onglet.actif { background: linear-gradient(135deg, #d4af37, #ffd700); color: var(--fond); font-weight: bold; border-color: transparent; }
main { max-width: 720px; margin: 0 auto; padding: 8px 16px 24px; }
.titre-tirage { text-align: center; color: var(--or); font-weight: normal; font-size: 1.25rem; margin: 14px 0; }
.cartes { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.carte { position: relative; display: block; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: center; }
.cartes.n1 .carte { width: 170px; }
.cartes.n3 .carte, .cartes.n5 .carte { width: calc((100% - 2 * var(--gap)) / 3); max-width: 190px; }
.cartes.n4 .carte { width: calc((100% - var(--gap)) / 2); max-width: 190px; }
@media (min-width: 520px) { .cartes.n4 .carte { width: calc((100% - 3 * var(--gap)) / 4); } }
.carte-img { display: block; width: 100%; aspect-ratio: 2 / 3; border-radius: 8px; border: 1px solid var(--or); background: #0a0a1a center / cover no-repeat;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .6); }
.carte.f-coeur .carte-img { border-color: var(--coeur); box-shadow: 0 0 12px rgba(255, 107, 107, .25); }
.carte.f-trefle .carte-img { border-color: var(--trefle); box-shadow: 0 0 12px rgba(85, 255, 119, .25); }
.carte.f-carreau .carte-img { border-color: var(--carreau); box-shadow: 0 0 12px rgba(255, 215, 0, .25); }
.carte.f-pique .carte-img { border-color: var(--pique); box-shadow: 0 0 12px rgba(135, 206, 235, .25); }
.carte-nom { position: absolute; left: 0; right: 0; bottom: 26px; padding: 4px 3px; font-size: .62rem; font-weight: bold; line-height: 1.2;
    background: rgba(0, 0, 0, .78); border-radius: 0 0 7px 7px; word-break: break-word; }
.carte-pos { display: block; margin-top: 6px; color: var(--or); font-size: .72rem; font-weight: bold; text-transform: uppercase; letter-spacing: .4px; }
.astuce { text-align: center; font-size: .8rem; color: rgba(245, 240, 232, .55); margin: 10px 0 0; }
.bloc { margin-top: 20px; padding: 16px 18px; border-left: 4px solid var(--or); border-radius: 8px; background: rgba(245, 240, 232, .05); }
.bloc h3 { margin: 0 0 10px; color: var(--or); font-weight: normal; font-size: 1.1rem; }
.bloc p { margin: 0 0 10px; }
.bloc strong { color: var(--or); }
.attente { font-style: italic; color: rgba(245, 240, 232, .65); }
.produits-liste { display: grid; gap: 12px; }
.produit { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; text-decoration: none; color: inherit;
    padding: 10px; border: 1px solid rgba(212, 175, 55, .35); border-radius: 10px; background: rgba(0, 0, 0, .2); }
.produit-img { width: 84px; height: 84px; border-radius: 8px; background: #0a0a1a center / cover no-repeat; }
.produit-titre { display: block; font-weight: bold; line-height: 1.25; }
.produit-raison { display: block; font-size: .8rem; color: rgba(245, 240, 232, .65); font-style: italic; margin: 2px 0; }
.produit-prix { display: block; color: var(--or); font-weight: bold; }
.produit-lien { display: inline-block; margin-top: 4px; font-size: .8rem; color: var(--or); text-decoration: underline; }
.mention { font-size: .72rem; color: rgba(245, 240, 232, .5); margin: 8px 0 0 !important; }
.livre-couv { width: 90px; border-radius: 6px; float: left; margin: 0 14px 6px 0; }
.bouton, .bouton-installer { display: inline-block; padding: 10px 18px; border: 0; border-radius: 8px; cursor: pointer; text-decoration: none;
    background: linear-gradient(135deg, #d4af37, #ffd700); color: var(--fond); font: bold .95rem Georgia, serif; }
.erreur { text-align: center; color: #ff6b6b; }
.hors-ligne { text-align: center; font-size: .8rem; color: #ffd700; margin: 8px 0 0; }
.pied { text-align: center; padding: 8px 20px 30px; font-size: .78rem; color: rgba(245, 240, 232, .55); }
.pied a { color: var(--or); }
.pied[hidden], [hidden] { display: none !important; }
/* fiche d'une carte : feuille qui monte du bas */
.fiche { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .8); display: flex; align-items: flex-end; justify-content: center; }
.fiche-boite { position: relative; width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; padding: 22px 18px 30px;
    border-radius: 16px 16px 0 0; border: 1px solid var(--or); background: linear-gradient(135deg, var(--fond2), #111122); }
.fiche-fermer { position: sticky; top: 0; float: right; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .5);
    color: var(--or); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.fiche-img { display: block; width: 190px; max-width: 60%; height: auto; margin: 0 auto 14px; border-radius: 10px; border: 1px solid var(--or); }
.fiche-sans-image { width: 160px; aspect-ratio: 2 / 3; margin: 0 auto 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 10px; border: 1px solid var(--or); border-radius: 10px; color: rgba(245, 240, 232, .55); background: #0a0a1a; }
.fiche h2 { margin: 0; color: var(--or); font-weight: normal; text-align: center; }
.fiche .sous-titre { text-align: center; font-style: italic; color: rgba(245, 240, 232, .7); margin: 2px 0 14px; }
.fiche h4 { color: var(--or); margin: 20px 0 8px; padding-bottom: 5px; border-bottom: 1px solid rgba(212, 175, 55, .25); }
.fiche .grille { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: .9rem; }
.fiche .grille strong { color: var(--or); }
@media (max-width: 380px) { .fiche .grille { grid-template-columns: 1fr; } }
body.fiche-ouverte { overflow: hidden; }

/* article à la une et carte du test */
.carte-lien { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; text-decoration: none; color: inherit;
    padding: 10px; border: 1px solid rgba(212, 175, 55, .35); border-radius: 10px; background: rgba(0, 0, 0, .2); }
.carte-lien.sans-img { grid-template-columns: 1fr; }
.lien-img { width: 110px; height: 80px; border-radius: 8px; background: #0a0a1a center / cover no-repeat; }
.lien-texte { display: block; font-size: .85rem; color: rgba(245, 240, 232, .75); margin: 2px 0; line-height: 1.4; }

/* test : écran plein page */
button.carte-lien { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.test { position: fixed; inset: 0; z-index: 30; overflow-y: auto; background: linear-gradient(160deg, #1a1228 0%, #2d1f45 100%); }
.test[hidden] { display: none; }
.test-boite { max-width: 680px; margin: 0 auto; padding: 56px 18px 40px; color: #e8e0d4; position: relative; }
.test .fiche-fermer { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 31; }
.test-titre { text-align: center; font-weight: normal; color: #e8c98a; font-size: 1.2rem; letter-spacing: .04em; margin: 0 0 18px; }
.test-progres { display: flex; justify-content: space-between; font-size: .8rem; color: #a899b8; margin-bottom: 6px; }
.test-barre { height: 3px; background: rgba(255, 255, 255, .1); border-radius: 2px; overflow: hidden; margin-bottom: 18px; }
.test-barre-remplie { height: 100%; background: linear-gradient(90deg, #7c5cbf, #c9a96e); transition: width .4s ease; }
.test-carte { background: rgba(58, 40, 88, .45); border: 1px solid rgba(201, 169, 110, .25); border-radius: 16px; padding: 22px 18px; }
.test-num { font-size: .7rem; letter-spacing: .25em; color: #c9a96e; margin-bottom: 10px; }
.test-q { font-style: italic; font-size: 1.1rem; line-height: 1.6; margin: 0 0 18px; color: #f5f0e8; }
.test-options { display: flex; flex-direction: column; gap: 10px; }
.test-option { text-align: left; font: inherit; font-size: .95rem; line-height: 1.5; color: #a899b8; padding: 12px 14px; border-radius: 10px; cursor: pointer;
    background: rgba(26, 18, 40, .6); border: 1px solid rgba(201, 169, 110, .2); }
.test-option.selected { border-color: #c9a96e; color: #e8c98a; background: rgba(124, 92, 191, .28); }
.test-nav { display: flex; justify-content: flex-end; margin-top: 16px; }
.test-nav .bouton:disabled { opacity: .35; }
.test-resultat { text-align: center; background: rgba(58, 40, 88, .5); border: 1px solid rgba(201, 169, 110, .3); border-radius: 20px; padding: 26px 18px; }
.test-icone { display: block; font-size: 2.6rem; margin-bottom: 8px; }
.test-eyebrow { font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: #c9a96e; margin-bottom: 6px; }
.test-profil { margin: 0 0 4px; font-weight: normal; color: #e8c98a; font-size: 1.45rem; }
.test-sous-titre { font-style: italic; color: #a899b8; margin: 0 0 16px; }
.test-desc { text-align: left; line-height: 1.8; margin: 0 0 18px; }
.test-pierres { text-align: left; background: rgba(26, 18, 40, .6); border: 1px solid rgba(201, 169, 110, .18); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.test-pierres h3 { margin: 0 0 6px; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: #c9a96e; font-weight: normal; }
.test-pierres p { margin: 0; font-style: italic; color: #a899b8; line-height: 1.7; }
.test-liens { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.test-cta { text-align: center; }
.test-lien { display: block; text-align: center; font: inherit; font-size: .85rem; color: #a899b8; text-decoration: none; cursor: pointer; background: transparent;
    padding: 10px 14px; border: 1px solid rgba(201, 169, 110, .35); border-radius: 40px; }
.test-email { background: rgba(26, 18, 40, .7); border: 1px solid rgba(201, 169, 110, .22); border-radius: 14px; padding: 16px 14px; margin-bottom: 16px; }
.test-email h3 { margin: 0 0 6px; font-size: .85rem; letter-spacing: .15em; text-transform: uppercase; color: #c9a96e; font-weight: normal; }
.test-email p { margin: 0 0 10px; font-style: italic; color: #a899b8; font-size: .9rem; }
.test-email input[type=email] { width: 100%; padding: 11px 14px; border-radius: 40px; border: 1px solid rgba(201, 169, 110, .35); background: rgba(255, 255, 255, .06); color: #f5f0e8; font: inherit; margin-bottom: 10px; }
.test-consent { display: block; text-align: left; font-size: .78rem; line-height: 1.5; color: #a899b8; margin-bottom: 10px; }
.test-consent a { color: #c9a96e; }
.test-message { min-height: 1.2em; font-size: .85rem !important; margin-top: 8px !important; }
.test-message.ok { color: #e8c98a; } .test-message.ko { color: #ff8c8c; }
.test-actions { display: flex; flex-direction: column; gap: 8px; }
