:root {
    --indigo: #3a3170;
    --corail: #ff6b52;
    --ambre: #ffc857;
    --creme: #f4f1ea;
    --texte-gris: #8a8478;
    --bordure: #e3ddce;
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: #f7f5ef;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e1b4b;
    -webkit-font-smoothing: antialiased;
}

/* Com */
.container {
    /* Com */
    max-width: 760px;
    /* Com */
    margin: 0 auto;
    /* Com */
}

.container,
main,
.main-content {
    width: 100%;
    max-width: 1100px;
    /* Élargi à 1100px au lieu de 600-800px */
    margin: 0 auto;
    padding: 40px 24px 60px 24px;
    /* Respiration haute et basse */
    box-sizing: border-box;
    flex: 1;
    /* Pousse le bandeau violet et le footer tout en bas */
}

/* BANNIERE MAINTENANCE */
.maintenance-banner {
    background-color: var(--corail);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
}

/* NAV */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo .accent {
    color: var(--corail);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 13px;
    font-weight: 600;
}

.nav-right a {
    color: var(--indigo);
    text-decoration: none;
}

.btn-jouer {
    background: var(--indigo);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
}

.btn-menu {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

/* HERO */
.hero {
    text-align: center;
    padding: 40px 24px 56px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: var(--corail);
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.hero h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}

.hero p {
    font-size: 15px;
    font-style: italic;
    color: var(--texte-gris);
    max-width: 420px;
    margin: 0 auto 32px;
}

/* GAME CARD */
.game-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    max-width: 320px;
    margin: 0 auto;
    box-shadow: 0 10px 28px -10px rgba(58, 49, 112, 0.3);
}

.puzzle-label {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--texte-gris);
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.word-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.word-pill {
    background: var(--indigo);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 10px;
    white-space: nowrap;
}

.dashed-line {
    flex: 1;
    height: 2px;
    background-image: repeating-linear-gradient(90deg, var(--bordure) 0 6px, transparent 6px 12px);
    margin: 0 8px;
}

#mot-input {
    width: 100%;
    border: 1.5px solid var(--bordure);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 14px;
}

#mot-input:focus {
    outline: none;
    border-color: var(--corail);
}

.btn-commencer {
    width: 100%;
    background: var(--corail);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-commencer:hover {
    opacity: 0.92;
}

/* STEPS */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 620px;
    margin: 56px auto;
    padding: 0 24px;
    text-align: center;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ambre);
    color: var(--indigo);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.step-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.step-desc {
    font-size: 12px;
    color: var(--texte-gris);
}

/* DUEL BANNER */
.duel-banner {
    background: var(--indigo);
    padding: 40px 24px;
    text-align: center;
}

.duel-banner h2 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.duel-banner p {
    font-size: 13px;
    color: #c9c3e8;
    margin-bottom: 20px;
}

.btn-defier {
    display: inline-block;
    background: var(--corail);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 24px;
    border-radius: 20px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    font-size: 11px;
    color: var(--texte-gris);
}

footer .brand {
    color: var(--indigo);
    font-weight: 600;
}

@media (max-width: 640px) {
    .steps {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 26px;
    }
}

/* Bouton ? dans la navbar */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--bordure);
    color: var(--indigo);
    font-weight: 800;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.15s;
}

.btn-icon:hover {
    border-color: var(--indigo);
    background: #fdfbf7;
}

/* Overlay & Fenêtre modale façon Sutom */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.rules-card {
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.rules-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--indigo);
}

.btn-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--texte-gris);
    cursor: pointer;
    padding: 4px;
}

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

.rules-body p {
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    margin-bottom: 12px;
}

.rules-body ul {
    margin: 0 0 16px 18px;
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
}

.rules-example {
    background: var(--creme);
    border: 1px dashed var(--bordure);
    border-radius: 10px;
    padding: 12px;
    margin-top: 14px;
}

.example-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--texte-gris);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.example-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.pill-ex {
    background: var(--indigo);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}

.pill-ex.target {
    background: var(--corail);
}

.arrow-ex {
    font-size: 11px;
    color: var(--texte-gris);
}







/* Style propre de l'input (police non grasse et aérée) */
#mot-input {
    width: 100%;
    border: 1.5px solid var(--bordure);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14.5px;
    font-weight: 500;
    /* Correction police non grasse */
    font-family: inherit;
    color: var(--indigo);
    background: #fff;
    margin-bottom: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#mot-input:focus {
    outline: none;
    border-color: var(--corail);
    box-shadow: 0 0 0 3px rgba(255, 107, 82, 0.15);
}

#mot-input:disabled {
    background: #faf8f5;
    cursor: not-allowed;
    color: var(--texte-gris);
}

/* Animations de transition Zoom vers /jeu */
.game-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    transform-origin: center center;
}

.game-card.zooming-in {
    transform: scale(1.15);
    opacity: 0.85;
}

body.page-transitioning {
    overflow: hidden;
}




/* Tuile de base du jour */
.cal-day-cell {
    background: #ffffff;
    border: 1.5px solid var(--bordure);
    border-radius: 12px;
    padding: 12px 6px;
    text-align: center;
    transition: transform 0.15s ease;
}

/* État : Jour futur (verrouillé) */
.cal-day-cell.is-future {
    background: #f8fafc;
    border-color: var(--bordure);
    opacity: 0.45;
}

/* État : Jour passé non joué / manqué */
.cal-day-cell.is-past-missed {
    border-color: #fca5a5;
    background: #fffafa;
}

/* État : Partie gagnée */
.cal-day-cell.is-won {
    border-color: #22c55e;
    background: #f0fdf4;
}

/* État : Aujourd'hui (mise en valeur) */
.cal-day-cell.is-today {
    border-color: var(--indigo);
    box-shadow: 0 0 0 2px var(--indigo);
    font-weight: 700;
}



.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #312b6b;
    /* Le violet foncé de Pontymot */
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.btn-nav:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-jouer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #312b6b;
    /* Fond violet foncé */
    color: white !important;
    /* Orange/corail de la DA Pontymot */
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 18px;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-jouer:hover {
    background-color: #241f52;
    color: #ff7862 !important;
    transform: translateY(-1px);
}



/* Calendrier */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* 7 colonnes pour les 7 jours */
    gap: 16px;
    /* Plus d'espace entre les tuiles */
    margin-top: 24px;
    margin-bottom: 40px;
}

.calendar-day-card {
    padding: 16px 12px;
    min-height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.calendar-day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}



.hero-section {
    padding: 40px 0 20px 0;
    text-align: center;
}

.hero-title,
h1.hero-title {
    font-size: 3.2rem !important;
    font-weight: 900 !important;
    color: #1e1b4b !important;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-top: 12px;
    margin-bottom: 16px;
}

.hero-subtitle,
p.hero-subtitle {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #555175 !important;
    font-style: normal !important;
    /* Retire l'italique fin */
    line-height: 1.5;
    max-width: 680px;
    margin: 0 auto 36px auto;
}

.card-preview {
    max-width: 520px;
    /* Carte d'exemple un peu plus généreuse */
    margin: 0 auto 50px auto;
    background: #ffffff;
    border-radius: 28px;
    padding: 36px 40px;
    box-shadow: 0 12px 34px rgba(30, 27, 75, 0.08);
}

.card-preview input {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e1b4b;
}

.steps-banner {
    display: flex;
    justify-content: center;
    gap: 48px;
    /* Plus d'espace entre les 3 étapes (1, 2, 3) */
    margin: 40px 0;
}

/* 5. Bandeau défi violet du bas */
.challenge-banner {
    width: 100%;
    padding: 50px 20px;
    background-color: #312b6b;
    text-align: center;
    color: white;
    margin-top: auto;
    /* Se cale proprement en bas */
}

/* Bouton corail */
.btn-primary,
.btn-action {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
}

/* 4. Les trois étapes (1, 2, 3) */
.steps-banner .step-title,
.steps-container h3 {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #1e1b4b;
    margin-top: 12px;
    margin-bottom: 6px;
}

.steps-banner .step-desc,
.steps-container p {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #6b6889;
}

/* 5. Bandeau inférieur violet */
.challenge-banner h2 {
    font-size: 2rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.challenge-banner p {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    opacity: 0.9;
}


/* Style de la ligne du tableau */
.row-puzzle {
    border-bottom: 1px solid #f1efe8;
}

.row-puzzle.is-today {
    background-color: #fff8f6;
}

/* Style des badges de date */
.badge-date {
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-block;
}

.badge-default {
    background-color: #312b6b;
}

.badge-today {
    background-color: var(--corail, #ff5f45);
}