/* Variables CSS */
.major-mono-display-regular {
    font-family: "Major Mono Display", monospace;
    font-weight: 400;
    font-style: normal;
}

:root {
    --primary-color: #2fdfad;
    --background-color: #1c1c1e;
    --text-color: #e8e8e8;
    --text-color-light: #c2c2c2dc;
    --highlight-color: #2fdfad;
    --strong-color: #2fdfad;
    --light-color: #7dd4bc;
    --success-color:  #69f06d;
    --warning-color: #f7bf58;
    --emergency-color: #fd6363;
    --info-color: #638ffd;
    --becoming-color: rgb(250, 237, 89);
    --box-shadow: rgba(0, 0, 0, 0.2);
    --font-main: Arial, sans-serif;
    --font-title: 'Major Mono Display', monospace;
    --nav-height: 60px;
    --footer-height: 20px;
    --max-width: 80%;
    --max-content-width: 1600px;
}

/* Global reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Layout styling */
body {
    font-family: var(--font-main);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: var(--nav-height);
    padding-bottom: var(--footer-height);
    text-align: center;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 1000;
    box-shadow: 0 2px 4px var(--box-shadow);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

li {
    margin-left: 30px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    font-size: 1.5rem;
    font-weight: 500;
}

nav a:hover,
nav a.active {
    color: var(--highlight-color);
    text-decoration: underline;
}

/* Headings */
h1 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    color: var(--strong-color);
    text-align: right;
    margin-bottom: 20px;
}

h2 {
    font-family: var(--font-main);
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 5px;
    text-align: left;
}

/* Main content container */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    max-width: var(--max-content-width);
    padding: 20px;
    margin: 40px 0;
    width: 80%;
    gap: 100px;
}

/* Text and list styling */
p,
ul {
    font-size: 1rem;
    text-align: left;
    line-height: 1.6;
    margin-bottom: 10px;
}

.mg-0 {
    margin: 0;
}

ul {
    padding-left: 20px;
}

ul li {
    margin-bottom: 10px;
}

/* Strong and anchor styling */
strong,
a {
    color: var(--strong-color);
    font-weight: bold;
}

/* Button styling */
.button-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.button,
.button-secondary {
    padding: 0.5rem 1.3rem;
    border-radius: 25px;
    text-decoration: none;
    box-shadow: 0px 1px 80px 3px rgb(244 244 244 / 20%);
    transition: background-color 0.3s ease;
    margin: 10px;
    font-weight: bold;
    font-size: 1.1rem;
}

.button {
    background-color: var(--highlight-color);
    color: var(--background-color);
    border: 1px solid var(--highlight-color);
}

.button:hover {
    background-color: transparent;
    color: var(--highlight-color);
    cursor: pointer;
}

.button-secondary {
    background-color: transparent;
    color: var(--highlight-color);
    border: 1px solid var(--highlight-color);
}

.button-secondary:hover {
    background-color: var(--highlight-color);
    color: var(--background-color);
    cursor: pointer;
}

/* Quiz container styling */
#quiz-container {
    text-align: left;
}

#progress-bar {
    height: 10px;
    background-color: var(--highlight-color);
    width: 0%;
    margin-bottom: 30px;
    border-radius: 5px;
}

#question-container h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

#question-container ul {
    list-style-type: none;
    padding: 0;
}

#question-container li {
    margin-bottom: 10px;
}

/* Info box styling */
#info {
    margin-top: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

#info-icon {
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--highlight-color);
    margin-right: 10px;
}

#info-text {
    background-color: var(--background-color);
    padding: 10px;
    border: 1px solid var(--highlight-color);
    border-radius: 5px;
    margin-bottom: 20px;
}

.strong-yellow {
    color: var(--becoming-color);
}

#extra-info-text {
    border: 1px solid var(--becoming-color);
    padding: 10px;
    border-radius: 5px;
}

/* Button container in quiz */
#buttons {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}

input,
label {
    cursor: pointer;
}

/* Bibliography styling */
.bibliography-list {
    list-style-type: none;
    padding: 0;
    font-size: 1rem;
}

.bibliography-list li {
    line-height: 1.5;
    color: var(--text-color);
}

.bibliography-list li a {
    color: var(--highlight-color);
    text-decoration: none;
}

.bibliography-list li a:hover {
    text-decoration: underline;
}

.bibliography-list em {
    font-style: italic;
}

/* Result summary */
.result-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.result-block {
    text-align: center;
    width: 80%;
}

.equivalences {
    margin-top: 30px;
}

.equivalence-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.equivalence-item i {
    font-size: 2rem;
    color: var(--highlight-color);
    margin-right: 20px;
}

/* Footer styling */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 4px var(--box-shadow);
    padding: 20px 0;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-color-light);
}

/* Cards Section */
#cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin-top: 30px;
}

.card {
    background-color: var(--background-color);
    border: 1px solid var(--highlight-color);
    border-radius: 10px;
    width: 350px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px var(--box-shadow);
}

.card h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
    text-align: center;
}

.card a {
    text-decoration: none;
}

.card p {
    color: var(--text-color-light);
    text-align: center;
}

/* Stats and Tips */
.stat-item {
    text-align: center;
    color: var(--text-color);
}

.stat-item i {
    font-size: 3rem;
    color: var(--highlight-color);
    margin-bottom: 10px;
}

.stat-item h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.tip-item {
    width: 30%;
    text-align: center;
    margin-bottom: 20px;
    background-color: var(--light-color);
    padding: 20px;
    border-radius: 10px;
}

.tip-item i {
    font-size: 2rem;
    color: var(--background-color);
    margin-bottom: 10px;
}

.term h3 {
    text-align: start;
    color: var(--highlight-color);
}

/* Quelques Chiffres - Écoconception Numérique */

.services-container,
.impact-details {
    display: flex;
    flex-direction: column;
}

.services-container {
    gap: 80px;
}

.impact-details h2,
.additional-impact h2,
.tips h2 {
    margin-bottom: 50px;
}
.additional-impact-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 20px;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

section .stats-icons h2 {
	text-align: center;
}

section .stats-icons {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
}

.progress-bar {
    width: 100%;
    background-color: rgb(38, 37, 37);
    border-radius: 25px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 24px;
    border-radius: 25px;
    text-align: center;
    line-height: 24px;
    color: var(--text-color);
    font-weight: bold;
}

.progress-bar-smartphone {
    width: 27%;
    background-color: var(--success-color);
    color: var(--background-color);
}

.progress-bar-laptop {
    width: 50%;
    background-color: var(--becoming-color);
    color: var(--background-color);
}


.progress-bar-tablette {
    width: 50%;
    background-color: var(--warning-color);
    color: var(--background-color);
}

.progress-bar-tv {
    width: 100%;
    background-color: var(--emergency-color);
    color: var(--background-color);
}
.impact-card {
    display: inline-block;
    width: 180px;
    padding: 20px;
    border-radius: 10px;
    margin: 10px;
    color: white;
    text-align: center;
    font-weight: bold;
}

.impact-value {
    font-size: 1.5em;
    margin-bottom: 5px;
    text-align: center;
}

.impact-label {
    font-size: 1em;
    margin-bottom: 5px;
    text-align: center;
}

.impact-card-1 {
    border: 2px solid var(--emergency-color);
    border-radius: 25px;
    color: var(--text-color);
    text-align: center;
    width: 200px;
}

.impact-card-2 {
    border: 2px solid var(--becoming-color);
    border-radius: 25px;
    color: var(--text-color);
    text-align: center;
    width: 200px;

}

.impact-card-3 {
    border: 2px solid var(--success-color);
    border-radius: 25px;
    color: var(--text-color);
    text-align: center;
    width: 200px;

}

.tip-item {
    color: var(--background-color);
}

h2 sup {
    font-weight: 500;
    font-size: 0.5em;
}

sup a {
    text-decoration: none;
}

.chart-container {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    max-width: 1200px; 
    margin:0 auto;
}

/* En Pratique - Écoconception Numérique */
#objectifs,
#prerequis {
    margin-bottom: 30px;
}

.info-block {
    background-color: #2d2d2d;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px var(--box-shadow);
}

.info-block h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: var(--light-color);
}

.info-block i {
    margin-right: 10px;
    color: var(--highlight-color);
}

.collapsible ol {
    padding-left: 20px;
    margin-top: 10px;
}

.collapsible ol li {
    text-align: left;
}

.collapsible ol li h3 {
    text-align: left;
}

.collapsible code {
    background-color: #333;
    color: white;
    padding: 2px 10px;
    border-radius: 5px;
}

.collapsible h2 {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 10px;
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 5px;
}

.toggle-icon {
    font-size: 1.5rem;
    margin-left: 10px;
    color: var(--highlight-color);
}

.collapsible .content {
    display: none;
    margin-top: 10px;
}

.content h3 {
    text-align: left;
}

.step {
    margin-top: 50px;
}

.step-btm {
    margin-bottom: 50px;
}

/* Inline code */
.inline-code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    color: #333;
}

/* Code blocks */
pre {
    color: #f8f8f2;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    text-align: left;
}

pre code {
    display: block;
    line-height: 1.4em;
}

/* Responsive Design */

/* Tablettes (Portrait et Paysage) */
@media screen and (max-width: 1024px) {
    .main {
        max-width: 90%;
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .stats-icons {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .tip-item {
        width: 45%;
        margin-bottom: 20px;
    }

    li {
        margin-left: 5px;
    }

    .additional-impact-content {
        justify-content: center;
    }
}

/* Petites Tablettes et Smartphones (Paysage) */
@media screen and (max-width: 768px) {
    .main {
        max-width: 98%;
        padding: 10px;
        gap: 70px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .collapsible h2 {
        font-size: 1.3rem;
    }

    .stats-icons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .tip-item {
        width: 100%;
        margin-bottom: 15px;
    }

    .stat-item h2 {
        font-size: 1.3rem;
    }

    .stat-item i {
        font-size: 2.5rem;
    }

    .info-block h3 {
        font-size: 1.2rem;
    }

    li {
        margin-left: 3px;
    }

    .additional-impact-content {
        justify-content: center;
    }
}

/* Smartphones (Portrait) */
@media screen and (max-width: 600px) {
    nav ul {
        align-items: center;
        gap: 0.5rem;
    }

    .button-container {
        flex-direction: column;
    }

    .main {
        max-width: 100%;
        padding: 10px;
        gap: 50px;
    }

    h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .stats-icons{
        flex-direction: column;
        align-items: center;
    }

    .tip-item {
        width: 100%;
        margin-bottom: 15px;
    }

    .stat-item h2 {
        font-size: 1.2rem;
    }

    .stat-item i {
        font-size: 2rem;
    }

    .info-block h3 {
        font-size: 1rem;
    }

    li {
        margin-left: 2px;
    }

    .additional-impact-content {
        justify-content: center;
    }
}