:root {
    --encre: #30313d;
    --papier: #fbf4e8;
    --vert: #cfe8a3;
    --orange: #efb7aa;
    --gris: #e4deee;
    --lavande: #dcd7f0;
    --menthe: #d5ead3;
    --jaune: #f4e3a3;
    --lien: #4c3f91;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--papier);
    color: var(--encre);
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

button,
input {
    font: inherit;
}

a {
    color: var(--lien);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

button,
a {
    transition: all 0.2s;
}

.application {
    min-height: 100vh;
    overflow: hidden;
}

.entete {
    border-bottom: 1px solid var(--gris);
    justify-content: space-between;
    align-items: center;
    height: 86px;
    padding: 0 5vw;
    display: flex;
}

.marque {
    letter-spacing: 0.08em;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    line-height: 1.05;
    display: flex;
}

.logo {
    background: var(--encre);
    width: 42px;
    height: 42px;
    color: var(--vert);
    place-items: center;
    font-size: 13px;
    font-weight: 900;
    display: grid;
    transform: rotate(-3deg);
}

nav {
    background: var(--gris);
    border-radius: 99px;
    gap: 8px;
    padding: 5px;
    display: flex;
}

nav button {
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 99px;
    padding: 10px 17px;
    font-size: 15px;
    font-weight: 700;
}

nav .actif {
    background: var(--menthe);
    box-shadow: 0 2px 8px #00000010;
}

.score-entete {
    background: var(--jaune);
    border: 2px solid var(--encre);
    padding: 9px 14px;
    min-width: 118px;
    text-align: center;
    box-shadow: 4px 4px 0 var(--lavande);
}

.score-entete small {
    letter-spacing: 0.12em;
    font-size: 9px;
    font-weight: 1000;
    display: block;
}

.score-entete strong {
    font-size: 18px;
    font-weight: 1000;
}

.profil {
    text-align: left;
    cursor: pointer;
    background: transparent;
    border: 0;
    align-items: center;
    gap: 9px;
    display: flex;
}

.profil > span {
    background: var(--jaune);
    width: 38px;
    height: 38px;
    color: var(--encre);
    border-radius: 50%;
    place-items: center;
    font-weight: 900;
    display: grid;
    overflow: hidden;
}

.profil > span img,
.avatar img,
.avatar-activite img,
.avatar-edition img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profil small {
    line-height: 1.35;
}

.profil b {
    color: #777;
    font-weight: 400;
}

.hero {
    justify-content: space-between;
    align-items: end;
    padding: 58px 7vw 38px;
    display: flex;
}

.surtitre {
    letter-spacing: 0.16em;
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 900;
}

.surtitre i {
    background: var(--vert);
    border-radius: 50%;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    display: inline-block;
    box-shadow: 0 0 0 4px #cfe8a366;
}

.hero h1 {
    letter-spacing: -0.04em;
    max-width: 830px;
    margin: 0;
    font-size: clamp(45px, 6.5vw, 92px);
    line-height: 0.88;
}

.note-solo {
    color: #5c5b66;
    max-width: 620px;
    margin: 18px 0 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.decompte {
    text-align: right;
    margin-bottom: 5px;
}

.decompte span,
.decompte small {
    letter-spacing: 0.17em;
    color: #666;
    font-size: 11px;
    font-weight: 800;
    display: block;
}

.decompte strong {
    letter-spacing: 0.02em;
    margin: 7px 0;
    font-family: monospace;
    font-size: 40px;
    display: block;
}

.decompte.termine strong,
.decompte.termine span {
    color: var(--orange);
}

.versus {
    background: var(--lavande);
    color: var(--encre);
    clip-path: polygon(1% 0, 100% 0, 99% 100%, 0 100%);
    grid-template-columns: 1fr 1fr;
    min-height: 230px;
    margin: 0 5vw;
    display: grid;
    position: relative;
    overflow: hidden;
}

.versus:before {
    content: "";
    background: var(--vert);
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, calc(var(--part-gauche, 50%) + 24px) 0, calc(var(--part-gauche, 50%) - 24px) 100%, 0 100%);
}

.versus:after {
    content: "";
    background: var(--encre);
    width: 3px;
    height: 145%;
    position: absolute;
    top: -22%;
    left: var(--part-gauche, 50%);
    transform: translateX(-50%) rotate(12deg);
    transform-origin: center;
}

.combattant {
    z-index: 1;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 35px;
    display: flex;
}

.combattant.gagnant {
    background: transparent;
}

.avatar {
    color: var(--encre);
    background: var(--papier);
    border: 7px solid var(--menthe);
    border-radius: 50%;
    place-items: center;
    inline-size: 132px;
    block-size: 132px;
    min-inline-size: 132px;
    min-block-size: 132px;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    font-size: 42px;
    font-weight: 900;
    display: grid;
    position: relative;
    box-shadow: 0 0 0 1px #ffffff30;
    overflow: hidden;
}

.gagnant .avatar {
    border-color: var(--vert);
    box-shadow: 0 0 30px #cfe8a355;
}

.avatar em {
    background: var(--vert);
    color: var(--encre);
    border-radius: 50%;
    place-items: center;
    width: 35px;
    height: 35px;
    font-size: 17px;
    font-style: normal;
    display: grid;
    position: absolute;
    top: -9px;
    right: -3px;
}

.combattant small {
    letter-spacing: 0.15em;
    color: #5c5b66;
    font-size: 11px;
    font-weight: 900;
}

.gagnant small {
    color: var(--vert);
}

.combattant h2 {
    margin: 7px 0;
    font-size: 34px;
}

.combattant strong {
    font-size: 31px;
}

.combattant strong span {
    color: #5c5b66;
    font-size: 12px;
}

.vs {
    z-index: 2;
    background: var(--orange);
    padding: 13px 11px;
    font-style: italic;
    font-weight: 1000;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-6deg);
}

.progression {
    gap: 10px;
    padding: 26px 7vw 40px;
    display: grid;
}

.ligne-score {
    grid-template-columns: 24px 100px 1fr 55px;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    display: grid;
}

.ligne-score > span {
    font-weight: 900;
}

.ligne-score > div {
    background: var(--gris);
    border-radius: 99px;
    height: 8px;
    overflow: hidden;
}

.ligne-score i {
    background: var(--encre);
    border-radius: 99px;
    height: 100%;
    display: block;
}

.ligne-score:first-child i {
    background: var(--vert);
}

.ligne-score strong {
    text-align: right;
}

.zone-action {
    background: var(--vert);
    justify-content: space-between;
    align-items: center;
    padding: 42px 8vw;
    display: flex;
}

.zone-action h2 {
    letter-spacing: -0.02em;
    margin: 0;
    font-size: 38px;
    line-height: 1.02;
}

.bouton-ajouter {
    background: var(--lavande);
    color: var(--encre);
    cursor: pointer;
    border: 2px solid var(--encre);
    align-items: center;
    gap: 15px;
    padding: 11px 12px 11px 18px;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    box-shadow: 7px 7px #ffffff80;
}

.bouton-ajouter:hover {
    transform: translateY(-3px);
}

.bouton-ajouter > span {
    place-items: center;
    width: 24px;
    height: 24px;
    font-size: 18px;
    display: grid;
}

.bouton-ajouter small {
    background: var(--vert);
    color: #111;
    padding: 11px;
}

.actions-principales {
    align-items: center;
    gap: 18px;
    display: flex;
}

.bouton-secondaire {
    border: 1px solid var(--encre);
    cursor: pointer;
    background: transparent;
    padding: 15px 18px;
    font-weight: 800;
    font-size: 15px;
}

.bouton-relance-rapide {
    background: var(--jaune);
    border: 2px solid var(--encre);
    cursor: pointer;
    padding: 13px 18px;
    font-weight: 900;
    font-size: 15px;
    box-shadow: 5px 5px 0 #fff8;
}

.bouton-relance-rapide span {
    background: var(--encre);
    color: #fffdf8;
    border-radius: 999px;
    min-width: 28px;
    margin-right: 8px;
    padding: 4px 8px;
    display: inline-block;
}

.bouton-relance-rapide:hover {
    transform: translateY(-3px);
}

.bouton-secondaire:hover {
    background: var(--menthe);
}

.bas-page {
    gap: 28px;
    padding: 55px 7vw;
    display: grid;
}

.statistiques {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    display: grid;
}

.statistiques article {
    background: var(--menthe);
    border: 1px solid var(--gris);
    align-items: center;
    gap: 12px;
    min-height: 92px;
    padding: 16px 18px;
    display: flex;
}

.statistiques article > span {
    text-align: center;
    width: 28px;
    font-size: 22px;
    flex: 0 0 auto;
}

.statistiques strong {
    font-size: 30px;
    line-height: 1;
}

.statistiques small {
    letter-spacing: 0.1em;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
}

.statistiques .bonus {
    background: var(--jaune);
    color: var(--encre);
}

.activite > div {
    border-bottom: 1px solid #ccc;
    justify-content: space-between;
    align-items: center;
    display: flex;
}

.activite h3 {
    font-size: 20px;
}

.activite button {
    background: transparent;
    border: 0;
    font-size: 14px;
    font-weight: 800;
}

.activite button i,
.bouton-principal i {
    margin-left: 6px;
}

.activite article,
.panneau-historique article {
    border-bottom: 1px solid #ddd;
    grid-template-columns: 38px 1fr 40px;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    display: grid;
}

.activite article > span,
.panneau-historique article > span {
    color: var(--encre);
    background: var(--lavande);
    border-radius: 50%;
    place-items: center;
    width: 36px;
    height: 36px;
    font-size: 11px;
    font-weight: 900;
    display: grid;
    overflow: hidden;
}

.activite p,
.panneau-historique article p {
    margin: 0;
    font-size: 14px;
}

.activite p small,
.panneau-historique article p small {
    color: #888;
    margin-top: 4px;
    font-size: 12px;
    display: block;
}

.activite em,
.panneau-historique article em {
    color: #4f8f00;
    font-style: normal;
    font-weight: 900;
}

.vide {
    color: #777;
    padding-top: 24px;
    font-size: 15px;
}

.connexion {
    background: var(--vert);
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    display: grid;
}

.carte-connexion {
    background: var(--papier);
    width: min(650px, 100%);
    box-shadow: 15px 15px 0 var(--encre);
    padding: 60px;
}

.carte-connexion h1 {
    letter-spacing: -0.04em;
    margin: 30px 0;
    font-size: 58px;
    line-height: 0.92;
}

.carte-connexion > p:not(.surtitre) {
    color: #666;
    line-height: 1.6;
}

.form-auth {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.form-auth label {
    letter-spacing: 0.08em;
    font-size: 11px;
    font-weight: 900;
}

.form-auth input {
    background: #fffdf8;
    border: 1px solid #bbb;
    width: 100%;
    margin-top: 7px;
    padding: 14px;
}

.lien-auth {
    cursor: pointer;
    background: transparent;
    border: 0;
    margin-top: 16px;
    padding: 0;
    color: #5c5a52;
    font-size: 15px;
    font-weight: 800;
    text-decoration: underline;
}

.erreur {
    background: #fff;
    border-left: 5px solid var(--orange);
    margin-top: 18px;
    padding: 13px;
    color: #6d2f20;
    font-size: 15px;
    font-weight: 700;
}

.bouton-principal {
    background: var(--lavande);
    color: var(--encre);
    cursor: pointer;
    border: 2px solid var(--encre);
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 16px;
    padding: 18px 20px;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
    display: flex;
}

.bouton-principal span {
    color: var(--vert);
}

.modale {
    z-index: 10;
    background: #30313dcc;
    place-items: center;
    padding: 20px;
    display: grid;
    position: fixed;
    inset: 0;
}

.modale form,
.panneau-prospects,
.panneau-historique {
    background: var(--papier);
    width: min(480px, 100%);
    box-shadow: 12px 12px 0 var(--vert);
    padding: 42px;
    position: relative;
}

.panneau-prospects {
    width: min(900px, 100%);
    max-height: 86vh;
    overflow: auto;
}

.panneau-historique {
    width: min(650px, 100%);
    max-height: 86vh;
    overflow: auto;
}

.modale h2,
.panneau-prospects h2,
.panneau-historique h2 {
    margin: 0 0 28px;
    font-size: 36px;
}

.photo-profil {
    background: var(--menthe);
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    padding: 14px;
    display: flex;
}

.avatar-edition {
    background: var(--jaune);
    border-radius: 50%;
    place-items: center;
    width: 68px;
    height: 68px;
    color: var(--encre);
    font-size: 19px;
    font-weight: 900;
    display: grid;
    overflow: hidden;
    flex: 0 0 auto;
}

.photo-profil label {
    flex: 1;
    margin: 0;
}

.photo-profil input {
    background: #fffdf8;
    cursor: pointer;
}

.modale label {
    letter-spacing: 0.08em;
    margin: 15px 0;
    font-size: 12px;
    font-weight: 900;
    display: block;
}

.modale input {
    background: #fffdf8;
    border: 1px solid #bbb;
    outline: none;
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    display: block;
}

.modale input:focus {
    box-shadow: 0 0 0 2px var(--vert);
    border-color: #111;
}

.contexte-prospect {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    display: grid;
}

.contexte-prospect label {
    margin-bottom: 8px;
}

.fermer {
    cursor: pointer;
    background: transparent;
    border: 0;
    font-size: 30px;
    position: absolute;
    top: 12px;
    right: 15px;
}

.notification {
    z-index: 40;
    background: var(--lavande);
    color: var(--encre);
    box-shadow: 5px 5px 0 var(--orange);
    padding: 18px 24px;
    font-weight: 900;
    font-size: 15px;
    position: fixed;
    bottom: 25px;
    right: 25px;
}

.popup-erreur {
    z-index: 45;
    background: #30313dcc;
    place-items: center;
    padding: 22px;
    display: grid;
    position: fixed;
    inset: 0;
}

.popup-erreur section {
    background: var(--papier);
    border: 2px solid var(--encre);
    width: min(520px, calc(100vw - 38px));
    box-shadow: 12px 12px 0 var(--orange), 0 24px 80px #0007;
    padding: 40px 34px 32px;
    position: relative;
    animation: 0.32s cubic-bezier(0.16, 1, 0.3, 1) rebond-celebration;
}

.popup-erreur small {
    letter-spacing: 0.14em;
    color: #6a3b32;
    font-size: 12px;
    font-weight: 1000;
}

.popup-erreur strong {
    margin-top: 14px;
    font-size: 20px;
    line-height: 1.35;
    display: block;
}

.prospect-prive {
    border-top: 1px solid #d5d0c7;
    grid-template-columns: 1fr 1.7fr;
    gap: 25px;
    padding: 22px 0;
    display: grid;
}

.prospect-prive > div:first-child {
    flex-direction: column;
    gap: 6px;
    display: flex;
}

.prospect-prive a {
    color: var(--lien);
    text-decoration: underline;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
    font-size: 12px;
    overflow: hidden;
}

.prospect-prive small {
    color: #777;
    font-size: 12px;
}

.parcours-prospect {
    flex-direction: column;
    gap: 9px;
    display: flex;
}

.actions-prospect {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    display: grid;
}

.action-relance {
    min-width: 0;
}

.action-relance button {
    width: 100%;
}

.delai-relance {
    color: #5c5b66;
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.35;
}

.delai-relance.disponible {
    color: #4f8f00;
    font-weight: 900;
}

.actions-prospect button {
    text-align: left;
    cursor: pointer;
    background: #fffdf8;
    border: 1px solid #c9c3b9;
    padding: 13px;
    font-size: 13px;
    font-weight: 800;
    transition: all 0.18s;
}

.actions-prospect button:hover {
    background: var(--vert);
    box-shadow: 3px 3px 0 var(--encre);
    transform: translateY(-2px);
}

.actions-prospect button:active {
    box-shadow: none;
    transform: scale(0.97);
}

.actions-prospect b {
    float: right;
}

.actions-prospect .client {
    background: var(--menthe);
    border-color: var(--menthe);
}

.actions-prospect button:disabled {
    cursor: not-allowed;
    color: #999;
    box-shadow: none;
    background: var(--gris);
    border-color: #ddd;
    transform: none;
}

.profil-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.danger {
    border-color: var(--orange);
}

.celebration,
.victoire {
    z-index: 30;
    background:
        radial-gradient(circle at 50% 42%, #cfe8a366 0 16%, transparent 36%),
        #30313dcc;
    place-items: center;
    display: grid;
    position: fixed;
    inset: 0;
    overflow: hidden;
}

.recompense {
    background: var(--vert);
    color: var(--encre);
    width: min(520px, calc(100vw - 38px));
    box-shadow: 14px 14px 0 var(--orange), 0 28px 90px #0007;
    flex-direction: column;
    align-items: center;
    padding: 42px 32px 34px;
    animation: 0.62s cubic-bezier(0.16, 1, 0.3, 1) rebond-celebration;
    display: flex;
    position: relative;
    transform-origin: center;
}

.recompense-victoire {
    background: var(--menthe);
}

.recompense:before {
    content: "";
    border: 2px solid #ffffff90;
    position: absolute;
    inset: 12px;
    pointer-events: none;
}

.recompense span {
    letter-spacing: 0;
    text-align: center;
    margin: 8px 0 6px;
    font-size: clamp(58px, 13vw, 96px);
    line-height: 0.9;
    font-weight: 1000;
    text-shadow: 4px 4px 0 #ffffff80;
    animation: pulse-recompense 1.15s ease-in-out infinite;
}

.recompense strong {
    text-align: center;
    font-size: 22px;
}

.recompense small {
    letter-spacing: 0.16em;
    font-size: 11px;
    font-weight: 1000;
}

.recompense p {
    margin: 10px 0 0;
    color: #4f5148;
    font-size: 14px;
    font-weight: 800;
}

.bouton-recompense {
    background: var(--lavande);
    color: var(--encre);
    cursor: pointer;
    border: 2px solid var(--encre);
    margin-top: 24px;
    padding: 15px 28px;
    font-weight: 900;
    box-shadow: 5px 5px 0 #ffffff90;
}

.bouton-recompense:hover {
    transform: translateY(-3px);
}

.fermer-recompense {
    background: var(--jaune);
    color: var(--encre);
    cursor: pointer;
    border: 2px solid var(--encre);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 26px;
    line-height: 1;
    position: absolute;
    top: -16px;
    right: -16px;
}

.confettis {
    pointer-events: none;
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.confettis i {
    --x: 50;
    --delay: 0s;
    --duration: 7s;
    --drift: 20px;
    --sway: 0px;
    --w: 10px;
    --h: 14px;
    --radius: 3px;
    --spin: 1;
    --c: var(--orange);
    background: var(--c);
    border-radius: var(--radius);
    width: var(--w);
    height: var(--h);
    position: absolute;
    top: -12vh;
    left: calc(var(--x) * 1%);
    opacity: 0;
    animation: chute-confetti var(--duration) var(--delay) cubic-bezier(0.28, 0.66, 0.42, 1) infinite;
}

@keyframes rebond-celebration {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.72) rotate(-4deg);
    }

    62% {
        transform: translateY(-8px) scale(1.04) rotate(1deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0);
    }
}

@keyframes pulse-recompense {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes chute-confetti {
    0% {
        opacity: 0;
        transform: translate3d(calc(var(--sway) * -1), -12vh, 0) rotate(0deg);
    }

    12% {
        opacity: 0.95;
    }

    48% {
        transform: translate3d(var(--sway), 48vh, 0) rotate(calc(var(--spin) * 260deg));
    }

    80% {
        opacity: 0.9;
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--drift), 112vh, 0) rotate(calc(var(--spin) * 540deg));
    }
}

@media (prefers-reduced-motion: reduce) {
    .recompense,
    .recompense span,
    .confettis i {
        animation: none;
    }
}

@media (width <= 800px) {
    .entete {
        height: 70px;
        padding: 0 20px;
    }

    .entete nav,
    .profil small {
        display: none;
    }

    .score-entete {
        min-width: 90px;
        padding: 7px 9px;
    }

    .score-entete strong {
        font-size: 14px;
    }

    .hero {
        padding: 40px 24px 25px;
        display: block;
    }

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

    .decompte {
        text-align: left;
        margin-top: 28px;
    }

    .versus {
        clip-path: none;
        grid-template-columns: 1fr;
        margin: 0 14px;
    }

    .versus:after,
    .vs {
        display: none;
    }

    .combattant {
        justify-content: flex-start;
        padding: 22px;
    }

    .avatar {
        inline-size: 85px;
        block-size: 85px;
        min-inline-size: 85px;
        min-block-size: 85px;
        font-size: 25px;
    }

    .combattant h2 {
        font-size: 25px;
    }

    .progression {
        padding: 25px 24px;
    }

    .zone-action {
        padding: 35px 24px;
        display: block;
    }

    .zone-action h2 {
        font-size: 30px;
    }

    .actions-principales {
        display: block;
    }

    .bouton-secondaire {
        width: 100%;
        margin-top: 24px;
    }

    .bouton-relance-rapide {
        width: 100%;
        margin-top: 24px;
    }

    .bouton-ajouter {
        justify-content: space-between;
        width: 100%;
        margin-top: 10px;
    }

    .bas-page {
        padding: 35px 20px;
    }

    .statistiques {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .statistiques article {
        min-height: 125px;
        padding: 12px;
    }

    .statistiques strong {
        font-size: 26px;
    }

    .contexte-prospect {
        grid-template-columns: 1fr;
    }

    .carte-connexion {
        padding: 35px;
    }

    .carte-connexion h1 {
        font-size: 44px;
    }

    .panneau-prospects,
    .panneau-historique {
        padding: 30px 20px;
    }

    .prospect-prive {
        grid-template-columns: 1fr;
    }

    .actions-prospect {
        grid-template-columns: 1fr 1fr;
    }
}
