/* =========================================================================
   1ʳᵉ Compagnie d’Arc – Sarrebourg
   Feuille de style principale
   Fichier  : assets/css/styles.css
   Date     : 14/06/2025
   Version  : 1.4
   Description :
   - Styles globaux (variables, typographie, composants Bootstrap, layout générique).
   - Les blocs spécifiques « Technique » et « Calendrier » sont externalisés
   ========================================================================= */

/* ────────────────────────────────────────────────────────────────────────────
   Variables globales
   ─────────────────────────────────────────────────────────────────────────*/
:root {
    --bs-primary: #198754; /* Vert principal (équivalent .btn-success Bootstrap) */
    --carousel-h: 60vh;    /* Hauteur visible du carrousel (desktop)          */
}

/* Hauteur de carrousel ajustée sur mobile (< 768 px) */
@media (max-width: 767.98px) {
    :root {
        --carousel-h: 40vh;
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   Base typographique & comportement
   ─────────────────────────────────────────────────────────────────────────*/
html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    background-color: var(--bs-primary);
    color: #ffffff;
}

/* ────────────────────────────────────────────────────────────────────────────
   NAVBAR
   ─────────────────────────────────────────────────────────────────────────*/
.navbar {
    background-color: transparent !important; /* Transparence totale */
    z-index: 1000;                            /* Au‑dessus du reste  */
}

.navbar-brand sup {
    font-size: 0.6em;
}

.navbar .nav-link,
.navbar .navbar-brand {
    color: #ffffff !important;
    transition: color 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .navbar-brand:hover {
    color: #e2e6ea !important; /* Gris très clair au survol */
    font-weight: bold;         /* Gras au survol            */
}

/* Menu déroulant */
.dropdown-menu {
    background-color: #ffffff;
    border-radius: 0.25rem;
}

.dropdown-menu .dropdown-item {
    color: #212529;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: #f8f9fa;
    color: #000000;
}
/* Bouton "burger" */
.navbar-toggler {
  	border-color: #fff; 
	border: 2px solid #fff;    
}

.navbar-dark .navbar-toggler-icon {
	background-image:
		linear-gradient(#fff, #fff),
		linear-gradient(#fff, #fff),
		linear-gradient(#fff, #fff);
	background-size: 100% 2px, 100% 2px, 100% 2px;
	background-position: center 5px, center 11px, center 17px;
	background-repeat: no-repeat;
}

/* ────────────────────────────────────────────────────────────────────────────
   CARROUSEL
   ─────────────────────────────────────────────────────────────────────────*/
.carousel-custom,
.carousel-custom .carousel-inner,
.carousel-custom .carousel-item,
.carousel-custom .carousel-item img {
    height: var(--carousel-h);
}

.carousel-custom {
    overflow: hidden;
    border-radius: 1rem;
}

.carousel-custom .carousel-item img {
    object-fit: cover;
}

.carousel-caption {
    bottom: 15%;
}

.carousel-caption h1,
.carousel-caption h2,
.carousel-caption p {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Légende en haut à droite */
.carousel-caption.top-right {
    top: 1.5rem;
    right: 1.5rem;
    left: auto;
    bottom: auto;
    text-align: left;
}

.carousel-dark .carousel-caption {
    color: #ffffff;
}

/* ────────────────────────────────────────────────────────────────────────────
   SECTIONS génériques
   ─────────────────────────────────────────────────────────────────────────*/
section {
    scroll-margin-top: 4rem; /* Ancre douce sous la navbar */
}

section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Images dans les cartes « cours » */
#cours .card-img-top {
    object-fit: cover;
    height: 220px;
}

/* ────────────────────────────────────────────────────────────────────────────
   Progress‑bar Adhésion
   ─────────────────────────────────────────────────────────────────────────*/
.progress {
    background-color: #e9ecef;
}

.progress-bar {
    font-weight: 700;
    font-size: 1rem;
}

/* ────────────────────────────────────────────────────────────────────────────
   Accordéon Valeurs
   ─────────────────────────────────────────────────────────────────────────*/
.accordion-button:not(.collapsed) {
    color: #ffffff;
    background-color: var(--bs-primary);
}

/* ────────────────────────────────────────────────────────────────────────────
   Bouton success (survol plus sombre)
   ─────────────────────────────────────────────────────────────────────────*/
.btn-success {
    --bs-btn-hover-bg: #157347;
}

/* ────────────────────────────────────────────────────────────────────────────
   Conteneur principal
   ─────────────────────────────────────────────────────────────────────────*/
.content-wrapper {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0.5rem auto;
    max-width: calc(100% - 2rem);
    color: #212529;
    padding: 2rem 1rem;
}

/* Ajustement du conteneur sur mobile */
@media (max-width: 767.98px) {
    .content-wrapper {
        max-width: calc(100% - 1rem);
    }
}

/* ────────────────────────────────────────────────────────────────────────────
   Footer
   ─────────────────────────────────────────────────────────────────────────*/
footer {
    background-color: transparent;
    padding: 2rem 0;
}

/* ────────────────────────────────────────────────────────────────────────────
   Section Nav secondaire
   ─────────────────────────────────────────────────────────────────────────*/
#sectionNav .nav-link {
    color: #16530B !important; /* Texte vert foncé */
    font-weight: 500;
    transition: color 0.2s;
}

#sectionNav .nav-link:hover,
#sectionNav .nav-link:focus {
    color: #000000 !important; /* Texte noir au survol */
    text-decoration: underline;
}

/* Ligne fixe + scroll horizontal quel que soit l’écran */
#sectionNav .navbar-nav {
    display: flex !important;          /* Forcer le flex */
    flex-direction: row !important;    /* Toujours à l’horizontale */
    flex-wrap: nowrap;                 /* Pas de retour à la ligne */
    overflow-x: auto;                  /* Scroll horizontal si besoin */
    -webkit-overflow-scrolling: touch; /* Inertie sous iOS */
}

#sectionNav .nav-item {
    flex: 0 0 auto; /* Chaque item conserve sa largeur */
}

/* ────────────────────────────────────────────────────────────────────────────
   Bouton « Retour en haut »
   ─────────────────────────────────────────────────────────────────────────*/
#btnTop {
    position: fixed;
    bottom: 1.5rem;
    right: 4rem;
    display: none;              /* Caché par défaut */
    z-index: 1050;              /* Au‑dessus de tout */
    background: var(--bs-primary);
    color: #ffffff;
    border: none;
    padding: 0.6rem 0.8rem;
    border-radius: 0.25rem;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s;
}

#btnTop:hover {
    opacity: 0.8;
}

/* ────────────────────────────────────────────────────────────────────────────
   Logo dans le header
   ─────────────────────────────────────────────────────────────────────────*/
.logo-circle {
    background-color: #ffffff; /* Fond blanc du cercle    */
    width: 4.5rem;             /* Diamètre du cercle      */
    height: 4.5rem;
    border-radius: 50%;
    overflow: hidden;          /* Masque les débordements */
    flex-shrink: 0;            /* Ne pas rétrécir         */
}

.logo-img {
    max-width: 95%;            /* L’image occupe 95 % du cercle */
    max-height: 95%;
    object-fit: contain;
}

