/* ============================================
   STYLE.CSS - BIM Concept
   ============================================ */

/* --- VARIABLES --- */
:root {
    --primary: #2c3e50;
    --secondary: #0056b3;
    --accent: #3498db;
    --orange: #e67e22;
    --light: #f8f9fa;
    --dark: #1a1a1a;
}

/* --- RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

/* --- BODY --- */
body {
    line-height: 1.6;
    color: #333;
    background: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- HEADER --- */
header {
    background: white;
    position: sticky;
    top: 0; left: 0; width: 100%;
    padding: 0.7rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.logo {
    font-size: 1.0rem;
    font-weight: bold;
    color: var(--primary);
    text-transform: uppercase;
}

.logo span { color: var(--accent); }

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

nav a:hover, nav a.active { color: var(--accent); }

/* --- MENU HAMBURGER --- */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary);
    display: block;
}

/* --- MENU MOBILE --- */
.nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    list-style: none;
    text-align: center;
    z-index: 1000;
}

.nav-links li { margin: 15px 0; }

.nav-links.active { display: flex; }

/* --- HERO --- */
.hero {
    position: relative;
    padding: 100px 5% 70px;
    background-image: url('fond-industriel-bim.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 43, 91, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
}

.hero h1 { font-size: 2.8rem; margin-bottom: 15px; }

/* --- MAIN --- */
main { flex: 1; }

.section {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    color: var(--secondary);
    margin-bottom: 25px;
    padding-left: 15px;
    font-size: 1.8rem;
}

.content-block { margin-bottom: 80px; }

.grid-competences {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.text-side { flex: 1; min-width: 300px; }
.image-side { flex: 1; min-width: 300px; }

.image-side img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- FOOTER --- */
footer {
    background: var(--primary);
    color: white;
    padding: 30px 5%;
    text-align: center;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
    letter-spacing: 1px;
}

/* --- TABLEAUX --- */
.table-container {
    overflow-x: auto;
    margin-top: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    border: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) { background: var(--light); }
tr:hover { background: #eaf3fb; }

.badge {
    background: var(--orange);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
}

.badge-fisa {
    background: var(--orange);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
}

/* --- GRILLE DE FORMATIONS --- */
.formation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.formation-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.formation-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(44, 62, 80, 0.15);
    border-color: var(--orange);
}

.formation-card i {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    transition: 0.3s;
}

.formation-card:hover i {
    color: var(--orange);
    transform: scale(1.1);
}

.formation-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.formation-card::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 0;
    height: 5px;
    background: var(--orange);
    transition: 0.4s;
}

.formation-card:hover::after { width: 100%; }

/* --- MODALES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 40px;
    border-left: 8px solid var(--orange);
    width: 60%;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
    animation: modalFadeIn 0.4s;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover { color: var(--orange); }
.modal h2 { color: var(--primary); margin-bottom: 15px; }
.modal ul { margin-left: 20px; }
.modal li { margin-bottom: 10px; }

@keyframes modalFadeIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- PAGE CONTACT --- */
.formulaire {
    padding: 40px 5%;
    max-width: 1100px;
    margin: 0 auto;
}

.adresse {
    padding: 40px 5%;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

#map {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
}

.formbox {
    background: var(--light);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.formrow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--primary);
}

.btn-orange {
    background: var(--orange);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    width: 100%;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-orange:hover { background: #d35400; }

/* --- RESPONSIVE CONTACT --- */
@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
    .formrow { grid-template-columns: 1fr; }
}

/* --- TITRES H3 --- */
h3 {
    color: var(--primary);
    margin-bottom: 25px;
    border-left: 5px solid var(--accent);
    padding-left: 15px;
    font-size: 1.5rem;
}

/* --- GRILLE DE CARTES INTERACTIVES --- */
.gstar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gstar-card {
    background: white;
    max-width: 100%;
    height: auto;
    padding: 10px 5px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.gstar-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(44, 62, 80, 0.15);
    border-color: var(--orange);
}

.gstar-card i {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    transition: 0.3s;
}

.gstar-card:hover i {
    color: var(--orange);
    transform: scale(1.1);
}

.gstar-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.gstar-card::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 0;
    height: 5px;
    background: var(--orange);
    transition: 0.4s;
}

.gstar-card:hover::after { width: 100%; }

/* --- GRILLES D'IMAGES --- */
.image-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    width: 100%;
}

.image-row img {
    max-width: 100%;
    height: auto;
    flex: 1;
    min-width: 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    object-fit: contain;
}

.image-norm img {
    max-width: 100%;
    height: auto;
    flex: 1;
    min-width: 0;
    border-radius: 8px;
    object-fit: contain;
}

/* --- PAGES D'ERREUR --- */
	.error-section {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		padding: 80px 5%;
		min-height: 60vh;
	}

	.error-code {
		font-size: 8rem;
		font-weight: 900;
		color: #e2e8f0;
		line-height: 1;
		margin-bottom: 10px;
		letter-spacing: -5px;
	}

	.error-code span {
		color: var(--orange);
	}

	.error-title {
		font-size: 2rem;
		color: var(--primary);
		margin-bottom: 15px;
		font-weight: 700;
	}

	.error-message {
		font-size: 1.1rem;
		color: #64748b;
		max-width: 500px;
		margin-bottom: 40px;
		line-height: 1.8;
	}

	.error-actions {
		display: flex;
		gap: 15px;
		flex-wrap: wrap;
		justify-content: center;
	}

	.btn-home {
		background: var(--primary);
		color: white;
		padding: 14px 35px;
		border-radius: 5px;
		text-decoration: none;
		font-weight: bold;
		font-size: 1rem;
		transition: 0.3s;
	}

	.btn-home:hover {
		background: var(--secondary);
	}

	.btn-contact {
		background: var(--orange);
		color: white;
		padding: 14px 35px;
		border-radius: 5px;
		text-decoration: none;
		font-weight: bold;
		font-size: 1rem;
		transition: 0.3s;
	}

	.btn-contact:hover {
		background: #d35400;
	}

	.error-divider {
		width: 60px;
		height: 4px;
		background: var(--orange);
		margin: 20px auto 30px;
		border-radius: 2px;
	}

/* --- RESPONSIVE MOBILE (< 768px) --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .menu-toggle { display: flex; }
    nav { display: none; }
}

@media (max-width: 600px) {
    .gstar-grid { flex-direction: column; }
    .gstar-card { flex-direction: column; }
    .image-row { flex-direction: column; }
    .image-row img { width: 100%; }
}
