/* ==========================================================================
   Tanganyika Tour — application de la charte graphique au site public
   (voir D:\SITE WEB\TANGANYIKA TOUR - IDENTITE VISUELLE\CHARTE-GRAPHIQUE.pdf)
   Chargé après style.css et front.css, uniquement par layouts/app.blade.php.
   ========================================================================== */

/* ---------- 1. Couleurs de la charte appliquées aussi aux anciens composants (style.css) ---------- */
body.tg-site {
    --primary-color: #133a26;   /* Vert Forêt */
    --primary-light: #2f6b43;
    --primary-dark: #0c2618;    /* Vert Nuit */
    --secondary-color: #d4a373; /* Ocre */
    --secondary-light: #f3e4cf;
    --accent-color: #c9600a;    /* Orange Soleil */
    --accent-hover: #ad5208;
    --light-bg: #f7f2ea;        /* Sable */
    --text-main: #33433a;
    --text-muted: #66756c;      /* Gris Brousse */
    --border-color: #e7e0d3;
    --shadow-premium: 0 18px 40px rgba(19, 58, 38, .14);
    --radius-md: 16px;

    /* Motif « Vagues » (blanc 7 %) et variante orange pour fonds clairs */
    --tg-waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='40'%3E%3Cpath d='M0 20 Q20 8 40 20 T80 20 T120 20 T160 20' fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='3'/%3E%3C/svg%3E");
    --tg-waves-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='40'%3E%3Cpath d='M0 20 Q20 8 40 20 T80 20 T120 20 T160 20' fill='none' stroke='%23c9600a' stroke-opacity='.08' stroke-width='3'/%3E%3C/svg%3E");
    --tg-wave-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0 6 Q10 0 20 6 T40 6 T60 6 T80 6 T100 6 T120 6' fill='none' stroke='%23c9600a' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
    --tg-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='12 14 36 34'%3E%3Cpath d='M12 44c10-2 18-8 24-18l-6-2 16-8-2 18-5-4c-6 10-14 15-27 14z' fill='%23c9600a'/%3E%3C/svg%3E");
}

/* Utilitaires de marque */
.tg-waves { background-image: var(--tg-waves); }
.tg-waves-sun { background-image: var(--tg-waves-sun); }

/* ---------- 2. Bandeau de page (composant <x-page-hero>) ---------- */
.tg-page-hero {
    position: relative; overflow: hidden; isolation: isolate;
    background: linear-gradient(180deg, #133a26, #0c2618);
    color: #fff; text-align: center;
    padding: 76px 0 68px;
}
.tg-page-hero::before { /* motif Vagues */
    content: ''; position: absolute; inset: 0; z-index: -1;
    background-image: var(--tg-waves);
}
.tg-page-hero--photo {
    background:
        linear-gradient(90deg, rgba(12, 38, 24, .94) 0%, rgba(19, 58, 38, .78) 45%, rgba(19, 58, 38, .45) 100%),
        var(--tg-hero-img) center / cover no-repeat;
}
.tg-page-hero__arrow {
    position: absolute; z-index: -1; right: -40px; bottom: -70px;
    width: min(440px, 55vw); fill: #c9600a; opacity: .14; pointer-events: none;
}
.tg-page-hero__inner { position: relative; max-width: 860px; }
.tg-page-hero__kicker {
    margin: 0 0 14px; font: 700 .76rem/1 var(--tg-font-ui); letter-spacing: .3em; text-transform: uppercase; color: #f3a65a;
}
body.tg-site .tg-page-hero__title {
    margin: 0; color: #fff; font: 800 clamp(2rem, 4.2vw, 3.1rem)/1.12 var(--tg-font-display); letter-spacing: -.01em;
}
.tg-page-hero__wave { display: block; width: 96px; height: 12px; margin: 18px auto 0; fill: none; stroke: #f3a65a; stroke-width: 3; stroke-linecap: round; }
.tg-page-hero__sub { margin: 18px auto 0; max-width: 680px; color: #d7e2d9; font-size: 1.08rem; line-height: 1.65; }
.tg-page-hero .tg-page-hero__slot { margin-top: 30px; text-align: left; }
@media (max-width: 640px) {
    .tg-page-hero { padding: 52px 0 46px; }
    .tg-page-hero__sub { font-size: 1rem; }
}

/* Le contenu qui suit le bandeau démarre avec un peu d'air */
.tg-page-hero + .container.section,
.tg-page-hero + .section { padding-top: 48px; }

/* ---------- 3. Titres de section : vague orange de la charte au lieu de la barre ---------- */
body.tg-site .section-title { font-weight: 800; color: var(--tg-ink); letter-spacing: -.01em; padding-bottom: 18px; }
body.tg-site .section-title::after {
    width: 96px; height: 12px; border-radius: 0;
    background: var(--tg-wave-line) center / contain no-repeat;
}
body.tg-site .tg-eyebrow { letter-spacing: .3em; font-weight: 700; }

/* ---------- 4. Boutons, cartes et badges des pages intérieures ---------- */
body.tg-site .btn { border-radius: 999px; font-family: var(--tg-font-ui); }
body.tg-site .btn-primary { background: var(--tg-forest); }
body.tg-site .btn-primary:hover { background: #0c2618; box-shadow: 0 8px 20px rgba(19, 58, 38, .25); }
body.tg-site .btn-accent { background: var(--tg-sun); }
body.tg-site .btn-accent:hover { background: #ad5208; box-shadow: 0 8px 20px rgba(201, 96, 10, .3); }
body.tg-site .btn-outline { border-width: 1.5px; border-color: var(--tg-forest); color: var(--tg-forest); }
body.tg-site .btn-outline:hover { background: var(--tg-forest); color: #fff; }

body.tg-site .card { border-radius: var(--tg-radius); border-color: var(--tg-line); box-shadow: var(--tg-shadow-sm); }
body.tg-site .card:hover { transform: translateY(-6px); box-shadow: var(--tg-shadow-lg); }
body.tg-site .card-title { font-weight: 800; color: var(--tg-ink); }
body.tg-site .card-price, body.tg-site .price { color: var(--tg-sun); }

/* Badges : tons de la palette (sable, lac, forêt, soleil) */
body.tg-site .badge { border-radius: 999px; font-weight: 700; letter-spacing: .04em; }
body.tg-site .badge-lake { background: #e3eef1; color: #0e4a5a; }
body.tg-site .badge-beach { background: #f6e9d4; color: #8a5a1c; }
body.tg-site .badge-mountain { background: #e6efe8; color: #133a26; }
body.tg-site .badge-nature { background: #e6efe8; color: #2f6b43; }
body.tg-site .badge-culture { background: #f9e3cf; color: #ad5208; }

/* Champs de formulaire */
body.tg-site .form-control { border-radius: 12px; border-color: var(--tg-line); }
body.tg-site .form-control:focus { border-color: var(--tg-sun); box-shadow: 0 0 0 3px rgba(201, 96, 10, .15); outline: 0; }

/* ---------- 5. Pied de page : motif Vagues + flèche Élan estompée ---------- */
.tg-footer { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, #133a26, #0c2618); }
.tg-footer::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--tg-waves); }
.tg-footer::after {
    content: ''; position: absolute; z-index: -1; right: -60px; top: 40px;
    width: 420px; height: 400px; background: var(--tg-arrow) center / contain no-repeat; opacity: .1;
}

/* ---------- 6. Pages d'authentification et boîtes blanches sur fond sable ---------- */
body.tg-site .auth-box { border-radius: var(--tg-radius-lg); border: 1px solid var(--tg-line); box-shadow: var(--tg-shadow); }
body.tg-site .auth-title { font-weight: 800; color: var(--tg-ink); }

/* Fond sable avec motif discret derrière les pages d'authentification */
.tg-auth-bg { background: var(--tg-sand) var(--tg-waves-sun); }

/* ---------- 7. Bloc « application mobile » (accueil) ---------- */
.tg-app {
    position: relative; overflow: hidden; isolation: isolate;
    background: linear-gradient(180deg, #133a26, #0c2618); color: #d7e2d9;
}
.tg-app::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--tg-waves); }
.tg-app__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
body.tg-site .tg-app h2 { color: #fff; font: 800 clamp(1.9rem, 3.4vw, 2.6rem)/1.15 var(--tg-font-display); margin: 16px 0; }
.tg-app .tg-eyebrow { color: #f3a65a; }
.tg-app p { font-size: 1.05rem; line-height: 1.7; margin: 0 0 26px; }
.tg-app__list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; }
.tg-app__list li { display: flex; gap: 12px; align-items: center; color: #fff; font-weight: 500; }
.tg-app__list i { color: #f3a65a; width: 18px; }
.tg-app__visual img { width: 100%; height: auto; display: block; border-radius: var(--tg-radius-lg); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
@media (max-width: 900px) { .tg-app__grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- 8. Encadré « Investir » de l'accueil : motif Vagues et flèche Élan ---------- */
.tg-invest::after {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: var(--tg-arrow) right -60px bottom -80px / 340px no-repeat, var(--tg-waves);
    opacity: .28;
}
.tg-invest__inner { position: relative; z-index: 1; }
.tg-app__visual { display: flex; justify-content: center; }
.tg-app__visual img { max-width: 500px; }

/* Formulaire de recherche des bateaux : 2 colonnes sur téléphone, bouton pleine largeur */
@media (max-width: 640px) {
    .tg-boat-search { grid-template-columns: 1fr 1fr !important; }
    .tg-boat-search > * { min-width: 0; }
    .tg-boat-search > button { grid-column: 1 / -1; padding: 14px; }
    .tg-page-hero .tg-page-hero__slot > div { padding: 20px !important; }
}

/* Titres de section adaptés à la taille de l'écran */
body.tg-site .section-title { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.2; }

/* ==========================================================================
   9. Téléphone : pages intérieures (beaucoup de mises en page sont écrites
      directement dans les vues ; on les adapte ici pour les petits écrans)
   ========================================================================== */
body.tg-site main img { max-width: 100%; }
.tg-about > *, .tg-mosaic > *, .detail-layout > * { min-width: 0; }

@media (max-width: 640px) {
    /* Grilles en ligne (formulaires, fiches, cartes) : une colonne */
    body.tg-site main [style*="grid-template-columns"]:not(.tg-boat-search) { grid-template-columns: 1fr !important; }
    body.tg-site main [style*="grid-template-columns"] > * { min-width: 0; }

    /* Galerie photos d'une fiche : une photo par écran, on fait défiler au doigt */
    body.tg-site .detail-gallery { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
    body.tg-site .detail-gallery img { min-width: 86% !important; max-width: 86% !important; height: 240px !important; scroll-snap-align: start; }
    body.tg-site .detail-gallery img:only-child { min-width: 100% !important; max-width: 100% !important; }

    /* Grandes images de couverture moins hautes */
    body.tg-site main img[style*="height: 400px"], body.tg-site main img[style*="height: 450px"], body.tg-site main img[style*="height: 500px"] { height: 240px !important; }

    /* Titres écrits en dur dans les fiches : taille adaptée */
    body.tg-site main h1[style*="font-size"] { font-size: 1.75rem !important; line-height: 1.2; }
    body.tg-site main h2[style*="font-size"] { font-size: 1.35rem !important; }

    /* Blocs blancs : moins de marge intérieure */
    body.tg-site .detail-card, body.tg-site main .card[style*="padding"] { padding: 18px !important; }

    /* Boutons faciles à toucher */
    body.tg-site main .btn { min-height: 44px; }
}

/* Chiffres clés de l'accueil sur très petit écran */
.tg-figure { min-width: 0; }
@media (max-width: 380px) {
    .tg-figure { padding-right: 8px; }
    .tg-figure + .tg-figure { padding-left: 10px; }
    .tg-figure strong { font-size: 1.35rem; }
    .tg-figure span { font-size: .78rem; }
}

/* .section (padding: 40px 0) annulait les marges latérales de .container : le texte touchait les bords sur téléphone */
body.tg-site .container { padding-left: 20px; padding-right: 20px; }
@media (max-width: 640px) {
    body.tg-site .container { padding-left: 16px; padding-right: 16px; }
    /* La galerie avait une hauteur fixe de 450 px : espace vide sous les photos */
    body.tg-site .detail-gallery { height: auto !important; border-radius: var(--tg-radius); }
}

/* Carte interactive sur téléphone : la carte avait une hauteur nulle (invisible). Carte en haut, liste dessous. */
@media (max-width: 768px) {
    body.tg-site .interactive-map-container { display: flex; flex-direction: column; height: auto; }
    body.tg-site .map-full { order: -1; height: 62vh; min-height: 340px; flex: 0 0 auto; scroll-margin-top: var(--tg-header-h); }
    body.tg-site .map-sidebar { border-right: 0; border-top: 1px solid var(--tg-line); padding: 20px 16px; }
}

/* Listes de cartes (hôtels, sites, guides…) : la grille exigeait 320 px minimum par carte */
@media (max-width: 640px) {
    body.tg-site .grid-container { grid-template-columns: 1fr; gap: 20px; }
}

/* Bandeaux photo : version 960 px (3 à 4 fois plus légère) sur téléphone et tablette */
@media (max-width: 960px) {
    .tg-page-hero--photo {
        background-image:
            linear-gradient(90deg, rgba(12, 38, 24, .94) 0%, rgba(19, 58, 38, .78) 45%, rgba(19, 58, 38, .45) 100%),
            var(--tg-hero-img-sm, var(--tg-hero-img));
    }
}
