Verion DeepSeek corrigée v1.1

This commit is contained in:
KONE SOREL 2025-12-13 15:32:50 +00:00
parent c3dab11552
commit 4af19d6dde

View File

@ -72,7 +72,7 @@
<!-- Affichage mobile (cartes) --> <!-- Affichage mobile (cartes) -->
<div class="d-md-none"> <div class="d-md-none">
<!-- Copie exacte de la logique desktop, juste adaptée pour mobile --> <!-- Version mobile avec IDs UNIQUES -->
<span class="login100-form-title" style="font-family: Play-Bold; color:#e5e5e5; margin-top: 5px; margin-bottom:10px; display: block; font-size: 22px; text-align: center;"> <span class="login100-form-title" style="font-family: Play-Bold; color:#e5e5e5; margin-top: 5px; margin-bottom:10px; display: block; font-size: 22px; text-align: center;">
Portail Assuré Portail Assuré
</span> </span>
@ -86,16 +86,16 @@
</h4> </h4>
</div> </div>
<?php else: ?> <?php else: ?>
<div class="text-center p-t-10" id="div_msgErreur" style="margin-bottom: 15px;"></div> <div class="text-center p-t-10" id="div_msgErreur_mobile" style="margin-bottom: 15px;"></div>
<?php endif; ?> <?php endif; ?>
<?php if($maintenance!='1'): ?> <?php if($maintenance!='1'): ?>
<!-- TOUTE LA STRUCTURE EST IDENTIQUE, SEULEMENT LES STYLES SONT AJUSTÉS POUR MOBILE --> <!-- TOUS LES IDs ONT UN SUFFIXE _mobile POUR LES RENDRE UNIQUES -->
<div class="wrap-input100" style="margin-bottom: 15px;"> <div class="wrap-input100" style="margin-bottom: 15px;">
<label for="langue">Langue</label> <label for="langue_mobile">Langue</label>
<select class="form-select" id="langue" name="langue" <select class="form-select" id="langue_mobile" name="langue_mobile"
style="width: 100%; height: 40px; padding: 8px 12px; border: 2px solid #7D4FFE !important; border-radius: 9px; background: transparent; font-size: 13px; color: #7D4FFE; text-align: center; box-sizing: border-box;" style="width: 100%; height: 40px; padding: 8px 12px; border: 2px solid #7D4FFE !important; border-radius: 9px; background: transparent; font-size: 13px; color: #7D4FFE; text-align: center; box-sizing: border-box;"
required autocomplete="off" onchange="javascript:changer_langue_connexion();"> required autocomplete="off" onchange="javascript:changer_langue_connexion_mobile(this.value);">
<?php liste_options($langues, $_SESSION['lang'], true); ?> <?php liste_options($langues, $_SESSION['lang'], true); ?>
</select> </select>
</div> </div>
@ -103,19 +103,19 @@
<div class="wrap-input100" style="margin-bottom: 15px;"> <div class="wrap-input100" style="margin-bottom: 15px;">
<div class="wrap-input100 validate-input"> <div class="wrap-input100 validate-input">
<label for="codeSociete">Entité</label> <label for="codeSociete_mobile">Entité</label>
<input class="input100" type="text" name="codeSociete" id="codeSociete" value="<?= $codeSociete ?>" <input class="input100" type="text" name="codeSociete_mobile" id="codeSociete_mobile" value="<?= $codeSociete ?>"
placeholder="Entité" placeholder="Entité"
style="width: 100%; height: 40px; padding: 8px 12px; border: 2px solid #7D4FFE !important; border-radius: 9px; color: #7D4FFE; text-align: center; box-sizing: border-box;" style="width: 100%; height: 40px; padding: 8px 12px; border: 2px solid #7D4FFE !important; border-radius: 9px; color: #7D4FFE; text-align: center; box-sizing: border-box;"
required AUTOCOMPLETE="off" required AUTOCOMPLETE="off"
onChange="javascript:changer_entite_portail();" > onChange="javascript:changer_entite_portail_mobile(this.value);" >
</div> </div>
</div> </div>
<div id="div_login_portail" class="wrap-input100" style="margin-bottom: 15px;"> <div id="div_login_portail_mobile" class="wrap-input100" style="margin-bottom: 15px;">
<div class="wrap-input100 validate-input"> <div class="wrap-input100 validate-input">
<label for="login">Identifiant</label> <label for="login_mobile">Identifiant</label>
<input class="input100" type="text" name="login" id="login" value="<?= $codeUtilisateur ?>" <input class="input100" type="text" name="login_mobile" id="login_mobile" value="<?= $codeUtilisateur ?>"
placeholder="Identifiant" placeholder="Identifiant"
style="width: 100%; height: 40px; padding: 8px 12px; border: 2px solid #7D4FFE !important; border-radius: 9px; color: #7D4FFE; text-align: center; box-sizing: border-box;" style="width: 100%; height: 40px; padding: 8px 12px; border: 2px solid #7D4FFE !important; border-radius: 9px; color: #7D4FFE; text-align: center; box-sizing: border-box;"
required AUTOCOMPLETE="off"> required AUTOCOMPLETE="off">
@ -123,14 +123,14 @@
</div> </div>
<div class="wrap-input100 validate-input" style="margin-bottom: 20px;"> <div class="wrap-input100 validate-input" style="margin-bottom: 20px;">
<label for="mdp">Mot de passe</label> <label for="mdp_mobile">Mot de passe</label>
<input class="input100" type="password" name="mdp" id="mdp" placeholder="Mot de passe" <input class="input100" type="password" name="mdp_mobile" id="mdp_mobile" placeholder="Mot de passe"
style="width: 100%; height: 40px; padding: 8px 12px; border: 2px solid #7D4FFE !important; border-radius: 9px; color: #7D4FFE; text-align: center; box-sizing: border-box;" style="width: 100%; height: 40px; padding: 8px 12px; border: 2px solid #7D4FFE !important; border-radius: 9px; color: #7D4FFE; text-align: center; box-sizing: border-box;"
required AUTOCOMPLETE="off"> required AUTOCOMPLETE="off">
</div> </div>
<div class="container-login100-form-btn" style="margin-bottom: 20px;"> <div class="container-login100-form-btn" style="margin-bottom: 20px;">
<button name="btn_connexion" id="btn_connexion" class="btn login-btn" <button name="btn_connexion_mobile" id="btn_connexion_mobile" class="btn login-btn"
style="width: 100%; height: 45px; background: #7D4FFE; color: white; font-size: 18px; font-weight: 700; border-radius: 9px; border: none; box-sizing: border-box;"> style="width: 100%; height: 45px; background: #7D4FFE; color: white; font-size: 18px; font-weight: 700; border-radius: 9px; border: none; box-sizing: border-box;">
Connexion Connexion
</button> </button>
@ -142,42 +142,60 @@
<?php endif; ?> <?php endif; ?>
</div> </div>
<!-- STYLE CRITIQUE POUR ÉVITER TOUT DÉBORDEMENT --> <!-- STYLE POUR ÉVITER TOUT DÉBORDEMENT -->
<style> <style>
/* RESET COMPLET POUR MOBILE */ /* MASQUER LA VERSION MOBILE SUR DESKTOP */
.d-md-none { .d-md-none {
width: 100% !important; display: none !important;
max-width: 100vw !important;
overflow-x: hidden !important;
position: relative !important;
box-sizing: border-box !important;
} }
.d-md-none > * { /* AFFICHER SEULEMENT SUR MOBILE */
@media screen and (max-width: 767px) {
.d-md-none {
display: block !important;
width: 100vw !important;
height: 100vh !important;
max-width: 100% !important;
overflow-x: hidden !important;
overflow-y: auto !important;
-webkit-overflow-scrolling: touch !important;
position: fixed !important;
top: 0 !important;
left: 0 !important;
background: white !important;
padding: 20px 15px !important;
box-sizing: border-box !important;
z-index: 9999 !important;
}
/* MASQUER LA VERSION DESKTOP SUR MOBILE */
.d-none.d-md-block {
display: none !important;
}
/* GARANTIR QUE TOUT EST CONTENU */
.d-md-none * {
max-width: 100% !important; max-width: 100% !important;
box-sizing: border-box !important; box-sizing: border-box !important;
word-wrap: break-word !important;
} }
/* CONTENEUR PRINCIPAL SANS DÉBORDEMENT */ /* CENTRER LE CONTENU VERTICALEMENT */
.d-md-none { .d-md-none {
display: flex !important; display: flex !important;
flex-direction: column !important; flex-direction: column !important;
justify-content: center !important; justify-content: center !important;
align-items: center !important; align-items: center !important;
padding: 10px 15px !important;
min-height: 100vh !important;
} }
/* GARANTIR QUE TOUT TIENT DANS L'ÉCRAN */ /* STYLES DES CHAMPS */
.wrap-input100 { .wrap-input100 {
width: 100% !important; width: 100% !important;
max-width: 100% !important; max-width: 300px !important;
margin: 0 auto 15px !important;
text-align: center !important; text-align: center !important;
} }
/* LES LABELS ET INPUTS S'ADAPTENT */ label {
.d-md-none label {
display: block !important; display: block !important;
width: 100% !important; width: 100% !important;
text-align: center !important; text-align: center !important;
@ -185,87 +203,166 @@
font-size: 12pt !important; font-size: 12pt !important;
} }
.d-md-none input, input, select, .login-btn {
.d-md-none select,
.d-md-none .login-btn {
width: 100% !important; width: 100% !important;
max-width: 100% !important; max-width: 300px !important;
margin: 0 auto !important; margin: 0 auto !important;
display: block !important; display: block !important;
} }
/* EMPÊCHER LE ZOOM SUR MOBILE */ /* EMPÊCHER LE ZOOM iOS */
.d-md-none input, input, select {
.d-md-none select {
font-size: 16px !important; font-size: 16px !important;
} }
/* CORRECTION SPÉCIFIQUE POUR LE FOOTER */ /* BOUTON HOVER */
.d-md-none .footer { .login-btn:hover {
background: white !important;
color: #7D4FFE !important;
border: solid 2px #7D4FFE !important;
}
/* PLACEHOLDER */
input::placeholder {
font-weight: bold !important;
color: #7D4FFE !important;
opacity: 0.8 !important;
}
/* FOOTER */
.footer {
position: static !important; position: static !important;
margin-top: 20px !important; margin-top: 20px !important;
width: 100% !important; width: 100% !important;
text-align: center !important; text-align: center !important;
} }
}
/* POUR LES TRÈS PETITS ÉCRANS */ /* POUR LES TRÈS PETITS ÉCRANS */
@media screen and (max-width: 320px) { @media screen and (max-width: 320px) {
.d-md-none { .d-md-none {
padding: 10px !important; padding: 15px 10px !important;
} }
.login100-form-title { .wrap-input100 {
font-size: 20px !important; max-width: 280px !important;
} }
.d-md-none input, input, select, .login-btn {
.d-md-none select { max-width: 280px !important;
height: 38px !important;
padding: 6px 10px !important;
}
.login-btn {
height: 42px !important;
font-size: 16px !important;
}
}
/* POUR LES TABLETTES EN MODE PORTRAIT */
@media screen and (min-width: 480px) and (max-width: 767px) {
.d-md-none {
max-width: 400px !important;
margin: 0 auto !important;
} }
} }
</style> </style>
<script> <script>
// IMPORTANT: MÊME LOGIQUE JAVASCRIPT QUE LE DESKTOP // FONCTIONS SPÉCIFIQUES POUR MOBILE
// Les IDs sont identiques, donc les fonctions JavaScript existantes function changer_langue_connexion_mobile(langue) {
// fonctionneront directement avec cette version mobile // Synchroniser avec la version desktop si nécessaire
const desktopLangue = document.getElementById('langue');
if (desktopLangue) {
desktopLangue.value = langue;
// Déclencher l'événement change
desktopLangue.dispatchEvent(new Event('change'));
}
// Assurer que le bouton a le même comportement // Appeler la fonction originale
document.getElementById('btn_connexion')?.addEventListener('click', function(e) { changer_langue_connexion();
// La logique existante dans votre application s'appliquera automatiquement }
// car les IDs des champs sont identiques à la version desktop
console.log('Connexion mobile - mêmes IDs que desktop'); function changer_entite_portail_mobile(entite) {
// Synchroniser avec la version desktop si nécessaire
const desktopEntite = document.getElementById('codeSociete');
if (desktopEntite) {
desktopEntite.value = entite;
desktopEntite.dispatchEvent(new Event('change'));
}
// Appeler la fonction originale
changer_entite_portail();
}
// GESTION DE LA CONNEXION MOBILE
document.getElementById('btn_connexion_mobile')?.addEventListener('click', function(e) {
e.preventDefault();
// RÉCUPÉRER LES VALEURS DES CHAMPS MOBILES
const codeSociete = document.getElementById('codeSociete_mobile').value;
const login = document.getElementById('login_mobile').value;
const mdp = document.getElementById('mdp_mobile').value;
// VALIDATION
if (!codeSociete || !login || !mdp) {
alert('Veuillez remplir tous les champs obligatoires');
return;
}
// SYNCHRONISER AVEC LES CHAMPS DESKTOP (pour la soumission du formulaire)
const desktopForm = document.querySelector('form'); // Trouver le formulaire principal
if (desktopForm) {
// Mettre à jour les champs du formulaire desktop
const desktopCodeSociete = document.getElementById('codeSociete');
const desktopLogin = document.getElementById('login');
const desktopMdp = document.getElementById('mdp');
if (desktopCodeSociete) desktopCodeSociete.value = codeSociete;
if (desktopLogin) desktopLogin.value = login;
if (desktopMdp) desktopMdp.value = mdp;
// DÉCLENCHER LA SOUMISSION DU FORMULAIRE DESKTOP
desktopForm.submit();
} else {
// FALLBACK: Créer un formulaire temporaire
const form = document.createElement('form');
form.method = 'POST';
form.action = window.location.href;
// Ajouter les champs
const fields = [
{name: 'codeSociete', value: codeSociete},
{name: 'login', value: login},
{name: 'mdp', value: mdp},
{name: 'langue', value: document.getElementById('langue_mobile').value}
];
fields.forEach(field => {
const input = document.createElement('input');
input.type = 'hidden';
input.name = field.name;
input.value = field.value;
form.appendChild(input);
});
document.body.appendChild(form);
form.submit();
}
}); });
// Correction pour garantir que tout s'affiche correctement // GARANTIR QUE SEULE LA BONNE VERSION EST VISIBLE
window.addEventListener('load', function() { document.addEventListener('DOMContentLoaded', function() {
// Vérifier et corriger tout débordement const isMobile = window.innerWidth <= 767;
const mobileContainer = document.querySelector('.d-md-none');
if (mobileContainer) {
// Forcer le recalcul des dimensions
mobileContainer.style.width = '100%';
mobileContainer.style.overflowX = 'hidden';
// Vérifier chaque élément pour éviter le débordement if (isMobile) {
const allElements = mobileContainer.querySelectorAll('*'); // Masquer le desktop, montrer le mobile
allElements.forEach(el => { const desktopVersion = document.querySelector('.d-none.d-md-block');
el.style.maxWidth = '100%'; const mobileVersion = document.querySelector('.d-md-none');
el.style.boxSizing = 'border-box';
}); if (desktopVersion) desktopVersion.style.display = 'none';
if (mobileVersion) mobileVersion.style.display = 'block';
}
});
// REDIMENSIONNEMENT DE LA FENÊTRE
window.addEventListener('resize', function() {
const isMobile = window.innerWidth <= 767;
const desktopVersion = document.querySelector('.d-none.d-md-block');
const mobileVersion = document.querySelector('.d-md-none');
if (isMobile) {
if (desktopVersion) desktopVersion.style.display = 'none';
if (mobileVersion) mobileVersion.style.display = 'block';
} else {
if (desktopVersion) desktopVersion.style.display = 'block';
if (mobileVersion) mobileVersion.style.display = 'none';
} }
}); });
</script> </script>