/* =============================================
   1. BASE & RESET
   ============================================= */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Acumin, sans-serif;
    background: white;
    overflow: hidden; 
}

@font-face {
    font-family: 'Boldonse';
    src: url('FONTS/Boldonse-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

#layout {
    display: grid;
    grid-template-columns: 20% 1fr;
    height: 100vh;
    width: 100%;
}

/* =============================================
   2. SIDEBAR (PC)
   ============================================= */
#sidebar {
    padding: 24px 110px 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow-y: auto; 
    transition: padding-bottom 0.3s ease;
    height: 100%;
}

.sidebar-top img.main-logo {
    max-width: 100px;
    margin-bottom: 16px;
}

.title-wrapper {
    position: relative;
    display: inline-block;
}

.title-wrapper h2 {
    font-size: 25px;
    margin: 25px 0 0 0;
    color: #5a2d84;
    font-family: 'Boldonse', Arial, sans-serif;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* LA FLEUR */
.flower {
    position: absolute;
    top: -118px;
    left: 70px;
    width: 70px;
    cursor: grab;
    rotate: 15deg;
    user-select: none;
    z-index: 10;
}

.sidebar-top p {
    font-size: 13px;
    line-height: 1.2;
    color: #5a2d84;
    text-align: left;
    margin-bottom: 20px;
}

.sidebar-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 25px;
    background: #FFB6FD;
    color: #5a2d84;
    text-decoration: none;
    font-size: 12px;
    border-radius: 25px;
    font-family: 'Boldonse', Arial, sans-serif;
    transition: transform 0.2s, background 0.2s;
}

.sidebar-link-btn:hover {
    transform: translateX(-4px);
    border: 4px solid #5a2d84;
}

/* SIDEBAR BOTTOM */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.sidebar-legal {
    order: 2;
    display: flex;
    justify-content: center;
    align-items: center; /* Aligne verticalement les éléments */
    font-family: Acumin, sans-serif;
    font-size: 11px;
    gap: 5px; /* Espace entre les éléments */
}

.sidebar-legal-link {
    color: #5a2d84;
    opacity: 0.8;
    text-decoration: none !important; /* Supprime le soulignement */
}

.sidebar-legal-separator {
    color: #5a2d84;
    opacity: 0.8;
}

.sidebar-legal-link:hover { opacity: 1; }

.sidebar-socials {
    order: 1;
    display: flex;
    gap: 3px;
}

.sidebar-socials img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* =============================================
   3. GRILLE PRINCIPALE (PC)
   ============================================= */
#main {
    padding: 24px;
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
    box-sizing: border-box;
    height: 100vh;
    overflow: hidden;
}

.row {
    display: grid;
    gap: 24px;
    height: 100%;
}

.row-top { grid-template-columns: 2fr 1fr; }
.row-bottom { grid-template-columns: 1fr 2fr; }

.frame {
    background: white;
    border: 4px solid #5a2d84;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
}

.frame iframe {
    width: 100%;
    height: 100% !important;
    border: none;
    display: block;
}

/* STYLE CONTENU BLOQUÉ */
.frame.placeholder.cookies-refused { background: #FFF39C; }
.blocked-msg {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #5a2d84; font-weight: bold;
    display: none; z-index: 5;
}
.frame.placeholder.cookies-refused .blocked-msg { display: block; }
.frame.placeholder.cookies-refused iframe { opacity: 0; pointer-events: none; }

/* SLIDER INSTA */
.instagram-frame-wrapper { overflow: visible; }
.instagram-frame-wrapper .slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #5a2d84;
    border: none;
    cursor: pointer;
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.instagram-frame-wrapper .slider-btn.next .texte-repli { display: none;
}
.instagram-frame-wrapper .slider-btn.prev .texte-repli { display: none;
}
.instagram-frame-wrapper .slider-btn.prev { left: -18px; }
.instagram-frame-wrapper .slider-btn.next { right: -18px; }

/* =============================================
   4. BANNIERE COOKIES
   ============================================= */
#cookie-banner {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background-color: #FFB6FD;
    color: white;
    padding: 20px;
    z-index: 9999;
    display: none;
    font-family: sans-serif;
    box-sizing: border-box;
}

.cookie-content {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cookie-text { color:#5a2d84; flex: 1; font-size: 0.7rem; line-height: 1.2; min-width: 280px; }
.cookie-buttons { display: flex; gap: 10px; }
.btn-cookie {
    padding: 6px 16px;
    border: 4px solid #5a2d84;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    background: transparent;
    color: #5a2d84;
    border-radius: 24px;
}
.btn-cookie.accept { background-color: #5a2d84; color: #FFB6FD; }

#cookie-mini-btn {
    position: fixed; bottom: 14px; right: 14px;
    width: 40px; height: 40px;
    background-color: #FFB6FD; color: #5a2d84;
    border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    font-size: 22px; cursor: pointer; z-index: 9998;
}

/* =============================================
   5. MOBILE ET TABLETTE (TOUT ÉCRAN < 1200PX)
   ============================================= */
/* J'ai changé 850px à 1200px pour inclure les tablettes en paysage */
@media screen and (max-width: 1200px) {
    html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
    }

    #layout {
        display: flex !important;
        flex-direction: column;
        height: auto !important;
        width: 100% !important;
    }

    #sidebar { display: contents; }

    .sidebar-top {
        order: 1;
        width: 100%;
        padding: 40px 20px 80px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        box-sizing: border-box;
    }
    .sidebar-link-btn { padding : 12px; width: 65%;}

    #main, .row {
        order: 2;
        display: block !important;
        height: auto !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .sidebar-bottom {
        order: 3;
        width: 100%;
        padding: 40px 20px 20px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        margin-top: auto;
    }

    .frame {
        width: 90% !important; 
        margin: 0 auto 30px auto !important;
        height: auto !important;
        min-height: auto !important;
        display: block !important;
        border: 4px solid #5a2d84;
    }
    
    .frame iframe {
        width: 100% !important;
        border: none;
    }

    /* --- A. REGLAGES HAUTEURS TÉLÉPHONES (PAR DÉFAUT) --- */
    .frame-player iframe { height: 640px !important; }
    .frame-agenda iframe { height: 450px !important; }
    .frame-blog iframe { height: 450px !important; }
    .frame-insta iframe { height: 275px !important; }

    .slider-btn { display: none !important; }

    .flower {
        position: relative !important;
        display: inline-block !important;
        left: 0 !important; top: 0 !important;
        margin-bottom: 10px;
        transform: none !important;
    }
    
    .sidebar-legal { text-decoration: underline; margin-top: 10px; }
}

/* =============================================
   6. EXCEPTION TABLETTES (Largeur > 700px)
   ============================================= */
/* C'est ici que tu modifies les tailles UNIQUEMENT pour les tablettes */
@media screen and (min-width: 700px) and (max-width: 1200px) {

    /* Exemple : Sur tablette, on peut réduire la largeur des boites */
    .frame {
        width: 80% !important; /* Un peu moins large que sur téléphone */
    }
    .sidebar-link-btn { width: auto; min-width: 300px; }

    /* --- B. REGLAGES HAUTEURS TABLETTES SPÉCIFIQUES --- */
    /* Modifie ces valeurs si tu veux que ce soit différent du téléphone */
    
    .frame-player iframe { height: 800px !important; } /* Exemple: plus haut */
    .frame-agenda iframe { height: 500px !important; }
    .frame-blog iframe { height: 500px !important; }
    .frame-insta iframe { height: 500px !important; }
}