/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f7fa;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px;
}

#app {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px 30px;
    max-width: 600px;
    width: 100%;
    text-align: center;
}

/* Title */
h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #0078d7;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

label {
    font-weight: bold;
    font-size: 0.9rem;
    text-align: left;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="color"],
input[type="tel"],
input[type="url"],
select {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    width: 100%;
    max-width: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="color"]:focus,
select:focus {
    outline: none;
    border-color: #0078d7;
    box-shadow: 0 0 5px rgba(0, 120, 215, 0.3);
}

input[type="file"] {
    border: none;
    padding: 5px;
    width: 100%;
    max-width: 100%;
}

select {
    cursor: pointer;
}

/* Conditional Input Groups */
#wifi-inputs,
#vcard-inputs {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* Buttons */
button {
    background-color: #0078d7;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

button:hover {
    background-color: #005bb5;
}

/* QR Code Result */
#qr-result {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
    position: relative;
}

canvas {
    border: 1px solid #ddd;
    border-radius: 10px;
    margin: 10px 0;
    background-color: #fff;
    max-width: 100%;
    height: auto;
}

#qr-code-container {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 256px;
}

#qr-code-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: block;
}

/* Download Link */
#download-link {
    margin-top: 15px;
}

#download-link a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    display: inline-block;
    padding: 10px 20px;
    background-color: #0078d7;
    border-radius: 5px;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#download-link a:hover {
    background-color: #005bb5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.download-button {
    background-color: #0078d7;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.download-button:hover {
    background-color: #005bb5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive Styles */
@media (max-width: 768px) {
    #app {
        padding: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    input, select {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #app {
        padding: 10px;
    }

    h1 {
        font-size: 1.2rem;
    }

    input, select {
        font-size: 0.8rem;
    }
}

/* Mobile View Classes */
body.mobile-view {
    background-color: #e6f7ff;
}

body.mobile-view h1 {
    color: #005bb5;
}

body.mobile-view #app {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Styles spécifiques pour Android */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    input[type="color"] {
        height: 40px;
    }
}

/* Correction pour les appareils Android */
@supports (-webkit-touch-callout: none) {
    input, select, button {
        font-size: 16px; /* Évite le zoom automatique sur iOS */
    }
}

/* Footer Styles */
footer {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #f4f7fa;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    border-top: 1px solid #ddd;
}

footer p {
    margin: 5px 0;
}

footer a {
    text-decoration: none;
    color: #0078d7;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

footer a:hover {
    color: #005bb5;
    text-decoration: underline;
}

/* Description text */
.description-text {
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: justify;
    padding: 0 10px;
}