/*
 * Verrouillage et masquage d'apps — iOS 18 (campagne iOS §10.34). Baseline documentaire : guide
 * d'utilisation iPadOS 18 « Lock or hide an app ». Feuille d'authentification Touch ID / Face ID,
 * popover « Exiger Touch ID » / « Masquer et exiger Touch ID », apps masquées retirées de l'accueil,
 * dossier « Hidden » de la Bibliothèque. Scope : body#ios-18 uniquement.
 */

/* Apps masquées : plus sur l'accueil ni dans le dock (restent dans le DOM pour la Bibliothèque). */
body#ios-18.ios-springboard #desktop a[data-app-hidden],
body#ios-18.ios-springboard #tableau a[data-app-hidden] { display: none !important; }

/* ---- Authentification ------------------------------------------------------------------- */

body#ios-18 #ios-app-lock,
body#ios-18 #ios-app-lock-options {
    position: absolute;
    inset: 0;
    z-index: 97;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'SF UI', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body#ios-18 #ios-app-lock[hidden],
body#ios-18 #ios-app-lock-options[hidden] { display: none !important; }

body#ios-18 .ios-lock-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body#ios-18 .ios-lock-card,
body#ios-18 .ios-lock-options-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 270px;
    padding: 20px 16px 10px;
    border-radius: 14px;
    color: #f5f5f7;
    text-align: center;
    background: rgba(44, 44, 46, 0.92);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

body#ios-18 .ios-lock-glyph {
    display: block;
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    background: #0a84ff;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'><path d='M32 10c-9 0-16 6-18 14M14 32c0-10 8-18 18-18s18 8 18 18c0 6-1 11-3 16M22 32c0-6 4-10 10-10s10 4 10 10c0 8-2 14-5 20M32 32v6c0 6-2 11-5 16M40 40c-1 4-3 8-6 12'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'><path d='M32 10c-9 0-16 6-18 14M14 32c0-10 8-18 18-18s18 8 18 18c0 6-1 11-3 16M22 32c0-6 4-10 10-10s10 4 10 10c0 8-2 14-5 20M32 32v6c0 6-2 11-5 16M40 40c-1 4-3 8-6 12'/></svg>") center / contain no-repeat;
}

body#ios-18 .ios-app-lock--face .ios-lock-glyph {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M10 22V14a4 4 0 0 1 4-4h8M42 10h8a4 4 0 0 1 4 4v8M54 42v8a4 4 0 0 1-4 4h-8M22 54h-8a4 4 0 0 1-4-4v-8M22 26v4M42 26v4M32 26v10h-4M24 42c4 4 12 4 16 0'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M10 22V14a4 4 0 0 1 4-4h8M42 10h8a4 4 0 0 1 4 4v8M54 42v8a4 4 0 0 1-4 4h-8M22 54h-8a4 4 0 0 1-4-4v-8M22 26v4M42 26v4M32 26v10h-4M24 42c4 4 12 4 16 0'/></svg>");
}

body#ios-18 .ios-lock-title { margin: 0; font-size: 17px; font-weight: 600; }
body#ios-18 .ios-lock-sub { margin: 4px 0 14px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }

body#ios-18 .ios-lock-sensor {
    width: 100%;
    height: 44px;
    margin-bottom: 6px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #0a84ff;
    cursor: pointer;
}

body#ios-18 .ios-lock-sensor::before { content: "Touch the sensor (top button)"; }
body#ios-18 .ios-app-lock--face .ios-lock-sensor::before { content: "Look at iPhone"; }

body#ios-18 .ios-lock-pass,
body#ios-18 .ios-lock-cancel,
body#ios-18 .ios-lock-options-card button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-top: 0.5px solid rgba(255, 255, 255, 0.16);
    font: inherit;
    font-size: 17px;
    color: #0a84ff;
    background: none;
    cursor: pointer;
}

body#ios-18 .ios-lock-pass { border-top: 0; font-size: 15px; }

/* ---- Popover « Exiger Touch ID » / « Masquer et exiger Touch ID » ------------------------ */

body#ios-18 .ios-lock-options-card { width: 300px; padding: 18px 0 0; }
body#ios-18 .ios-lock-options-title { margin: 0 16px 6px; font-size: 17px; font-weight: 600; }
body#ios-18 .ios-lock-options-text { margin: 0 16px 14px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
body#ios-18 .ios-lock-options-card button { font-weight: 600; }
body#ios-18 .ios-lock-options-card .ios-lock-options-cancel { font-weight: 400; }

/* ---- Dossier « Hidden » de la Bibliothèque -------------------------------------------- */

body#ios-18 .ios-al-folder-tile--hidden {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.22);
}

body#ios-18 .ios-al-folder-tile--hidden::before {
    content: "";
    width: 36%;
    height: 36%;
    background: #fff;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'><rect x='5' y='10' width='14' height='11' rx='2.5'/><path d='M8 10V7a4 4 0 0 1 8 0v3'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'><rect x='5' y='10' width='14' height='11' rx='2.5'/><path d='M8 10V7a4 4 0 0 1 8 0v3'/></svg>") center / contain no-repeat;
}
