/* =========================================
   PETRO MENA ENERGY - Styles Principaux
   ========================================= */

:root {
  --primary-blue: #0033a0;
  --primary-green: #00a651;
  --secondary-blue: #1e5aa8;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --white: #ffffff;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--dark);
  line-height: 1.7;
  overflow-x: hidden;
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; display: block; }

ul { list-style: none; }

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
  padding: 0;
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.12);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-badge {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0,51,160,0.3);
}

.logo-text {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.1;
}

.logo-text strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-blue);
  letter-spacing: 0.5px;
}

.logo-text span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-green);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--dark);
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-blue);
  background: rgba(0,51,160,0.06);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary-green);
  border-radius: 2px;
}

.nav-cta {
  background: var(--primary-blue) !important;
  color: white !important;
  padding: 0.6rem 1.4rem !important;
  border-radius: 50px !important;
  transition: var(--transition) !important;
}

.nav-cta:hover {
  background: var(--primary-green) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,166,81,0.35);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--dark);
  border-radius: 3px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  z-index: 999;
  padding: 1.5rem 2rem;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 3px solid var(--primary-green);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dark);
  border-radius: 8px;
  transition: var(--transition);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--light);
  color: var(--primary-blue);
  padding-left: 1.5rem;
}

/* =========================================
   PAGE HERO (Bannière intérieure)
   ========================================= */
.page-hero {
  margin-top: 80px;
  height: 320px;
  background: linear-gradient(135deg, rgba(0,51,160,0.88), rgba(0,166,81,0.75)),
              url('https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  color: white;
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.breadcrumb a { color: white; transition: opacity 0.2s; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb i { font-size: 0.7rem; }

.page-hero h1 {
  font-size: 2.8rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.25);
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 500px;
}

/* =========================================
   SECTIONS COMMUNES
   ========================================= */
section { padding: 5.5rem 0; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  color: var(--primary-green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.2rem;
  color: var(--primary-blue);
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background: var(--primary-green);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--gray);
  max-width: 580px;
  margin: 2rem auto 0;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Background variants */
.bg-light { background: var(--light); }
.bg-dark { background: var(--dark); color: white; }
.bg-blue { background: var(--primary-blue); color: white; }
.bg-gradient { background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue)); color: white; }

/* =========================================
   BOUTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 4px 15px rgba(0,51,160,0.3);
}

.btn-primary:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,51,160,0.4);
}

.btn-green {
  background: var(--primary-green);
  color: white;
  box-shadow: 0 4px 15px rgba(0,166,81,0.3);
}

.btn-green:hover {
  background: #008f45;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,166,81,0.4);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline-white:hover {
  background: white;
  color: var(--primary-blue);
  border-color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn-outline:hover {
  background: var(--primary-blue);
  color: white;
}

/* =========================================
   CARDS
   ========================================= */
.card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* =========================================
   GRIDS
   ========================================= */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* =========================================
   STATS BAR
   ========================================= */
.stats-bar {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  padding: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
  color: white;
  padding: 1rem;
  border-right: 1px solid rgba(255,255,255,0.15);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary-green);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.85);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo-text strong { color: white; }

.footer-brand p {
  margin: 1.25rem 0 1.5rem;
  font-size: 0.9rem;
  line-height: 1.8;
  opacity: 0.7;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: white;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: white;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary-green);
}

.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }

.footer-links a {
  font-size: 0.88rem;
  opacity: 0.7;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover { opacity: 1; color: var(--primary-green); padding-left: 4px; }

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.contact-item i {
  color: var(--primary-green);
  font-size: 0.9rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  opacity: 0.6;
}

/* =========================================
   ANIMATIONS
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
}

@media (max-width: 768px) {
  .nav-links, .hamburger ~ .nav-links { display: none; }
  .hamburger { display: flex; }

  .page-hero { height: 260px; }
  .page-hero h1 { font-size: 1.9rem; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  section { padding: 4rem 0; }
  .section-title { font-size: 1.8rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 2rem; }
  .page-hero h1 { font-size: 1.6rem; }
  .btn { padding: 0.8rem 1.6rem; font-size: 0.82rem; }
}
