/* Daniel — front public (couche sur Bootstrap 5).
   Couleurs via variables CSS injectées par le thème (D-13). */

/* Police auto-hébergée : Open Sans (OFL), rendu net et léger, identique sur tous les OS. */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/fonts/open-sans/open-sans-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/fonts/open-sans/open-sans-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/fonts/open-sans/open-sans-latin-700.woff2") format("woff2"); }

:root {
    --color-bg: #e6e6e6;
    --color-text: #7a7a7a;
    --color-link: #337ab7;
    --color-link-hover: #23527c;
    --color-header-bg: #a6a8a9;
    --color-header-border: #8f9193;
    --color-menu-text: #444444;
    --color-accent: #e2041a;
    --color-submenu-bg: #ffffff;
    --color-submenu-hover-bg: #f4f4f4;
    --color-footer-bg: #a6a8a9;
    --color-hover: #4e4e4e;
}

body {
    background: var(--color-bg);
    color: #1f1f1f;
    font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    /* Sticky footer : le corps occupe au moins toute la hauteur de l'écran. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.container { max-width: 100%; }
@media (min-width: 768px)  { .container { max-width: 750px; } }
@media (min-width: 992px)  { .container { max-width: 970px; } }
@media (min-width: 1200px) { .container { max-width: 1170px; } }
a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); }

/* --- En-tête (sticky, fond = page, filet bas plus sombre) --- */
.site-header { background: var(--color-header-bg); border-bottom: 1px solid var(--color-header-border); position: sticky; top: 0; z-index: 1030; transition: box-shadow .25s ease; }
.site-header.scrolled { box-shadow: 0 2px 10px rgba(0, 0, 0, .07); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; gap: 20px; }
.brand { display: inline-block; line-height: 1.15; }
.brand-name { display: block; font-weight: 700; font-size: 22px; letter-spacing: .5px; color: #333; }
.brand-tagline { display: block; font-size: 13px; color: #4a4a4a; margin-top: 1px; position: relative; top: 2px; }
.brand:hover .brand-name { color: #000; }

/* --- Navigation horizontale (desktop), calée à droite --- */
.main-nav-h ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 30px; }
.main-nav-h > ul > li { position: relative; }
.main-nav-h a { display: block; padding: 8px 0; color: var(--color-menu-text); font-size: 15px; }
.main-nav-h a:hover { color: var(--color-accent); }
.main-nav-h .caret { display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
.main-nav-h .submenu { display: none; position: absolute; right: 0; top: 100%; min-width: 210px; background: var(--color-submenu-bg); border: 1px solid #ddd; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); padding: 6px 0; z-index: 1040; }
.main-nav-h .has-sub:hover .submenu, .main-nav-h .has-sub:focus-within .submenu { display: block; }
.main-nav-h .submenu a { padding: 8px 18px; white-space: nowrap; font-size: 14px; }
.main-nav-h .submenu a:hover { color: var(--color-accent); background: var(--color-submenu-hover-bg); }

/* --- Hamburger (affiché seulement sous le breakpoint, via media query injectée) --- */
.menu-toggle { display: none; align-items: center; justify-content: center; flex-direction: column; background: transparent; border: 0; width: 44px; height: 38px; padding: 7px; cursor: pointer; }
.menu-toggle span { display: block; width: 100%; height: 3px; background: #444; margin: 3px 0; border-radius: 2px; }

/* --- Menu off-canvas (mobile) --- */
.main-menu { background: #fff; }
/* Le menu ne prend que la hauteur de son contenu (pas plein écran), ancré en haut à droite. */
.main-menu.offcanvas-end { height: auto; bottom: auto; max-height: 100dvh; border-bottom-left-radius: 12px; box-shadow: -4px 6px 22px rgba(0, 0, 0, .14); }
.main-menu .offcanvas-body { overflow-y: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li { border-bottom: 1px solid #eee; }
.main-nav a { display: block; padding: 12px 4px; color: #444; font-size: 17px; }
.main-nav a:hover { color: var(--color-accent); background: var(--color-submenu-hover-bg); }
.main-nav .nav-label { padding: 12px 4px 6px; color: #8f8f8f; font-size: 15px; font-weight: 400; border-bottom: 0; }
.main-nav .nav-sub { margin-left: 20px; }
.main-nav .nav-sub a { font-size: 15px; }

.page-main { flex: 1 0 auto; padding: clamp(32px, 6vw, 60px) 20px 70px; }

/* --- Accueil : intro + tuiles --- */
.home-intro { margin-bottom: 30px; }
.home-intro p { margin: 0 0 10px; }
.home-intro hr { border: 0; border-top: 1px solid rgba(0, 0, 0, .28); margin: 22px 0; }
.home-bio { margin: 0; }
.section-title { font-size: 16px; color: var(--color-text); margin: 10px 0 20px; }

.folder-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: start;
}
@media (max-width: 1000px) { .folder-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .folder-grid { grid-template-columns: 1fr; } }

.folder-item { position: relative; display: block; }
.folder-cover { display: block; width: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
.folder-cover--empty { background: #d9d9d9; }
.folder-label {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: #7a7a7a; color: #fff;
    padding: 4px 8px; text-align: right; font-size: 14px;
}
.folder-item:hover .folder-label { background: var(--color-hover); }

/* --- Fil d'Ariane + galerie --- */
.breadcrumb-nav { padding: 20px 0 30px; font-size: 10px; color: var(--color-text); }
.breadcrumb-nav a { color: var(--color-breadcrumb-link, #7a7a7a); }
.breadcrumb-nav a:hover { color: var(--color-breadcrumb-link, #7a7a7a); text-decoration: underline; }
.breadcrumb-nav .current { color: var(--color-breadcrumb-current, #5a5a5a); }
.breadcrumb-nav .sep { padding: 0 5px; color: var(--color-breadcrumb-link, #7a7a7a); opacity: .55; }
.gallery-title { font-size: 20px; margin: 0 0 16px; color: var(--color-gallery-title, #5a5a5a); }
.gallery-intro { margin-bottom: 24px; }
.page-content { max-width: 760px; }
.page-content h1, .page-content h2, .page-content h3 { color: #5a5a5a; }

/* --- Contact --- */
.contact-layout { display: flex; gap: 44px; align-items: flex-start; }
.contact-main { flex: 1 1 auto; min-width: 0; max-width: 620px; }
.contact-aside { flex: 0 0 320px; }
.contact-aside img { width: 100%; height: auto; display: block; border-radius: 6px; }
@media (max-width: 820px) { .contact-aside { display: none; } }
.contact-intro { max-width: 620px; margin: 0 0 30px; color: var(--color-text); font-size: 16px; line-height: 1.6; }
.contact-actions { text-align: right; }
.contact-form { max-width: 620px; }
.contact-form .field-row { margin-bottom: 18px; }
.contact-form .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.contact-form .field-grid .field-row { margin-bottom: 0; }
@media (max-width: 560px) { .contact-form .field-grid { grid-template-columns: 1fr; gap: 18px; } }
.contact-form label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 500; color: var(--color-text); }
.contact-form label .req { color: #d0454c; }
.contact-form label .opt { color: #9aa0a6; font-weight: 400; font-size: 13px; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form input[type=tel], .contact-form textarea {
    width: 100%; padding: 11px 13px; border: 1px solid #d3d6db; border-radius: 6px; font-size: 15px; font-family: inherit;
    color: #2f3237; background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #aab0b7; }
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--color-link);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-link) 18%, transparent);
}
.contact-form textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-submit {
    display: inline-flex; align-items: center; gap: 8px; background: #6e7072; color: #fff; border: 0;
    padding: 12px 28px; border-radius: 6px; cursor: pointer; font-size: 15px; font-weight: 500;
    transition: background-color .15s ease, transform .05s ease;
}
.contact-submit:hover { background: var(--color-hover); }
.contact-submit:active { transform: translateY(1px); }
.contact-success { background: #e7f6ec; border: 1px solid #aedcbd; color: #1c6b3a; padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; }
.contact-errors { background: #fde8e8; border: 1px solid #f5b5b5; color: #9b1c1c; padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; }
.contact-errors div + div { margin-top: 4px; }

/* --- Grille d'images : cadre 3:2 uniforme, œuvre entière, remplissage = fond de page (pas de blanc) --- */
.portfolio-grid::after { content: ""; display: table; clear: both; }
.portfolio-item {
    box-sizing: border-box;
    width: 25%;
    float: left;
    padding: 0 20px 20px;
    margin-bottom: 25px;
}
.portfolio-item picture { position: relative; display: block; padding-top: 66.5%; overflow: hidden; }
.portfolio-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .3s ease-in-out; }
.portfolio-item:hover img { transform: scale(1.2); }
@media (max-width: 1000px) { .portfolio-item { width: 50%; } }
@media (max-width: 450px)  { .portfolio-item { width: 100%; } }

.empty { color: #999; padding: 20px 0; }

/* --- Lightbox (GLightbox) : tout en noir, image avec marge 15px, légende fine sur noir --- */
.goverlay { background: #000 !important; }
.glightbox-clean .gslide-image img { box-sizing: border-box; border: 30px solid #000; border-bottom-width: 0; background: #000; box-shadow: none; }
.glightbox-clean .gslide-description { background: #000; box-shadow: none; }
.glightbox-clean .gdesc-inner { padding: 4px 30px 30px; }
.glightbox-clean .gslide-title { color: #aaa; font-size: 12px; line-height: 1.3; margin: 0; }
.glightbox-clean .gslide-desc { color: #888; }

/* --- Pied de page : marque à gauche, bloc « Travaux » + galeries à droite --- */
.site-footer { background: var(--color-footer-bg); color: #fff; margin-top: 40px; flex-shrink: 0; font-size: 12px; font-weight: 400; }
.footer-grid { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 26px 50px; padding: 30px 20px 10px; }
.site-footer h3 { font-size: 12px; font-weight: 400; margin: 0 0 8px; line-height: 1.5; }
.footer-brand { flex: 0 0 auto; }
.footer-works { flex: 0 1 auto; display: flex; align-items: flex-start; justify-content: flex-end; gap: 30px; margin-top: 26px; }
.footer-works-title { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.footer-gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; gap: 0 40px; flex: 0 1 720px; }
@media (max-width: 1000px) { .footer-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
    .footer-grid { flex-direction: column; }
    .footer-works { flex-direction: column; align-self: stretch; justify-content: flex-start; gap: 8px; margin-top: 0; }
    .footer-gallery-grid { flex: 1 1 auto; width: 100%; margin-left: 16px; }
}
@media (max-width: 420px) { .footer-gallery-grid { grid-template-columns: 1fr; } }
.footer-links { list-style: none; margin: 0; padding: 0; line-height: 1.5; }
.footer-links a { font-weight: 400; color: rgba(255,255,255,.82); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.footer-links a:hover { color: #fff; }
.footer-links li { margin-bottom: 6px; }
.footer-bottom { padding: 10px 20px 22px; font-size: 12px; opacity: .85; text-align: center; }
.footer-bottom a { color: #fff; text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }
.footer-sep { margin: 0 8px; opacity: .55; }
