/*general*/

@font-face {
    font-family: 'manrope-web';
    font-weight: 200 900;
    src: url('Manrope-VF.woff2') format('woff2-variations');
}

:root {
    --vert1: #012626;
    --vert2: #3b8383;
    --rouge: #ff5e55;
}

* {
    margin: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    font: 400 1em manrope-web, sans-serif;
    letter-spacing: .02em;
    margin: 0;
    background: #033;
}

#jeu {
    background-image: url(boule.jpg), linear-gradient(var(--vert1), #033, #033);
    background-repeat: no-repeat;
    background-position: right -200px bottom, 0 0;
    color: var(--vert2);
    min-height: calc(100vh + 200px);
    padding-bottom: 220px;
}

::selection {
    color: var(--vert1);
    background: var(--rouge);
}

#jeu ::selection {
    color: transparent;
    background: transparent;
}

/* Désactive le flash bleu au clic/toucher sur mobile */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Optionnel : Empêche la sélection de texte lors des clics répétés */
.tab-btn, .btn-main, .btn-note, td {
    user-select: none;
    -webkit-user-select: none;
}

button {
    font: inherit;
    letter-spacing: inherit;
    border: 0;
    cursor: pointer;
}

button:active {
    transform: scale(.9);
}

.centre {
    width: 330px;
    margin: 0 auto;
    padding-left: 10px;
}

/*haut*/

#tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}

.tab-btn {
    border: 1px solid var(--vert2);
    border-top: 0;
    padding: 3px 14px 7px;
    border-radius: 0 0 15px 15px;
    opacity: .8;
    cursor: pointer;
}

.tab-btn.active {
    border-color: var(--rouge);
    color: var(--rouge);
    opacity: 1;
}

.difficulty-options {
    display: none;
    gap: 16px;
    margin-bottom: 22px;
}

.difficulty-options.active {
    display: flex;
}

.diff-btn {
    padding: 10px 0;
    color: var(--rouge);
    background: none;
    cursor: pointer;
}


/*grille*/

#flex-grille {
    display: flex;
    justify-content: space-between;
    filter: saturate(1) brightness(.9);
}

#grid-container {
    transition: opacity .2s;
}

.generating {
    opacity: .4;
    pointer-events: none;
}

table {
    border-collapse: collapse;
}

td {
    width: 54px;
    height: 54px;
    position: relative;
    text-align: center;
    vertical-align: middle;
    border: 1px solid var(--vert1);
    font-size: 1.65em;
    font-weight: 700;
    cursor: pointer;
}

.hidden-cell {
    color: transparent !important;
}

.revealed {
    color: var(--vert1) !important;
}

.selected {
    filter: brightness(1.2);
}

.error {
    background-color: var(--rouge) !important;
    color: #fff !important;
    transition: .2s;
}

/* bordures */
.bt {
    border-top: 3px solid var(--vert1) !important;
}

.bb {
    border-bottom: 3px solid var(--vert1) !important;
}

.bl {
    border-left: 3px solid var(--vert1) !important;
}

.br {
    border-right: 3px solid var(--vert1) !important;
}

td.bt.bl::before,
td.bt.br::before,
td.bb.bl::after,
td.bb.br::after {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--vert1);
    z-index: 10;
}

td.bt.bl::before {
    top: -3px;
    left: -3px;
}

td.bt.br::before {
    top: -3px;
    right: -3px;
}

td.bb.bl::after {
    bottom: -3px;
    left: -3px;
}

td.bb.br::after {
    bottom: -3px;
    right: -3px;
}

.notes-grid {
    position: absolute;
    top: 4px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    pointer-events: none;
}

.note-item {
    font-size: .6em;
    color: #e2453d;
    font-weight: 550;
    line-height: 10px;
}

/*boutons chiffres*/

.btn-main {
    display: block;
    width: 45px;
    height: 52px;
    padding: 0 0 0 5px;
    text-align: center;
    margin-top: 2px;
    font-size: 1.65em;
    font-weight: 700;
    background: none;
    color: var(--gris2);
}


/*boutons notes*/

#txt-notes {
    font-size: .8em;
    margin: 16px 0 5px;
    color: var(--rouge);
}

#notes {
    display: flex;
    gap: 0px;
    margin-left: -18px;
}

.btn-note {
    width: 43px;
    height: 42px;
    font-size: 1.1em;
    color: var(--rouge);
    background: none;
    font-weight: normal;
    text-align: center;
}

.btn-note:last-child {
    padding-right: 0;
    /* width: 23px; */
}


/*statut*/

#status::before {
    content: '> ';
}

#status {
    margin-top: 20px;
    color: var(--gris2);
    text-shadow: 0 1px 0px #033
}

/*texte*/

#texte {
    /* background: #a4c4c4; */
    padding-top: 30px;
    margin-top: -200px;
    box-shadow: inset 0 30px 30px rgba(0,0,0,.1);
}

section {
    padding: 15px;
    /* background: rgba(0,0,0,.1); */
    border-radius: 9px;
    width: 600px;
    margin: 0 auto 15px;
    border: 1px solid var(--vert2);
    color: #448e8e;
}

a {
    color: var(--vert2);
}

h1,
h2 {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.2em;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--vert2);
    color: var(--rouge);
}

h3 {
    font-size: 1.3em;
    font-weight: 750;
    margin: 30px 0 10px;
}

ol,
ul {
    padding-left: 18px;
}

li {
    margin-top: 12px;
}

img {
    display: block;
    margin-top: 5px;
}

#retour-bas {
    margin: 40px 0 0 4px;
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--rouge);
    border-right: 2px solid var(--rouge);
    transform: rotate(45deg);
}

#retour-haut {
    position: fixed;
    right: 0;
    bottom: 20px;
    display: block;
    width: 38px;
    height: 32px;
    background: #033;
    border: 1px solid var(--vert2);
    border-right: 0;
    border-radius: 16px 0 0 16px;
    opacity: 0;
    transition: opacity .4s;
}

#retour-haut::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    position: absolute;
    top: 12px;
    left: 11px;
    border-top: 1px solid var(--vert2);
    border-left: 1px solid var(--vert2);
    transform: rotate(45deg);
}

.opacite {
    opacity: 1 !important;
}

#mentions {
    text-align: center;
    font-size: .9em;
    opacity: .4;
    padding: 15px;
}

/*resp*/

@media (max-width: 630px) {

    section {
        width: 330px;
    }
}

@media (max-width: 355px) {

    .centre {
        width: 100%;
        padding: 0 0 0 15px;
    }

    section {
        width: calc(100% - 30px);
        margin-left: 15px;
    }

    .btn-main {
        width: 35px;
        padding: 5px;
    }
}

@media (min-height: 660px) {

    #jeu {
        background-position: right -150px bottom 50px, 0 0;
    }
}
