/* ============ */
/* === BASE === */
/* ============ */
* {
    /*Tout le site*/
    margin: 0;
    padding: 0;
    /* largeur et la hauteur incluent padding et bordure */
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    /*Contenue du site*/
    background: linear-gradient(180deg, #f6f9fc, #edf3f9);
    color: #0a3d62;
}

/* =============== */
/* === NAV BAR === */
/* =============== */
.nav {
    position: absolute;
    top: 0px;
    width: 100%;
    display: flex;
    align-items: center;
    background: white;
    list-style: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.imgLinkNav {
    width: 6%;
    height: auto;
    margin: 1%;
    margin-left: 4%;
}

.imgNav {
    width: 100%;
    transition: transform .3s ease;
}

.imgNav:hover {
    transform: scale(1.05);
}

a:visited {
    text-decoration: none;
}

.linkNav {
    position: relative;
    font-size: 180%;
    margin: 2.5%;
    text-decoration: none;
    color: #0a3d62;
}

.linkNav:hover {
    color: #17a2b8;
}

/* afficher après */
.linkNav::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 3px;
    border-radius: 5px;
    background: linear-gradient(90deg, #17a2b8, #74c0fc);
    transition: width .25s ease-out;
}

.linkNav:hover::after {
    width: 100%;
}

/* ================ */
/* === CONTENUE === */
/* ================ */
.contained {
    max-width: 1200px;
    margin: 140px auto 60px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 11%;
}

/* ============== */
/* === TITRES === */
/* ============== */
h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    margin-top: 20px;
}

/* =================== */
/* === IMAGE INDEX === */
/* =================== */

.imgHomePage {
    width: 70%;
    max-width: 850px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform .3s ease;
}

.imgHomePage:hover {
    transform: scale(1.02);
}

/* =================== */
/* === FORMULAIRES === */
/* =================== */
form {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

input,
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 10px;
    border: 1px solid #cfd9e3;
    font-size: 1rem;
}

/* quand un champ est sélectionné */
input:focus,
select:focus {
    outline: none;
    border-color: #1e90ff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

input[type="submit"] {
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    background: linear-gradient(90deg, #0077cc, #4db7ff);
    color: white;
    transition: transform .2s ease, box-shadow .2s ease;
}

input[type="submit"]:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* ====================== */
/* === GRILLE COURSES === */
/* ====================== */
.grille {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.item {
    background: linear-gradient(90deg, #0077cc, #4db7ff);
    color: white;
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
    transition: transform .25s ease, box-shadow .25s ease;
}

.item:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.item p {
    font-size: 1.05rem;
    line-height: 1.6rem;
}

/* seulement les boutons submit à l'intérieur d'un input*/
.item input[type="submit"] {
    margin-top: 12px;
    width: 100%;
}

/* ============================ */
/* === TABLEAUX CLASSEMENTS === */
/* ============================ */
form:has(.table) {
    max-width: 100%;
    width: 100%;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

/* ============================ */
/* === TABLEAUX CLASSEMENTS === */
/* ============================ */

.table {
    margin-left: auto;
    margin-right: auto;
    /* CENTRAGE RÉEL */
    width: max-content;
    /* largeur basée sur le contenu */
    max-width: 100%;

    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

/* En-tête */
.table tr:first-child {
    background: linear-gradient(90deg, #0077cc, #42b6ff);
    color: white;
    font-weight: 700;
}

/* Cellules */
.column {
    padding: 16px 20px;
    border-bottom: 1px solid #d6e6f5;
    font-size: 1rem;
    white-space: nowrap;
    /* empêche le retour à la ligne */
}

/* Inputs dans le tableau */
.table input {
    width: 100%;
    min-width: 160px;
    margin: 0;
    white-space: nowrap;
}

form:has(.table) input[type="submit"] {
    width: auto;
    min-width: 240px;
    padding: 14px 36px;
    margin: 20px auto 0;
    /* centrage horizontal */
    display: block;
}


/* ============== */
/* === RADIOS === */
/* ============== */
form label[for="skipper"],
form label[for="organisateur"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 25px;
    font-weight: 600;
    cursor: pointer;
}

input[type="radio"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
    accent-color: #0077cc;
    cursor: pointer;
}

/* ====================== */
/* === EXTENSION FORM === */
/* ====================== */
#extension_form {
    margin-top: 20px;
    padding: 18px;
    border-radius: 14px;
    background: #f3f8ff;
    border: 1px solid #d6e6f5;
}

/* =============== */
/* === ERREURS === */
/* =============== */
.erreurs {
    margin-top: 15px;
    padding: 15px;
    border-radius: 12px;
    background: #ffe6e6;
    color: #b30000;
    font-weight: 600;
}