:root {
    --primary-color: #00558B;
    --secondary-color: #EBC55E;
    --text-color: #ffffff;
    --background-color: #EBC55E;
    --accent-color: #2B91BB;
    --hero-bg-color: #00558B;
    --hover-color : #1E6F8C;
}

body.tritanopie {
    --primary-color: #005C45;
    --secondary-color: #FF9100;
    --text-color: #ffffff;
    --background-color: #FF9100;
    --accent-color: #009b73;
    --hero-bg-color: #005C45;
    --hover-color: #008764;
}

header {
    background-color: var(--background-color);
    border-bottom: 1px solid #ddd;
    padding: 10px 20px;
    position: relative;
}

.logo_amu {
    height: 100px;
}


.top-bar {
    position : relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
}


body {
    background-color: var(--background-color);
    margin: 0;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.right-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left :auto;
}

.lang-dropdown {
    postion : relative;
    display: inline-block;
}


.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 120px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: var(--primary-color);
    padding: 10px 12px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #eee;
}

.lang-dropdown:hover .dropdown-content {
    display: block;
}

nav.menu {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
}

nav.menu button {
    width: 100%;
    border: solid #ffffff;
    padding: 10px 15px;
    background-color: var(--accent-color);
    color: var(--text-color);
    cursor: pointer;
}

nav.menu button:hover {
    background-color: var(--primary-color);
}

nav.menu button.active {
    background-color: var(--primary-color);
    color: var(--text-color);
}

button {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: var(--text-color);
    cursor: pointer;
}

button:hover {
    background-color: var(--secondary-color);
}

main {
    flex: 1;
    max-width: 1000px;
    margin: 2em auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 2em;
}

h1 {
    text-align: center;
    color: #222;
}

ul {
    list-style: disc inside;
    margin: 2em 0 1em 1em;
    padding: 0;
    color: #333;
    font-size: 1.1em;
}

ul li {
    margin-bottom: 0.7em;
}

p {
    color: #444;
    font-size: 1em;
    margin-bottom: 1em;
}

.hero-section {
    width: 100%;
    background: var(--hero-bg-color);
    padding: 60px 30px;
    text-align: center;
    color: white;
    position: relative;
    box-sizing: border-box;
}

.hero-section h1 {
    font-size: 36px;
    margin: 0;
}

.hero_logo{
    height:80px;
    position:absolute;
    top:20px;
    left:20px;
}

#hero-img {
    height: 80px;
    position: absolute;
    top: 20px;
    left: 20px;
}

.dashboard-container {
    max-width: 1000px;
    margin: -50px auto 50px;
    position: relative;
    z-index: 2;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

.card h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.legend-color.complet {
    background-color: var(--accent-color);
}

.legend-color.incomplet {
    background-color: var(--secondary-color);
}

* {
    box-sizing: border-box;
}

.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.donut-chart {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    position: relative;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: rotate(-90deg);
}

#circle_incomplet{
    stroke : var(--secondary-color);
}

#circle_complet{
    stroke : var(--accent-color);
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-percentage {
    font-size: 48px;
    font-weight: bold;
    color: var(--accent-color);
    line-height: 1;
}

.chart-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.pub-section {
    position: relative;
    width: 100%;
    text-align: center;
}

.pub-section img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.pub-text {
    position: absolute;
    bottom: 10px;
    left: 10px;
    transform: none;
    color: white;
    font-size: 40px;
    font-weight: bold;
}

footer {
    background: var(--primary-color);
    color: var(--text-color);
    text-align: center;
    padding: 2rem 1rem;
}

footer p {
    margin: 0;
    color: #f0f4ff;
    font-size: 14px;
}

.insta {
    height:32px;
}

#help-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ffffff;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 2em;
    line-height: 60px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
}

#help-popup {
    display: none;
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: 300px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 0px 10px rgba(0,0,0,0.3);
    display: none;
    z-index: 1001;
    padding:10px;
}


#help-popup ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.help-popup-header {
    background-color: var(--accent-color);
    color: white;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}


.help-popup-header button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.help-popup-body {
    padding: 15px;
}

.help-popup-body ul {
    padding-left: 20px;
    margin: 0;
}

.help-popup-body li {
    margin-bottom: 10px;
}

li a {
    display: block;
    padding: 1em;
    background: #f0f4ff;
    color:var(--accent-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
}

li a:hover {
    background:var(--primary-color);
    color: #fff;
}

#page_complete {
    display: block;
    padding: 1em;
    background: #f0f4ff;
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
}

#page_complete:hover {
    background: var(--primary-color);
    color: #fff;
}


/* === BOUTON TRITANOPIE (interrupteur) === */
#theme-toggle {
    background: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    position : relative;
    top : -15px;
    right : 15px;
    border-radius: 20px;
    border: 1.5px solid black;
}



.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: #D46F4D;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* le rond commence à gauche */
    padding: 3px; /* espace intérieur */
}


/* bouton de l'interupteur */
.toggle-switch::before {
    content: "";
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    border: 1px solid black;
    transition: transform 0.3s ease;
}

#theme-toggle.active .toggle-switch{
    background-color: var(--primary-color);
}

#theme-toggle.active .toggle-switch::before {
    transform: translateX(28px);
}


.menu-toggle {
    display: none;
}



@media (max-width: 810px) {
    header {
        padding: 10px;
    }

    .logo_amu {
        width: 200px;
        height: 100px;
    }

    .top-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: block;
        font-size: 28px;
        color: var(--primary-color);
        background: none;
        border: none;
        cursor: pointer;
    }

    nav.menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 10px;
        background-color: var(--accent-color);
        border-radius: 6px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.menu.active {
        display: flex;
    }

    nav.menu button {
        border: none;
        background-color: var(--accent-color);
        color: var(--text-color);
        padding: 12px;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.3);
    }

    nav.menu button:last-child {
        border-bottom: none;
    }

    nav.menu button:hover {
        background-color: var(--primary-color);
    }

    .right-buttons {
        display: none;
    }

    .menu-right-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    main {
        margin: 1em;
        padding: 1.5em;
    }

    table {
        font-size: 0.85em;
    }

    th, td {
        padding: 8px 6px;
    }

    .progress-bar {
        height: 14px;
    }

    .progress {
        font-size: 0.7em;
    }

    .pub-section {
        width: 100vw;
        height: 175px;
        position: relative;
        overflow: hidden;
    }

    .pub-section img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .pub-text {
        font-size: 22px;
        bottom: 5px;
        left: 15px;
    }

    .card h2 {
        margin-top: 60px;
    }

    footer {
        width: 100%;
    }
}



@media (max-width: 500px) {
    header {
        padding: 5px;
    }

    .logo_amu {
        width: 150px;
        height: auto;
    }

    .top-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: block;
        font-size: 28px;
        color: var(--primary-color);
        background: none;
        border: none;
        cursor: pointer;
    }

    nav.menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 10px;
        background-color: var(--accent-color);
        border-radius: 6px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.menu.active {
        display: flex;
    }

    nav.menu button {
        border: none;
        background-color: var(--accent-color);
        color: var(--text-color);
        padding: 12px;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.3);
    }

    nav.menu button:last-child {
        border-bottom: none;
    }

    nav.menu button:hover {
        background-color: var(--primary-color);
    }

    .right-buttons {
        display: none;
    }

    .menu-right-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    main {
        margin: 1em;
        padding: 1.5em;
    }

    table {
        font-size: 0.85em;
    }

    th, td {
        padding: 8px 6px;
    }

    .progress-bar {
        height: 14px;
    }

    .progress {
        font-size: 0.7em;
    }

    .pub-section {
        width: 100vw;
        height: 175px;
        position: relative;
        overflow: hidden;
    }

    .pub-section img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .pub-text {
        font-size: 22px;
        bottom: 5px;
        left: 15px;
    }

    .card h2 {
        margin-top: 60px;
    }

    footer {
        width: 100%;
    }
}