/* Page Télécharger : deux façons d'obtenir CoddyRun, un compte ou un lien par e-mail. */

.tg-page {
    max-width: 900px;
    margin: 34px auto 10px;
}

.tg-tete {
    text-align: center;
    margin-bottom: 24px;
}

.tg-tete h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.tg-tete h1 em {
    font-style: normal;
    color: var(--accent);
}

.tg-tete p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 auto;
}

.tg-choix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: stretch;   /* les deux cartes ont la même hauteur */
}

.tg-carte {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 22px;
    box-shadow: 0 10px 30px rgba(15, 20, 25, .04);
}

.tg-carte.is-mise-en-avant {
    border-color: var(--accent);
}

.tg-etiquette {
    position: absolute;
    top: -10px;
    left: 22px;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.tg-carte h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--text);
}

.tg-carte h2::before {
    content: none;
}

.tg-carte h2 i {
    font-size: 20px;
    color: var(--accent);
}

.tg-carte > p {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-dim);
    margin: 0 0 16px;
}

.tg-liste {
    list-style: none;
    display: grid;
    gap: 9px;
    margin: 0 0 18px;
    padding: 0;
}

.tg-liste li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-dim);
}

.tg-liste i {
    flex: 0 0 auto;
    font-size: 15px;
    color: var(--accent2);
}

.tg-carte .form-group {
    margin-bottom: 14px;
}

/* un seul et même bouton dans les deux cartes, quelle que soit la balise */
.tg-carte .form-submit,
.tg-carte .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;      /* même hauteur pour le lien et pour le bouton */
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.tg-carte .form-submit:hover,
.tg-carte .btn:hover {
    background: #1a8cd8;
    opacity: 1;
    transform: translateY(-1px);
}

.tg-carte .form-submit[disabled] {
    opacity: .6;
    cursor: progress;
    transform: none;
}

.tg-carte .form-submit i,
.tg-carte .btn i {
    font-size: 17px;
}

/* Les deux cartes se terminent par leur bouton, collé au bas de la carte : la
   petite ligne de texte passe au-dessus du bouton (order), et le bouton est
   poussé en bas (margin-top auto). Les deux boutons tombent donc exactement au
   même niveau, quelle que soit la longueur des textes. */
.tg-carte form,
.tg-pousse {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.tg-carte form {
    order: 2;
}

.tg-carte .form-submit,
.tg-carte .btn {
    margin-top: auto;
}

.tg-sous-lien {
    order: -1;
    margin: 0 0 12px;
    font-size: 11.5px;
    line-height: 1.6;
    text-align: center;
    color: var(--text-dimmer);
}

/* sans cette règle, un lien déjà visité s'affiche en violet, illisible en thème sombre */
.tg-sous-lien a,
.tg-sous-lien a:visited {
    color: var(--accent);
}

.tg-note {
    order: 1;
    margin: 0 0 14px;
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--text-dimmer);
}

/* après l'envoi il n'y a plus de formulaire : la note reprend sa place dessous */
.tg-envoye + .tg-note {
    margin: 14px 0 0;
}

.tg-note a,
.tg-note a:visited {
    color: var(--text-dim);
    text-decoration: underline;
}

.tg-envoye {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(0, 186, 124, .35);
    border-radius: 12px;
    background: rgba(0, 186, 124, .08);
    font-size: 12px;
    line-height: 1.7;
    color: var(--text);
}

.tg-envoye i {
    font-size: 22px;
    color: var(--accent2);
}

.tg-envoye strong {
    font-size: 13px;
}

.tg-envoye span {
    color: var(--text-dim);
}

.tg-apres {
    margin: 22px auto 0;
    max-width: 620px;
    text-align: center;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--text-dimmer);
}

/* page du lien reçu par e-mail */
.tg-lien {
    max-width: 520px;
    margin: 50px auto 0;
    text-align: center;
}

.tg-lien .tg-carte {
    align-items: center;
    padding: 32px 26px;
}

.tg-lien h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.6px;
    margin-bottom: 8px;
}

.tg-lien p {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text-dim);
    margin: 0 0 18px;
}

.tg-lien .tg-rond {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(29, 155, 240, .1);
    color: var(--accent);
    font-size: 30px;
}

.tg-lien .tg-rond.is-perime {
    background: rgba(244, 33, 46, .1);
    color: #f4212e;
}

@media (max-width: 820px) {
    .tg-choix {
        grid-template-columns: 1fr;
    }

    .tg-page {
        margin-top: 22px;
    }
}
