/* =========================
RESET LARGEUR PLEINE PAGE
========================= */

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

p, h2, h3, h4, h5, h6, blockquote, pre,
a, abbr, acronym, address, big, cite, code {
    font-family: Arial, Helvetica, sans-serif;
}

/* =========================
SCROLL REDLINE
========================= */

#scroll-redline,
#scroll-redline-left {
    position: fixed;
    top: 0;
    width: 8px;
    height: 0%;
    z-index: 9999;
    background-image: radial-gradient(circle, red 2px, transparent 2px);
    background-size: 100% 12px;
    background-repeat: repeat-y;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.1) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.1) 100%);
}

#scroll-redline       { right: 0; }
#scroll-redline-left  { left: 0; }

/* =========================
BLOC LOGOS
========================= */

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 12px 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    height: auto;
}

.logo a {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
}

.logo img {
    display: block;
    object-fit: contain;
    height: 60px;
    width: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px red);
}

@media (max-width: 768px) {
    .logo img { height: 42px; }
}

/* =========================
HEADER / NAV PRINCIPALE
========================= */

.glow2 img, .glow1 img {
    max-height: 50px;
}

.glow1 img:hover, .glow2 img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px red);
    transition: transform 0.3s ease, filter 0.3s ease;
}

header.menu {
    background-color: #ffffff;
    border-top: 2px solid red;
    border-bottom: 2px solid red;
    position: sticky !important;
    top: 0;
    z-index: 2000;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

header.menu nav ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

header.menu nav ul li a {
    position: relative;
    text-decoration: none;
    color: black;
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

header.menu nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: red;
    transition: width 0.3s ease;
}

header.menu nav ul li a:hover        { color: red; }
header.menu nav ul li a:hover::after { width: 100%; }
header.menu nav ul li a.active       { color: red; }
header.menu nav ul li a.active::after { width: 100%; }

.langues img { width: 30px; height: auto; vertical-align: middle; }
header.menu nav ul li a.langues:hover { color: transparent; }
header.menu nav ul li a.langues::after,
header.menu nav ul li a.langues:hover::after { background: transparent; }

/* =========================
MAIN
========================= */

main.ensemblemain {
    width: 100%;
    margin: 0;
    padding: 0;
    transition: opacity 0.15s ease;
}

/* =========================
FOOTER
========================= */

footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 2px solid red;
    background-color: #ffffff;
    gap: 12px;
    position: relative;
    z-index: 99999;
    width: 100%;
    margin: 0;
}

.footer-section { flex: 1; display: flex; }
.insta-container { justify-content: flex-start; }
.email-container { justify-content: center; }
.gif-container   { justify-content: flex-end; }

.insta-container i {
    font-size: 40px;
    color: #000;
    transition: color 0.3s ease;
}

.email-container a {
    color: #000;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
    transition: color 0.3s ease;
}

.gif-container img { max-width: 200px; height: auto; }

.insta-container i:hover,
.email-container a:hover { color: red; }

.credits {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #555;
    letter-spacing: 0.05em;
    border-top: 1px solid #e0e0e0;
    order: 10;
    padding-top: 30px;
    font-family: 'Times New Roman', Times, serif, Helvetica, sans-serif;
}

footer nav {
    width: 100%;
    border-top: 1px solid #e0e0e0;
    order: 9;
}

footer nav ul {
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: center;
    list-style: none;
    padding: 12px 0;
    margin: 0;
}

footer nav ul li a {
    position: relative;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.3s ease;
}

footer nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: red;
    transition: width 0.3s ease;
}

footer nav ul li a:hover        { color: red; }
footer nav ul li a:hover::after { width: 100%; }
footer nav ul li a.active       { color: red; }
footer nav ul li a.active::after { width: 100%; }

footer nav ul li a.langues:hover { color: transparent; }
footer nav ul li a.langues::after,
footer nav ul li a.langues:hover::after { background: transparent; }

/* =========================
RESPONSIVE
========================= */

@media (max-width: 1024px) {
    header.menu nav ul {
        justify-content: flex-start;
        gap: 18px;
        padding: 10px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    header.menu nav ul li { flex: 0 0 auto; }

    footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section { justify-content: center; }
    .gif-container img { max-width: 160px; }
    footer nav ul { gap: 20px; }
}

@media (max-width: 728px) {
    header.menu nav ul li a { font-size: 13px; }
    .insta-container i { font-size: 30px; }
    .email-container a { font-size: 15px; word-break: break-word; }
    .gif-container img { max-width: 110px; }
    footer nav ul { gap: 14px; flex-wrap: wrap; }
    footer nav ul li a { font-size: 11px; }
    .credits { font-size: 11px; }
}

/* =========================
LECTEUR MUSIQUE FLOTTANT
========================= */

.music-player {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100000; /* passe devant le header (2000) et le footer (99999) */
    /* La position est ensuite pilotée en JS via left/top une fois déplacée */
}

.music-handle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid red;
    color: red;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.music-handle-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

.music-handle:hover {
    background-color: red;
    color: #ffffff;
}

.music-handle.dragging {
    cursor: grabbing;
    transform: scale(1.08);
}

.music-handle.playing {
    background-color: red;
    color: #ffffff;
}

.music-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    width: 0;
    height: 0;
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 8px;
    transition: width 0.3s ease, height 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.music-panel.open {
    width: 260px;
    height: auto;
    padding: 14px;
    border: 2px solid red;
}

.sound-toggle {
    display: block;
    margin-bottom: 10px;
    width: 100%;
    background: none;
    border: 1px solid black;
    color: black;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    padding: 8px 10px;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.sound-toggle:hover {
    color: red;
    border-color: red;
}

.track-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.track-nav-btn {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid black;
    color: black;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.track-nav-btn:hover {
    color: red;
    border-color: red;
}

.track-title {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    color: black;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shuffle-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 10px;
    background: none;
    border: 1px solid black;
    color: black;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    padding: 8px 10px;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.shuffle-toggle:hover {
    color: red;
    border-color: red;
}

.shuffle-toggle.active {
    background-color: red;
    border-color: red;
    color: #ffffff;
}

#sc-widget {
    border-radius: 4px;
    display: block;
}

@media (max-width: 728px) {
    .music-panel.open { width: 220px; }
}
