:root {
    /* Palette inspirée du nouveau visuel */
    --primary-color: #5c6bc0;
    /* Bleu-violet (titres & boutons) */
    --second-color: #3949ab;
    /* Bleu soutenu (prix / sous-titres) */
    --background-color: #9aa8f8;
    /* Fond bleu/lilas pastel */
    --case-color: #fef3bd;
    /* Jaune pâle façon "Notes" */
    --write-color: #2c387e;
    /* Bleu marine lisible sur fond jaune */
}

#appointmentForm,
#modalBackdrop {
    display: none;
}

#bookingForm fieldset {
    border: 1px solid rgba(92, 107, 192, 0.3);
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
}

#bookingForm legend {
    padding: 0 10px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
}

#bookingForm label {
    margin-bottom: 5px;
    color: var(--write-color);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    /* Empêche le zoom auto forcé sur iOS */
    font-family: inherit;
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(180deg, #8797f7 0%, #aebafb 100%);
    background-attachment: fixed;
}

header {
    background-color: transparent;
    padding: 1rem 0.5rem;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#mainTitle {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-heading {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 1rem;
    font-weight: normal;
}

#mainTitle img {
    width: 85%;
    max-width: 360px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* Classe utilitaire pour l'accessibilité et le référencement naturel (SEO) */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

footer {
    background-color: transparent;
    color: var(--write-color);
    padding: 1rem;
    text-align: center;
    width: 100%;
}

main {
    padding: 0.5rem;
    overflow-y: auto;
    width: 100%;
}

.content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    transition: margin-left 0.3s;
}

/* Styles modaux */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 56, 126, 0.4);
    z-index: 999;
}

.modal-content {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 650px;
    max-height: 90vh;
    background: var(--case-color);
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow-y: auto;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .modal-content {
        padding: 35px;
    }
}

.services {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 15px auto;
    width: 100%;
}

@media (min-width: 600px) {
    .services {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .services {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Pousse le footer tout en bas */
    min-height: 180px;
    padding: 18px;
    background: var(--case-color);
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    border: 1px solid transparent;
}

.service:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.service h3 {
    color: var(--primary-color);
    margin: 0 0 10px 0;
    font-size: 1.15rem;
}

.service p {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--write-color);
    margin: 0;
}

/* Nouveau pied de carte : Durée | Prix */
.service .service-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(44, 56, 126, 0.12);
    /* Ligne discrète de séparation */
}

.service .service-time {
    font-size: 0.95rem;
    color: var(--write-color);
    font-weight: 600;
}

.service .service-separator {
    color: var(--second-color);
    opacity: 0.5;
    font-weight: bold;
}

.service .service-price {
    font-size: 1.05rem;
    font-weight: bold;
    color: var(--second-color);
}

button {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    min-height: 44px;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: var(--second-color);
}

button.centered {
    display: block;
    margin: 15px auto;
}

h2 {
    color: #ffffff;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.addresses {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 15px auto;
    width: 100%;
}

@media (min-width: 520px) {
    .addresses {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .addresses {
        grid-template-columns: repeat(4, 1fr);
    }
}

.address-item,
.email-item,
.phone-item,
.social-media,
.Planity {
    cursor: pointer;
    background: var(--case-color);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    min-height: 52px;
    font-size: 0.9rem;
    color: var(--write-color);
    text-align: center;
    word-break: break-word;
    overflow-wrap: anywhere;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 1px solid transparent;
}

.address-item:hover,
.email-item:hover,
.phone-item:hover,
.social-media:hover,
.Planity:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.email-item a,
.phone-item a,
.address-item a {
    color: var(--write-color);
    text-decoration: none;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-weight: 500;
}

.address-item span,
.email-item span,
.phone-item span,
.social-media span,
.Planity span {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.note-container {
    text-align: center;
    width: 100%;
    margin: 16px 0 8px 0;
}

.note {
    color: #ffffff;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.photo-gallery {
    position: relative;
    text-align: center;
    margin: 15px auto;
    max-width: 750px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    background: var(--case-color);
}

.photo-gallery img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

#next {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 60px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.35));
    color: white;
    border: none;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    padding: 0 10px;
}

.photo-gallery:hover #next {
    opacity: 1;
}

/* Section Informations */
.Informations {
    background-color: var(--case-color);
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 24px 20px;
    margin: 15px auto;
    width: 100%;
    max-width: 850px;
}

.Informations [role="listitem"],
.Informations .info-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
}

.Informations h3.text {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin: 16px 0 6px 0;
    text-align: center;
}

.Informations p.text {
    font-size: 0.95rem;
    color: var(--write-color);
    margin: 4px 0;
    line-height: 1.5;
    text-align: center;
}

#Payment {
    font-size: 1.1rem;
    color: var(--second-color);
    text-align: center;
    margin-top: 20px;
    font-weight: bold;
    text-shadow: none;
}

/* Section Présentation */
.presentation {
    background: var(--case-color);
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 24px 20px;
    margin: 15px auto;
    width: 100%;
    max-width: 850px;
}

.presentation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.presentation-img {
    width: 100%;
    max-width: 260px;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.presentation-text {
    width: 100%;
}

.presentation-text h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 0 0 12px 0;
    text-align: left;
}

.presentation-text p {
    color: var(--write-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 10px 0;
    text-align: justify;
}

@media (min-width: 768px) {
    .presentation-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 30px;
    }

    .presentation-img {
        width: 35%;
        max-width: 280px;
    }

    .presentation-text {
        width: 65%;
    }
}

/* Sidebar */
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    background-color: var(--case-color);
    overflow-x: hidden;
    transition: width 0.3s ease;
    padding-top: 60px;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
}

.sidebar a {
    padding: 14px 20px;
    text-decoration: none;
    font-size: 18px;
    color: var(--primary-color);
    display: block;
    font-weight: 600;
    transition: background-color 0.2s;
}

.sidebar a:hover {
    background-color: rgba(92, 107, 192, 0.12);
}

#BoutonSide {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2001;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 10px 14px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
}

#BoutonSide:hover {
    background-color: var(--second-color);
}

.icon-style {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.margin-left-8 {
    margin-left: 8px;
}

.hidden-input {
    display: none;
}

/* Contour très net et élégant pour la navigation au clavier */
:focus-visible {
    outline: 3px solid var(--primary-color) !important;
    outline-offset: 3px !important;
}

/* Style spécifique pour les cartes quand on les sélectionne au clavier */
.service:focus-visible,
.address-item:focus-visible,
.email-item:focus-visible,
.phone-item:focus-visible,
.social-media:focus-visible,
.Planity:focus-visible {
    outline: 3px solid var(--primary-color) !important;
    outline-offset: 4px !important;
    transform: translateY(-4px);
    /* Effet de léger relief identique au hover souris */
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* Invisible sauf si sélectionné avec la touche Tab */
.skip-link {
    position: absolute;
    top: -60px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    z-index: 9999;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 10px;
}

/* Encadré d'indisponibilité et urgence */
.availability-alert {
    background: rgba(92, 107, 192, 0.12);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 14px;
    margin: 12px 0;
    text-align: center;
    color: var(--write-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.availability-alert p {
    margin: 4px 0;
}

.emergency-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.emergency-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: var(--primary-color);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.emergency-link:hover {
    background: var(--second-color);
}

.emergency-btn-msg {
    padding: 8px 14px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    min-height: auto;
    cursor: pointer;
}

.emergency-btn-msg:hover {
    background: rgba(92, 107, 192, 0.1);
    color: var(--second-color);
}