/*
Theme Name: SailingLoc
Theme URI: https://dsp-cdp-g2-saty.fr
Author: Agence WebAgency (projet étudiant)
Description: Thème WordPress développé intégralement pour SailingLoc (location de voiliers et bateaux à moteur entre particuliers), conforme à la charte graphique définie dans le cahier des charges (§ G8). Projet étudiant fictif — aucune réservation réelle.
Version: 1.0
Text Domain: sailingloc
*/

/* ===== Variables charte graphique (§ G8) ===== */
:root {
  --navy: #14233f;
  --steel: #6f90ac;
  --pale: #d7dee6;
  --green: #2f7d5a;
  --green-light: #eaf5ef;
  --gold: #d9a441;
  --bg: #f7f8fa;
  --text: #445066;
  --border: #e4e7ec;
  --radius-card: 6px;
  --radius-btn: 4px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
h1, h2, h3, h4 { color: var(--navy); font-weight: 800; margin: 0 0 12px; text-wrap: balance; }
a { color: #1f4e7a; text-decoration: none; }
a:hover { color: var(--navy); }
img { max-width: 100%; display: block; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 64px; }
@media (max-width: 900px) { .container { padding: 0 32px; } }
@media (max-width: 480px) { .container { padding: 0 20px; } }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-logo { font-weight: 800; font-size: 18px; color: #fff; display: flex; align-items: center; gap: 8px; }
.site-logo .loc { color: #a9c2d6; }
.primary-nav { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 13px; font-weight: 500; align-items: center; }
.primary-nav a { color: #cfd8e4; }
.mega-trigger { position: relative; cursor: pointer; color: #cfd8e4; padding: 8px 0; }
.mega-trigger:hover .mega-menu { display: grid; }
.mega-menu { display: none; position: absolute; top: 100%; left: -20px; background: #fff; border-radius: 8px; box-shadow: 0 12px 32px rgba(20,35,63,0.2); padding: 24px; grid-template-columns: repeat(3, 180px); gap: 24px; z-index: 100; }
.mega-menu h4 { color: var(--navy); font-size: 12px; margin-bottom: 10px; }
.mega-menu a { display: block; color: var(--text); font-size: 12.5px; padding: 4px 0; }
.mega-menu a:hover { color: var(--navy); }
.mega-menu p { font-size: 11.5px; color: #8a94a6; margin: 0; }
[contenteditable="true"] { outline: none; border-bottom: 1px dashed transparent; }
[contenteditable="true"]:hover, [contenteditable="true"]:focus { border-bottom-color: var(--steel); }
.header-actions { display: flex; gap: 10px; font-size: 13px; font-weight: 600; }
.btn { display: inline-block; padding: 9px 18px; border-radius: var(--radius-btn); font-weight: 700; font-size: 13px; cursor: pointer; border: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); }
.btn-outline-light { background: transparent; border: 1.5px solid var(--steel); color: #fff; }
.btn-steel { background: var(--steel); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
@media (max-width: 900px) { .primary-nav { display: none; } }
.site-header { transition: box-shadow 0.25s ease; position: sticky; top: 0; z-index: 50; }
.site-header.is-scrolled { box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.btn { transition: transform 0.15s ease, opacity 0.15s ease; }
.btn:hover { opacity: 0.88; }
.boat-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.boat-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(20,35,63,0.12); }
.mobile-menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 0; }
.mobile-menu-toggle span { display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px; }
@media (max-width: 900px) { .mobile-menu-toggle { display: flex; } }
.mobile-nav { display: none; background: var(--navy); border-top: 1px solid #2a3a5c; }
.mobile-nav.is-open { display: block; }
.mobile-nav-list { list-style: none; margin: 0; padding: 12px 32px 20px; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-list a { color: #cfd8e4; padding: 10px 0; font-size: 14px; font-weight: 600; display: block; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
#boat-results.is-loading { opacity: 0.4; pointer-events: none; transition: opacity 0.2s ease; }
.gallery-thumbs { display: flex; gap: 8px; margin-bottom: 10px; }
.gallery-thumb { width: 70px; height: 52px; border-radius: 4px; background-size: cover; background-position: center; cursor: pointer; border: 2px solid transparent; opacity: 0.7; transition: opacity 0.15s ease, border-color 0.15s ease; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.is-active { opacity: 1; border-color: var(--steel); }
.gallery-main { transition: background-image 0.2s ease; }
.review-card { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dashboard-subtitle { font-size: 13px; color: var(--text); max-width: 560px; margin: -8px 0 24px; }
.role-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.role-badge-client { background: var(--pale); color: var(--navy); }
.role-badge-owner { background: var(--green-light); color: var(--green); }
.form-field, .search-bar select, .search-bar input { transition: box-shadow 0.15s ease; }
.form-field:focus, .search-bar select:focus, .search-bar input:focus { outline: none; box-shadow: 0 0 0 2px var(--steel); }

/* Page hero (À propos, Permis côtier, Devenir propriétaire) */
.page-hero { background-size: cover; background-position: center; }
.page-hero-overlay { background: linear-gradient(rgba(20,35,63,0.6), rgba(20,35,63,0.6)); padding: 50px 0; }

/* Timeline (À propos) */
.timeline { border-left: 2px solid var(--pale); padding-left: 20px; display: flex; flex-direction: column; gap: 18px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -25px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--steel); }
.timeline-year { font-weight: 800; color: var(--navy); font-size: 13px; }

/* Accordion FAQ */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger { width: 100%; text-align: left; background: none; border: none; padding: 14px 0; font: 700 14px/1.4 'Inter', sans-serif; color: var(--navy); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.accordion-trigger span { transition: transform 0.2s ease; }
.accordion-trigger.is-open span { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height 0.25s ease, padding 0.25s ease; font-size: 13px; color: var(--text); }
.accordion-panel.is-open { max-height: 300px; padding-bottom: 16px; }

/* Testimonials */
.testimonial-track { display: flex; gap: 20px; overflow: hidden; }
.testimonial { flex: 1; min-width: 260px; background: var(--bg); border-radius: 6px; padding: 20px; font-style: italic; }
.testimonial footer { margin-top: 10px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--navy); }
@media (max-width: 800px) { .testimonial-track { flex-direction: column; } }

/* Back to top */
#back-to-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; border: none; font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; z-index: 60; }
#back-to-top.is-visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { transform: translateY(-3px); }

/* Chart (back-office) */
.chart-canvas { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 24px; }

/* Map embed (contact) */
.map-embed { border-radius: 6px; overflow: hidden; min-height: 220px; }

/* Newsletter */
.newsletter-form input:focus { outline: 2px solid var(--steel); }

/* Catégories (façon grille SamBoat) */
.category-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 500px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
.category-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--navy); font-size: 12px; font-weight: 700; text-align: center; transition: border-color 0.15s ease, transform 0.15s ease; }
.category-card:hover { border-color: var(--steel); transform: translateY(-2px); color: var(--navy); }
.category-icon { font-size: 26px; }

/* Bandeau confiance */
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
@media (max-width: 800px) { .trust-row { grid-template-columns: repeat(2, 1fr); } }
.trust-row strong { display: block; color: var(--navy); font-size: 13px; margin-bottom: 4px; }
.trust-row p { font-size: 11px; color: #8a94a6; margin: 0; }

/* Hero */
.hero { background: var(--steel); color: #fff; padding: 60px 0; }
.hero .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: #e4ecf3; text-transform: uppercase; }
.hero h1 { color: #fff; font-size: 34px; max-width: 560px; }
.search-bar { background: #fff; border-radius: 8px; padding: 14px; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.search-bar select, .search-bar input { flex: 1; min-width: 160px; background: #f2f4f7; border: none; border-radius: 4px; padding: 12px 14px; font-family: inherit; font-size: 13px; color: var(--text); }

/* Sections communes */
section.block { padding: 48px 0; }
.section-eyebrow { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--steel); text-transform: uppercase; margin-bottom: 6px; }
.section-title { text-align: center; margin-bottom: 28px; }
.steps { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.step { max-width: 200px; text-align: center; }
.step .icon { width: 48px; height: 48px; border-radius: 50%; background: var(--green-light); margin: 0 auto 12px; }

/* Cartes bateau (contenu répété) */
.boat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .boat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .boat-grid { grid-template-columns: 1fr; } }
.boat-card { border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; background: #fff; position: relative; }
.boat-card .photo { aspect-ratio: 4/3; background: repeating-linear-gradient(45deg, #dbe4ec, #dbe4ec 8px, #ccd8e2 8px, #ccd8e2 16px); display: flex; align-items: center; justify-content: center; font: 500 11px/1 'JetBrains Mono', monospace; color: #7a8aa0; }
.boat-card .badge { position: absolute; top: 10px; left: 10px; background: var(--green); color: #fff; font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 4px; }
.boat-card .body { padding: 14px; }
.boat-card .price { font-weight: 800; color: var(--navy); margin-top: 6px; }
.boat-card .price span { font-weight: 400; color: #8a94a6; }

/* RSE */
.rse-banner { background: var(--green-light); border-radius: 6px; padding: 20px 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.rse-banner .eyebrow { color: var(--green); }

/* Filtres catégorie */
.filters-bar { background: var(--pale); padding: 14px 0; }
.filters-bar .filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters-bar select { background: #fff; border: none; border-radius: 4px; padding: 8px 12px; font-size: 12px; font-family: inherit; }

/* Fiche bateau */
.product-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
@media (max-width: 900px) { .product-grid { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 16/10; background: repeating-linear-gradient(45deg, #dbe4ec, #dbe4ec 10px, #ccd8e2 10px, #ccd8e2 20px); border-radius: 6px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; font: 500 12px/1 'JetBrains Mono', monospace; color: #7a8aa0; }
.reservation-panel { border: 1.5px solid #1f4e7a; border-radius: 6px; padding: 20px; position: sticky; top: 20px; }
.reservation-panel .price { font-size: 22px; font-weight: 800; color: var(--navy); }
.features-grid { background: var(--pale); border-radius: 6px; padding: 16px; display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 20px 0; }
@media (max-width: 600px) { .features-grid { grid-template-columns: repeat(2,1fr); } }

/* Formulaire contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }
.form-field { background: #f2f4f7; border: none; border-radius: 4px; padding: 12px 14px; font-family: inherit; font-size: 13px; width: 100%; margin-bottom: 10px; }
.map-placeholder { background: repeating-linear-gradient(45deg, #dbe4ec, #dbe4ec 10px, #ccd8e2 10px, #ccd8e2 20px); border-radius: 6px; min-height: 220px; display: flex; align-items: center; justify-content: center; font: 500 11px/1 'JetBrains Mono', monospace; color: #5a6b80; }

/* Dashboards */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: 60vh; }
@media (max-width: 800px) { .dashboard-layout { grid-template-columns: 1fr; } }
.dashboard-sidebar { background: var(--pale); padding: 24px; }
.dashboard-sidebar nav a { display: block; padding: 10px 12px; border-radius: 4px; color: var(--navy); font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.dashboard-sidebar nav a.active { background: var(--navy); color: #fff; }
.dashboard-main { padding: 32px; }
.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 700px) { .kpi-row { grid-template-columns: repeat(2,1fr); } }
.kpi-card { border: 1px solid var(--border); border-radius: 6px; padding: 14px; background: #fff; }
.kpi-card .value { font-size: 22px; font-weight: 800; color: var(--navy); }
table.data-table { width: 100%; border-collapse: collapse; background: #fff; }
table.data-table th { background: var(--navy); color: #fff; text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
table.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.status-pill { padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.status-confirme { background: var(--green-light); color: var(--green); }
.status-attente { background: #fbeed7; color: #a3711a; }

/* Footer */
.site-footer { background: var(--navy); color: #cfd8e4; padding: 40px 0 0; margin-top: 60px; }
@media (max-width: 480px) { .site-footer { padding: 24px 0 0; } }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 28px; border-bottom: 1px solid #2a3a5c; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 13px; margin-bottom: 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; font-size: 12px; line-height: 2; }
.footer-grid a { color: #cfd8e4; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 11px; flex-wrap: wrap; gap: 8px; }
