/**
 * Cali&Co — Garde-fous responsive globaux (toutes pages).
 * Breakpoint canonique : 767px (aligné sidebar.js / TopBar / layout).
 */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: clip;
}
body {
    overflow-x: clip;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

img, svg, video, iframe, canvas { max-width: 100%; height: auto; }
iframe { border: 0; }

/* Toggle afficher/masquer mot de passe */
.pwd-wrap { position: relative; display: inline-block; width: 100%; max-width: 100%; }
.pwd-wrap input { padding-right: 40px; width: 100%; box-sizing: border-box; }
.pwd-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: auto; min-width: 0; background: none; border: none; cursor: pointer;
    padding: 4px; margin: 0; appearance: none; -webkit-appearance: none; line-height: 0;
}
.pwd-toggle:hover { background: none; }
.pwd-icon { display: block; width: 18px; height: 18px; }
.pwd-toggle:hover .pwd-icon { opacity: 0.85; }

/* Utilitaires responsive (CSS pur, pas de JS) */
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
    .touch-target { min-height: 44px; min-width: 44px; }
    /* Évite le zoom iOS sur focus des champs */
    input:not([type="checkbox"]):not([type="radio"]),
    select, textarea { font-size: max(16px, 1em); }
    textarea { resize: vertical; }
}
