
<div class="row row1">
    <div class="col-12 col-md-6 col-lg-6">
        <section class="sectionTheme h-100">
            <h2><i class="fas fa-palette"></i>Modifier mon Thème</h2>

            <div class="conteneur-couleur">

            <?php
                $reponse = $bdd->query('SELECT * FROM `couleurs` ORDER BY ordre DESC');
                $donnees = $reponse->fetchAll();
                foreach ($donnees as $donnee){
            ?>
                <div class="couleurBox" id="<?php echo $donnee['nom']; ?>" style="background-color: #<?php echo $donnee['couleur']; ?>"></div>
            <?php
                }
                $reponse->closeCursor();
            ?>

            </div>
        </section>
    </div>

    <div class="col-12 col-md-6 col-lg-6">
        <section class="sectionAvatar h-100">

            <h2><i class="fas fa-user-circle"></i>Avatar</h2>
            <div class="conteneur-avatar">
                <div class="boxAvatars">
                    <!-- On récupère tous les noms de fichiers img dans le dossier /img/avatars/ -->
                    <?php
                        $d = '../../img/avatars/';
                        /*------  Contrôle des extensions en sortie de serveur  ------*/
                        foreach(glob($d.'*.{jpg,JPG,jpeg,JPEG,png,PNG,svg,SVG}',GLOB_BRACE) as $file){
                            $imags[] =  basename($file);
                        };
                        foreach ($imags as $imgName){
                        ?>
                            <div class="conteneurImgWidget">
                                <img src="../../img/avatars/<?php echo $imgName; ?>" id="<?php  echo $imgName?>" <?php if (("img/avatars/" . $imgName) === $avatar){echo "class='avatarChoisit'";} ?> >
                            </div>
                        <?php
                        }
                        ?>
                </div>

                <div class="boxMenuAvatar">
                    <div class="menuAvatar">
                        <div class="addAvatar booking"><i class="fas fa-plus-circle"></i></div>
                    </div>
                </div>

            <!----------------------------
            |    Widget Gestion images    |
            ----------------------------->
                <div class="widgetAvatar">
                    <div class="conteneur-widget">
                        <div class="selectionAvatar"><i class="far fa-check-circle"></i></div>
                        <div class="delAvatar"><i class="fas fa-trash-alt"></i></div>
                    </div>
                </div>
            </div>

        </section>
    </div>

</div>



<div class="row row2">
    <div class="col-12 col-md-6">
        <section class="sectionCoord">

            <h2><i class="fas fa-info-circle"></i>Vos Coordonnées</h2>

            <div class="conteneur-coord">
                <form action="" >
                    <label for="societe">Soci&eacute;t&eacute; : </label><input type="text" name="societe" id="societe" value="<?php echo $societe; ?>"/>

                    <label for="nom">Nom : </label><input type="text" name="nom" id="nom" value="<?php echo $nom; ?>"/>

                    <label for="prenom">Pr&eacute;nom : </label><input type="text" name="prenom" id="prenom" value="<?php echo $prenom; ?>"/>

                    <label for="email">Email : </label><input type="email" name="email" id="email" value="<?php echo $email; ?>"/>

                    <label for="tel">T&eacute;l&eacute;phone : </label><input type="tel" pattern="[0-9]{2} [0-9]{2} [0-9]{2} [0-9]{2} [0-9]{2}" name="tel" id="tel" value="<?php echo $tel; ?>"/>
                </form>

                <div class="conteneur-btns-coord">
                    <i class="fas fa-check-circle"></i>
                    <i class="fas fa-crosshairs"></i>
                </div>
            </div>

        </section>
    </div>

    <div class="col-12 col-md-6">
        <section class="sectionSecurite">

            <h2><i class="fas fa-unlock-alt"></i>Sécurité</h2>

            <div class="conteneur-securite">
                <h3 class="consigneSecu">Changer mes Identifiants</h3>

                <form action="">
                    <label for="login">Login : </label><input type="text" name="login" id="login" value="<?php echo $pseudo; ?>"/>

                    <label for="mdp">Mot de passe : </label><input type="text" name="mdp" id="mdp" value="********"/>
                </form>
                
                <div class="conteneur-btns-secu">
                    <i class="fas fa-check-circle"></i>
                    <i class="fas fa-crosshairs"></i>
                </div>
            </div>

        </section>
    </div>
</div>
