/* Styles globaux */
:root {
    --bdsm-red: #E10B26;
    --bdsm-black: #0A0A0A;
    --gray-900: #121212;
    --gray-800: #1E1E1E;
    --gray-700: #2D2D2D;
    --gray-600: #383838;
    --gray-500: #555555;
    --gray-400: #717171;
    --gray-300: #9E9E9E;
    --gray-200: #CCCCCC;
    --gray-100: #EFEFEF;
    --white: #FFFFFF;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-100);
    background-color: var(--bdsm-black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--gray-200);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--bdsm-red);
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

.page-title {
    font-family: 'Ceviche One', cursive;
    font-size: 2.5rem;
    color: var(--bdsm-red);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--bdsm-red);
    padding-bottom: 0.5rem;
}

.btn, .btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--bdsm-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #c0091f;
    color: var(--white);
}

.btn-secondary {
    background-color: var(--gray-700);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--gray-600);
}

/* Cards */
.card {
    background-color: var(--gray-900);
    border: 2px solid var(--gray-700);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--bdsm-red);
    box-shadow: 0 0 15px rgba(225, 11, 38, 0.3);
}

.card-title {
    font-family: 'Ceviche One', cursive;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--bdsm-red);
}

/* Grids */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid var(--gray-600);
    border-radius: 0.25rem;
    background-color: var(--gray-800);
    color: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--bdsm-red);
    box-shadow: 0 0 0 0.2rem rgba(225, 11, 38, 0.25);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

/* ===== STYLES POUR LA GESTION DES MÉDIAS DANS LES DEMANDES D'ACHAT DE JOUETS ===== */

/* Conteneur principal de média dans les cartes */
.purchase-media {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--gray-900);
    margin-bottom: 15px;
}

/* Carousel pour les médias */
.purchase-media .carousel {
    height: 100%;
}

.purchase-media .carousel-inner {
    height: 100%;
}

.purchase-media .carousel-item {
    height: 100%;
}

/* Contrôles du carousel */
.purchase-media .carousel-control-prev,
.purchase-media .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.purchase-media .carousel-control-prev {
    left: 10px;
}

.purchase-media .carousel-control-next {
    right: 10px;
}

.purchase-media:hover .carousel-control-prev,
.purchase-media:hover .carousel-control-next {
    opacity: 0.8;
}

.purchase-media .carousel-control-prev:hover,
.purchase-media .carousel-control-next:hover {
    opacity: 1;
}

/* Indicateurs du carousel */
.purchase-media .carousel-indicators {
    margin-bottom: 10px;
}

.purchase-media .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 2px;
    background-color: rgba(255, 255, 255, 0.5);
}

.purchase-media .carousel-indicators button.active {
    background-color: white;
}

/* État sans média */
.purchase-media .no-media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-600);
    font-size: 3rem;
}

/* Overlay pour les vidéos dans les grilles */
.media-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grilles de médias dans les modals */
.existing-media-grid,
.new-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-800);
    transition: transform 0.2s ease;
}

.media-item:hover {
    transform: scale(1.02);
}

.btn-remove-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.btn-remove-media:hover {
    opacity: 1;
    background: #dc3545;
}

/* Aperçu des fichiers audio et autres */
.audio-container,
.file-container {
    background: var(--gray-800);
    color: var(--gray-300);
    text-align: center;
    padding: 20px;
    border-radius: 8px;
}

.file-name {
    font-size: 0.9rem;
    color: var(--gray-400);
    word-break: break-word;
}

/* Styles pour la galerie modale */
.modal-content.bg-dark {
    border: 1px solid var(--gray-700);
}

.modal-content.bg-dark .modal-header {
    background: var(--gray-800);
}

.modal-content.bg-dark .modal-body {
    background: var(--gray-900);
}

/* Amélioration de l'affichage des cartes de demandes */
.purchase-card {
    position: relative;
    margin-bottom: 20px;
}

.purchase-card .purchase-media + .purchase-info {
    margin-top: 0;
}

.purchase-title {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive pour les médias */
@media (max-width: 768px) {
    .purchase-media {
        height: 250px;
    }
    
    .existing-media-grid,
    .new-media-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .purchase-media .carousel-control-prev,
    .purchase-media .carousel-control-next {
        width: 35px;
        height: 35px;
    }
}
