* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #0f3460;
    --light: #e94560;
    --white: #f1f1f1;
}
body {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    min-height: 100vh;
    padding: 30px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}
header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 30px;
}
h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--light), #ff7aa2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.story-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    height: 350px;
    display: flex;
    flex-direction: column;
}
.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.1);
}
.story-image {
    height: 250px;
    background-size: cover;
    background-position: center;
}
.story-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.story-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.story-description {
    font-size: 0.9rem;
    opacity: 0.8;
    flex-grow: 1;
}
.story-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: 10px;
    color: var(--light);
}
/* Stories Viewer */
.stories-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    flex-direction: column;
}
.stories-viewer.active {
    display: flex;
}
.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
}
.story-progress {
    display: flex;
    gap: 5px;
    flex-grow: 1;
    margin: 20px;
}
.progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    flex-grow: 1;
    border-radius: 2px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.1s linear;
}
.story-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}
.story-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
}
.story-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}
.story-close {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.3s;
}
.story-close:hover {
    background: rgba(255, 255, 255, 0.1);
}
.story-content {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: start;
    padding: 20px;
    position: relative;
}
.story-slides {
    position: relative;
    width: 100%;
    height: 75vh;
    max-width: 500px;
    overflow: hidden;
}
.story-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: none;
    border-radius: 30px;
    background: #000;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    overflow: hidden;
    z-index: 1;
}
.story-slide.active {
    display: flex;
    z-index: 2;
}
.story-slide img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    z-index: 1;
}
/* Pour que le texte reste lisible au-dessus de l'image */
.story-caption {
    position: relative;
    z-index: 2;
    margin: 30px 0 0 0;
    font-size: 1.2rem;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 8px #000, 0 0 10px #000;
    background: rgba(0,0,0,0.25);
    padding: 10px 20px;
    border-radius: 8px;
    max-width: 90%;
}
.story-slide .story-caption.bottom { background: rgba(0,128,0,0.5); }
.story-slide.overlay .story-caption.overlay { background: rgba(128,0,0,0.5); }
.story-slide .story-caption { background: rgba(0,0,128,0.5); }
/* Pour voir la différence entre les templates */
.story-caption.bottom {
    background: rgba(0, 128, 0, 0.7);
    color: #fff;
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 1em;
}
.story-slide.paysage {
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    height: 100%;
    width: 100%;
    position: relative;
    top: 0; left: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 30px;
    z-index: 1;
}
.paysage-caption-container {
    padding: 30px 30px 10px 30px;
    z-index: 2;
}
.story-caption.paysage {
    background: none;
    color: #222;
    font-size: 1.3rem;
    text-align: left;
    margin: 0;
    padding: 0;
    text-shadow: none;
}
.paysage-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 30px;
}
.paysage-img {
    width: 90%;
    max-width: 600px;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    object-fit: cover;
    object-position: center;
}
.story-slide.overlay .story-caption.overlay {
    background: rgba(128, 0, 0, 0.7);
    color: #fff;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}
.story-caption {
    background: rgba(0, 0, 128, 0.7);
    color: #fff;
    padding: 1em;
    position: relative;
}
.story-slide img {
    width: 100%;
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.nav-btn {
    position: absolute;
    bottom: 10px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}
.prev-btn {
    left: -70px;
}
.next-btn {
    right: -70px;
}
@media (max-width: 768px) {
    .prev-btn {
        left: 20px;
    }
    .next-btn {
        right: 20px;
    }
}
.share-options {
    position: absolute;
    top: 70px;
    right: 20px;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    padding: 15px;
    display: none;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1001;
    min-width: 200px;
}
.share-options.active {
    display: flex;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.95rem;
}
.share-option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}
.share-option i {
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
    font-style: normal;
}
.facebook { color: #1877f2; }
.twitter { color: #1da1f2; }
.instagram { 
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.whatsapp { color: #25d366; }
.linkedin { color: #0077b5; }
.copy { color: #9ca3af; }
.native { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}
/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 30, 30, 0.95);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    .story-card {
        height: 300px;
    }
    .share-options {
        right: 10px;
        left: 10px;
        top: auto;
        bottom: 80px;
    }
}