/* =========================
   Variables de ton thème
========================= */

:root {
    --primary: #1C1C1C;
    --secondary: #c0a162;
    --three: #d4d4d4;
    --background-primary: #d4d4d4;
    --background-secondary: #31314a;
    --background-three: #893a4c;
    --text-ilight: #c0a162;
    --text-ilight-secondary: #893a4c;
    --text-light: #fff;
    --text-light-300: #d4d4d4;
    --text-dark: #1C1C1C;
    --text-dark-300: #31314a;
}


/* =========================
   Général & Layout
========================= */

body {
    background-color: var(--background-primary);
    color: var(--text-dark);
    font-family: 'Raleway', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

main {
    display: flex;
    justify-content: center;
    padding: 2rem;
}


/* =========================
   Header
========================= */

header {
    display: flex;
    align-items: center;
    background-color: var(--background-secondary);
    color: var(--text-light);
    padding: 1rem;
    position: relative;
    gap: 1rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
}


/* =========================
   Bouton retour
========================= */

.back-button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-primary);
    color: var(--text-dark);
    border-radius: 0.5rem;
    width: 2rem;
    height: 2rem;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: var(--background-three);
    color: var(--text-light);
}

.return-arrow {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    margin-right: 8px;
}

.return-arrow::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-left: 5px solid var(--secondary);
    border-bottom: 5px solid var(--secondary);
    border-radius: 2px 0 2px 0px;
}


/* =========================
   Bouton de thème
========================= */

.theme-toggle {
    margin-left: auto;
    background-color: var(--background-primary);
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--background-three);
    color: var(--text-light);
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
}

.hidden {
    display: none;
}


/* =========================
   Liste de liens
========================= */

.link-wrapper {
    width: 100%;
    max-width: 1200px;
}

.link-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}


/* =========================
   Cartes de liens
========================= */

.link-item {
    padding: 1.25rem;
    border: 2px solid var(--background-three);
    width: 150px;
    text-align: center;
    background-color: var(--background-secondary);
    color: var(--text-light);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, background-color 0.3s ease;
}

.link-item:hover {
    transform: translateY(-5px);
    background-color: var(--background-three);
}


/* =========================
   Titre de carte
========================= */

.link-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-ilight);
    margin-bottom: 0.75rem;
}


/* =========================
   Bouton de carte
========================= */

.link-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: transparent;
    color: var(--text-ilight);
    border: 2px solid var(--text-ilight);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
}

.link-button:hover {
    background-color: var(--text-ilight);
    color: var(--background-secondary);
}


/* =========================
   Tooltips
========================= */

.tooltips {
    position: relative;
    cursor: pointer;
}

.tooltips::after {
    content: attr(data-description);
    font-size: 0.75rem;
    width: 160px;
    position: absolute;
    bottom: -110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--background-primary);
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
    padding: 0.5rem;
    border-radius: 0.5rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.tooltips:hover::after {
    opacity: 1;
}


/* =========================
   Responsive
========================= */

@media (max-width: 600px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    .back-button {
        margin-bottom: 0.5rem;
    }
    .link-item {
        width: 100%;
    }
    .link-title {
        font-size: 1rem;
    }
    .link-button {
        width: 100%;
        padding: 0.75rem;
    }
}