/*
Theme Name:  JAMTOLY
Theme URI:   https://www.jamtoly.com
Description: Thème JAMTOLY — charte graphique 2026 (Nuit, Signal, Jost Light, Manrope). Autonome, sans constructeur.
Author:      JAMTOLY SAS
Version:     1.1.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jamtoly
*/

/* ---------- Charte ---------- */
:root {
    --nuit: #0B1220;
    --asphalte: #1C2433;
    --nuit-profonde: #070B14;
    --signal: #3DD6F5;
    --signal-profond: #0A8FB0;
    --blanc: #F5F7FA;
    --gris-route: #8A94A6;
    --texte: #2A3242;
    --texte-clair: #C5CCD8;
    --titres: 'Jost', 'Futura', 'Trebuchet MS', sans-serif;
    --corps: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --largeur: 1080px;
    --lecture: 820px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
    margin: 0;
    background: #fff;
    color: var(--texte);
    font: 400 16px/1.75 var(--corps);
    -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; }
a { color: var(--signal-profond); text-underline-offset: 2px; }
a:hover { color: var(--nuit); }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid #E3E7ED; margin: 2em 0; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: .95em; }
th, td { padding: .6em .8em; border-bottom: 1px solid #E3E7ED; text-align: left; vertical-align: top; }
th { color: var(--nuit); font-weight: 600; }
blockquote { margin: 0 0 1.5em; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--signal-profond); color: var(--nuit); }

/* Titres : Jost Light pour les grands titres, Regular pour les sous-titres (charte) */
h1, h2, h3, h4, h5, h6 { font-family: var(--titres); color: var(--nuit); line-height: 1.25; margin: 1.6em 0 .6em; }
h1, h2 { font-weight: 300; }
h3, h4, h5, h6 { font-weight: 400; }
h1 { font-size: clamp(30px, 4.2vw, 44px); margin-top: 0; }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 22px; }
h4 { font-size: 19px; }

.jmtl-wrap { width: min(var(--largeur), 100% - 32px); margin-inline: auto; }
.jmtl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jmtl-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--signal); color: var(--nuit); padding: 8px 14px; }
.jmtl-skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ---------- Barre du haut ---------- */
.jmtl-topbar { background: var(--nuit-profonde); color: var(--texte-clair); font-size: 13.5px; }
.jmtl-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; flex-wrap: wrap; }
.jmtl-topbar-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.jmtl-topbar a { color: var(--texte-clair); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.jmtl-topbar a:hover { color: var(--signal); }
.jmtl-cart svg, .jmtl-topbar svg { flex: none; }

/* ---------- En-tête ---------- */
.jmtl-header { position: sticky; top: 0; z-index: 50; background: var(--nuit); border-bottom: 1px solid rgba(255,255,255,.06); }
.admin-bar .jmtl-header { top: 32px; }
.jmtl-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.jmtl-logo { display: block; line-height: 0; }
.jmtl-logo img { width: 170px; height: auto; }

.jmtl-menu, .jmtl-menu ul { list-style: none; margin: 0; padding: 0; }
.jmtl-menu { display: flex; align-items: center; gap: 4px; }
.jmtl-menu li { position: relative; margin: 0; }
.jmtl-menu a {
    display: block; padding: 10px 14px; color: var(--blanc); text-decoration: none;
    font: 600 14px/1.2 var(--corps); letter-spacing: .04em; text-transform: uppercase;
}
.jmtl-menu a:hover, .jmtl-menu .current-menu-item > a, .jmtl-menu .current-menu-ancestor > a { color: var(--signal); }
.jmtl-menu .menu-item-has-children > a::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); }
.jmtl-menu .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px 0;
    background: var(--asphalte); border-top: 2px solid var(--signal); border-radius: 0 0 6px 6px;
    box-shadow: 0 12px 30px rgba(0,0,0,.35); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.jmtl-menu li:hover > .sub-menu, .jmtl-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.jmtl-menu .sub-menu a { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14.5px; padding: 9px 18px; }

.jmtl-burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--blanc); }
.jmtl-burger span:first-child, .jmtl-burger span:first-child::before, .jmtl-burger span:first-child::after {
    display: block; width: 24px; height: 2px; background: currentColor; position: relative; transition: .2s;
}
.jmtl-burger span:first-child::before, .jmtl-burger span:first-child::after { content: ''; position: absolute; left: 0; }
.jmtl-burger span:first-child::before { top: -7px; }
.jmtl-burger span:first-child::after { top: 7px; }
.jmtl-burger[aria-expanded="true"] span:first-child { background: transparent; }
.jmtl-burger[aria-expanded="true"] span:first-child::before { top: 0; transform: rotate(45deg); }
.jmtl-burger[aria-expanded="true"] span:first-child::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 980px) {
    .jmtl-header-inner { min-height: 64px; }
    .jmtl-logo img { width: 150px; }
    .jmtl-burger { display: block; }
    .jmtl-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--nuit); border-top: 1px solid rgba(255,255,255,.08); display: none; max-height: calc(100vh - 64px); overflow-y: auto; }
    .jmtl-nav.is-open { display: block; }
    .jmtl-menu { flex-direction: column; align-items: stretch; padding: 8px 16px 18px; gap: 0; }
    .jmtl-menu a { padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 15px; }
    .jmtl-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px; }
    .jmtl-menu li.is-open > .sub-menu { display: block; }
    .jmtl-topbar-inner { justify-content: center; padding: 6px 0; }
    .jmtl-topbar-contact { justify-content: center; gap: 6px 16px; }
}

/* ---------- Contenu ---------- */
.jmtl-main { display: block; }
.jmtl-content { padding: 48px 0 64px; }
.jmtl-page .jmtl-content > * { max-width: var(--lecture); }
.jmtl-page .jmtl-content > .alignwide, .jmtl-page .jmtl-content > .wp-block-woocommerce-cart, .jmtl-page .jmtl-content > .wp-block-woocommerce-checkout, .jmtl-page .jmtl-content > .woocommerce, .jmtl-page .jmtl-content > [class*="jmtl-"] { max-width: none; }
.jmtl-title { margin-bottom: .7em; }
.jmtl-meta { color: var(--gris-route); font-size: 14px; }
.jmtl-list { display: grid; gap: 28px; }
.jmtl-card h2 { margin: 0 0 .2em; font-size: 24px; }
.jmtl-card h2 a { color: var(--nuit); text-decoration: none; }

/* Boutons */
.jmtl-btn, .wp-block-button__link, .button, button.button, input[type="submit"] {
    display: inline-block; padding: 14px 26px; border-radius: 6px; border: 0; cursor: pointer;
    background: var(--signal); color: var(--nuit); text-decoration: none;
    font: 600 14px/1.2 var(--corps); letter-spacing: .08em; text-transform: uppercase; transition: .18s;
}
.jmtl-btn:hover, .wp-block-button__link:hover, .button:hover, input[type="submit"]:hover { background: var(--nuit); color: var(--blanc); }
.jmtl-btn-ghost { background: transparent; color: var(--nuit); box-shadow: inset 0 0 0 1.5px var(--nuit); }
.jmtl-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.5em; }

/* Formulaires simples */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
    font: inherit; color: var(--texte); background: #fff; border: 1px solid #CDD3DC; border-radius: 6px; padding: 10px 12px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--signal-profond); outline: none; box-shadow: 0 0 0 3px rgba(10,143,176,.15); }

/* ---------- Pages en sections (accueil, contact) ---------- */
.jmtl-section { padding: 72px 0; }
.jmtl-section h2:first-child, .jmtl-section-head h2 { margin-top: 0; }
.jmtl-section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.jmtl-section-head p { color: var(--texte-clair); }
.jmtl-dark { background: var(--nuit); color: var(--texte-clair); }
.jmtl-dark h2, .jmtl-dark h3 { color: var(--blanc); }
.jmtl-light { background: var(--blanc); }
.jmtl-prose .jmtl-wrap { max-width: var(--lecture); }
.jmtl-prose h3 { margin-top: 1.4em; }
.jmtl-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.jmtl-split-top { align-items: start; }

/* Bandeau : vidéo de la route en fond, symbole au-dessus du bouton */
.jmtl-hero { position: relative; overflow: hidden; background: var(--nuit); color: var(--blanc); text-align: center; }
.jmtl-hero > .jmtl-wrap { position: relative; z-index: 1; padding: 44px 0 40px; }
.jmtl-hero h1 { color: var(--blanc); font-size: clamp(30px, 3.6vw, 46px); margin: 0 auto .35em; max-width: 760px; }
.jmtl-hero-sub { font: italic 300 clamp(17px, 1.8vw, 22px)/1.5 var(--titres); color: var(--texte-clair); max-width: 640px; margin: 0 auto 1.3em; }
.jmtl-hero-cta { margin: 0; }
.jmtl-hero-video { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.jmtl-hero-video video { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.jmtl-hero-small > .jmtl-wrap { padding: 56px 0 50px; }

/* Réservation */
.jmtl-booking { background: rgba(10, 143, 176, .08); padding: 56px 0; }

/* Services : pictogrammes de la charte */
.jmtl-services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.jmtl-service {
    display: block; padding: 28px 22px; border-radius: 10px; text-align: center; text-decoration: none;
    background: var(--asphalte); border: 1px solid rgba(255,255,255,.06); transition: .2s;
}
.jmtl-service:hover { border-color: var(--signal); transform: translateY(-2px); }
.jmtl-service-ico { display: inline-flex; color: var(--signal); margin-bottom: 12px; }
.jmtl-service h3 { color: var(--blanc); font-size: 18px; margin: 0 0 .3em; }
.jmtl-service p { color: var(--gris-route); font-size: 14px; line-height: 1.5; margin: 0; }

/* Prendre contact */
.jmtl-contact-actions { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.jmtl-phone { font: 300 clamp(28px, 3.4vw, 40px)/1.2 var(--titres); color: var(--nuit); text-decoration: none; }
.jmtl-phone:hover { color: var(--signal-profond); }
.jmtl-btn-whatsapp { background: #25D366; color: #0B1220; }
.jmtl-btn-whatsapp:hover { background: #1DA851; color: #fff; }

/* Page Contact */
.jmtl-checklist { list-style: none; padding: 0; margin: 0 0 28px; }
.jmtl-checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; font-weight: 600; color: var(--nuit); }
.jmtl-checklist li::before { content: ''; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border: solid var(--signal-profond); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.jmtl-contact-cards { display: grid; gap: 12px; }
.jmtl-contact-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 10px; background: var(--nuit); color: var(--blanc); text-decoration: none; }
.jmtl-contact-card:hover { color: var(--signal); }
.jmtl-contact-card .jmtl-service-ico { margin: 0; }
.jmtl-contact-card strong { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gris-route); }
.jmtl-form-card { background: var(--blanc); border-radius: 12px; padding: 32px; border: 1px solid #E3E7ED; }
.jmtl-form-card h2 { font-size: 24px; margin: 0 0 18px; }
.jmtl-form-card input:not([type="submit"]):not([type="checkbox"]), .jmtl-form-card textarea { width: 100%; }
.jmtl-form-card label { font-weight: 600; font-size: 14px; color: var(--nuit); }
.jmtl-zones-map { display: block; width: 100%; max-width: 440px; margin-left: auto; border-radius: 12px; }

@media (max-width: 980px) {
    .jmtl-services { grid-template-columns: repeat(2, 1fr); }
    .jmtl-split { grid-template-columns: 1fr; gap: 36px; }
    .jmtl-zones-map { margin: 0 auto; }
}
@media (max-width: 600px) {
    .jmtl-section { padding: 52px 0; }
    .jmtl-service { padding: 22px 14px; }
    .jmtl-service h3 { font-size: 16px; }
    .jmtl-form-card { padding: 22px 18px; }
}

/* ---------- Pied de page ---------- */
.jmtl-footer { background: var(--nuit); color: var(--texte-clair); font-size: 14px; line-height: 1.8; }
.jmtl-footer-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; padding: 50px 0 34px; }
.jmtl-footer h2 {
    color: #fff; font: 600 15px/1.3 var(--corps); letter-spacing: .06em; text-transform: uppercase;
    margin: 0 0 15px; padding-bottom: 10px; border-bottom: 2px solid var(--signal);
}
.jmtl-footer ul { list-style: none; margin: 0; padding: 0; }
.jmtl-footer li { margin-bottom: 6px; }
.jmtl-footer a { color: var(--texte-clair); text-decoration: none; transition: color .2s; }
.jmtl-footer a:hover { color: var(--signal); }
.jmtl-footer-map { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 2px solid rgba(255,255,255,.1); }
.jmtl-legal { background: rgba(255,255,255,.05); }
.jmtl-legal-menu { list-style: none; margin: 0; padding: 14px 0; display: flex; flex-wrap: wrap; gap: 6px 26px; }
.jmtl-legal-menu li { margin: 0; }
.jmtl-legal-menu a { color: var(--texte-clair); font-weight: 600; font-size: 13.5px; }
.jmtl-legal-menu .current-menu-item a { color: var(--signal); }
.jmtl-bottom { background: var(--nuit-profonde); color: var(--gris-route); font-size: 13px; padding: 14px 0; }

@media (max-width: 980px) {
    .jmtl-footer-inner { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 600px) {
    /* Barre du haut sur une ligne : téléphone, chat, panier (l'e-mail reste dans le pied de page) */
    .jmtl-topbar { font-size: 13px; }
    .jmtl-topbar-inner { flex-wrap: nowrap; justify-content: space-between; padding: 0; }
    .jmtl-topbar-contact { flex-wrap: nowrap; gap: 14px; }
    .jmtl-topbar a[href^="mailto:"] { display: none; }
    .jmtl-footer-inner { grid-template-columns: 1fr; gap: 26px; padding: 36px 0 26px; }
    .jmtl-content { padding: 32px 0 48px; }
}

/* ---------- WooCommerce (blocs panier / paiement) ---------- */
/* Le placeholder du téléphone n'apparaît qu'au focus, pour ne pas chevaucher le libellé flottant */
.wp-block-woocommerce-checkout input[type="tel"]:not(:focus)::placeholder,
.wp-block-woocommerce-checkout-contact-information-block input[type="tel"]:not(:focus)::placeholder,
#billing-phone:not(:focus)::placeholder,
#shipping-phone:not(:focus)::placeholder { color: transparent; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top-color: var(--signal-profond); }
