class SeasonError(Exception):
    """Base exception for the Seasons domain."""


class SeasonValidationError(SeasonError, ValueError):
    """Base exception for invalid Season input."""


class InvalidSeasonDatesError(SeasonValidationError):
    """Raised when season dates are invalid."""


class InvalidSeasonNameError(SeasonValidationError):
    """Raised when a season name is invalid."""


class InvalidSeasonYearError(SeasonValidationError):
    """Raised when a season year is invalid."""


class InvalidSeasonStatusError(SeasonValidationError):
    """Raised when a status or status transition is invalid."""


class InvalidInitialSeasonStatusError(InvalidSeasonStatusError):
    """Raised when a season is created directly in a terminal status."""


class SeasonIntegrityError(SeasonError):
    """Raised when a database invariant prevents a Season operation."""


class SeasonNotFoundError(SeasonError):
    """Raised when a requested season does not exist."""


class SeasonAlreadyExistsError(SeasonError):
    """Base exception for duplicate Season identity."""


class SeasonNameAlreadyExistsError(SeasonAlreadyExistsError):
    """Raised when a season with the same name already exists."""


class SeasonYearAlreadyExistsError(SeasonAlreadyExistsError):
    """Raised when a season with the same year already exists."""


class SeasonAlreadyActiveError(SeasonError):
    """Raised when another active season already exists."""


class SeasonNotActiveError(SeasonError):
    """Raised when an operation requires an active season."""


class SeasonAlreadyCompletedError(SeasonError):
    """Raised when attempting to complete an already completed season."""


class SeasonAlreadyArchivedError(SeasonError):
    """Raised when attempting to archive an already archived season."""


class SeasonOrchestrationError(SeasonError):
    """Base exception for season/competition orchestration."""


class SeasonOrchestrationNotReadyError(SeasonOrchestrationError):
    """Raised when an orchestration prerequisite is not satisfied."""


class SeasonOrchestrationIntegrityError(SeasonOrchestrationError):
    """Raised when persisted orchestration evidence is inconsistent."""


class SeasonOrchestrationConflictError(SeasonOrchestrationError):
    """Raised when another execution is already running."""


class SeasonActivationGateError(SeasonOrchestrationError):
    """Raised when a prepared target season cannot yet be activated."""
