/* =========================================
   1. RESET & VARIABLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

:root {
    --primary: #D4A373;
    /* Gold / Beige signature */
    --primary-dark: #b08d68;
    /* Gold foncé */
    --secondary: #FAEDCD;
    /* Crème */
    --text: #4A4A4A;
    /* Gris élégant */
    --accent: #E6C8A0;
    /* Champagne clair */

    --glass: rgba(255, 255, 255, 0.88);
    --glass-transparent: rgba(255, 255, 255, 0.45);

    /* Icônes version Onsemarie (teinte gold) */
    --icon-filter:
        invert(69%) sepia(25%) saturate(512%) hue-rotate(356deg) brightness(92%) contrast(90%);

    --icon-filtermenu:
        brightness(0) invert(1);
}

/* =========================================
   2. GLOBAL LAYOUT
   ========================================= */
body {
    min-height: 100vh;
    background-image: url("background_index.png?v=5");
    background-repeat: no-repeat;
    background-position: 10% top;
    background-size: cover;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    color: var(--text);
    background-color: #FEFAE0;
    /* crème signature Onsemarie */
}

/* Centrage par défaut pour certaines pages (login, musique, audio...) */
body.center-content {
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    background-size: cover;
}

body.index-page {
    background-image: url("background_index.png?v=5");
    background-size: cover;
}



h1 {
    font-family: 'Playfair Display', serif;
    text-align: center;
}

h2,
h3 {
    font-family: 'Playfair Display', serif;
}

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

.footer {
    font-family: 'Playfair Display', serif;
    text-align: center;

}

/* =========================================
   3. NAVIGATION (HEADER & MOBILE)
   ========================================= */
.desktop-header-menu {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 0.5rem 0;

}

.desktop-header-menu-accueil {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 0.5rem 0;
    border-radius: 14px;
    width: 800px;

}

/* Boutons transparents */
.desktop-header-menu button {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85rem;

}

.desktop-header-menu-accueil button {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85rem;


}

.desktop-header-menu img {
    width: 28px;
    height: 28px;
    filter: var(--icon-filtermenu);
}

.desktop-header-menu button:hover {
    transform: scale(1.1);
}

.desktop-header-menu-accueil img {
    width: 28px;
    height: 28px;
    filter: var(--icon-filtermenu);
}

.desktop-header-menu-accueil button:hover {
    transform: scale(1.1);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu button {
    flex: 1;
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6rem 0;
}

.mobile-menu img {
    width: 28px;
    height: 28px;
    filter: var(--icon-filtermenu);
}

.mobile-menu button:hover img {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.desktop-header-menu button,
.desktop-header-menu button:hover,
.desktop-header-menu button:focus,
.desktop-header-menu button:active {
    background: transparent !important;
    box-shadow: none !important;
}

.desktop-header-menu-accueil button,
.desktop-header-menu-accueil button:hover,
.desktop-header-menu-accueil button:focus,
.desktop-header-menu-accueil button:active {
    background: transparent !important;
    box-shadow: none !important;
}


.mobile-menu button,
.mobile-menu button:hover,
.mobile-menu button:focus,
.mobile-menu button:active {
    background: transparent !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .desktop-header-menu {
        display: none;
    }

    .desktop-header-menu-accueil {
        display: none;
    }

    .container-module {
        padding-bottom: 90px;
        /* 70px menu + marge sécurité */
    }

    .mobile-menu {
        display: flex;
    }
}

/* MENU GALLERIE */


/* MENU GALLERIE */
/* CONTAINER */
.container-module {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;

    background:
        linear-gradient(var(--glass), var(--glass)),
        url("background_index.png?v=5") center / cover no-repeat;

    backdrop-filter: blur(10px);
}

.container-header-module {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;

}

.download-wrapper {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: var(--glass-transparent);
}

.submit-wrapper {
    display: flex;
    justify-content: center;
    padding: 1rem;
    gap: 15px;
}


.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.btn-secondary {
    background: #666;
}

@media (max-width: 600px) {
    .submit-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .submit-wrapper button {
        width: 100%;
    }
}








/* =========================================
   4. CONTAINERS & CARDS
   ========================================= */
.container {
    background: var(--glass);
    padding: 2rem;
    border-radius: 22px;
    box-shadow: 0 15px 35px rgba(196, 106, 75, 0.25);
    border: 1px solid rgba(196, 106, 75, 0.2);
    width: 80%;

    /* Par défaut */
    margin: 0 auto;
}

.container-application {
    background: var(--glass);
    padding: 2rem;
    border-radius: 22px;
    box-shadow: 0 15px 35px rgba(196, 106, 75, 0.25);
    border: 1px solid rgba(196, 106, 75, 0.2);
    max-width: 600px;

    /* Par défaut */
    margin: 0 auto;
}




/* =========================================
   5. COMPONENTS (BUTTONS, INPUTS)
   ========================================= */

button,
.btn-submit,
.action-btn,
.download-all,
.copy-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 1.5rem;
    /* 👈 padding vertical retiré */
    height: 48px;
    /* 👈 hauteur fixe parfaite */
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(196, 106, 75, 0.25);
    margin-top: 0.8rem;
}

.copy-btn img {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 6px;
    filter: var(--icon-filtermenu);
}

.action-btn img {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-right: 4px;
    filter: var(--icon-filtermenu);
}

button:hover,
.btn-submit:hover,
.action-btn:hover,
.download-all:hover,
.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(196, 106, 75, 0.35);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

input,
select {
    width: 100%;
    padding: 0.9rem;
    border-radius: 14px;
    border: 2px solid #E8D9C9;
    background: #FFF9F4;
    font-size: 1rem;
    margin-bottom: 1rem;
    outline: none;

}

input:focus,
select:focus {
    border-color: var(--primary);
}

/* =========================================
   6. PAGE: LOGIN (index.php)
   ========================================= */
.login-box {
    background: var(--glass);
    padding: 2.5rem;
    border-radius: 22px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(45, 99, 73, 0.2);
}

.login-box h1 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.login-box p {
    color: #666;
    margin-bottom: 2rem;
}

/* =========================================
   7. PAGE: ESPACE (espace.php)
   ========================================= */

.wrapper-espace {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* centre horizontalement */
    justify-content: center;
    /* centre verticalement dans le body */
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
    /* largeur max propre */
}

.container-espace {
    background: var(--glass);
    padding: 2rem;
    border-radius: 22px;
    width: 100%;
    max-width: 800px;
    align-items: center;
    /* centre le texte et contenu */

    height: 400px;
    text-align: center;


    gap: 1rem;
    border: 1px solid rgba(45, 99, 73, 0.2);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.header-espace {


    border-radius: 14px;
}

body.body-espace {
    min-height: 100vh;
    background-image: url("background_index.png?v=5");
    background-repeat: no-repeat;
    background-position: 10% top;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    /* centre verticalement */
    overflow-x: hidden;
    /* empêche scroll horizontal */
    padding: 2rem 1rem;
}

.welcome {
    display: flex;
    flex-direction: column;
    /* si tu as plusieurs lignes ou éléments */
    justify-content: center;
    /* centre verticalement */
    align-items: center;
    /* centre horizontalement */
    text-align: center;
    /* utile si texte multiline */
    height: 100%;
    /* prend toute la hauteur du container */
}

@media (max-width:768px) {
    .wrapper-espace {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        /* garde margin-left pour motif */
        gap: 1rem;
        margin-top: 0px;
        width: 90%;
    }

    .container-espace {
        width: 100%;
        margin-left: 0;
        height: auto;
        border-radius: 22px;
        padding: 1.5rem;
        align-items: center;
    }

    .header-espace {
        display: none;
    }

}

.welcome-wrapper {
    display: flex;
    justify-content: center;
    /* vertical si height défini */
    align-items: center;
    /* horizontal */
    width: 100%;
}

@media (max-aspect-ratio: 3/4) {
    body {
        background-position: 10% top;
        background-size: 120%;
    }
}

/* =========================================
   8. PAGE: GALLERIE
   ========================================= */


.folder-nav {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.folder-nav h3 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.folder-list {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.folder-btn {
    padding: 0.6rem 1.2rem;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    display: inline-block;
}

.folder-btn:hover,
.folder-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.folder-count {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-left: 0.3rem;
}

/* GALERIE */
.gallery {
    padding: 0.8rem;
    display: grid;
    gap: 0.5rem;
}

@media(min-width:769px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media(max-width:768px) {
    .gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

.media-item {
    position: relative;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

/* Icône play pour les vidéos */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.3s ease;
}

.video-play-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 12px solid #fff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-left: 3px;
}

.media-item:hover .video-play-icon {
    background: rgba(212, 163, 115, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}


/* Viewer */
.viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.viewer img,
.viewer video {
    max-width: 95%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.viewer-counter {
    position: absolute;
    top: 20px;
    color: #fff;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 3rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-arrow-left {
    left: 20px;
}

.nav-arrow-right {
    right: 20px;
}

@media(max-width:768px) {
    .nav-arrow {
        display: none;
    }
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* =========================================
   9. PAGE: PLAYLIST & AUDIO
   ========================================= */

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.preview-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.preview-item img,
.preview-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.tabs-scroll {
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
}


.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0.5rem 1rem;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    color: #666;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
}

.new-playlist-btn {
    background: #cad7a7;
    color: #333;

}

.actions-bar {
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    background: #f9f9f9;
    flex-wrap: wrap;
}

.action-btn.secondary {
    background: #795548;
}

.action-btn.danger {
    background: #d32f2f;
}

.music-list,
.audio-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.music-item,
.audio-item {
    position: relative;
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(196, 106, 75, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.music-item:hover,
.audio-item:hover {
    transform: translateX(5px);
    border-color: var(--accent);
}

.music-info {
    flex: 1;
}

.music-link {
    color: var(--primary);

}

.music-title,
.audio-name {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.music-title img {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-right: 4px;
    position: relative;
    filter: var(--icon-filter);
}

.music-artist {
    color: #666;
    font-size: 0.95rem;
}

.music-meta {
    font-size: 0.85rem;
    color: #999;
}

.music-platform {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.platform-spotify {
    background: #1DB954;
    color: #fff;
}

.platform-deezer {
    background: #FF0092;
    color: #fff;
}

.platform-texte {
    background: #e0e0e0;
    color: #666;
}

.play-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.delete-btn {
    background: #ffebee;
    color: #d32f2f;
    padding: 0.5rem;
    border-radius: 8px;
}

.delete-btn:hover {
    background: #ffcdd2;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal {
    background: #fff;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
}

#results {
    list-style: none;
    margin-top: -0.8rem;
    margin-bottom: 1rem;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
}

/* Deezer Results */

#results li {
    padding: 0.6rem;
    background: var(--secondary);
    border-radius: 10px;
    margin-bottom: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
}

#results li:hover {
    background: #f9f9f9;
    color: var(--primary);
}

#deezerResults {
    list-style: none;
    margin-top: -0.8rem;
    margin-bottom: 1rem;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
}

/* Deezer Results */

#deezerResults li {
    padding: 0.6rem;
    background: var(--secondary);
    border-radius: 10px;
    margin-bottom: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
}

#deezerResults li:hover {
    background: #f9f9f9;
    color: var(--primary);
}

@media (max-width:768px) {
    .desktop-header-menu {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }

    .container {
        height: calc(100vh - 60px);
        padding-bottom: 60px;
    }

    .music-item {
        flex-direction: column;
        align-items: flex-start;
        padding-right: 3rem;
    }

    .music-actions {
        width: 100%;
    }

    .play-btn {
        flex: 1;
        justify-content: center;
    }

    .drag-handle {
        position: absolute;
        right: 10px;
        top: 10px;
        font-size: 2rem;
        padding: 10px;
    }
}

/* =========================================
   10. PAGE: QR CODE
   ========================================= */
.qr-section {
    text-align: center;
    max-width: 600px;
    width: 100%;
}


.icon-title-h1 {
    width: 45px;
    height: 45px;
    vertical-align: middle;
    margin-right: 4px;
    position: relative;
    filter: var(--icon-filter);
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.qr-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(196, 106, 75, 0.15);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.icon-title {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-right: 4px;
    position: relative;
    filter: var(--icon-filter);
}

.icon-svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
    position: relative;
    top: -2px;
    /* Centrage alignement texte */
    /* Filtre pour colorer le SVG noir en #2D6349 */
    filter: var(--icon-filter);
}

.qr-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.qr-card h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.qr-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #fff;
    border: 2px dashed #cad7a7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.qr-code {
    width: 100%;
    height: 100%;
    padding: 0.5rem;
}

.qr-link {
    font-size: 0.85rem;
    color: #666;
    word-break: break-all;
    background: #fff;
    padding: 0.6rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

@media (max-width: 480px) {

    .qr-section {
        padding: 0 1rem;
    }

    .qr-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        margin-top: 1.2rem;
    }

    .qr-card {
        padding: 1.1rem;
        border-radius: 14px;
    }

    .qr-card h3 {
        font-size: 1rem;
        margin-bottom: 0.7rem;
    }

    /* 🔥 Taille QR optimisée mobile */
    .qr-placeholder {
        max-width: 200px;
        margin: 0 auto 0.8rem auto;
        border-radius: 10px;
    }

    .qr-code {
        padding: 0.4rem;
    }

    /* Lien plus compact */
    .qr-link {
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    /* Boutons full width pour le tactile */
    .copy-btn {
        width: 100%;
        padding: 0.7rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }

    /* Désactiver effet hover mobile */
    .qr-card:hover {
        transform: none;
    }
}

@media (min-width: 1024px) {
    .qr-section {
        max-width: 1200px;
        /* pour limiter la largeur et centrer */
        margin: 0 auto;
    }

    .qr-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 colonnes fixes */
        justify-items: center;
        /* centre chaque qr-card horizontalement */
        gap: 2rem;
    }

    .qr-card {
        width: 100%;
        /* chaque card prend toute la colonne */
        max-width: 300px;
        /* limite la largeur des cartes */
    }
}

/* =========================================
   11. GESTION DES ICÔNES NAV (audio.php / musique.php)
   ========================================= */
.nav-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.nav-icons a {
    display: block;
    transition: transform 0.2s;
}

.nav-icons a:hover {
    transform: scale(1.1);
}

.nav-icons img {
    width: 36px;
    height: 36px;
    opacity: 0.7;
    filter: var(--icon-filter);
    ;
}

.nav-icons a.active img,
.nav-icons a:hover img {
    opacity: 1;
}

/* Status Messages */
.status {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f9f9f9;
    color: #666;
    font-size: 0.9rem;
    display: none;
}

/* =========================================
   12. PAGE: PHOTOS (UPLOAD)
   ========================================= */
.upload-area {
    border: 2px dashed var(--accent);
    background: rgba(255, 248, 240, 0.6);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;

    margin-bottom: 1.5rem;
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(196, 106, 75, 0.08);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.file-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1.2rem;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

input[type="file"] {
    display: none;
}

.file-label {
    display: block;
    width: 100%;
    padding: 0.9rem;
    border-radius: 14px;
    border: 2px dashed #cad7a7;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.file-label:hover {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary);
}

.file-label.has-files {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(45, 99, 73, 0.1), rgba(85, 107, 47, 0.1));
    color: var(--primary-dark);
    font-weight: 600;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.preview-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.preview-item img,
.preview-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#progress-bar {
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 8px;
    margin-bottom: 1rem;
    height: 10px;
    display: none;
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    width: 0%;
    transition: width 0.3s ease;
}

#status {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.status.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(139, 195, 74, 0.1));
    color: #4CAF50;
    padding: 0.8rem;
    border-radius: 12px;
    display: block;
}

.status.error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(229, 57, 53, 0.1));
    color: #f44336;
    padding: 0.8rem;
    border-radius: 12px;
    display: block;
}

.hint {
    font-size: 0.85rem;
    color: #999;
    margin-top: -0.8rem;
    margin-bottom: 1rem;
    text-align: left;
}

.hint img {
    width: 15px;
    height: 15px;
    vertical-align: middle;
    margin-right: 4px;
    position: relative;

    filter: var(--icon-filter);
}

.status.recording {
    display: block;
    background: rgba(45, 99, 73, 0.1);
    color: var(--primary);
    font-weight: bold;
}