/* ═══════════════════════════════════════════════════════════════
   CSS OPTIMISÉ POUR iPAD 9ÈME GÉNÉRATION (2160×1620)
   
   - Garde le positionnement EXACT (pixels absolus)
   - Optimise la lisibilité du texte
   - Support parfait pour 2160×1620 natif
   
   IMPORTANT : Ne PAS modifier le positionnement en pixels !
   Tout est calculé pour 2160×1620 exactement.
   ═══════════════════════════════════════════════════════════════ */

/* ===== RESET MINIMAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== DIMENSIONS FIXES POUR iPAD 9 ===== */
html, body {
    width: 2160px;
    height: 1620px;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: white;
    -webkit-text-size-adjust: 100%; /* Empêche le zoom automatique du texte sur iOS */
}

/* ===== CONTENEUR PRINCIPAL (garde dimensions exactes) ===== */
#publication-1 {
    width: 2160px !important;
    height: 1620px !important;
    position: relative;
    background-color: transparent;
}

/* ===== OPTIMISATION TEXTE POUR LISIBILITÉ ===== */

/* Texte standard - optimisé pour lecture confortable */
.Paragraphe-standard,
p,
span {
    font-size: 28px; /* Taille optimale pour iPad 9 */
    line-height: 1.5;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Titres - bien visibles */
h1, .titre-h1 {
    font-size: 64px;
    line-height: 1.2;
    font-weight: 700;
}

h2, .titre-h2 {
    font-size: 48px;
    line-height: 1.3;
    font-weight: 600;
}

h3, .titre-h3 {
    font-size: 36px;
    line-height: 1.4;
    font-weight: 600;
}

/* Override pour les spans avec styles inline (garde positionnement) */
span[style*="position:absolute"] {
    /* Le positionnement absolu est préservé */
    /* On optimise juste la lisibilité */
    text-rendering: optimizeLegibility;
}

/* ===== IMAGES (garde positionnement exact) ===== */
img {
    display: block;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

._idGenObjectAttribute-1,
._idGenObjectAttribute-2 {
    /* Préserve le positionnement exact des images */
    position: absolute;
}

/* ===== CONTENEURS (garde positionnement exact) ===== */
div[id^="_idContainer"] {
    /* Tous les conteneurs gardent leur position absolue */
    /* Défini dans le HTML inline */
}

.Bloc-de-texte-standard {
    /* Garde positionnement exact */
}

/* ===== DÉSACTIVE COMPORTEMENTS INDÉSIRABLES iOS ===== */
body,
div,
span,
p {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Active sélection seulement pour le texte de contenu */
.Paragraphe-standard,
.Bloc-de-texte-standard p,
.Bloc-de-texte-standard span {
    -webkit-user-select: text;
    user-select: text;
}

/* ===== OPTIMISATION RENDU TEXTE ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Pour écrans Retina (iPad 9 a 264 ppi) */
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* ===== TRANSFORMS PRÉSERVÉS ===== */
/* Les transforms webkit et standard sont dans le HTML */
/* On ne les override PAS */

/* ===== IFRAME (si présent) ===== */
.contentIframeClass {
    width: 100%;
    height: 100%;
    position: absolute;
    border: none;
}

.dummyIFrameClass {
    display: none;
}

/* ===== NAVIGATION (si présente) ===== */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 30px; /* Augmenté pour touch */
    color: rgb(0, 0, 0);
    font-weight: bold;
    font-size: 48px; /* Augmenté pour visibilité */
    visibility: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 88px; /* Zone tactile confortable */
    min-width: 88px;
}

.next {
    right: 0;
    border-radius: 6px 0 0 6px;
}

.prev:active,
.next:active {
    transform: scale(0.95);
    opacity: 0.7;
}

/* ===== OPTIMISATION PERFORMANCE ===== */
div[style*="transform"] {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ===== COULEURS ET CONTRASTE OPTIMISÉS ===== */
body {
    color: #000000;
    background-color: #ffffff;
}

/* Assure un bon contraste pour les textes colorés */
.CharOverride-2,
.CharOverride-4 {
    /* Les couleurs sont dans idGeneratedStyles.css */
    /* On ajoute juste un fallback */
    color: inherit;
}

/* ===== MODE LANDSCAPE STRICT (optionnel) ===== */
@media (orientation: portrait) {
    /* Si l'iPad est en portrait, on peut afficher un message */
    /* Ou forcer la rotation */
    body::before {
        content: "";
        /* Message de rotation si nécessaire */
    }
}

/* ===== VIEWPORT STRICT iPAD 9 ===== */
@media screen and (min-width: 2160px) and (min-height: 1620px) {
    /* Si résolution exacte iPad 9 */
    body {
        /* Optimisations spécifiques */
    }
}

/* ===== MEDIA QUERY POUR TEST SUR DESKTOP ===== */
@media screen and (max-width: 2159px) {
    /* Pour développement sur écran plus petit */
    html {
        zoom: 0.5; /* Scale à 50% pour voir sur laptop */
    }
    
    body {
        transform-origin: top left;
    }
}

/* ===== DÉSACTIVE ZOOM PINCH SUR iPAD ===== */
html {
    touch-action: pan-x pan-y;
    -ms-touch-action: pan-x pan-y;
}

/* ===== LIENS ET ÉLÉMENTS INTERACTIFS ===== */
a,
button,
[onclick],
[role="button"] {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    touch-action: manipulation;
    min-height: 44px; /* Taille minimale Apple */
    min-width: 44px;
}

a:active,
button:active {
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   FIN DU CSS OPTIMISÉ iPAD 9
   
   NOTES IMPORTANTES :
   - Tous les positionnements absolus sont PRÉSERVÉS
   - Seule la LISIBILITÉ du texte est optimisée
   - Tailles de police adaptées pour confort de lecture
   - Performance optimisée pour iPad
   - Support tactile amélioré
   ═══════════════════════════════════════════════════════════════ */