/* =======================================================
   RESET
======================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: #f4f6f9;
    color: #1f2937;

    line-height: 1.5;
}

/* =======================================================
   LAYOUT
======================================================= */

.container {
    width: 100%;
    max-width: 900px;

    margin: 0 auto;
    padding: 1rem;
}

h1 {
    margin-top: 0;

    text-align: center;
    color: #1e3a8a;

    font-size: 2rem;
}

h2 {
    margin-top: 0;
}

.intro {
    text-align: center;

    margin-bottom: 2rem;

    color: #4b5563;
}

/* =======================================================
   CARTES
======================================================= */

.card {
    position: relative;

    background: white;

    border-radius: 12px;

    padding: 1rem;
    margin-bottom: 1rem;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.card label {
    display: block;

    font-weight: 600;

    margin-bottom: 0.75rem;

    color: #111827;
}

/* =======================================================
   FORMULAIRES
======================================================= */

select,
input[type="text"],
textarea {
    width: 100%;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    padding: 0.9rem;

    font-size: 1rem;

    transition: border-color 0.2s;
}

select:focus,
input:focus,
textarea:focus {
    outline: none;

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37,99,235,.15);
}

textarea {
    resize: vertical;
    min-height: 90px;
}

/* =======================================================
   STATUTS
======================================================= */

.status {
    display: inline-block;

    margin-top: 0.75rem;

    font-size: 1.8rem;

    font-weight: bold;
}

.status.success {
    color: #16a34a;
}

.status.error {
    color: #dc2626;
}

/* =======================================================
   SUCCESS MESSAGE
======================================================= */

.success-message {
    margin-top: 2rem;

    padding: 1.5rem;

    border-radius: 12px;

    background: #dcfce7;

    border: 2px solid #22c55e;

    text-align: center;
}

.success-message h2 {
    color: #15803d;
}

.success-message p {
    margin: 0.5rem 0;
}

/* =======================================================
   ERROR MESSAGE
======================================================= */

.error-message {
    margin-top: 1rem;

    background: #fee2e2;

    border: 1px solid #ef4444;

    color: #991b1b;

    padding: 1rem;

    border-radius: 10px;
}

/* =======================================================
   BOUTONS
======================================================= */

.button {
    display: inline-block;

    background: #2563eb;
    color: white;

    text-decoration: none;

    padding: 0.9rem 1.4rem;

    border-radius: 8px;

    font-weight: bold;

    transition: all 0.2s ease;
}

.button:hover {
    background: #1d4ed8;
}

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

/* =======================================================
   FOOTER
======================================================= */

.footer {
    margin-top: 2rem;

    text-align: center;
}

.footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* =======================================================
   UTILITAIRES
======================================================= */

.hidden {
    display: none !important;
}

/* =======================================================
   RANKING PAGE
======================================================= */

.ranking-list {
    background: white;

    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 2px 8px rgba(0,0,0,.08);

    margin-bottom: 2rem;
}

.rank-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 1rem;

    border-bottom: 1px solid #e5e7eb;
}

.rank-row:last-child {
    border-bottom: none;
}

.rank-position {
    font-weight: bold;

    min-width: 60px;
}

.rank-team {
    flex: 1;

    padding-left: 1rem;
}

.rank-date {
    color: #6b7280;

    font-size: 0.9rem;
}

.gold {
    color: #d97706;
}

.silver {
    color: #6b7280;
}

.bronze {
    color: #b45309;
}

/* =======================================================
   NON CLASSES
======================================================= */

.nc-list {
    background: white;

    border-radius: 12px;

    padding: 1rem;

    box-shadow:
        0 2px 8px rgba(0,0,0,.08);
}

.nc-item {
    padding: 0.5rem 0;
}

/* =======================================================
   MOBILE
======================================================= */

@media (max-width: 640px) {

    body {
        font-size: 15px;
    }

    .container {
        padding: 0.75rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    .card {
        padding: 0.9rem;
    }

    .rank-row {
        flex-direction: column;

        align-items: flex-start;

        gap: 0.5rem;
    }

    .rank-team {
        padding-left: 0;
    }

    .rank-date {
        font-size: 0.85rem;
    }

    .button {
        width: 100%;
        text-align: center;
    }

    select,
    input,
    textarea {
        font-size: 16px;
    }
}

/* =======================================================
   TABLETTE
======================================================= */

@media (min-width: 641px) and (max-width: 1024px) {

    .container {
        max-width: 800px;
    }
}

/* =======================================================
   GRAND ECRAN
======================================================= */

@media (min-width: 1200px) {

    .container {
        max-width: 1000px;
    }

    h1 {
        font-size: 2.4rem;
    }
}