/* 
 * Polices et fichiers CSS externes
 */
@import "assets/fontawesome/css/fontawesome.min.css";
@import "assets/fontawesome/css/brands.min.css";
@import "assets/fontawesome/css/solid.min.css";

@font-face {
    font-family: "Comfortaa";
    src: url("assets/fonts/Comfortaa-VariableFont_wght.ttf");
    font-display: swap;
    font-weight: 1 1000;
}

@font-face {
    font-family: "Archivo Black";
    src: url("assets/fonts/ArchivoBlack-Regular.ttf");
    font-display: swap;
    font-weight: 700 900;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/Inter-VariableFont_opsz,wght.ttf');
    font-weight: 1 1000;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/Inter-Italic-VariableFont_opsz,wght.ttf');
    font-weight: 1 1000;
    font-style: italic;
    font-display: swap;
}

/*
 * VARIABLES ET SYSTEME DE DESIGN GLOBAL
 */

:root {
    --color-forge-100: #fde8e5;
    --color-forge-300: #f8a599;
    --color-forge-500: #f17361;
    --color-forge-600: #d85a49;
    --color-forge-700: #a83d30; /* Forge Dark */
    --color-bleu-marianne: #000091;
    --color-white: #ffffff;
    --color-lightgrey: #f5f5f5;
    --color-grey: #eeeeee;
    --color-dark: #333333;
    --color-border: #cccccc;
    
    /* Couleurs des Badges/Tags */
    --tag-red-bg: #ffe9e9;
    --tag-red-txt: #a94442;
    --tag-orange-bg: #fff3e0;
    --tag-orange-txt: #e65100;
    --tag-yellow-bg: #fff9db;
    --tag-yellow-txt: #856404;
    --tag-green-bg: #e8f5e9;
    --tag-green-txt: #2e7d32;
    --tag-purple-bg: #f3e5f5;
    --tag-purple-txt: #6a1b9a;
    --tag-blue-bg: #e3f2fd;
    --tag-blue-txt: #1565c0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-lightgrey);
    color: var(--color-dark);
    min-height: 100vh;
}

/* Layout global avec Sidebar et Contenu */
.app-layout {
    display: flex;
    min-height: 100vh;
}


/*
 * Couleurs
 */

.tag-red { background: var(--tag-red-bg); color: var(--tag-red-txt); }
.tag-orange { background: var(--tag-orange-bg); color: var(--tag-orange-txt); }
.tag-yellow { background: var(--tag-yellow-bg); color: var(--tag-yellow-txt); }
.tag-green { background: var(--tag-green-bg); color: var(--tag-green-txt); }
.tag-purple { background: var(--tag-purple-bg); color: var(--tag-purple-txt); }
.tag-blue { background: var(--tag-blue-bg); color: var(--tag-blue-txt); }

.color-forge-100-bg { background: var(--color-forge-100); }
.color-forge-100-fg { color: var(--color-forge-100); }
.color-forge-300-bg { background: var(--color-forge-300); }
.color-forge-300-fg { color: var(--color-forge-300); }
.color-forge-500-bg { background: var(--color-forge-500); }
.color-forge-500-fg { color: var(--color-forge-500); }
.color-forge-600-bg { background: var(--color-forge-600); }
.color-forge-600-fg { color: var(--color-forge-600); }
.color-forge-700-bg { background: var(--color-forge-700); }
.color-forge-700-fg { color: var(--color-forge-700); }
.color-bleu-marianne-bg { background: var(--color-bleu-marianne); }
.color-bleu-marianne-fg { color: var(--color-bleu-marianne); }
.color-white-bg { background: var(--color-white); }
.color-white-fg { color: var(--color-white); }
.color-grey-bg { background: var(--color-grey); }
.color-grey-fg { color: var(--color-grey); }
.color-dark-bg { background: var(--color-dark); }
.color-dark-fg { color: var(--color-dark); }

/*
 * ZONE DE CONTENU PRINCIPAL
 */

/*
 * Titre principal
 */

/* Éléments communs */
header.header {
    background: var(--color-forge-100);
    margin: 0 auto;

    /* Ajuste le padding pour que la taille maximale soit de 1200px */
    padding: 0.8rem max(1rem, 50vw - 600px);

    .header-logo {
        max-height: 4.5rem;
    }

    .header-title-sub {
        font-family: 'Comfortaa', cursive;
        font-size: 1.1rem;
        font-weight: 500;
        line-height: 1.3;
        margin: 0;
        padding: 0;
        color: var(--color-forge-700);
    }
}

/* Mobile */
.header {
    display: grid;
    row-gap: 5px;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: 
        "logo main"
        "sub sub"
        "buttons buttons";
    align-items: center;

    .header-logo {
        grid-area: logo;
    }
    .header-title-main {
        grid-area: main;
        margin: 0;
        align-self: center;
        text-align: center;
    }
    .header-title-sub {
        grid-area: sub;
        align-self: center;
        text-align: center;
    }
    .header-buttons {
        grid-area: buttons;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-evenly;
        align-items: baseline;

        a {
            margin: 0.5rem;
        }
    }
}

/* Écran moyen */
@media (min-width: 576px) {
    .header {
        gap: 0;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas: 
            "logo main"
            "logo sub"
            "buttons buttons";

        .header-logo {
            grid-area: logo;
        }
        .header-title-main {
            grid-area: main;
        }
        .header-title-sub {
            grid-area: sub;
        }
        .header-buttons {
            grid-area: buttons;
            display: flex;
            flex-direction: row;
            justify-content: flex-end;
        }
    }
}

/* Grand écran */
@media (min-width: 768px) {
    .header {
        gap: 0;
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        grid-template-areas: 
            "logo main buttons"
            "logo sub buttons";

        .header-logo {
            grid-area: logo;
        }
        .header-title-main {
            grid-area: main;
            align-self: end;
            text-align: left;
            margin: 0;
        }
        .header-title-sub {
            grid-area: sub;
            text-align: left;
            margin: 0 1rem;
        }
        .header-buttons {
            grid-area: buttons;
            display: flex;
            flex-direction: column;
            justify-content: space-evenly;
            align-items: stretch;
        }
    }
}


button.toggler-button {
    background: none;
    color: inherit;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
}

/*
 * Titre princial (version fine)
 */

header.header-thin {
    background: var(--color-forge-100);
    margin: 0 auto;
    padding: .5rem;

    display: grid;
    gap: 5px;
    grid-template-columns: auto 1fr;
    align-items: center;
    grid-template-areas: 
        "logo main"
        "logo sub"
    ;

    .header-logo {
        grid-area: logo;
        max-height: 2rem;
    }
    .header-title-main {
        grid-area: main;
        font-family: 'Archivo Black', sans-serif;
        font-weight: bold;
        line-height: 1.1;
        text-transform: uppercase;
        color: var(--color-bleu-marianne);
    }
    .header-title-sub {
        grid-area: sub;
        font-family: 'Comfortaa', cursive;
        font-size: small;
        margin: 0;
        padding: 0;
        color: var(--color-forge-700);
    }
}

/*
 * Menu de navigation interne
 */

/* Éléments communs */
nav.nav-internal {
    background: var(--color-forge-500);
    color: var(--color-white);
    margin: 0 auto;

    /* Ajuste le padding pour que la taille maximale soit de 1200px */
    padding: 0rem max(0rem, 50vw - 600px);


    .navbar-home {
        font-weight: bold;
    }

    .navbar-link {
        text-decoration: none;
        font-family: 'Comfortaa', cursive;
        color: var(--color-white);

    }

    .navbar-dropdown-toggler {
        background: none;
        color: inherit;
        border: none;
        font-size: 1rem;
        cursor: pointer;
    }

    .navbar-item {
        transition: background-color .5s;
        &:hover {
            background-color: var(--color-forge-700);
        }
    }

    .navbar-nowrap {
        display: flex;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .navbar-search {
        align-items: center;
        gap: 5px;
    }
}

/* Petit écran (mobile) */
nav.nav-internal {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: stretch;

    .navbar-item {
        grid-column: 1 / span 4;
        padding: .4rem 1rem;
        display: flex;
        align-items: center;
    }

    .navbar-home {
        grid-column: 1/1;
        grid-row: 1/1;
        padding-left: 1rem;
    }

    .navbar-search {
        grid-column: 3/3;
        grid-row: 1/1;
        padding: .2rem;
        input {
            max-width: 12em;
        }
    }

    .navbar-toggler {
        grid-column: 4/4;
        grid-row: 1/1;
        padding: 0 1rem;
    }


    .navbar-dropdown {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        grid-column: 1 / span 4;

        button.navbar-dropdown-toggler {
            width: 100%;
            .navbar-toggler-icon {
                display: none;
                width: 20px;
                &.toggled {
                    display: inline-block;
                }
            }
            .toggled {
                display: inline;
            }
        }

        .navbar-dropdown-menu {
            flex-direction: column;
            width: 100%;
        }
    }

    .navbar-collapse {
        display: none;
        &.toggled {
            display: flex;
        }
    }
}

/* Grand écran (ordinateur) */
@media (min-width: 768px) {
    nav.nav-internal {
        display: grid;
        /* On triche ici en répétant 100 fois la colonne, alors que `auto-fit` serait mieux, mais `auto-fit` ne fonctionne qu'avec des largeurs de colonnes fixes (pas de 1fr ni auto). */
        grid-template-columns: 1fr repeat(100, auto) auto auto;
        align-items: stretch;

        .navbar-item, .navbar-dropdown {
            grid-column: span 1;
            grid-row: span 1;
            display: block;
            display: flex;
            align-items: center;
        }

        .navbar-dropdown {
            position: relative;
            display: flex;
            align-items: stretch;
            flex-direction: row;
            align-content: stretch;
            button.navbar-dropdown-toggler {
                cursor: revert;
            }
            &:hover {
                .navbar-dropdown-menu {
                    position: absolute;
                    display: flex;
                    flex-direction: column;
                    top: 100%;
                    background-color: var(--color-forge-500);
                }

                .navbar-toggler-icon {
                    &.fa-angle-right {
                        display: none;
                        &.toggled {
                            display: none;
                        }
                    }
                    &.fa-angle-down {
                        display: inline-block;
                        &.toggled {
                            display: none;
                        }
                    }
                }
            }
        }

        .navbar-home {
            grid-column: 1 / span 1;
            grid-row-start: 1;
            padding-left: 1rem;
        }

        .navbar-search {
            grid-column: -2 / span 1;
            grid-row: 1 / span 1;
            padding: .2rem;
            input {
                max-width: none;
            }
        }
        
        .navbar-last {
            grid-column: -1 / span 1;
            grid-row: 1 / span 1;
        }

        .navbar-toggler {
            display: none;
        }
    }
}


/*
 * Taille des polices
 */
.text-verybig {
    font-size: 2rem;
}
.text-big {
    font-size: 1.5rem;
}
.text-normalsize {
    font-size: 1rem;
}
.text-small {
    font-size: 0.9rem;
}
.text-verysmall {
    font-size: 0.8rem;
}

/*
 * Titres et sous-titres
 */
h1 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    color: var(--color-bleu-marianne);
    /* Réinitialisation du compteur de titre de niveau inférieur. */
    counter-reset: h2counter;
}

h2 {
    font-family: 'Comfortaa', cursive;
    color: var(--color-forge-500);
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-forge-100);
    padding-bottom: 0.5rem;

    /* Numérotation automatique */
    counter-reset: h3counter;
    &.autonumbering::before {
        counter-increment: h2counter;
        content: counter(h2counter) ". ";
    }

    /* Lien et ancre qui apparait au survol */
    a {
        color: inherit;
        text-decoration: none;
        .anchor {
            opacity: 0;
            transition: opacity .5s;
        }
        &:hover .anchor {
            opacity: 1;
        }
    }
}

h3 {
    font-family: 'Inter', sans-serif;
    color: var(--color-forge-700);
    padding-bottom: .2rem;
    border-bottom: 2px solid var(--color-forge-100);

    /* Numérotation automatique */
    &.autonumbering::before {
        counter-increment: h3counter;
        content: counter(h3counter, lower-alpha) ". ";
    }
}

/*
 * STYLES DES COMPOSANTS UI
 */

/*
 * En-tête : Navigation externe
 */

/* D'abord les parties communes */
nav.nav-external {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: .9rem;

    .nav-external-home {
        display: flex;
        align-items: center;
        gap: 10px;

        >button {
            padding: 0
        }

        a {
            color: var(--color-dark);
            text-decoration: none;
            font-family: 'Comfortaa', cursive;
            font-weight: 700;
            display: flex;
            gap: 10px;
            align-items: baseline;

            i {
                color: var(--color-forge-500);
            }
        }
    }

    ul {
        list-style: none;
        padding: 0;
        margin: 0;

        a {
            text-decoration: none;
            color: var(--color-dark);
            display: flex;
            align-items: center;
            transition: color .5s;
            gap: 10px;

            &:hover {
                color: var(--color-forge-500);
            }

            i {
                opacity: .5;
            }
        }
    }
}

/* Parties spécifiques au mobile */

.nav-external {
    display: flex;
    flex-direction: column;

    .nav-external-home {
        display: flex;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    ul.nav-external-links {
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 10px;
        padding-top: 10px;

        &.toggled {
            display: flex;
        }

        li {

            a {
                display: flex;
                flex-direction: row;
            }
        }
    }
}

/* Parties spécifique aux écrans larges */

@media (min-width: 768px) {
    .nav-external {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 2rem;

        .nav-external-home {
            flex-shrink: 0;
            width: auto;
            button {
                display: none;
            }
        }

        ul.nav-external-links {
            display: flex;
            width: auto;
            gap: 1rem;
            padding-top: 0;
            flex-wrap: nowrap;
            flex-direction: row;
            align-items: center;
        }
    }
}

/* Composant Bannière */
.announcement-banner {
    display: flex;
    background-color: var(--color-bleu-marianne);
    color: var(--color-white);
    padding: 10px 15px;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

    &.toggled {
        display: none;
    }

    .banner-content {
        display: flex;
        align-items: center;
        gap: 0.75rem;

        a {
            font-weight: bold;
            &:visited {
                color: inherit;
            }
            &:link {
                color: inherit;
            }
        }

        p {
            padding: 0;
            margin: 0;
        }
    }

    .banner-icon {
        font-size: 1rem;
        color: var(--color-forge-500);
        align-self: center;
    }

    .banner-close {
        background: none;
        border: none;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        line-height: 1;
        align-self: flex-start;
        font-size: 1rem;
    }
}

/* Boutons */
.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: opacity 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;

    &.bouton-thin {
        padding: .4rem .5rem;
    }

}

.bouton-minimal {
    background-color: inherit;
    border: none;
    cursor: pointer;
}

.bouton-hover:hover { opacity: 0.9; transform: translateY(-1px); }
.bouton-action {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-bleu-marianne);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    transition: background-color .5s;

    &:hover {
        background-color: var(--color-grey); 
    }

    &.actif {
        background-color: var(--color-grey);
        &:hover {
            background: var(--color-white);
        }
    }
}

/* Infobulles */

.tooltip-scope {
    anchor-scope: --tooltip-anchor;

    .tooltip-trigger {
        position: relative;
        cursor: help;
        anchor-name: --tooltip-anchor;
    }

    .tooltip-content {
        display: none;
        font-size: 1rem;
        position: fixed;
        position-anchor: --tooltip-anchor;
        position-area: bottom;
        position-try-fallbacks: flip-block, flip-inline;
        background-color: var(--color-dark);
        color: var(--color-white);
        border: 1px solid var(--color-border);
        border-radius: 4px;
        max-width: 50vw;
        padding: 5px;
    }

    .tooltip-trigger:hover ~ .tooltip-content {
        display: block;
    }
}
@media (pointer: coarse), (hover: none) {
    /* Uniquement sur les terminaux sans souris ou sans notion de survol (c'est-à-dire les mobiles). */
    .tooltip-trigger:focus ~ .tooltip-content {
        display: block;
    }
}

/* Pagination */

.pagination {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 8px;

    .pagination-bouton {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid var(--color-border);
        background: var(--color-white);
        color: var(--color-bleu-marianne);
        cursor: pointer;
        border-radius: 4px;
        transition: all .2s;
        font-weight: 500;

        &:hover:not(.disabled), &.pagination-active {
            background: var(--color-bleu-marianne);
            color: var(--color-white);
            border-color: var(--color-bleu-marianne);
        }

        &.disabled {
            opacity: .4;
            cursor: not-allowed;
        }
    }

    .pagination-ellipse {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--color-dark);
        opacity: .6;
        user-select: none;
        padding: 0 4px;
    }
}

/* Badges / Tags */
.tag-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 10px;
}
.tag-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    border: none;
    cursor: pointer;
}

/* Formulaires */
.input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 4px 12px;
    background: var(--color-white);
}
.input-group input {
    border: none;
    outline: none;
    width: 100%;
    padding: 8px 0;
    font-size: 0.95rem;
}
.input-group i { color: var(--color-bleu-marianne); margin-right: 10px; }

.select {
    padding: 8px 30px 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    height: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    background-color: var(--color-white);
    color: var(--color-dark);

    /* Les lignes suivantes pourront être remplacées par le pseudo-sélecteur picker::icon lorsqu'il sera supporté par tous les navigateurs. https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::picker-icon */
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23777777' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.select-inline {
    border: none;
    border-bottom: 1px dashed var(--color-bleu-marianne);
    color: var(--color-bleu-marianne);
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    cursor: pointer;
}

/* Tuiles / Cartes */
.tuile {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    display: flex;
    flex-direction: column;

    .tuile-image {
        max-width: 100%;
    }
}

.tuile-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tuile-title {
    border-bottom: none;
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-bleu-marianne);

    a {
        text-decoration: none;
        color: inherit;

        &:hover {
            text-decoration: underline;
        }
    }
}

.tuile-body {
    padding: 0 15px 15px 15px;
    flex-grow: 1; 
}
.tuile-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--color-grey);
    border-radius: 0 0 6px 6px;
}

.tuile-bouton {
    width: 28px;
    height: 28px;
}

.tuile p {
    font-size: .95rem;
    line-height: 1.5;
    margin: 0;
}

.tuile-chargement {
    min-height: 350px;
    height: 100%;
    background-color: var(--color-grey); 
    background-image: linear-gradient(
        110deg, 
        var(--color-grey) 40%, 
        var(--color-white) 50%, 
        var(--color-grey) 60%
    );
    background-size: 200% 100%;
    animation: shine 2s linear infinite;
    border: 1px solid var(--color-border);
    border-radius: 6px;
}



@keyframes shine {
    from { background-position: 0 0;}
    to { background-position: -200% 0; }
}

/*
 * Avertissements (admonitions)
 */

.admonition {
    background: var(--color-white);
    border: 1px solid;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    margin: 1em 0;
    overflow: hidden;

    .admonition-header {
        background: var(--color-grey);
    }
}

.admonition-header {
    padding: .7em;
    margin: 0;
}

.admonition-content {
    padding: 0 .7em;
    margin: .5em 0;
}

.admonition-success {
    border-color: #0c0;

    .admonition-header {
        background: #cfc;
        color: #0a0;
    }
    .admonition-icon {
        color: #0a0;
    }
}

.admonition-error {
    border-color: #a00;

    .admonition-header {
        background: #fcc;
        color: #a00;
    }
    .admonition-icon {
        color: #a00;
    }
}

.admonition-warning {
    border-color: #a50;

    .admonition-header {
        background: #fda;
        color: #a50;
    }
    .admonition-icon {
        color: #a50;
    }
}

.admonition-info {
    border-color: #00c;

    .admonition-header {
        background: #ccf;
        color: #00c;
    }
    .admonition-icon {
        color: #00c;
    }
}

/*
 * Footer
 */
.footer-separator {
    border-top: 3px solid var(--color-forge-500);
}

/* Section 1 : Infos & Référencement */
.footer-top-infos {
    background-color: var(--color-forge-100);
    color: var(--color-dark);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;

    /* Ajuste le padding pour que la taille maximale soit de 1200px */
    padding: 1.5rem max(1.5rem, 50vw - 600px);

    .infos-text p {
        font-size: .95rem;
        line-height: 1.4;
        margin: .4rem 0;
        font-weight: 500;
    }
}

@media (min-width: 576px) {
    .footer-top-infos {
        flex-direction: row;
    }
}

/* Section 2 : Barre d'actions */
.footer-action-bar {
    background-color: var(--color-forge-300);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    flex-direction: column;

    /* Ajuste le padding pour que la taille maximale soit de 1200px */
    padding: 1.5rem max(1rem, 50vw - 600px);
}

@media (min-width: 576px) {
    .footer-action-bar {
        flex-direction: row;
    }
}

/* Section 3 : Contenu principal */
.footer-main {
    background-color: var(--color-forge-500);
    font-size: 0.9rem;
    color: var(--color-white);
    margin: 0 auto;
    justify-content: stretch;
    align-items: center;
    gap: 1rem;
    display: grid;
    grid-template-columns: 1fr;

    /* Ajuste le padding pour que la taille maximale soit de 1200px */
    padding: 1.5rem max(1.5rem, 50vw - 600px);

    .footer-main-image img {
        max-width: 200px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
    }

    .footer-main-text {
        p {
            margin-top: 0;
            font-size: 1.1rem;
            text-align: center;
        }
        .forge-link a {
            font-weight: 700;
            text-decoration: none;
            color: inherit;
            &:hover {
                text-decoration: underline;
            }
        }
        .slogan {
            font-family: 'Comfortaa', cursive;
            font-weight: 700;
            font-size: 1.05rem;
        }
    }

    .footer-main-credits {
        padding: .5rem;
        border-top: 1px solid var(--color-forge-300);

        p {
            margin-top: 0;
        }

        ul {
            list-style: none;
            padding: 0;
            margin: 0.5rem 0 0 0;

            li {
                margin-bottom: 0.3rem;
                font-size: 0.85rem;
            }
        }
    }
}

@media (min-width: 576px) {
    .footer-main {
        display: grid;
        padding-top: 1rem;
        grid-template-columns: 180px 1fr;
        justify-content: space-between;
        .footer-main-text {
            grid-column-start: 1;
            grid-column-end: span 2;
            grid-row-start: 1;
            grid-row-end: span 1;
        }
        .footer-main-image {
            grid-column-start: 1;
            grid-column-end: span 1;
            grid-row-start: 2;
            grid-row-end: span 1;
        }
        .footer-main-credits {
            max-width: 400px;
            justify-self: center;
            grid-column-start: 2;
            grid-column-end: span 1;
            grid-row-start: 2;
            grid-row-end: span 1;
            border-top: none;
            border-left: 1px solid var(--color-forge-300);
        }
    }
}

@media (min-width: 992px) {
    .footer-main {
        display: grid;
        grid-template-columns: 180px 1fr auto;
        .footer-main-text {
            grid-column-start: 2;
            grid-column-end: span 1;
            grid-row-start: 1;
            grid-row-end: span 1;
            p {
                text-align: start;
            }
        }
        .footer-main-image {
            grid-column-start: 1;
            grid-column-end: span 1;
            grid-row-start: 1;
            grid-row-end: span 1;
        }
        .footer-main-credits {
            padding: .5rem;
            border-top: none;
            border-left: 1px solid var(--color-forge-300);
            max-width: 400px;
            grid-column-start: 3;
            grid-column-end: span 1;
            grid-row-start: 1;
            grid-row-end: span 1;
        }
    }
}

/* Section 4 : Réseaux sociaux */
.footer-social {
    background-color: var(--color-forge-600);
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-white);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-content: center;

    /* Ajuste le padding pour que la taille maximale soit de 1200px */
    padding: 1rem max(1.5rem, 50vw - 600px);

    .footer-social-text {
        display: inline-block;
        font-weight: 600;
    }

    .footer-social-links {
        display: inline-block;
        a {
            color: var(--color-white);
            font-size: 1.2rem;
            transition: transform 0.2s;
            &:hover {
                transform: scale(1.2);
            }
        }
    }
}

/* Section 5 : Liens légaux */
.footer-bottom-legal {
    background-color: var(--color-forge-700);
    color: var(--color-white);
    text-align: center;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;

    /* Ajuste le padding pour que la taille maximale soit de 1200px */
    padding: 0.8rem max(1.5rem, 50vw - 600px);

    .footer-bottom-legal-separator {
        padding: 5px 0;
    }

    a {
        color: var(--color-white);
        text-decoration: none;
        margin: 0 0.5rem;
        &:hover {
            text-decoration: underline;
        }
    }
}
@media (min-width: 768px) {
    .footer-bottom-legal {
        flex-direction: row;
        align-items: stretch;
        justify-content: center;

        .footer-bottom-legal-separator {
            border-left: 1px solid var(--color-white);
        }
    }
}

/* Icône de chargement */
.fa-spinner {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from { transform:rotate(0deg);}
    to { transform:rotate(360deg);}
}
