/* Définition de la police dynamique */
@import url('https://fonts.googleapis.com/css2?family=Alata&display=swap');

/* ==========================================================================
   Variables Globales (Charte Graphique)
   ========================================================================== */
:root {
    color-scheme: normal;
    /* Couleurs de la charte dynamiques (PHP) */
    --pop-blue: #00aeed;
    --pop-pink: #e74290;
    --pop-orange: #f5911e;
    --pop-yellow: #ffea00;
    --pop-green: #0fd925;
    
    /* Couleurs fixes */
    --text-light: #ffffff;

    /* Couleurs d'interface (Mode Clair par défaut) */
    --c-bg: #f0f2f5;       /* Fond de la page */
    --c-surface: #ffffff;  /* Fond des cartes */
    --c-text: #1c1e21;      /* Texte principal */
    --c-border: #ddd;     /* Bordures neutres */
    --c-border-strong: #1c1e21; /* Bordures des cartes */
    --c-shadow: rgba(0, 0, 0, 0.1);
    --c-shadow-hover: rgba(0, 0, 0, 0.15);
    --c-shadow-social: rgba(0, 0, 0, 0.35);
    --c-shadow-social-hover: rgba(0, 0, 0, 0.2);
    --c-modal-bg: rgba(28, 30, 33, 0.75);
    --c-news-fade: #ffffff;
    --c-logo-shadow-from: rgba(0, 0, 0, 0.6);
    --c-logo-shadow-to: rgba(0, 0, 0, 0.75);
    --c-header-slogan: #1c1e21;
    --c-header-slogan-shadow: rgba(0, 0, 0, 0.3);

    /* Configuration globale */
    --font-main: 'Alata', sans-serif;
    --border-radius: 15px;
    --transition-speed: 0.3s ease;
}

/* ==========================================================================
   Mode Sombre (Dark Mode)
   ========================================================================== */
html[data-theme="dark"] {
    --c-bg: #121212;
    --c-surface: #1e1e1e;
    --c-text: #e0e0e0;
    --c-border: #444;
    --c-border-strong: #f0f2f5;
    --c-shadow: rgba(0, 0, 0, 0.3);
    --c-shadow-hover: rgba(0, 0, 0, 0.4);
    --c-shadow-social: rgba(0, 0, 0, 0.5);
    --c-shadow-social-hover: rgba(0, 0, 0, 0.4);
    --c-modal-bg: rgba(10, 10, 10, 0.85);
    --c-news-fade: #1e1e1e;
    --c-logo-shadow-from: rgba(0, 0, 0, 0.7);
    --c-logo-shadow-to: rgba(0, 0, 0, 0.9);
    --c-header-slogan: #ffffff;
    --c-header-slogan-shadow: rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background-color: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top));
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
    gap: 2rem; 
}

main { flex-grow: 1; }

h1, h2, h3 { font-weight: bold; line-height: 1.2; }

/* Titres H2 globaux (Cartes) */
h2 {
   font-size: clamp(1.5rem, 4vw, 2rem);
   margin-bottom: 1.5rem;
   color: var(--pop-blue);
   text-align: center;
   text-shadow: 2px 2px 0px var(--pop-yellow);
}

/* Titres H2 dans les modales (surcharge) */
.modal-content h2 {
    color: var(--pop-pink);
    text-shadow: none;
    text-align: left;
}

/* ==========================================================================
   Header & Logo
   ========================================================================== */
.site-header {
    --header-pad-y: 1.5rem;
    --header-pad-x: 2rem;
    background-color: var(--c-bg);
    padding: var(--header-pad-y) var(--header-pad-x);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 20px var(--c-shadow);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 20px;
    margin-bottom: 0;
    border: 3px solid var(--c-border-strong);
    transition: box-shadow var(--transition-speed), border-color var(--transition-speed);
    position: relative;
    /* Pas d'overflow hidden par défaut pour laisser respirer les ombres/animations sur Desktop */
}

/* ==========================================================================
   Header Mobile Spécifique (Sticky + Masking)
   ========================================================================== */
@media (max-width: 1024px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        overflow: hidden; /* Nécessaire ici pour le masquage des angles sur mobile défilant */
        /* Double ombre renforcée pour l'effet "fade" */
        box-shadow: 0 8px 30px var(--c-shadow), 0 20px 40px -10px var(--c-bg);
    }
}


.logo-wrapper {
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    justify-self: start;
}

.header-text {
    min-width: 0;
    min-height: 0;
    width: 100%;
}

#push-notification-wrapper {
    --header-action-size: clamp(2.05rem, 4.2vh, 2.5rem);
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: flex-end;
    justify-self: end;
    align-self: stretch;
    height: calc(100% + (2 * var(--header-pad-y)));
    margin-block: calc(-1 * var(--header-pad-y));
    min-height: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    padding-block: 0;
    gap: 0;
    padding-inline: 0;
}

.logo-wrapper .logo {
    max-height: 120px;
    width: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    animation: breathing-logo 2.5s ease-in-out infinite alternate;
}

/* Animations Logo */
@keyframes breathing-logo {
    from { transform: scale(1); filter: drop-shadow(0 6px 10px var(--c-logo-shadow-from)); }
    to { transform: scale(1.07); filter: drop-shadow(0 12px 22px var(--c-logo-shadow-to)); }
}

@keyframes uncap-logo {
    0%   { transform: scale(1.07) rotate(0deg); filter: drop-shadow(0 12px 22px var(--c-logo-shadow-to)); }
    5%   { transform: scale(1.15) rotate(-15deg); filter: drop-shadow(0 12px 22px var(--c-logo-shadow-to)); }
    95%  { transform: scale(1.15) rotate(-15deg); filter: drop-shadow(0 12px 22px var(--c-logo-shadow-to)); }
    100% { transform: scale(1.07) rotate(0deg); filter: drop-shadow(0 12px 22px var(--c-logo-shadow-to)); }
}

@keyframes shake-wrapper {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    75% { transform: translateX(-2px); }
}

@keyframes rise-and-fade {
    from { transform: translateY(0) scale(0.5); opacity: 1; }
    to { transform: translateY(-150px) scale(1.2); opacity: 0; }
}

.logo-wrapper.is-popped { animation: shake-wrapper 0.15s linear infinite; }
.logo-wrapper.is-popped .logo { animation: uncap-logo 7s ease-in-out forwards; }

.bubble {
    position: absolute;
    bottom: 20px; left: 50%;
    width: 15px; height: 15px;
    background-color: rgba(0, 174, 237, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    opacity: 0; pointer-events: none; z-index: 2;
    animation: rise-and-fade 3s ease-out forwards;
}

.header-text {
    flex-grow: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-width: 0;
}

.site-header .title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--user-title-color, var(--pop-orange));
    font-weight: bold; text-align: center;
    animation: neon-pulse 1.5s ease-in-out infinite alternate;
}

.slogan {
    font-family: var(--font-main);
    color: var(--user-slogan-color, var(--c-header-slogan));
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-top: 0.25rem;
    text-shadow: 1px 1px 3px var(--c-header-slogan-shadow);
    font-weight: bold; text-align: center;
    transition: color var(--transition-speed);
}

.site-header .title,
.slogan {
    overflow-wrap: anywhere;
}

@keyframes neon-pulse {
    from { text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 5px #fff, 0 0 10px #fff, 0 0 20px var(--pop-blue), 0 0 30px var(--pop-blue), 0 0 40px var(--pop-blue); }
    to { text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 2px #fff, 0 0 5px #fff, 0 0 10px var(--pop-blue), 0 0 15px var(--pop-blue), 0 0 20px var(--pop-blue); }
}

/* ==========================================================================
   Grille de Contenu & Cartes (Base)
   ========================================================================== */
.content-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .content-grid { grid-template-columns: repeat(2, 1fr); } }

.card {
    background: var(--c-surface);
    color: var(--c-text);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 20px var(--c-shadow);
    border: 3px solid var(--c-border-strong);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed), border-color var(--transition-speed), color var(--transition-speed);
}
.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 30px var(--c-shadow-hover);
}

/* ==========================================================================
   Carte Actualités (News)
   ========================================================================== */
.card-news { grid-column: 1 / -1; display: flex; flex-direction: column; max-height: 450px; padding: 1.5rem 2.5rem; }

.news-scroll-container { 
    overflow: hidden; flex-grow: 1; position: relative; 
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
    -webkit-tap-highlight-color: transparent; /* Supprime le flash de sélection au clic sur Android */
    cursor: pointer; 
}
.news-scroll-container::before, .news-scroll-container::after {
    content: ''; position: absolute; left: 0; right: 0; height: 20px; z-index: 2; pointer-events: none;
    transition: background var(--transition-speed);
}
.news-scroll-container::before { top: 0; background: linear-gradient(to bottom, var(--c-news-fade) 0%, rgba(255, 255, 255, 0) 100%); }
.news-scroll-container::after { bottom: 0; background: linear-gradient(to top, var(--c-news-fade) 0%, rgba(255, 255, 255, 0) 100%); }

@keyframes scroll-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.news-item { 
    border-bottom: 2px dashed var(--pop-blue);
    padding-bottom: 1rem; 
    margin-bottom: 1rem; 
}
.news-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.is-scrolling .news-content-wrapper .news-item:last-of-type { 
    padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 2px dashed var(--pop-blue);
}

.news-item-content.has-image { display: flex; gap: 1.5rem; align-items: flex-start; }
.news-item-image { width: 250px; margin-bottom: 0.5rem; flex-shrink: 0; }
.news-item-image img { 
    width: 100%; height: auto; 
    border-radius: 10px; border: 2px solid var(--c-border-strong);
    transition: border-color var(--transition-speed);
}

.news-item-text { min-width: 0; }
.news-item-text p { margin: 0; }
.news-item h3 { color: var(--pop-pink); margin-bottom: 0.5rem; margin-top: 0.5rem; }
.news-item-text ul, .news-item-text ol { list-style-position: inside; padding-left: 20px; margin-top: 1rem; margin-bottom: 1rem; }
.news-item-text a { color: var(--pop-blue); text-decoration: underline; }

/* Vignettes Vidéo (Effet Pellicule) */
.video-thumbnail-wrapper {
    display: block; margin: 1rem auto; max-width: 100%; position: relative; cursor: pointer;
    background-color: var(--c-text); padding: 10px 25px; border-radius: 8px;
    box-sizing: content-box; transition: background-color var(--transition-speed); overflow: hidden;
}
.video-thumbnail-wrapper::before, .video-thumbnail-wrapper::after {
    content: ''; position: absolute; top: 10px; bottom: 10px; width: 20px;
    background-image: repeating-linear-gradient(var(--c-text), var(--c-text) 8px, var(--c-bg) 8px, var(--c-bg) 16px);
    background-size: 100% 16px; transition: background-image var(--transition-speed);
}
.video-thumbnail-wrapper::before { left: 2.5px; }
.video-thumbnail-wrapper::after { right: 2.5px; }
.video-thumbnail-wrapper[data-orientation="horizontal"] { max-width: calc(480px + 50px); }
.video-thumbnail-wrapper[data-orientation="vertical"] { max-width: calc(270px + 50px); }
.video-thumbnail-wrapper img { width: 100%; height: auto; display: block; border-radius: 0; border: none; }
.video-thumbnail-wrapper .play-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 4rem; color: rgba(255, 255, 255, 0.9); text-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    pointer-events: none; transition: transform 0.2s ease, color 0.2s ease; z-index: 10;
}
.video-thumbnail-wrapper:hover .play-icon { transform: translate(-50%, -50%) scale(1.1); color: #fff; }

.is-fake-thumbnail { border: 1px solid var(--c-border); border-radius: 8px; aspect-ratio: 16 / 9; }
.is-fake-thumbnail[data-orientation="vertical"] { aspect-ratio: 9 / 16; }
.is-fake-thumbnail .ql-custom-video-container { position: absolute; top: 10px; left: 25px; bottom: 10px; right: 25px; }
.is-fake-thumbnail .ql-video-wrapper, .is-fake-thumbnail iframe { width: 100%; height: 100%; border: none; }

/* ==========================================================================
   Carte Avantages
   ========================================================================== */
.card-advantages { display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }

/* Correction pour mobile : S'assurer que le texte est au-dessus des icônes tombantes */
.card-advantages h2, .card-advantages p {
    position: relative;
    z-index: 1;
}

.btn-advantages {
    display: inline-block;
    color: var(--text-light);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed);
    box-shadow: 0 4px 15px var(--c-shadow-social);
    z-index: 1;
    margin-top: 1.5rem;
}
.btn-advantages:hover { transform: scale(1.05); box-shadow: 0 6px 20px var(--c-shadow-social-hover); }

@keyframes fall {
    0%   { transform: translateY(-50px) rotate(0deg) scale(2.5); opacity: 1; }
    100% { transform: translateY(250px) rotate(360deg) scale(2.5); opacity: 0; }
}
.falling-icon {
    position: absolute; top: -50px; z-index: 0;
    animation: fall linear infinite; user-select: none;
}
/* 10 Délais d'animation pour les icônes */
.falling-icon:nth-of-type(1) { left: 10%; animation-duration: 5s; animation-delay: 0s; }
.falling-icon:nth-of-type(2) { left: 50%; animation-duration: 6s; animation-delay: 3s; }
.falling-icon:nth-of-type(3) { left: 70%; animation-duration: 4.5s; animation-delay: 2.5s; }
.falling-icon:nth-of-type(4) { left: 90%; animation-duration: 8s; animation-delay: 4s; }
.falling-icon:nth-of-type(5) { left: 20%; animation-duration: 6.5s; animation-delay: 5s; }
.falling-icon:nth-of-type(6) { left: 40%; animation-duration: 8.5s; animation-delay: 2s; }
.falling-icon:nth-of-type(7) { left: 60%; animation-duration: 5.5s; animation-delay: 6s; }
.falling-icon:nth-of-type(8) { left: 80%; animation-duration: 7.5s; animation-delay: 0.5s; }
.falling-icon:nth-of-type(9) { left: 30%; animation-duration: 7s; animation-delay: 1s; }
.falling-icon:nth-of-type(10) { left: 75%; animation-duration: 6.2s; animation-delay: 5.5s; }

/* ==========================================================================
   Carte Réseaux Sociaux
   ========================================================================== */
.card-socials { text-align: center; }

.social-links { list-style: none; display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; position: relative; z-index: 0; }
.social-links li { position: relative; z-index: 0; }
.social-links li:hover,
.social-links li:focus-within { z-index: 1300; }

.social-links a {
    font-size: 2.2rem;
    color: var(--text-light);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    width: 65px; height: 65px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 6px 15px var(--c-shadow-social);
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.social-links a:not(.disabled-link):hover { transform: translateY(-5px) scale(1.1); box-shadow: 0 8px 20px var(--c-shadow-social-hover); }
.social-links a.disabled-link { cursor: not-allowed; box-shadow: 0 2px 5px var(--c-shadow); }

/* ==========================================================================
   Tooltips (Infobulles)
   ========================================================================== */
.social-links a[data-tooltip]::before, .theme-switch[data-tooltip]::before,
#push-subscribe-btn[data-tooltip]::before, #share-portal-btn[data-tooltip]::before, #install-btn[data-tooltip]::before,
#logo-wrapper[data-tooltip]::before {
    content: attr(data-tooltip); position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%);
    background-color: var(--c-text); color: var(--c-surface);
    padding: 0.4rem 0.8rem; border-radius: 8px;
    font-size: 0.9rem; font-family: sans-serif; white-space: nowrap; opacity: 0; visibility: hidden;
    pointer-events: none; transition: opacity 0.2s ease, visibility 0.2s ease; 
    z-index: 1200; text-shadow: none;
}
.social-links a[data-tooltip]::after, .theme-switch[data-tooltip]::after,
#push-subscribe-btn[data-tooltip]::after, #share-portal-btn[data-tooltip]::after, #install-btn[data-tooltip]::after,
#logo-wrapper[data-tooltip]::after {
    content: ''; position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%) translateY(100%);
    border: 6px solid transparent; border-top-color: var(--c-text);
    opacity: 0; visibility: hidden; pointer-events: none; 
    transition: opacity 0.2s ease, visibility 0.2s ease; z-index: 1200;
}

.social-links a[data-tooltip], .theme-switch[data-tooltip],
#push-subscribe-btn[data-tooltip], #share-portal-btn[data-tooltip], #install-btn[data-tooltip],
#logo-wrapper[data-tooltip] {
    position: relative;
}

.social-links a[data-tooltip]:hover::before, .social-links a[data-tooltip]:hover::after,
.theme-switch[data-tooltip]:hover::before, .theme-switch[data-tooltip]:hover::after,
#logo-wrapper[data-tooltip]:hover::before, #logo-wrapper[data-tooltip]:hover::after { opacity: 1; visibility: visible; }

@media (hover: hover) and (pointer: fine) {
    #push-subscribe-btn[data-tooltip]:hover::before, #push-subscribe-btn[data-tooltip]:hover::after,
    #share-portal-btn[data-tooltip]:hover::before, #share-portal-btn[data-tooltip]:hover::after,
    #install-btn[data-tooltip]:hover::before, #install-btn[data-tooltip]:hover::after {
        opacity: 1;
        visibility: visible;
    }

    .social-links a[data-tooltip]:hover,
    .theme-switch[data-tooltip]:hover,
    #push-subscribe-btn[data-tooltip]:hover,
    #share-portal-btn[data-tooltip]:hover,
    #install-btn[data-tooltip]:hover,
    #logo-wrapper[data-tooltip]:hover {
        z-index: 1300;
    }
}

.social-links a[data-tooltip]:focus-visible,
.theme-switch[data-tooltip]:focus-within,
#push-subscribe-btn[data-tooltip]:focus-visible,
#share-portal-btn[data-tooltip]:focus-visible,
#install-btn[data-tooltip]:focus-visible,
#logo-wrapper[data-tooltip]:focus-within {
    z-index: 1300;
}

/* Correction position tooltip pour le switch */
.theme-switch[data-tooltip]::before { left: auto; right: 0; transform: none; }
.theme-switch[data-tooltip]::after { left: auto; right: 24px; transform: translateY(100%); }

/* Tooltip logo : sous le logo pour éviter qu'il ne soit masqué en haut de fenêtre */
#logo-wrapper[data-tooltip]::before {
    top: calc(100% + 14px);
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
}

#logo-wrapper[data-tooltip]::after {
    top: calc(100% + 2px);
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--c-text);
}

/* Tooltips header PWA : positionnés à gauche des icônes */
#push-subscribe-btn[data-tooltip]::before,
#share-portal-btn[data-tooltip]::before,
#install-btn[data-tooltip]::before {
    top: 50%;
    bottom: auto;
    left: auto;
    right: calc(100% + 10px);
    transform: translateY(-50%);
    max-width: min(220px, calc(100vw - 1rem));
    white-space: normal;
    text-align: center;
}

#push-subscribe-btn[data-tooltip]::after,
#share-portal-btn[data-tooltip]::after,
#install-btn[data-tooltip]::after {
    width: 0;
    height: 0;
    top: 50%;
    bottom: auto;
    left: auto;
    right: calc(100% + 4px);
    transform: translateY(-50%);
    border: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--c-text);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    margin-top: 0; padding: 2.5rem;
    color: var(--text-light); text-align: center; 
    border-radius: var(--border-radius); border: 2px solid var(--text-light); 
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.4); text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    position: relative;
    display: flex; justify-content: center; align-items: center;
}
.footer-content { padding-right: 75px; }
.site-footer a { color: var(--pop-yellow); font-weight: bold; text-decoration: underline; transition: color var(--transition-speed); }
.site-footer a:hover { color: var(--text-light); }
.site-footer a[data-modal-target="privacy-modal"] { white-space: nowrap; display: inline-block; }

/* Switch Thème dans le footer */
.theme-switch-wrapper { position: absolute; bottom: 0.5rem; right: 0.5rem; }
.theme-switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before {
    position: absolute; content: '☀️'; height: 26px; width: 26px; left: 4px; bottom: 4px;
    background-color: white; transition: .4s; border-radius: 50%;
    font-size: 18px; line-height: 26px; text-align: center;
}
input:checked + .slider { background-color: var(--pop-blue); }
input:focus + .slider { box-shadow: 0 0 1px var(--pop-blue); }
input:checked + .slider:before { transform: translateX(26px); content: '🌙'; }
.slider.round { border-radius: 34px; }

/* ==========================================================================
   Responsive Mobile (< 600px)
   ========================================================================== */
@media (max-width: 600px) {
    body { padding: 0.5rem; }
    .container { padding: 0; gap: 1.5rem; }
    .site-header {
        grid-template-columns: clamp(64px, 22vw, 84px) minmax(0, 1fr) auto;
        --header-pad-y: 0.75rem;
        --header-pad-x: 0.5rem;
        --header-action-size: 2rem;
        padding: var(--header-pad-y) var(--header-pad-x);
        column-gap: 0.35rem;
    }
    .logo-wrapper .logo { max-height: 80px; }
    .site-header .title {
        font-size: clamp(1.35rem, 5.8vw, 1.95rem);
        line-height: 1.1;
    }
    .slogan {
        font-size: clamp(0.8rem, 3.1vw, 1.02rem);
        line-height: 1.2;
    }
    .news-item-content.has-image { flex-direction: column; gap: 1rem; }
    .news-item-image { width: 100%; margin-right: 0; }
    .btn-advantages { padding: 1rem 1.5rem; }
    .site-footer { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 2.5rem 1rem; }
    .footer-content { order: 1; padding-right: 0; }
    
    .header-text {
        min-width: 0;
        padding: 0 0.1rem 0 0.3rem;
    }
    
    #push-subscribe-btn,
    #share-portal-btn,
    #install-btn {
        width: 2rem;
        height: 2rem;
        padding: 0.375rem;
    }
    
    #push-subscribe-btn svg,
    #share-portal-btn svg,
    #install-btn svg {
        width: 1rem;
        height: 1rem;
    }
}

@media (max-width: 390px) {
    .site-header {
        grid-template-columns: 58px minmax(0, 1fr) auto;
        column-gap: 0.35rem;
    }

    .site-header .title {
        font-size: clamp(1.18rem, 5vw, 1.55rem);
    }

    .slogan {
        font-size: clamp(0.7rem, 2.6vw, 0.88rem);
    }
}

/* ==========================================================================
   Modales & Formulaire Contact
   ========================================================================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--c-modal-bg); display: flex; justify-content: center; align-items: center;
    z-index: 1000; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color var(--transition-speed);
}
.modal-overlay.visible { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--c-surface); color: var(--c-text); border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--c-shadow-hover); border: 3px solid var(--c-border-strong);
    position: relative; max-width: 90%; width: 700px; padding: 2.5rem;
    transform: scale(0.9); transition: transform 0.3s ease; max-height: 90vh; overflow-y: auto;
    font-family: sans-serif; line-height: 1.6;
}
.modal-overlay.visible .modal-content { transform: scale(1); }

.modal-content h3 { font-family: var(--font-main); color: var(--pop-blue); margin-top: 1.5rem; margin-bottom: 0.5rem; }
.modal-content p, .modal-content li { margin-bottom: 1rem; }
.modal-content ul { list-style-position: inside; padding-left: 1rem; }
.modal-content a { color: var(--pop-blue); }

.modal-close-btn {
    position: absolute; top: 10px; right: 15px; background: none; border: none;
    font-size: 2.2rem; line-height: 1; color: #aaa; cursor: pointer; padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}
.modal-close-btn:hover { color: var(--c-text); transform: rotate(90deg) scale(1.1); }

/* Modales des liens footer (Mentions/Confidentialite/Contact) */
.footer-linked-modal-content {
    padding: 0;
    overflow: hidden;
}

.footer-linked-modal-content .modal-close-btn {
    z-index: 2;
}

.footer-linked-modal-scroll {
    max-height: calc(90vh - 6px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2.5rem;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--c-border-strong) 45%, transparent) transparent;
}

.footer-linked-modal-scroll::-webkit-scrollbar {
    width: 12px;
}

.footer-linked-modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.footer-linked-modal-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
    background-color: color-mix(in srgb, var(--c-border-strong) 52%, transparent);
}

/* Modales Média (Vidéo/Image) */
#video-modal .modal-content, #image-modal .modal-content {
    width: auto; padding: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; box-shadow: none; max-width: 90vw; max-height: 90vh;
}
#video-modal-content {
    position: relative; line-height: 0; border-radius: var(--border-radius);
    border: 2px solid var(--c-border); box-shadow: 0 10px 30px var(--c-shadow-hover); overflow: hidden;
}
#video-modal.is-horizontal #video-modal-content { width: 90vw; height: calc(90vw * 9 / 16); max-height: 90vh; max-width: calc(90vh * 16 / 9); }
#video-modal.is-vertical #video-modal-content { height: 90vh; width: calc(90vh * 9 / 16); max-width: 90vw; max-height: calc(90vw * 16 / 9); }
#video-modal-content iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
#video-modal .modal-close-btn { color: white; text-shadow: 0 0 8px rgba(0,0,0,0.8); position: fixed; top: 1rem; right: 1rem; z-index: 1001; }

#image-modal-content {
    padding: 10px; background-color: #ffffff; border-radius: 0; line-height: 0;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.5); transition: background-color var(--transition-speed);
}
#image-modal-content img { display: block; max-width: 100%; max-height: calc(90vh - 20px); border-radius: 0; }

#news-notification-modal .news-notification-modal-content {
    width: min(960px, 95vw);
    max-width: 95vw;
}

#news-notification-modal-content .news-item {
    border-bottom: none;
    margin: 0;
    padding-bottom: 0;
}

#news-notification-modal-content .news-item-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

#news-notification-modal-content .news-item-image {
    width: min(320px, 40%);
}

#news-notification-modal-content .news-item-text {
    width: 100%;
}

#news-notification-modal-content iframe {
    width: 100%;
    max-width: 100%;
    min-height: 320px;
    border: 0;
}

#news-notification-modal-content .ql-custom-video-container,
#news-notification-modal-content .video-thumbnail-wrapper {
    margin: 1rem auto;
    max-width: 100%;
}

#share-portal-modal .share-portal-modal-content {
    width: min(520px, 92vw);
    max-width: 92vw;
    padding: 0;
    overflow: hidden;
}

#share-portal-modal .share-portal-modal-scroll {
    max-height: calc(90vh - 6px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2.5rem;
    scrollbar-gutter: stable;
}

#share-portal-modal .share-portal-modal-scroll {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--c-border-strong) 45%, transparent) transparent;
}

#share-portal-modal .share-portal-modal-scroll::-webkit-scrollbar {
    width: 12px;
}

#share-portal-modal .share-portal-modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

#share-portal-modal .share-portal-modal-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
    background-color: color-mix(in srgb, var(--c-border-strong) 52%, transparent);
}

.share-portal-modal-content h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.share-portal-description {
    text-align: center;
    margin-bottom: 1.25rem;
}

.share-portal-qr {
    width: min(320px, 78vw);
    aspect-ratio: 1 / 1;
    margin: 0 auto 1.25rem;
    padding: 0.75rem;
    border-radius: 18px;
    border: 2px solid var(--c-border-strong);
    background: var(--c-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.share-portal-qr > canvas,
.share-portal-qr > svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.share-portal-link-area {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.share-portal-link-area label {
    font-family: var(--font-main);
    font-weight: bold;
    color: var(--c-text);
}

.share-portal-link-controls {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

#share-portal-link {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.9rem;
    border: 2px solid var(--c-border);
    border-radius: 10px;
    font-family: sans-serif;
    font-size: 0.95rem;
    color: var(--c-text);
    background: var(--c-surface);
}

#share-portal-link:focus {
    outline: none;
    border-color: var(--pop-blue);
    box-shadow: 0 0 0 3px var(--c-shadow-social);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pop-blue) 26%, transparent);
}

#share-portal-copy-btn {
    border: none;
    border-radius: 999px;
    background: var(--pop-blue);
    color: #ffffff;
    font-family: var(--font-main);
    font-weight: bold;
    padding: 0.7rem 1.15rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px var(--c-shadow-social);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--pop-blue) 35%, transparent);
}

#share-portal-copy-btn:hover {
    background: var(--pop-pink);
    transform: translateY(-1px);
}

#share-portal-copy-btn:focus-visible {
    outline: 2px solid var(--pop-orange);
    outline-offset: 2px;
}

.share-portal-copy-feedback {
    min-height: 1.2rem;
    margin: 0;
    font-size: 0.9rem;
    font-family: sans-serif;
}

.share-portal-copy-feedback.is-success {
    color: var(--pop-green);
}

.share-portal-copy-feedback.is-error {
    color: var(--pop-orange);
}

@media (max-width: 768px) {
    #news-notification-modal-content .news-item-content {
        flex-direction: column;
        gap: 1rem;
    }

    #news-notification-modal-content .news-item-image {
        width: 100%;
    }

    #news-notification-modal-content iframe {
        min-height: 220px;
    }

    .footer-linked-modal-scroll {
        padding: 2rem 1.1rem 1.1rem;
    }

    .share-portal-link-controls {
        flex-direction: column;
    }

    #share-portal-modal .share-portal-modal-scroll {
        padding: 2rem 1.1rem 1.1rem;
    }

    #share-portal-copy-btn {
        width: 100%;
    }
}

/* Formulaire contact */
.contact-form-group { margin-bottom: 1.5rem; }
.contact-form-group label { display: block; margin-bottom: 0.5rem; font-family: var(--font-main); font-weight: bold; font-size: 1.1rem; color: var(--c-text); }
.contact-form-group input[type="text"], .contact-form-group input[type="email"], .contact-form-group textarea {
    width: 100%; padding: 0.8rem; border: 2px solid var(--c-border); border-radius: 8px; box-sizing: border-box;
    font-family: sans-serif; font-size: 1rem; background-color: var(--c-surface); color: var(--c-text);
    transition: border-color 0.2s ease, background-color var(--transition-speed), color var(--transition-speed);
}
.contact-form-group input:focus, .contact-form-group textarea:focus { border-color: var(--pop-blue); outline: none; box-shadow: 0 0 8px rgba(0, 174, 237, 0.3); }
.contact-form-group textarea { resize: vertical; min-height: 120px; }
.contact-form-group .button-submit {
    padding: 1rem 2rem; border: none; border-radius: 50px; cursor: pointer;
    font-family: var(--font-main); font-size: 1.2rem; font-weight: bold;
    transition: transform 0.2s ease, background-color 0.2s ease;
    text-decoration: none; display: inline-block; text-align: center;
    background-color: var(--pop-pink); color: var(--text-light);
}
.contact-form-group .button-submit:hover:not(:disabled) { transform: scale(1.03); background-color: var(--pop-orange); }
.contact-form-group .button-submit:disabled { background-color: #ccc; cursor: not-allowed; }
#contact-form-message { margin-top: 1.5rem; font-family: sans-serif; }
#contact-form-message .message { padding: 1rem; border-radius: 8px; text-align: center; font-weight: bold; }
#contact-form-message .message.error { background-color: #f8d7da; color: #721c24; }
#contact-form-message .message.success { background-color: #d4edda; color: #155724; }
.grecaptcha-badge { visibility: hidden; }
.recaptcha-branding { font-family: sans-serif; font-size: 0.75rem; color: #6c757d; margin-top: 1rem; }
.recaptcha-branding a { color: var(--pop-blue); }


/* ==========================================================================
   Masquage du contenu sous le header (Mobile)
   ========================================================================== */
@media (max-width: 1024px) {
    body::before {
        content: '';
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 50px; /* Zone tampon pour masquer juste le haut avant que le header ne prenne le relais */
        background-color: var(--c-bg);
        z-index: 999; /* Sous le header (1000) mais sur le contenu */
        pointer-events: none;
    }
}

/* ==========================================================================
   Desktop Layout (2 colonnes fixes, 0 ascenseur, full Flex)
   ========================================================================== */
@media only screen and (min-width: 1025px) {
    body { overflow: hidden; }
    
    .container { height: calc(100vh - 2rem); max-height: calc(100vh - 2rem); }
    main { flex-grow: 1; display: flex; min-height: 0; }
    
    .content-grid {
        height: 100%; display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        grid-template-rows: 1fr 1fr;
    }
    
    .card {
        min-height: 0; display: flex; flex-direction: column; overflow: hidden;
        padding: 1.5rem; justify-content: space-between;
    }
    
    .card-news { grid-column: 1 / 2; grid-row: 1 / 3; max-height: none; }
    .news-scroll-container { flex-grow: 1; }
    
    /* Configuration commune Avantages & Réseaux */
    .card-advantages, .card-socials {
        align-items: center; text-align: center;
        overflow: hidden; /* Règle Universelle: Contenu coupé si trop grand, jamais de scroll */
        padding: 1rem;
        display: flex; 
        flex-direction: column;
    }
    
    /* TITRES : Taille UNIFIÉE et assez grosse pour les deux cartes, basée sur vmin */
    .card-advantages h2, .card-socials h2 {
        height: auto; 
        flex: 0 1 auto; 
        width: 100%; 
        margin-bottom: 1vh;
        /* Titre élastique plus imposant pour correspondre à la demande, vmin protège en vertical */
        font-size: clamp(1.5rem, 3.5vmin, 2.5rem); 
        line-height: 1.1;
        /* Ajout flex-shrink pour accepter de réduire avant de casser */
        flex-shrink: 1; 
        position: relative;
        z-index: 1; 
    }
    
    /* TEXTE AVANTAGES : Priorité haute, prend tout l'espace */
    .card-advantages p {
        height: auto;
        flex: 2 1 auto; 
        display: flex; align-items: center; justify-content: center; flex-direction: column;
        margin: 0; padding: 0 1rem;
        overflow: hidden; 
        min-height: 0; /* Permet de réduire en dessous du contenu naturel */
        /* Texte élastique avec vmin */
        font-size: clamp(0.9rem, 1.5vmin, 1.2rem);
        position: relative;
        z-index: 1;
    }
    
    /* BOUTON AVANTAGES : Priorité faible */
    .card-advantages .btn-advantages {
        height: auto;
        flex: 0 1 auto;
        margin-top: 1vh; margin-bottom: 0;
        /* Padding élastique avec vmin */
        padding: clamp(0.5rem, 1vmin, 1rem) clamp(1rem, 2vmin, 2rem);
        align-self: center; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        flex-shrink: 1; /* Accepte de réduire */
        font-size: clamp(0.9rem, 1.5vmin, 1.2rem);
    }
    
    /* LIENS SOCIAUX : Priorité haute, prend tout l'espace */
    .card-socials .social-links {
        height: auto;
        flex: 2 1 auto;
        display: flex; align-items: center; justify-content: center; align-content: center;
        flex-wrap: wrap; width: 100%; margin: 0;
        gap: clamp(0.2rem, 1vmin, 1.5rem); /* Gap réduit dynamiquement */
        min-height: 0; /* Clé pour réduire les conteneurs flex */
        position: relative;
        z-index: 2;
    }

    /* ICÔNES SOCIAUX - ÉTAT NORMAL - Version Large CORRIGÉE avec vmin */
    .card-socials .social-links a {
        /* VMIN est le secret : 
           - Sur 4K (2160px de haut), 9vmin = 194px ! => C'est énorme, ça remplit 3 lignes.
           - Sur Laptop (900px de haut), 9vmin = 81px => Ça rentre parfaitement.
           - Sur écran écrasé (600px de haut), 9vmin = 54px => Ça réduit pour ne pas déborder.
        */
        width: clamp(30px, 9vmin, 140px);
        height: auto; aspect-ratio: 1 / 1;
        
        /* Taille de police qui suit la largeur */
        font-size: clamp(1.2rem, 4vmin, 3rem);
        
        /* On autorise le rétrécissement agressif si l'espace manque */
        flex-shrink: 1; 
        display: flex; align-items: center; justify-content: center;
    }
}

/* ==========================================================================
   Desktop bas en hauteur (1080p/1200p avec barres navigateur visibles)
   ========================================================================== */
@media only screen and (min-width: 1025px) and (max-height: 1080px) {
    .site-header {
        --header-pad-y: 1.15rem;
        --header-pad-x: 1.6rem;
        padding: var(--header-pad-y) var(--header-pad-x);
        gap: 16px;
    }

    .logo-wrapper .logo {
        max-height: 104px;
    }

    .site-footer {
        padding: 1.9rem 2rem;
    }

    .card-advantages, .card-socials {
        padding: 0.75rem;
    }

    .card-advantages h2, .card-socials h2 {
        margin-bottom: 0.6vh;
    }

    .card-socials .social-links {
        gap: clamp(0.15rem, 0.7vmin, 1rem);
    }

    .card-socials .social-links a {
        width: clamp(26px, 7.2vmin, 120px);
        font-size: clamp(1rem, 3.2vmin, 2.6rem);
    }
}

@media only screen and (min-width: 1025px) and (max-height: 980px) {
    .site-header {
        --header-pad-y: 0.9rem;
        --header-pad-x: 1.25rem;
        padding: var(--header-pad-y) var(--header-pad-x);
        gap: 12px;
    }

    .logo-wrapper .logo {
        max-height: 90px;
    }

    .site-header .title {
        font-size: clamp(1.8rem, 5vw, 3rem);
    }

    .slogan {
        font-size: clamp(1rem, 2.2vw, 1.35rem);
    }

    .site-footer {
        padding: 1.25rem 1.4rem;
    }

    .footer-content {
        padding-right: 68px;
    }

    .theme-switch-wrapper {
        bottom: 0.35rem;
        right: 0.35rem;
    }

    .container {
        gap: 1rem;
    }

    .content-grid {
        gap: 1rem;
    }

    .card {
        padding: 1.2rem;
    }

    .card-advantages, .card-socials {
        padding: 0.55rem;
    }

    .card-advantages h2, .card-socials h2 {
        margin-bottom: 0.35vh;
    }

    .card-socials .social-links {
        gap: clamp(0.1rem, 0.55vmin, 0.7rem);
    }

    .card-socials .social-links a {
        width: clamp(24px, 6.4vmin, 104px);
        font-size: clamp(0.95rem, 2.8vmin, 2.2rem);
    }
}

/* ==========================================================================
   Styles pour le script JS de réduction automatique (ÉTAT RÉDUIT FLUIDE)
   ========================================================================== */
/* Correction importante : Augmentation drastique des tailles pour le mode "réduit" */

.card.content-shrunk h2 { 
    /* Titre un peu plus petit, basé sur vmin */
    font-size: clamp(1rem, 2.5vmin, 1.5rem); 
    margin-bottom: 0.5vh; 
}

.card.content-shrunk p { 
    font-size: clamp(0.8rem, 1.2vmin, 1rem); 
    line-height: 1.2; 
}

.card.content-shrunk .btn-advantages { 
    padding: clamp(0.2rem, 0.5vmin, 0.5rem) clamp(0.5rem, 1vmin, 1rem); 
    font-size: clamp(0.7rem, 1.2vmin, 0.9rem); 
    margin-top: 0.5vh; 
}

.card.content-shrunk .social-links { 
    margin-top: 0.5vh; 
    gap: clamp(0.25rem, 0.5vmin, 0.75rem); 
}

/* ICÔNES SOCIAUX - ÉTAT RÉDUIT (taille augmentée pour être "Medium") */
.card.content-shrunk .social-links a { 
    /* Beaucoup plus gros qu'avant : 25px min -> 60px max */
    /* On descend très bas (25px) pour les hauteurs très limitées */
    width: clamp(25px, 6vmin, 60px); 
    font-size: clamp(1rem, 2.5vmin, 2.2rem); 
    flex-shrink: 1;
}

/* ==========================================================================
   Push Notification Button (Zikfrantz Style - 3D Relief)
   ========================================================================== */
#push-subscribe-btn,
#share-portal-btn,
#install-btn {
    align-self: center;
    position: relative;
    background: var(--pop-blue);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        inset -2px -2px 5px rgba(0, 0, 0, 0.2),
        inset 2px 2px 5px rgba(255, 255, 255, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.25);
    width: var(--header-action-size, 2.5rem);
    height: var(--header-action-size, 2.5rem);
    color: white;
}

#push-subscribe-btn {
    grid-row: 1;
}

#share-portal-btn {
    grid-row: 2;
}

#install-btn {
    grid-row: 3;
}

#push-subscribe-btn:hover,
#share-portal-btn:hover,
#install-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        inset -2px -2px 5px rgba(0, 0, 0, 0.2),
        inset 2px 2px 5px rgba(255, 255, 255, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.3);
}

#push-subscribe-btn:active,
#share-portal-btn:active,
#install-btn:active {
    transform: scale(0.98);
    box-shadow: 
        inset -1px -1px 3px rgba(0, 0, 0, 0.3),
        inset 1px 1px 3px rgba(255, 255, 255, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

#push-subscribe-btn.subscribed {
    background: var(--pop-green);
}

#push-subscribe-btn.subscribed:hover {
    box-shadow: 
        inset -2px -2px 5px rgba(0, 0, 0, 0.2),
        inset 2px 2px 5px rgba(255, 255, 255, 0.2),
        0 6px 12px rgba(15, 217, 37, 0.4);
}

#push-subscribe-btn.denied {
    background: #6b7280;
    cursor: help;
}

#push-subscribe-btn svg,
#share-portal-btn svg,
#install-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

#push-subscribe-btn svg {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0.5px;
}

#share-portal-btn svg,
#install-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2px;
}

#push-subscribe-btn .bell-on { display: none; }
#push-subscribe-btn .bell-off { display: block; }
#push-subscribe-btn.subscribed .bell-on { display: block; }
#push-subscribe-btn.subscribed .bell-off { display: none; }

/* iOS Modal Styling */
.ios-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.ios-modal.show { display: flex; }

.ios-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 2rem;
    max-width: 90%;
    width: 320px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ios-modal-content h3 { font-size: 1.5rem; margin-bottom: 1rem; color: white; }
.ios-modal-content p { font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem; color: #d1d1d1; }
.ios-modal-content ol { text-align: left; margin: 1.5rem 0; padding-left: 1.5rem; }
.ios-modal-content li { margin-bottom: 0.8rem; color: #d1d1d1; }

.ios-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pop-blue);
    vertical-align: middle;
    line-height: 1;
    margin: 0 0.15em;
}
.ios-icon svg {
    width: 1.35em;
    height: 1.35em;
    stroke: currentColor;
    fill: none;
    display: block;
}

#ios-app-install-modal .ios-modal-content p {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.45rem;
}

#ios-app-install-modal .ios-modal-content p > strong:first-of-type {
    justify-self: end;
    text-align: right;
    white-space: nowrap;
}

#ios-app-install-modal .ios-modal-content p > .ios-icon {
    justify-self: center;
    margin: 0;
}

#ios-app-install-modal .ios-modal-content p > strong:last-of-type {
    justify-self: start;
    text-align: left;
}

.ios-modal-close {
    background: linear-gradient(135deg, var(--pop-blue) 0%, #06b6d4 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.ios-modal-close:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(10, 184, 217, 0.4); }

.permission-step {
    background: var(--c-bg);
    padding: 10px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    text-align: left;
    font-size: 0.95rem;
    border: 1px solid var(--c-border);
}

/* Notification Feedback Modal */
#notification-feedback-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background: rgba(31, 41, 55, 0.98);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 174, 237, 0.5);
    min-width: 280px;
}

#notification-feedback-modal.show { display: block; }

#notification-feedback-modal h2 { 
    margin: 0.5rem 0 0; 
    color: white; 
    font-size: 1.6rem; 
    text-shadow: none;
    margin-bottom: 0.5rem;
}

#notification-feedback-modal p {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #d1d1d1;
    opacity: 0.8;
}

#notification-feedback-modal .notif-modal-icon {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#notification-feedback-modal.show .notif-modal-icon {
    animation: notif-icon-pop 0.24s ease-out;
}

#notification-feedback-modal .notif-modal-icon.notif-on {
    color: var(--pop-green);
    background: rgba(15, 217, 37, 0.14);
    box-shadow: 0 8px 20px rgba(15, 217, 37, 0.28);
}

#notification-feedback-modal .notif-modal-icon.notif-off {
    color: var(--pop-orange);
    background: rgba(245, 145, 30, 0.16);
    box-shadow: 0 8px 20px rgba(245, 145, 30, 0.32);
}

#notification-feedback-modal .notif-modal-icon.notif-denied {
    color: #9ca3af;
    background: rgba(107, 114, 128, 0.18);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.28);
}

#notification-feedback-modal .notif-modal-icon::after {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    border: 2px solid rgba(31, 41, 55, 0.98);
}

#notification-feedback-modal .notif-modal-icon.notif-on::after {
    content: '✓';
    background: var(--pop-green);
}

#notification-feedback-modal .notif-modal-icon.notif-off::after {
    content: '×';
    background: var(--pop-orange);
}

#notification-feedback-modal .notif-modal-icon.notif-denied::after {
    content: '!';
    background: #6b7280;
}

#notification-feedback-modal .notif-modal-icon svg {
    width: 34px;
    height: 34px;
    fill: currentColor;
}

@keyframes notif-icon-pop {
    0% {
        transform: scale(0.88);
        opacity: 0.4;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#notification-feedback-modal button {
    background: var(--pop-blue);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 174, 237, 0.4);
    transition: all 0.2s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#notification-feedback-modal button:hover {
    background: var(--pop-pink);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 66, 144, 0.4);
}

#notification-feedback-modal .bell-on { display: block; }
#notification-feedback-modal .bell-off { display: none; }
#notification-feedback-modal.notif-off .bell-on { display: none; }
#notification-feedback-modal.notif-off .bell-off { display: block; }

@media (max-width: 600px) {
    #push-subscribe-btn, #share-portal-btn, #install-btn { width: 2rem; height: 2rem; }
    #push-subscribe-btn svg, #share-portal-btn svg, #install-btn svg { width: 1rem; height: 1rem; }
}
