/* Palette de couleurs royales Tamoules */
:root {
    --bg-gradient: linear-gradient(135deg, #1a0305 0%, #33080e 50%, #1a0305 100%);
    --card-bg: rgba(255, 254, 250, 0.97);
    --primary-red: #800020;
    --primary-dark: #4a0012;
    --accent-gold: #D4AF37;
    --accent-gold-light: #F3E5AB;
    --accent-green: #0D5C3A;
    --text-dark: #2A1A08;
    --text-muted: #665544;
    --shadow-gold: 0 10px 30px rgba(212, 175, 55, 0.25);
}

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

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header & Navigation Responsive */
.site-header {
    background: linear-gradient(to right, #3b000e, #66001a, #3b000e);
    border-bottom: 2px solid var(--accent-gold);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    font-size: 26px;
    color: var(--accent-gold);
}

.brand-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(45deg, #FFE259, #FFA751);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.brand-tamil-group {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.brand-tamil {
    font-family: 'Noto Sans Tamil', sans-serif;
    font-size: 11px;
    color: var(--accent-gold-light);
    background: rgba(212, 175, 55, 0.15);
    padding: 1px 5px;
    border-radius: 6px;
    border: 1px solid var(--accent-gold);
}

/* Navigation Bureau */
.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
}

.nav-link {
    color: #FFF;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: var(--accent-gold);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch {
    display: flex;
    gap: 4px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--accent-gold);
    color: #FFF;
    padding: 4px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
}

.lang-btn.active, .lang-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
    font-weight: 700;
}

/* Bouton Menu Hamburger pour Téléphone */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--accent-gold);
    font-size: 22px;
    cursor: pointer;
}

/* Conteneur de Contenu */
.main-content {
    flex: 1;
    max-width: 1150px;
    width: 100%;
    margin: 25px auto;
    padding: 0 15px;
}

.container-card {
    background: var(--card-bg);
    border: 2px solid var(--accent-gold);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), var(--shadow-gold);
    overflow: hidden;
    position: relative;
}

.container-card::before {
    content: '';
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px dashed var(--accent-gold);
    border-radius: 15px;
    pointer-events: none;
    z-index: 10;
}

/* Hero / Disposition Réactive */
.hero-layout {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.hero-text-column {
    flex: 1.1;
    min-width: 300px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-image-column {
    flex: 0.9;
    min-width: 300px;
    padding: 25px;
    background: radial-gradient(circle, #FFF9EF 0%, #F5E5C0 100%);
    border-left: 1px dashed var(--accent-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

h1 {
    font-family: 'Cinzel', serif;
    color: var(--primary-red);
    font-size: 30px;
    line-height: 1.3;
    margin-bottom: 12px;
}

.subtitle-decoration {
    width: 70px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-red), var(--accent-gold));
    margin-bottom: 18px;
    border-radius: 2px;
}

p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

/* Diaporama */
.diaporama-container {
    position: relative;
    width: 100%;
    height: 340px;
    border-radius: 14px;
    overflow: hidden;
    border: 3px solid var(--accent-gold);
    box-shadow: var(--shadow-gold);
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
    object-fit: cover;
    transform: scale(1.05);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slide-caption {
    position: absolute;
    bottom: 0; width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-style: italic;
}

/* Boutons */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Cinzel', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-dark));
    color: var(--accent-gold-light);
    border: 1px solid var(--accent-gold);
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(128, 0, 32, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
}

.btn-secondary:hover {
    background-color: rgba(13, 92, 58, 0.08);
    transform: translateY(-2px);
}

.btn-back {
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 15px;
    border: none;
    cursor: pointer;
}

/* Formulaires */
.form-layout {
    max-width: 460px;
    margin: 0 auto;
    padding: 30px 15px;
    text-align: center;
}

.form-group {
    text-align: left;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 12px;
    color: var(--accent-green);
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--accent-gold);
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 11px 12px 11px 38px;
    border: 1.5px solid #E0D0B0;
    border-radius: 8px;
    font-size: 14px;
    background-color: #FFFDF9;
}

/* Zone Téléversement Photos */
.photo-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.photo-box {
    border: 1.5px dashed var(--accent-gold);
    border-radius: 8px;
    padding: 10px 5px;
    text-align: center;
    background: #FFF9EF;
    position: relative;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.photo-box i {
    font-size: 18px;
    color: var(--primary-red);
    margin-bottom: 4px;
}

.photo-box span {
    font-size: 10px;
    color: var(--text-muted);
}

.photo-box input[type="file"] {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.photo-preview {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    display: none;
}

/* Gestion Pages */
.page {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modale */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 3, 5, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--accent-gold);
    border-radius: 16px;
    padding: 25px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.modal-icon {
    font-size: 40px;
    color: var(--accent-green);
    margin-bottom: 10px;
}

/* Footer */
.site-footer {
    background: #120204;
    border-top: 1px solid var(--accent-gold);
    color: #d8c2aa;
    padding: 20px 15px;
    margin-top: auto;
    font-size: 12px;
    text-align: center;
}

.footer-container {
    max-width: 1150px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 15px;
    list-style: none;
}

.footer-links a {
    color: var(--accent-gold-light);
    text-decoration: none;
}

/* --- MEDIA QUERIES (ADAPTATION MOBILE) --- */
@media (max-width: 768px) {
    .header-container {
        padding: 10px 15px;
    }

    .mobile-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 12px;
        padding-top: 12px;
        border-top: 1px dashed rgba(212, 175, 55, 0.3);
    }

    .main-nav.open {
        display: flex;
    }

    .header-container {
        flex-wrap: wrap;
    }

    .brand-name {
        font-size: 17px;
    }

    .brand-tamil {
        font-size: 10px;
    }

    .hero-text-column {
        padding: 25px 20px;
    }

    .hero-image-column {
        border-left: none;
        border-top: 1px dashed var(--accent-gold);
        padding: 20px 15px;
    }

    h1 {
        font-size: 24px;
    }

    .btn-group {
        flex-direction: column;
    }

    .diaporama-container {
        height: 250px;
    }

    .footer-container {
        flex-direction: column;
        gap: 10px;
    }
}


.photo-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 18px;
    cursor: pointer;
    z-index: 10;
}


#mon-espace-photos img.slide {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre l'image proprement au format portrait sans la déformer */
}
