@import url('https://fonts.googleapis.com/css2?family=League+Spartan&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display&display=swap');

/* =====================
   STYLES GÉNÉRAUX
   ===================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'League Spartan', sans-serif;
}

body {
    width: 100%;
    background-color: white;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Recoleta', serif;
    color: black;
    text-align: left;
    margin: 1em 0;
    font-weight: 900;
}

h1 {
    font-size: 2.2em;
    text-align: center;
}

h2 {
    font-size: 1.8em;
}

h3 {
    font-size: 1.5em;
}

h4 {
    font-size: 1.3em;
}

h5 {
    font-size: 1.1em;
}

h6 {
    font-size: 1em;
}

p {
    font-size: 1.2em;
    margin: 0.5em 5%;
}

.intro {
    font-size: 1.4em;
    text-align: center;
    padding: 20px;
    font-weight: 600;
}

a {
    color: black;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    color: #0F5E7F;
    text-decoration: underline;
}

strong {
    color: black;
    font-weight: 800;
}

footer {
    text-align: center;
    padding: 2em;
    background: white;
    font-size: 0.9em;
}


/* =====================
   FONTS SUR MOBILE
   ===================== */

@media (max-width: 768px) {
    body {
        font-family: 'Playfair Display', serif; /* Applique Playfair Display sur mobile */
    }

    h1, h2, h3, h4, h5, h6 {
        font-family: 'Playfair Display', serif; /* Applique Playfair Display aux titres */
        font-weight: bold; /* Garder les titres en gras */
    }

    p, a {
        font-family: 'Playfair Display', serif; /* Applique Playfair Display aux paragraphes et liens */
    }
    
    strong {
        font-family: 'Playfair Display', serif; /* Applique Playfair Display sur mobile pour strong */
        font-weight: bold; /* Assure que strong est toujours en gras */
    }
}

/* =====================
   HEADER + NAVIGATION
   ===================== */

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    flex-wrap: wrap;
    position: relative;
    border: none;
}

.header-container a {
    display: block;
    max-width: 300px;
}

.header-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

nav ul.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1em;
    flex-wrap: wrap;
    border: none;
}

nav a {
    font-family: 'Recoleta', serif;
    font-weight: bold;
    font-size: 1.2em;
}

/* BURGER BUTTON */
.burger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 20;
}

/* Responsive nav */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .burger {
        display: block;
        margin-top: 1rem;
        align-self: center;
    }

    nav ul.nav-links {
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        display: none;
        border-top: 1px solid #ddd;
        position: static;
        margin-top: 1rem;
    }

    nav ul.nav-links.active {
        display: flex;
    }
}

/* =====================
   CONTAINER GÉNÉRAL
   ===================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* =====================
   GALERIE
   ===================== */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    justify-items: center;
    grid-auto-rows: auto;
}

.grid-item {
    position: relative;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

.grid-item img:hover {
    filter: grayscale(0%);
}

.grid-item p {
    font-style: italic;
    text-align: center;
    padding: 1em;
    font-size: 1em;
    line-height: 1.4;
}

.gal-img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.gal-img {
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease-in-out;
}

.grid-item:hover .gal-img {
    opacity: 0;
}

.grid-item:hover .gal-img-hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 700px) {
    .grid-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .grid-item {
        width: 100%;
    }

    .grid-item img {
        width: 100%;
    }

    .grid-item p {
        font-size: 1em;
        padding: 0.8em;
    }
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0 auto;
}

.service-list li {
    background: white; /* Fond plus clair pour les services */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Ombre légère */
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    justify-content: flex-start; /* Aligner le texte en haut */
}

.service-list li h2 {
    font-family: 'Recoleta', serif;
    color: black; /* Texte en noir */
    font-weight: 900;
    font-size: 1.5em;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
}

.service-list li img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 10px 10px 0 0;
}

/* Responsive */
@media (max-width: 700px) {
    .service-list {
        grid-template-columns: 1fr;
    }

    .service-list li {
        padding: 1rem 0.5rem;
    }

    .service-list li img {
        max-width: 100%;
    }
}

/* Liens sociaux */
.social-links {
    margin-top: 20px;
}

.social-links p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.social-links a {
    display: inline-block;
    margin: 0 15px;
    font-size: 1.2em;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.social-links a:hover {
    color: #0F5E7F;
}

.social-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .social-links a {
        color: white; /* Couleur du texte des liens en mode sombre */
    }

    .social-link.instagram-link img {
        content: url('logo_instagram_dark.svg'); /* Utilisation de l'icône Instagram sombre */
    }

    .social-link.facebook-link img {
        content: url('logo_fb_dark.svg'); /* Utilisation de l'icône Facebook sombre */
    }
}

/* Mode clair */
@media (prefers-color-scheme: light) {
    .social-links a {
        color: black; /* Couleur du texte des liens en mode clair */
    }

    .social-link.instagram-link img {
        content: url('logo_instagram.svg'); /* Utilisation de l'icône Instagram claire */
    }

    .social-link.facebook-link img {
        content: url('logo_fb.svg'); /* Utilisation de l'icône Facebook claire */
    }
}

/* =====================
   FORM
   ===================== */

.form2 {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.form2 label {
    font-weight: bold;
    display: block;
    margin-top: 1rem;
    font-family: 'Recoleta', serif;
}

.form2 input[type="text"],
.form2 input[type="email"],
.form2 textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'League Spartan', sans-serif;
    font-size: 1em;
    resize: vertical;
}

.form2 input[type="submit"] {
    background-color: #0F5E7F;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 1rem;
}

.form2 input[type="submit"]:hover {
    background-color: #084c65;
}

@media (max-width: 700px) {
    .form2 {
        width: 90%;
        padding: 1rem;
    }
}
/* Flèches de navigation */
.prev, .next {
    position: absolute;
    top: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 15px;
    cursor: pointer;
    z-index: 1;
    transform: translateY(-50%);
    border-radius: 50%;
}

/* Rapprocher les flèches des images */
.prev {
    left: 5%;
}

.next {
    right: 5%;
}

/* Croisillon pour fermer la vue */
.close-modal {
    position: absolute;
    top: 5%;
    right: 5%;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 1001;
    background-color: rgba(0, 0, 0, 0.5); /* Ajoute un fond semi-transparent à la croix */
    padding: 10px;
    border-radius: 50%;
}

/* Modale d'image */
.zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Image dans la modale */
.zoom-img {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
}

/* Légende sous l'image */
.zoom-modal .caption {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.1em;
    font-style: italic;
    text-align: center;
    padding: 0.5em;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    margin: 0 auto;
    z-index: 2;
}

/* Modifications pour mobile */
@media (max-width: 768px) {
    /* Limiter la taille de la galerie pour éviter les chevauchements */
    .zoom-modal .zoom-img {
        max-width: 80%;
    }

    .prev, .next {
        padding: 10px; /* Réduire la taille des flèches */
    }

    .prev {
        left: 0%;
    }

    .next {
        right: 0%;
    }

    .close-modal {
        top: 5%;
        right: 5%;
    }
}



/* =====================
   MODE SOMBRE
   ===================== */

@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: white;
    }

    h1, h2, h3, h4, h5, h6, p {
        color: white;
    }

    a {
        color: #BB86FC;
    }

    a:hover {
        color: #3700B3;
    }

    .grid-item {
        background-color: #333;
    }

    .zoom-modal {
        background-color: rgba(0, 0, 0, 0.9);
    }

    .zoom-modal .caption {
        background-color: rgba(0, 0, 0, 0.7);
    }

    .close-modal {
        color: white;
    }

    .prev, .next {
        background-color: rgba(0, 0, 0, 0.7);
    }

    .header-container img {
        content: url('banniere_lelaserdewilliam_dark.svg');
    }

    footer {
        background-color: #121212;
        color: white;
    }

    footer a {
        color: #BB86FC;
    }

    footer a:hover {
        color: #3700B3;
    }

    strong {
        color: white;
        font-weight: 800;
    }

    .service-list li, .grid-item {
        background-color: #333;
    }

    .service-list li h2, .service-list li p {
        color: white;
    }

    .intro {
        color: white;
    }

    .service-list li {
        box-shadow: 0 4px 6px rgba(255, 255, 255, 0.2);
    }

    .header-container {
        background-color: #121212;
    }

    .header-container a {
        color: white;
    }

    .grid-item img, .service-list li img {
        filter: brightness(0.7);
    }

    .burger {
        color: white;
        background-color: transparent;
        border: 2px solid white;
    }

    nav ul.nav-links {
        background-color: #121212;
        color: white;
        border-top: 1px solid #444;
    }

    nav a {
        color: white;
    }

    nav a:hover {
        color: #BB86FC;
    }

    nav ul.nav-links.active {
        background-color: #121212;
    }
}

/* Supprime toute bordure et trait indésirable */
header, nav, .header-container, nav ul {
    border: none !important;
    box-shadow: none !important;
}

/* Supprimer le trait qui peut apparaître au survol du menu */
nav ul.nav-links {
    border: none !important;
    box-shadow: none !important;
}

/* Si le problème persiste avec le menu burger */
.burger {
    border: none !important;
    box-shadow: none !important;
}

/* spécial page gravure */


.engraving-section {
    text-align: center;
    padding: 20px;
}

#nameInput {
    margin: 10px;
    padding: 10px;
    font-size: 1.2em;
    border-radius: 5px;
    border: 1px solid black;
    width: 80%;
    max-width: 500px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Canvas */
#engravingCanvas {
    border: 2px solid black;
    margin-top: 20px;
    width: 500px;  /* Fixe la largeur à 500px */
    height: 700px; /* Fixe la hauteur à 700px */
    display: block;
    margin-left: auto;  /* Centre horizontalement */
    margin-right: auto; /* Centre horizontalement */
}

#createEngravingBtn {
    background-color: black;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}

#createEngravingBtn:hover {
    background-color: #084c65;
}

/* Change les bordures et l'alignement de la section gravure */
body.wood-background {
    background-image: url('wood_texture.png');
    background-size: cover;
    background-position: center;
}

body.cork-background {
    background-image: url('cork_texture.jpg');
    background-size: cover;
    background-position: center;
}

body {
    font-family: 'League Spartan', sans-serif;
}

.stencil-font {
    font-family: 'Stencil', sans-serif;
}

body.low-power {
    color: black;
}

body.high-power {
    color: black;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

/* Styles pour les fonds */
.wood-background {
    background-image: url('wood_texture.png');
    background-size: cover;
    background-position: center;
}

.cork-background {
    background-image: url('cork_texture.jpg');
    background-size: cover;
    background-position: center;
}

