/* ============================================
   CONCOURS BOURSE D'EXCELLENCE - STYLE REFONTE
   ============================================ */

/* Importation des polices modernes */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

/* Variables globales */
:root {
  --primary-red: #D4112C;
  --primary-red-dark: #a00c22;
  --primary-teal: #07706E;
  --primary-teal-light: #0a8a87;
  --primary-teal-dark: #055755;
  --dark-bg: #0A0F1C;
  --gray-bg: #F8F9FC;
  --gray-light: #F0F2F5;
  --gray-border: #E4E7EC;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --white: #FFFFFF;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.02);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-colomn-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-teal);
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  font-weight: 800;
}

.section-colomn-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), var(--primary-teal));
  border-radius: 4px;
}

/* Boutons */
.btn {
  border-radius: 40px !important;
  padding: 12px 32px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  transition: var(--transition) !important;
  letter-spacing: 0.3px;
  border: none !important;
  cursor: pointer;
}

.btn-site {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%) !important;
  color: white !important;
  box-shadow: var(--shadow-sm);
}

.btn-site:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--primary-red-dark) 0%, #8a0a1c 100%) !important;
}

.btn-site:active {
  transform: translateY(0);
}

.btn-warning {
  background: transparent !important;
  border: 1.5px solid var(--gray-border) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
}

.btn-warning:hover {
  background: var(--gray-light) !important;
  border-color: var(--text-light) !important;
  color: var(--text-dark) !important;
  transform: translateY(-2px);
}

/* Sections générales */
section {
  padding: 80px 5%;
}

@media (min-width: 1200px) {
  section {
    padding: 100px 8%;
  }
}

/* Hero Section avec formulaire */
#formulaire-section {
  background: linear-gradient(135deg, #0A0F1C 0%, #1a1f2e 100%);
  position: relative;
  overflow: hidden;
}

#formulaire-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/backgrounds/background.jpg') no-repeat center center/cover;
  opacity: 0.12;
  pointer-events: none;
}

#formulaire-section .container-fluid {
  position: relative;
  z-index: 2;
}

#main-title {
  font-size: 3rem;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  font-weight: 800;
}

#sub-main-title {
  font-size: 1.5rem;
  background: linear-gradient(90deg, var(--primary-red), #ff4d6d);
  display: inline-block;
  padding: 8px 28px;
  border-radius: 40px;
  color: white;
  margin-bottom: 2rem;
  font-weight: 600;
}

.bourse {
  color: #ff6b8a;
  position: relative;
}

#formulaire-inscription {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(2px);
  border-radius: 32px;
  padding: 40px;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
}

#logo-reconu {
  width: 180px;
  margin-bottom: 30px;
}

/* Stepper moderne */
.stepper-horizontal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.stepper-horizontal::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gray-border);
  z-index: 1;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  background: transparent;
}

.circle {
  width: 48px;
  height: 48px;
  background: white;
  border: 2px solid var(--gray-border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: var(--transition);
  background: white;
}

.step.completed .circle {
  background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-light));
  border-color: var(--primary-teal);
  color: white;
  box-shadow: 0 4px 12px rgba(7, 112, 110, 0.3);
}

.step.active .circle {
  background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
  border-color: var(--primary-red);
  color: white;
  box-shadow: 0 4px 12px rgba(212, 17, 44, 0.3);
}

.step h5 {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* Formulaires */
.form-group label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.form-control, select.form-control {

    width: 100% !important;           /* Prend toute la largeur du parent */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;          /* Ajoute des "..." si trop long, mais mieux vaut éviter */
    white-space: nowrap;       

  border-radius: 16px;
  border: 1.5px solid var(--gray-border);
  font-size: 0.95rem;
  transition: var(--transition);
  background: white;
}

.form-control:focus, select.form-control:focus {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(7, 112, 110, 0.1);
  outline: none;
}

/* Radio buttons */
.form-check-input {
  width: 18px;
  height: 18px;
  margin-top: 0;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary-teal);
  border-color: var(--primary-teal);
}

.form-check-label {
  margin-left: 8px;
  cursor: pointer;
}

/* Messages d'erreur */
#error-messages, #error-messages2 {
  font-size: 0.85rem;
  margin-top: 20px;
  padding: 12px;
  border-radius: 16px;
  background: #FFF5F5;
  color: var(--primary-red);
}

.text-danger {
  color: var(--primary-red) !important;
  font-size: 0.75rem;
  margin-top: 6px;
  display: block;
}

.input-error {
  border-color: var(--primary-red) !important;
}

/* Sections d'information */
#apropos_section, .section-info {
  background: var(--white);
}

#apropos_section:nth-of-type(even) {
  background: var(--gray-bg);
}

.article-img {
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  width: 100%;
  height: auto;
  object-fit: cover;
}

.article-img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.section-paragraph {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.lire_suit {
  color: var(--primary-red);
  font-weight: 600;
  cursor: pointer;
  margin-left: 5px;
}

.lire_suit:hover {
  text-decoration: underline;
}

/* Section Concours */
#concours-section {
  background: linear-gradient(115deg, var(--primary-teal) 0%, var(--primary-teal-dark) 100%);
  color: white;
  clip-path: polygon(0% 12%, 100% 0%, 100% 88%, 0% 100%);
}

#concours-section h1 {
  color: white;
}

#concours-section h1::after {
  background: white;
}

#concours-section .section-paragraph {
  color: rgba(255,255,255,0.9);
}

/* Section vidéo */
.embed-responsive {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.embed-responsive iframe {
  border-radius: 24px;
}

/* Statistiques */
#statistique-section {
  background: linear-gradient(115deg, #0A0F1C 0%, #1a1f2e 100%);
  color: white;
}

.school-content {
  text-align: center;
  padding: 24px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 28px;
  backdrop-filter: blur(5px);
  transition: var(--transition);
  height: 100%;
}

.school-content:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.1);
}

.content-icon {
  font-size: 2.5rem;
  color: var(--primary-red);
}

.content-number {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 12px 0;
  background: linear-gradient(135deg, white, var(--text-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.content-text {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Filières - accordéon modernisé */
#filiere-section {
  background: var(--gray-bg);
}

.main-filiere {
  background: white;
  border-radius: 60px;
  padding: 16px 28px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  color: var(--text-dark);
}

.main-filiere:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.main-filiere .fa-chevron-circle-down {
  transition: transform 0.3s;
  color: var(--primary-teal);
  font-size: 1.2rem;
}

.main-filiere[aria-expanded="true"] .fa-chevron-circle-down,
.main-filiere.collapsed .fa-chevron-circle-down {
  transform: rotate(0deg);
}

.main-filiere:not(.collapsed) .fa-chevron-circle-down {
  transform: rotate(180deg);
}

.collapse.show {
  background: white;
  border-radius: 24px;
  margin-top: -8px;
  margin-bottom: 20px;
  padding: 20px 28px;
  box-shadow: var(--shadow-sm);
}

.sub-filiere {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-border);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.sub-filiere:last-child {
  border-bottom: none;
}

/* Couleurs des bordures de catégories */
#informatique-collapse-btn { border-left: 5px solid #FEA400; }
#management-collapse-btn { border-left: 5px solid #2C96D6; }
#industriel-collapse-btn { border-left: 5px solid #70A41D; }
#cp-collapse-btn { border-left: 5px solid var(--primary-red); }
#ci-collapse-btn { border-left: 5px solid var(--primary-teal); }

/* Partenaires */
#partenaire-section {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
  color: white;
}

#partenaire-section h1 {
  color: white;
}

#partenaire-section h1::after {
  background: white;
}

.img-partenaire {
  max-width: 140px;
  filter: brightness(0) invert(1);
  transition: var(--transition);
  opacity: 0.85;
  margin: 15px;
}

.img-partenaire:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Footer */
#footer-section {
  background: var(--dark-bg);
  color: var(--text-light);
  padding: 60px 5%;
}

#footer-logo {
  width: 160px;
  margin-bottom: 20px;
}

#footer-section a {
  color: var(--text-light);
  transition: var(--transition);
}

#footer-section a:hover {
  color: var(--primary-red);
  text-decoration: none;
}

.social-icon {
  font-size: 1.8rem;
  margin-right: 18px;
  display: inline-block;
}

.footer-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: white;
}

.footer-divider {
  width: 50px;
  height: 3px;
  background: var(--primary-red);
  margin-bottom: 20px;
}

.footer-filier {
  margin-bottom: 10px;
}

.footer-filier a {
  color: var(--text-light);
}

.footer-filier a:hover {
  color: var(--primary-red);
}

/* Responsive Design */
@media (max-width: 991px) {
  .stepper-horizontal {
    flex-direction: column;
    gap: 20px;
  }
  .stepper-horizontal::before {
    display: none;
  }
  .step {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  .circle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  .step h5 {
    margin: 0;
    font-size: 0.9rem;
  }
  #main-title {
    font-size: 2.2rem;
  }
  #sub-main-title {
    font-size: 1.2rem;
  }
  .section-colomn-title {
    font-size: 1.75rem;
  }
  .article-img {
    margin-bottom: 30px;
  }
  .school-content {
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 50px 20px;
  }
  #formulaire-inscription {
    padding: 25px;
  }
  .main-filiere {
    font-size: 0.9rem;
    padding: 12px 20px;
  }
  .sub-filiere {
    font-size: 0.85rem;
  }
  .content-number {
    font-size: 2rem;
  }
  .img-partenaire {
    max-width: 100px;
  }
  .btn {
    padding: 10px 24px !important;
  }
}

@media (max-width: 576px) {
  #main-title {
    font-size: 1.8rem;
  }
  #sub-main-title {
    font-size: 1rem;
    padding: 6px 20px;
  }
  .section-colomn-title {
    font-size: 1.4rem;
  }
  .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 12px;
    text-align: center;
  }
  .btn {
    width: 100%;
  }
  .stepper-horizontal .step {
    flex-direction: column;
    text-align: center;
  }
  .circle {
    margin-bottom: 5px;
  }
  .form-group {
    margin-bottom: 1rem;
  }
  #concours-section {
    clip-path: polygon(0% 6%, 100% 0%, 100% 94%, 0% 100%);
  }
}

/* Animation WOW.js */
.wow {
  visibility: hidden;
}

.animated {
  animation-duration: 0.8s;
}

/* Ajustements pour intl-tel-input */
.iti {
  width: 100%;
  display: block;
}

.iti__flag-container {
  border-radius: 16px 0 0 16px;
}

/* Amélioration des sélecteurs */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* Scroll to top button (optionnel, mais peut être ajouté) */
html {
  scroll-behavior: smooth;
}

/* Captcha styling */
.g-recaptcha {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}


.custom-control.custom-checkbox {
    margin: 20px 0;
}
.custom-control-label a {
    color: var(--primary-red);
    text-decoration: underline;
}