/* ── Slidia Slide Render — styles partagés éditeur + popup présentation ──
   Importé par editor.css (bundle app) ET chargé en addStyleEntry séparé
   (slidia_slide_render) dans la popup présentation.
   Ne jamais importer depuis app.css directement — passer par editor.css.
─────────────────────────────────────────────────────────────────────────── */

/* ── Slide container ── */
.sde-slide {
    position: relative;
    width: 100%;
    background: #fff;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* ── Placeholder texte/image (position absolue dans la slide) ── */
.sde-ph {
    position: absolute;
    box-sizing: border-box;
    padding: 2px 6px;
    white-space: pre-wrap;
    overflow: hidden;
    line-height: 1.25;
    border-radius: 3px;
}

/* LES INDICES SUIVENT LA COULEUR DE LA ZONE, jamais un gris figé. Chaque zone porte en
 * inline la couleur de texte RÉSOLUE de son masque (contraste corrigé, thème sombre compris) :
 * `currentColor` atténué par color-mix rend donc les cadres, libellés et icônes lisibles sur
 * n'importe quel fond — noirs translucides sur fond clair, blancs translucides sur fond
 * sombre. Les gris `rgba(0,0,0,…)` figés qu'ils remplacent étaient invisibles sur un masque
 * noir : un emplacement d'image y disparaissait entièrement, description comprise. */
/* ── Zone vide — hint style PowerPoint ── */
.sde-ph:empty,
.sde-ph--empty {
    border: 1.5px dashed color-mix(in srgb, currentColor 30%, transparent);
    background: color-mix(in srgb, currentColor 5%, transparent);
    border-radius: 3px;
}
.sde-ph:empty::before,
.sde-ph--empty::before {
    content: attr(data-ph-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.55em;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: color-mix(in srgb, currentColor 45%, transparent);
    white-space: nowrap;
    pointer-events: none;
}

/* ── Zone IMAGE encore vide ────────────────────────────────────────────────
 * Elle affichait « CORPS », l'indice générique des zones de texte vides : un mot qui décrit ce
 * que la zone n'est plus, et qui ne dit rien de ce qu'on attend d'elle. Elle porte maintenant
 * une icône et la description proposée par l'IA — la diapositive dit la même chose que le
 * panneau d'édition, à droite.
 */
.sde-ph__image-vide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    padding: 0 8%;
    text-align: center;
    color: color-mix(in srgb, currentColor 55%, transparent);
    pointer-events: none;
}
.sde-ph__image-vide svg {
    width: 2.2em;
    height: 2.2em;
    flex: 0 0 auto;
    opacity: 0.55;
}
.sde-ph__image-vide p {
    margin: 0;
    font-size: 0.62em;
    font-weight: 600;
    line-height: 1.35;
}

/* Le contenu de la zone n'étant plus vide, la règle `:empty` ne s'applique plus : le cadre en
   pointillés est reconduit ici pour que la zone reste visiblement en attente. */
.sde-ph:has(.sde-ph__image-vide) {
    border: 1.5px dashed color-mix(in srgb, currentColor 30%, transparent);
    background: color-mix(in srgb, currentColor 5%, transparent);
    border-radius: 3px;
}

/* ── Zones overlay (masques) ── */
.sde-mask-zone {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    overflow: hidden;
    white-space: nowrap;
    padding: 2px 4px;
}

.sde-mask-zone--title {
    border: 1.5px solid color-mix(in srgb, currentColor 45%, transparent);
    background: color-mix(in srgb, currentColor 8%, transparent);
    color: color-mix(in srgb, currentColor 70%, transparent);
}

.sde-mask-zone--body {
    border: 1.5px dashed color-mix(in srgb, currentColor 35%, transparent);
    background: color-mix(in srgb, currentColor 6%, transparent);
    color: color-mix(in srgb, currentColor 55%, transparent);
}

.sde-mask-zone--pic {
    background: rgba(148, 163, 184, 0.60);
    border: none;
    color: rgba(255, 255, 255, 0.80);
    font-size: 16px;
    letter-spacing: 0;
}

/* ── Inner div texte ── */
.sde-ph-inner {
    width: 100%;
    white-space: normal;
}

/* ── Listes (Tailwind/Preflight supprime list-style par défaut) ── */
.sde-ph ul { list-style-type: disc; padding-left: 1.2em; margin: 0; }
.sde-ph ol { list-style-type: decimal; padding-left: 1.2em; margin: 0; }
.sde-ph li { display: list-item; }

/* ── Placeholder image ── */
.sde-ph--has-image::before { content: none !important; }
.sde-ph--has-image:empty {
    border: none;
    background: none;
}
.sde-ph--has-image {
    background-repeat: no-repeat;
}
