/* --- Général --- */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #222; /* Fond sombre pour faire ressortir le téléphone */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* --- Écran du téléphone (Le corps externe) --- */
#phone {
    width: 375px;
    height: 812px;
    background: #ffffff; /* L'écran est blanc */
    border: 8px solid #000; /* La bordure noire simule la coque */
    border-radius: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* --- L'Encoche (Notch) --- */
#notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px; 
    height: 30px; 
    background: #000;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 20;
}

/* --- Barre de statut --- */
#status-bar {
    height: 44px;
    background: transparent; 
    backdrop-filter: none; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    box-shadow: none; 
    z-index: 10;
}

/* Heure */
#hour {
    font-weight: 600;
    font-size: 16px;
}

/* Conteneurs d'icônes de statut */
#status-bar .status-icons {
    display: flex;
    align-items: center;
    z-index: 1; 
}

/* Réseau (Barres de Signal) */
.network-signal {
    display: flex;
    align-items: flex-end;
    margin-right: 5px;
}
.signal-bar {
    width: 3px;
    height: 10px; 
    background: #000;
    margin-left: 1px;
    border-radius: 1px;
    opacity: 0.3; /* Par défaut faible, JS/CSS ajuste */
}
/* Hauteurs des barres pour la forme */
.signal-bar:nth-child(1) { height: 6px; }
.signal-bar:nth-child(2) { height: 8px; }
.signal-bar:nth-child(3) { height: 10px; }
.signal-bar:nth-child(4) { height: 12px; }
.network-type {
    font-size: 11px;
    font-weight: 500;
    margin-left: 3px;
}

/* Batterie style iOS */
#battery {
    width: 28px;
    height: 14px;
    border: 1.5px solid #000;
    border-radius: 4px;
    position: relative;
    margin-left: 5px;
}
#battery::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 3px;
    width: 3px;
    height: 8px;
    background: #000;
    border-radius: 1px;
}
#battery-level {
    height: 100%;
    background: #4cd964; 
    width: 100%; 
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

/* --- Home / écran d’accueil --- */
#home {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; 
    align-content: flex-start;
    padding: 20px 10px;
    
    /* REMPLACEZ LE CHEMIN ICI PAR CELUI DE VOTRE IMAGE */
    background: url('./assets/wallpaper.jpg') no-repeat center center;
    background-size: cover;
    background-color: #f8f8f8; 
}

/* --- Icônes d’applications (Clair et Flou) --- */
.app-icon {
    width: 70px;
    height: 70px;
    margin: 10px;
    background: #ffffff; 
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 600; 
    color: rgba(0, 0, 0, 0.15); /* Texte très pâle pour l'effet flou */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); 
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
    user-select: none;
    text-align: center;
    position: relative;
}

/* Effet glossy sur icône */
.app-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 50%;
    top: 0;
    left: 0;
    border-radius: 18px 18px 0 0;
    background: rgba(255,255,255,0.05); 
}

/* Animation au clic */
.app-icon:active {
    transform: scale(0.92);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* --- Fenêtre des apps --- */
#app-window {
    position: absolute;
    top: 0; /* Commence en haut, sous l'encoche */
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.97);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    overflow: auto;
    /* Retirez le padding ici et ajoutez-le au contenu de l'app si besoin */
    border-radius: 0 0 32px 32px; 
    z-index: 5;
}

/* --- Indicateur de Accueil (Home Indicator) --- */
#home-indicator {
    position: absolute;
    bottom: 8px; 
    left: 50%;
    transform: translateX(-50%);
    width: 135px;
    height: 5px;
    background: #000; 
    border-radius: 100px;
    opacity: 0.8;
    z-index: 10;
    cursor: pointer; /* Indique qu'il est cliquable */
}