/* Variables pour les couleurs */
:root {
    --primary-color: #D4B08C;  /* Couleur dorée */
    --secondary-color: #F9F5F1; /* Beige clair */
    --accent-color: #8D5B4C;   /* Bordeaux */
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --text-color: #2c3e50;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
    background-image: linear-gradient(45deg, #ffffff55 25%, transparent 25%),
                      linear-gradient(-45deg, #ffffff55 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #ffffff55 75%),
                      linear-gradient(-45deg, transparent 75%, #ffffff55 75%);
    background-size: 20px 20px;
    margin: 0;
    padding: 20px;
}

.wedding-header {
    text-align: center;
    margin-bottom: 40px;
}

.wedding-header h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 4em;
    color: var(--accent-color);
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.wedding-date {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em;
    color: var(--primary-color);
    margin-top: 10px;
}

/* Container principal */
.upload-form, .admin-panel {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

/* Titres */
h2 {
    font-family: 'Montserrat', sans-serif;
    color: var(--accent-color);
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Formulaires et inputs */
form {
    text-align: center;
}

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

.file-input-label {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.upload-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.file-input-label:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.submit-btn {
    background: var(--accent-color);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

input[type="password"] {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    width: 250px;
    margin-right: 10px;
}

input[type="password"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Messages */
#message {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Grille d'images */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.image-grid div {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.image-grid div:hover {
    transform: translateY(-5px);
}

.image-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.image-grid p {
    margin: 10px 0;
    font-size: 0.9em;
    color: #666;
    word-break: break-all;
}

.image-grid button {
    width: 100%;
    background-color: var(--danger-color);
    padding: 8px 16px;
    font-size: 0.9em;
}

.image-grid button:hover {
    background-color: #c0392b;
}

/* Responsive design */
@media (max-width: 768px) {
    .wedding-header h1 {
        font-size: 3em;
    }
    
    .upload-form {
        padding: 20px;
    }
    
    .preview-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Ajoutez ces styles à votre fichier CSS existant */

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.preview-item {
    position: relative;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.preview-item:hover {
    transform: translateY(-5px);
}

.preview-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.preview-item .remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

.preview-item p {
    margin: 5px 0 0;
    font-size: 0.8em;
    color: #666;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.button-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.delete-btn, .download-btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

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

.delete-btn:hover {
    background-color: #c0392b;
}

.download-btn:hover {
    background-color: #357abd;
}

.download-all-btn {
    background-color: var(--primary-color);
    margin: 20px 0;
    padding: 12px 24px;
    width: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.download-all-btn:hover {
    background-color: #357abd;
}

.admin-link {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-button {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.admin-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
} 