/* CSS moderne et responsive pour la page Index.html */

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

html, body {
    height: 100%;
    font-family: 'Montserrat', Arial, sans-serif;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar, html::-webkit-scrollbar {
    display: none;
}

/* Container principal */
.header-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Vidéo de fond */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
    background: #000;
}

/* Logo principal */
#logorond {
    width: clamp(200px, 25vw, 400px);
    height: auto;
    z-index: 100;
    opacity: 0.95;
    animation: fadeInScale 1.2s ease-out;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
    margin-bottom: 2rem;
}

/* Message principal */
.message {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    max-width: 90vw;
    width: clamp(300px, 60vw, 800px);
    text-align: center;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInUp 1s ease-out 0.5s both;
}

.message h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: #2c2c2c;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-weight: 400;
}

.message p:last-of-type {
    margin-bottom: 2rem;
}

/* Boutons d'entrée */
.btn-entrer {
    background: linear-gradient(135deg, #a8a8a8 0%, #808080 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(128, 128, 128, 0.3);
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-entrer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-entrer:hover::before {
    left: 100%;
}

.btn-entrer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(128, 128, 128, 0.4);
    background: linear-gradient(135deg, #909090 0%, #606060 100%);
}

.btn-entrer:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(128, 128, 128, 0.3);
}

/* Gestion des boutons desktop et mobile */
.btn-entrer-mobile {
    display: none;
}

.btn-entrer-desktop {
    display: inline-block;
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 0.95;
        transform: scale(1);
    }
}

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

/* RESPONSIVE DESIGN */

/* Tablette Portrait (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
    .message {
        padding: 2rem 2.5rem;
        width: clamp(400px, 70vw, 600px);
    }
    
    .message h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
        margin-bottom: 1.2rem;
    }
    
    .message p {
        font-size: clamp(1rem, 2.5vw, 1.1rem);
    }
    
    #logorond {
        width: clamp(180px, 30vw, 300px);
        margin-bottom: 1.5rem;
    }
}

/* Tablette Paysage et petits écrans (701px - 767px) */
@media (max-width: 767px) and (min-width: 701px) {
    .message {
        padding: 1.8rem 2rem;
        width: clamp(350px, 80vw, 500px);
    }
    
    .message h1 {
        font-size: clamp(1.6rem, 4vw, 2rem);
        margin-bottom: 1rem;
    }
    
    .message p {
        font-size: clamp(0.9rem, 2vw, 1rem);
        margin-bottom: 0.8rem;
    }
    
    #logorond {
        width: clamp(150px, 25vw, 250px);
        margin-bottom: 1.2rem;
    }
    
    .btn-entrer {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}

/* Mobile (≤700px) */
@media (max-width: 700px) {
    .header-container {
        padding: 1rem;
        padding-bottom: calc(var(--bottom-nav-h, 56px) + 12px); /* espace pour la barre mobile */
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
    
    #logorond {
        width: clamp(120px, 35vw, 200px);
        margin-bottom: 0;
        margin-top: 0;
        flex-shrink: 0;
        align-self: center;
    }
    
    .message {
        background: rgba(255, 255, 255, 0.70);
        backdrop-filter: blur(20px);
        padding: 1.5rem 1.8rem;
        width: calc(100vw - 2rem);
        max-width: 400px;
        margin: 0 auto 0.5rem auto;
        border-radius: 15px;
        position: relative;
        flex-shrink: 0;
        align-self: flex-end;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.4);
    }
    
    .message h1 {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
        margin-bottom: 0.8rem;
        line-height: 1.3;
        color: #1a1a1a;
        font-weight: 800;
        text-shadow: 0 1px 3px rgba(255,255,255,0.8);
    }
    
    .message p {
        font-size: clamp(0.85rem, 4vw, 1rem);
        margin-bottom: 0.7rem;
        line-height: 1.5;
        color: #2c2c2c;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(255,255,255,0.6);
    }
    
    .message p:last-of-type {
        margin-bottom: 1.5rem;
    }
    
    /* Boutons mobile */
    .btn-entrer-desktop {
        display: none;
    }
    
    .btn-entrer-mobile {
        display: flex;
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        z-index: 200;
        padding: 1rem 3rem;
        font-size: 1.1rem;
        font-weight: 700;
        min-width: 200px;
        animation: slideInUp 1s ease-out 1s both;
        text-align: center;
        justify-content: center;
        align-items: center;
        margin: 0 auto 2rem auto;
        align-self: flex-end;
    }
}

/* Très petits mobiles (≤400px) */
@media (max-width: 400px) {
    .message {
        background: rgba(255, 255, 255, 0.70);
        backdrop-filter: blur(20px);
        padding: 1.2rem 1.5rem;
        width: calc(100vw - 1.5rem);
        margin: 0 auto 0.5rem auto;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.4);
    }
    
    .message h1 {
        font-size: 1.3rem;
        margin-bottom: 0.7rem;
        color: #1a1a1a;
        font-weight: 800;
        text-shadow: 0 1px 3px rgba(255,255,255,0.8);
    }
    
    .message p {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
        color: #2c2c2c;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(255,255,255,0.6);
    }
    
    #logorond {
        width: clamp(100px, 40vw, 150px);
        margin-top: 0;
    }
    
    .btn-entrer-mobile {
        padding: 0.9rem 2.5rem;
        font-size: 1rem;
        min-width: 180px;
        margin: 0 auto 2rem auto;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Mode paysage sur mobile */
@media (max-width: 700px) and (orientation: landscape) {
    .header-container {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 1rem;
        padding-bottom: calc(var(--bottom-nav-h, 56px) + 8px);
    }
    
    #logorond {
        width: clamp(80px, 20vw, 120px);
        margin: 0;
        flex-shrink: 0;
    }
    
    .message {
        width: clamp(300px, 50vw, 400px);
        padding: 1rem 1.5rem;
        margin: 0 1rem;
    }
    
    .message h1 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .message p {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .message p:last-of-type {
        margin-bottom: 1rem;
    }
    
    .btn-entrer-mobile {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        padding: 0.7rem 2rem;
        font-size: 0.9rem;
        min-width: 150px;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 1rem auto 0 auto;
    }
}

/* Responsive XXL écrans (≥1800px) */
@media (min-width: 1800px) {
    .header-container {
        max-width: 1800px;
        margin: 0 auto;
        height: 100vh;
        padding: 0;
    }
    .message {
        max-width: 1200px;
        width: 60vw;
        padding: 3rem 4rem;
        font-size: 1.3rem;
    }
    #logorond {
        width: clamp(350px, 20vw, 600px);
        margin-bottom: 3rem;
    }
    .btn-entrer {
        font-size: 1.3rem;
        padding: 1.2rem 3.5rem;
    }
}

/* Responsive laptop (1200px - 1799px) */
@media (min-width: 1200px) and (max-width: 1799px) {
    .header-container {
        max-width: 1400px;
        margin: 0 auto;
        height: 100vh;
        padding: 0;
    }
    .message {
        max-width: 900px;
        width: 55vw;
        padding: 2.5rem 3rem;
        font-size: 1.15rem;
    }
    #logorond {
        width: clamp(250px, 18vw, 400px);
        margin-bottom: 2.2rem;
    }
    .btn-entrer {
        font-size: 1.1rem;
        padding: 1rem 2.5rem;
    }
}

/* Ajustements des tailles de police  */
html {
    font-size: 14px;
}
body {
    font-size: 1rem; /* 14px */
}
h1, #galerie-title {
    font-size: 2rem !important; /* 28px */
}
h2, #poeme-title, .bloc-galerie h2, .bloc-videos h2, #contact-section h2 {
    font-size: 1.5rem !important; /* 21px */
}
h3 {
    font-size: 1.21rem !important; /* 17px */
}
.bloc-connexion label,
.bloc-connexion input,
.bloc-connexion p,
.btn-entrer {
    font-size: 1rem !important; /* 14px */
}

/* Accessibilité et performances */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #logorond {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
